author | leseb <leseb> | 2002-03-21 17:33:38 (UTC) |
---|---|---|
committer | leseb <leseb> | 2002-03-21 17:33:38 (UTC) |
commit | 29baf8dcda3d05d91d340b739de0fdd9e37f5749 (patch) (unidiff) | |
tree | 5f2958a16cc1f065cdef3e31c2c9500f8aac2e7b /noncore/graphics/drawpad/newpagedialog.cpp | |
parent | 60c9126183ea72c08ad5cb77b8939812627aae17 (diff) | |
download | opie-29baf8dcda3d05d91d340b739de0fdd9e37f5749.zip opie-29baf8dcda3d05d91d340b739de0fdd9e37f5749.tar.gz opie-29baf8dcda3d05d91d340b739de0fdd9e37f5749.tar.bz2 |
Enable any size pages
Diffstat (limited to 'noncore/graphics/drawpad/newpagedialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/graphics/drawpad/newpagedialog.cpp | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/noncore/graphics/drawpad/newpagedialog.cpp b/noncore/graphics/drawpad/newpagedialog.cpp new file mode 100644 index 0000000..c11d977 --- a/dev/null +++ b/noncore/graphics/drawpad/newpagedialog.cpp | |||
@@ -0,0 +1,61 @@ | |||
1 | /*************************************************************************** | ||
2 | * * | ||
3 | * DrawPad - a drawing program for Opie Environment * | ||
4 | * * | ||
5 | * (C) 2002 by S. Prud'homme <prudhomme@laposte.net> * | ||
6 | * * | ||
7 | * This program is free software; you can redistribute it and/or modify * | ||
8 | * it under the terms of the GNU General Public License as published by * | ||
9 | * the Free Software Foundation; either version 2 of the License, or * | ||
10 | * (at your option) any later version. * | ||
11 | * * | ||
12 | ***************************************************************************/ | ||
13 | |||
14 | #include "newpagedialog.h" | ||
15 | |||
16 | #include <qlabel.h> | ||
17 | #include <qlayout.h> | ||
18 | #include <qspinbox.h> | ||
19 | |||
20 | NewPageDialog::NewPageDialog(QWidget* parent, const char* name) | ||
21 | : QDialog(parent, name, true) | ||
22 | { | ||
23 | setCaption(tr("New Page")); | ||
24 | |||
25 | QLabel* widthLabel = new QLabel(tr("Width :"), this); | ||
26 | QLabel* heightLabel = new QLabel(tr("Height :"), this); | ||
27 | |||
28 | m_pWidthSpinBox = new QSpinBox(1, 1024, 1, this); | ||
29 | m_pHeightSpinBox = new QSpinBox(1, 1024, 1, this); | ||
30 | |||
31 | QGridLayout* gridLayout = new QGridLayout(this, 2, 2, 2, 2); | ||
32 | |||
33 | gridLayout->addWidget(widthLabel, 0, 0); | ||
34 | gridLayout->addWidget(heightLabel, 1, 0); | ||
35 | gridLayout->addWidget(m_pWidthSpinBox, 0, 1); | ||
36 | gridLayout->addWidget(m_pHeightSpinBox, 1, 1); | ||
37 | } | ||
38 | |||
39 | NewPageDialog::~NewPageDialog() | ||
40 | { | ||
41 | } | ||
42 | |||
43 | void NewPageDialog::setWidth(int width) | ||
44 | { | ||
45 | m_pWidthSpinBox->setValue(width); | ||
46 | } | ||
47 | |||
48 | void NewPageDialog::setHeight(int height) | ||
49 | { | ||
50 | m_pHeightSpinBox->setValue(height); | ||
51 | } | ||
52 | |||
53 | int NewPageDialog::width() | ||
54 | { | ||
55 | return m_pWidthSpinBox->value(); | ||
56 | } | ||
57 | |||
58 | int NewPageDialog::height() | ||
59 | { | ||
60 | return m_pHeightSpinBox->value(); | ||
61 | } | ||