kpresenter

KPrMarginWidget.h
1/* This file is part of the KDE project
2 Copyright (C) 2005 Thorsten Zachmann <zachmann@kde.org>
3
4 The code is mostly a copy from kword/framedia.h
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
15
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
20*/
21#ifndef KPMARGINWIDGET_H
22#define KPMARGINWIDGET_H
23
24#include <tqwidget.h>
25
26#include <KoUnit.h>
27
28class MarginUI;
29
30class KPrMarginWidget : public TQWidget
31{
32 TQ_OBJECT
33
34public:
35 KPrMarginWidget( TQWidget *parent, const char *name, const KoUnit::Unit unit );
36 ~KPrMarginWidget();
37
38 bool changed() const { return m_changed; }
39 void resetChanged() { m_changed = false; }
40
41 void setValues( double left, double right, double top, double bottom ); // in pt
42 double leftValue() const; // in pt
43 double rightValue() const; // in pt
44 double topValue() const; // in pt
45 double bottomValue() const; // in pt
46
47private:
48 MarginUI *m_ui;
49 KoUnit::Unit m_unit;
50 bool m_changed;
51 bool m_noSignal;
52
53protected slots:
54 void slotValueChanged( double );
55};
56
57#endif /* KPMARGINWIDGET_H */