37
38
class QRadioButton;
40
class KDoubleNumInput;
40
const int FORMAT_AND_BORDERS = 1;
41
const int HEADER_AND_FOOTER = 2;
42
const int COLUMNS = 4;
43
const int DISABLE_BORDERS = 8;
44
const int KW_HEADER_AND_FOOTER = 16;
45
const int DISABLE_UNIT = 32;
42
enum { FORMAT_AND_BORDERS = 1, HEADER_AND_FOOTER = 2, COLUMNS = 4, DISABLE_BORDERS = 8,
43
KW_HEADER_AND_FOOTER = 16, DISABLE_UNIT = 32 };
87
85
class KoPageLayoutDiaPrivate;
90
* With this dialog the user can specify the layout of this paper during printing.
88
* With this dialog the user can specify the layout of the paper during printing.
92
90
class KoPageLayoutDia : public KDialogBase
103
101
* @param layout The layout.
104
102
* @param headfoot The header and the footer.
105
103
* @param tabs The number of tabs.
104
* @param unit The unit to use for displaying the values to the user
107
KoPageLayoutDia( QWidget* _parent, const char* _name, KoPageLayout _layout, KoHeadFoot _headfoot, int _tabs );
106
KoPageLayoutDia( QWidget* parent, const char* name,
107
const KoPageLayout& layout,
108
const KoHeadFoot& headfoot,
109
int tabs, KoUnit::Unit unit, bool modal=true );
116
118
* @param columns The number of columns on the page.
117
119
* @param kwheadfoot The KWord header and footer.
118
120
* @param tabs The number of tabs.
121
* @param unit The unit to use for displaying the values to the user
120
KoPageLayoutDia( QWidget* parent, const char* name, KoPageLayout layout, KoHeadFoot headfoot,
121
KoColumns columns, KoKWHeaderFooter kwheadfoot, int tabs );
123
KoPageLayoutDia( QWidget* parent, const char* name,
124
const KoPageLayout& layout,
125
const KoHeadFoot& headfoot,
126
const KoColumns& columns,
127
const KoKWHeaderFooter& kwheadfoot,
128
int tabs, KoUnit::Unit unit );
129
136
* Show page layout dialog.
137
* See constructor for documentation on the parameters
131
static bool pageLayout( KoPageLayout&, KoHeadFoot&, int );
139
static bool pageLayout( KoPageLayout&, KoHeadFoot&, int tabs, KoUnit::Unit& unit);
134
142
* Show page layout dialog.
143
* See constructor for documentation on the parameters
136
static bool pageLayout( KoPageLayout&, KoHeadFoot&, KoColumns&, KoKWHeaderFooter&, int );
145
static bool pageLayout( KoPageLayout&, KoHeadFoot&, KoColumns&, KoKWHeaderFooter&, int tabs, KoUnit::Unit& unit );
139
148
* Retrieves a standard page layout.
141
150
static KoPageLayout standardLayout();
155
KoPageLayout getLayout() { return layout; } // BIC: make const
158
* Returns the header and footer information
160
KoHeadFoot getHeadFoot(); // BIC: make const
165
KoUnit::Unit unit() const { return m_unit; }
144
KoPageLayout getLayout() {return layout;};
145
KoHeadFoot getHeadFoot();
146
168
KoColumns getColumns();
147
169
KoKWHeaderFooter getKWHeaderFooter();
155
177
void setupTab4();
157
179
// update preview
158
void updatePreview( KoPageLayout );
180
void updatePreview( const KoPageLayout& );
160
182
// dialog objects
161
183
QComboBox *cpgFormat;
162
QComboBox *cpgOrientation;
163
184
QComboBox *cpgUnit;
165
QLineEdit *epgHeight;
169
QLineEdit *ebrBottom;
185
QRadioButton *rbPortrait;
186
QRadioButton *rbLandscape;
187
KDoubleNumInput *epgWidth;
188
KDoubleNumInput *epgHeight;
189
KDoubleNumInput *ebrLeft;
190
KDoubleNumInput *ebrRight;
191
KDoubleNumInput *ebrTop;
192
KDoubleNumInput *ebrBottom;
170
193
KoPagePreview *pgPreview;
171
194
KoPagePreview *pgPreview2;
172
195
QLineEdit *eHeadLeft;
176
199
QLineEdit *eFootMid;
177
200
QLineEdit *eFootRight;
178
201
QSpinBox *nColumns;
179
QLineEdit *nCSpacing;
180
QLineEdit *nHSpacing;
181
QLineEdit *nFSpacing;
182
QRadioButton *rhSame;
183
QRadioButton *rhFirst;
184
QRadioButton *rhEvenOdd;
185
QRadioButton *rfSame;
186
QRadioButton *rfFirst;
187
QRadioButton *rfEvenOdd;
202
KDoubleNumInput *nCSpacing;
204
KDoubleNumInput *nHSpacing;
205
KDoubleNumInput *nFSpacing;
206
KDoubleNumInput *nFNSpacing;
207
QCheckBox *rhSame_unused; // BIC: remove
209
QCheckBox *rhEvenOdd;
210
QCheckBox *rfSame_unused; // BIC: remove
212
QCheckBox *rfEvenOdd;
190
215
KoPageLayout layout;
212
232
void rightChanged();
213
233
void topChanged();
214
234
void bottomChanged();
237
virtual void slotOk();
241
void unitChanged( int );
242
void formatChanged( int );
243
void orientationChanged();
215
245
void rPressed() {retPressed = true;}
218
248
void nColChanged( int );
219
void nSpaceChanged( const QString & );
249
void nSpaceChanged( double );
222
void changed(QLineEdit *line, double &mm, double &pt, double &inch);
252
void changed(KDoubleNumInput *line, double &pt);
224
254
KoPageLayoutDiaPrivate *d;