lib
KoPageLayoutSize.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef kopagelayoutsize_h
00021 #define kopagelayoutsize_h
00022
00023 #include <qgroupbox.h>
00024 #include <KoGlobal.h>
00025 #include <KoUnit.h>
00026 #include <kdialogbase.h>
00027 #include <KoPageLayout.h>
00028 #include <KoPageLayoutDia.h>
00029
00030 class QComboBox;
00031 class KoUnitDoubleSpinBox;
00032 class KoPageLayoutColumns;
00033
00037 class KoPageLayoutSize : public QWidget {
00038 Q_OBJECT
00039
00040 public:
00050 KoPageLayoutSize(QWidget *parent, const KoPageLayout& layout, KoUnit::Unit unit,
00051 const KoColumns& columns, bool unitChooser, bool enableBorders);
00052
00056 bool queryClose();
00061 void setColumns(KoColumns &columns);
00062
00063 KoUnit::Unit unit() { return m_unit; }
00064
00065 public slots:
00070 void setUnit( KoUnit::Unit unit );
00075 void setEnableBorders(bool on);
00076
00077 signals:
00084 void propertyChange(KoPageLayout &layout);
00085
00086 protected:
00087 QComboBox *cpgFormat;
00088 KoUnitDoubleSpinBox *epgWidth;
00089 KoUnitDoubleSpinBox *epgHeight;
00090 KoUnitDoubleSpinBox *ebrLeft;
00091 KoUnitDoubleSpinBox *ebrRight;
00092 KoUnitDoubleSpinBox *ebrTop;
00093 KoUnitDoubleSpinBox *ebrBottom;
00094 KoPagePreview *pgPreview;
00095 QButtonGroup *m_orientGroup;
00096
00097 protected slots:
00098 void formatChanged( int );
00099 void widthChanged( double );
00100 void heightChanged( double );
00101 void leftChanged( double );
00102 void rightChanged( double );
00103 void topChanged( double );
00104 void bottomChanged( double );
00105 void orientationChanged( int );
00106 void setUnitInt( int unit );
00107
00108 private:
00109 void updatePreview();
00110 void setValues();
00111
00112 KoUnit::Unit m_unit;
00113 KoPageLayout m_layout;
00114
00115 bool m_blockSignals, m_haveBorders;
00116 };
00117
00118 #endif
|