kpresenter
KPrGeneralProperty.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef GENERALPROPERTY_H
00021 #define GENERALPROPERTY_H
00022
00023 #include <qwidget.h>
00024 #include <global.h>
00025
00026 #include <KoRect.h>
00027 #include <KoUnit.h>
00028
00029 class KoGeneralPropertyUI;
00030
00031 class KPrGeneralProperty : public QWidget
00032 {
00033 Q_OBJECT
00034 public:
00035 struct GeneralValue
00036 {
00037 GeneralValue()
00038 {}
00039 QString m_name;
00040 PropValue m_keepRatio;
00041 PropValue m_protect;
00042 KoRect m_rect;
00043 };
00044
00045 enum GeneralConfigChange
00046 {
00047 Name = 1,
00048 Protect = 2,
00049 KeepRatio = 4,
00050 Left = 8,
00051 Top = 16,
00052 Width = 32,
00053 Height = 64
00054 };
00055
00056 KPrGeneralProperty( QWidget *parent, const char *name, GeneralValue &generalValue, KoUnit::Unit unit );
00057 ~KPrGeneralProperty();
00058
00059 int getGeneralPropertyChange() const;
00060 GeneralValue getGeneralValue() const;
00061
00062 void apply();
00063
00064 protected:
00065 KoRect getRect() const;
00066 void setRect( KoRect &rect );
00067
00068 KoGeneralPropertyUI *m_ui;
00069 double m_ratio;
00070
00071 GeneralValue m_generalValue;
00072 KoUnit::Unit m_unit;
00073
00074 protected slots:
00075 void slotReset();
00076 void slotProtectToggled( bool state );
00077 void slotKeepRatioToggled( bool state );
00078 void slotWidthChanged( double value );
00079 void slotHeightChanged( double value );
00080 };
00081
00082 #endif
|