lib

KoPageLayoutSize.h
1/* This file is part of the KDE project
2 * Copyright (C) 1998, 1999 Reginald Stadlbauer <reggie@kde.org>
3 * Copyright (C) 2005 Thomas Zander <zander@kde.org>
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; version 2.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public License
15 * along with this library; see the file COPYING.LIB. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#ifndef kopagelayoutsize_h
21#define kopagelayoutsize_h
22
23#include <tqgroupbox.h>
24#include <KoGlobal.h>
25#include <KoUnit.h>
26#include <kdialogbase.h>
27#include <KoPageLayout.h>
28#include <KoPageLayoutDia.h>
29
30class TQComboBox;
33
37class KoPageLayoutSize : public TQWidget {
38 TQ_OBJECT
39
40
41public:
51 KoPageLayoutSize(TQWidget *parent, const KoPageLayout& layout, KoUnit::Unit unit,
52 const KoColumns& columns, bool unitChooser, bool enableBorders);
53
57 bool queryClose();
62 void setColumns(KoColumns &columns);
63
64 KoUnit::Unit unit() { return m_unit; }
65
66public slots:
71 void setUnit( KoUnit::Unit unit );
76 void setEnableBorders(bool on);
77
78signals:
86
87protected:
88 TQComboBox *cpgFormat;
89 KoUnitDoubleSpinBox *epgWidth;
90 KoUnitDoubleSpinBox *epgHeight;
91 KoUnitDoubleSpinBox *ebrLeft;
92 KoUnitDoubleSpinBox *ebrRight;
93 KoUnitDoubleSpinBox *ebrTop;
94 KoUnitDoubleSpinBox *ebrBottom;
95 KoPagePreview *pgPreview;
96 TQButtonGroup *m_orientGroup;
97
98protected slots:
99 void formatChanged( int );
100 void widthChanged( double );
101 void heightChanged( double );
102 void leftChanged( double );
103 void rightChanged( double );
104 void topChanged( double );
105 void bottomChanged( double );
106 void orientationChanged( int );
107 void setUnitInt( int unit );
108
109private:
110 void updatePreview();
111 void setValues();
112
113 KoUnit::Unit m_unit;
114 KoPageLayout m_layout;
115
116 bool m_blockSignals, m_haveBorders;
117};
118
119#endif
This class is a widget that shows the KoColumns data structure and allows the user to change it.
void setEnableBorders(bool on)
Enable the user to edit the page border size.
void setColumns(KoColumns &columns)
Update the page preview widget with the param columns.
KoPageLayoutSize(TQWidget *parent, const KoPageLayout &layout, KoUnit::Unit unit, const KoColumns &columns, bool unitChooser, bool enableBorders)
Contructor.
void setUnit(KoUnit::Unit unit)
Set a new unit for the widget updating the widgets.
void propertyChange(KoPageLayout &layout)
Emitted whenever the user changed something in the dialog.
KoPagePreview.
Spin box for double precision numbers with unit display.
Unit
Length units supported by KOffice.
Definition KoUnit.h:63
structure for columns
This structure defines the page layout, including its size in pt, its format (e.g.