kspread
kspread_generalProperty.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 "kspread_global.h"
00025
00026 #include <KoRect.h>
00027 #include <KoUnit.h>
00028
00029 class KoGeneralPropertyUI;
00030
00031 namespace KSpread
00032 {
00033
00034 class GeneralProperty : public QWidget
00035 {
00036 Q_OBJECT
00037 public:
00038 struct GeneralValue
00039 {
00040 GeneralValue()
00041 {}
00042 QString m_name;
00043 PropValue m_keepRatio;
00044 PropValue m_protect;
00045 KoRect m_rect;
00046 };
00047
00048 enum GeneralConfigChange
00049 {
00050 Name = 1,
00051 Protect = 2,
00052 KeepRatio = 4,
00053 Left = 8,
00054 Top = 16,
00055 Width = 32,
00056 Height = 64
00057 };
00058
00059 GeneralProperty( QWidget *parent, const char *name, GeneralValue &generalValue, KoUnit::Unit unit );
00060 ~GeneralProperty();
00061
00062 int getGeneralPropertyChange() const;
00063 GeneralValue getGeneralValue() const;
00064
00065 void apply();
00066
00067 protected:
00068 KoRect getRect() const;
00069 void setRect( KoRect &rect );
00070
00071 KoGeneralPropertyUI *m_ui;
00072 double m_ratio;
00073
00074 GeneralValue m_generalValue;
00075 KoUnit::Unit m_unit;
00076
00077 protected slots:
00078 void slotReset();
00079 void slotProtectToggled( bool state );
00080 void slotKeepRatioToggled( bool state );
00081 void slotWidthChanged( double value );
00082 void slotHeightChanged( double value );
00083 };
00084
00085 }
00086
00087 #endif
|