Diffstat (limited to 'noncore/apps/tableviewer/ui/commonwidgets.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/tableviewer/ui/commonwidgets.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/noncore/apps/tableviewer/ui/commonwidgets.cpp b/noncore/apps/tableviewer/ui/commonwidgets.cpp index bf4c36f..4c47951 100644 --- a/noncore/apps/tableviewer/ui/commonwidgets.cpp +++ b/noncore/apps/tableviewer/ui/commonwidgets.cpp | |||
@@ -19,25 +19,25 @@ | |||
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include <qlineedit.h> | 21 | #include <qlineedit.h> |
22 | #include <qlayout.h> | 22 | #include <qlayout.h> |
23 | #include <qlabel.h> | 23 | #include <qlabel.h> |
24 | #include <qcombobox.h> | 24 | #include <qcombobox.h> |
25 | 25 | ||
26 | #include <qpe/datebookmonth.h> | 26 | #include <qpe/datebookmonth.h> |
27 | #include <qpopupmenu.h> | 27 | #include <qpopupmenu.h> |
28 | #include <qspinbox.h> | 28 | #include <qspinbox.h> |
29 | #include "commonwidgets.h" | 29 | #include "commonwidgets.h" |
30 | 30 | ||
31 | DateEdit::DateEdit( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ) | 31 | DateEdit::DateEdit( QWidget *parent, const char *name, WFlags f ) |
32 | : QToolButton(parent, name) | 32 | : QToolButton(parent, name) |
33 | { | 33 | { |
34 | QPopupMenu *m1 = new QPopupMenu(this); | 34 | QPopupMenu *m1 = new QPopupMenu(this); |
35 | dateSelector = new DateBookMonth(m1, 0, TRUE); | 35 | dateSelector = new DateBookMonth(m1, 0, TRUE); |
36 | m1->insertItem(dateSelector); | 36 | m1->insertItem(dateSelector); |
37 | setPopup(m1); | 37 | setPopup(m1); |
38 | setPopupDelay(0); | 38 | setPopupDelay(0); |
39 | 39 | ||
40 | connect(dateSelector, SIGNAL(dateClicked(int, int, int)), | 40 | connect(dateSelector, SIGNAL(dateClicked(int, int, int)), |
41 | this, SLOT(subValueChanged())); | 41 | this, SLOT(subValueChanged())); |
42 | 42 | ||
43 | setText(dateSelector->selectedDate().toString()); | 43 | setText(dateSelector->selectedDate().toString()); |
@@ -73,25 +73,25 @@ void DateEdit::clear() | |||
73 | dateSelector->setDate(today.year(), today.month(), today.day()); | 73 | dateSelector->setDate(today.year(), today.month(), today.day()); |
74 | setText(today.toString()); | 74 | setText(today.toString()); |
75 | } | 75 | } |
76 | 76 | ||
77 | void DateEdit::subValueChanged() | 77 | void DateEdit::subValueChanged() |
78 | { | 78 | { |
79 | QDate current = dateSelector->selectedDate(); | 79 | QDate current = dateSelector->selectedDate(); |
80 | 80 | ||
81 | setText(current.toString()); | 81 | setText(current.toString()); |
82 | emit valueChanged(current); | 82 | emit valueChanged(current); |
83 | } | 83 | } |
84 | 84 | ||
85 | TimeEdit::TimeEdit( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ) | 85 | TimeEdit::TimeEdit( QWidget *parent, const char *name, WFlags f ) |
86 | : QWidget(parent, name, f) | 86 | : QWidget(parent, name, f) |
87 | { | 87 | { |
88 | QHBoxLayout *layout = new QHBoxLayout(this, 0); | 88 | QHBoxLayout *layout = new QHBoxLayout(this, 0); |
89 | 89 | ||
90 | layout->addWidget(hourKey = new QSpinBox(1, 12, 1, this)); | 90 | layout->addWidget(hourKey = new QSpinBox(1, 12, 1, this)); |
91 | hourKey->setWrapping(true); | 91 | hourKey->setWrapping(true); |
92 | hourKey->setMinimumWidth(30); | 92 | hourKey->setMinimumWidth(30); |
93 | hourKey->setMaximumWidth(35); | 93 | hourKey->setMaximumWidth(35); |
94 | 94 | ||
95 | layout->addWidget(new QLabel(" : ", this)); | 95 | layout->addWidget(new QLabel(" : ", this)); |
96 | layout->addWidget(minuteKey = new QSpinBox(0, 59, 1, this)); | 96 | layout->addWidget(minuteKey = new QSpinBox(0, 59, 1, this)); |
97 | minuteKey->setWrapping(true); | 97 | minuteKey->setWrapping(true); |
@@ -181,25 +181,25 @@ void TimeEdit::clear() | |||
181 | secondKey->setValue(0); | 181 | secondKey->setValue(0); |
182 | minuteKey->setValue(0); | 182 | minuteKey->setValue(0); |
183 | hourKey->setValue(12); | 183 | hourKey->setValue(12); |
184 | 184 | ||
185 | ampm->setCurrentItem(0); | 185 | ampm->setCurrentItem(0); |
186 | } | 186 | } |
187 | 187 | ||
188 | void TimeEdit::subValueChanged() | 188 | void TimeEdit::subValueChanged() |
189 | { | 189 | { |
190 | emit valueChanged(time()); | 190 | emit valueChanged(time()); |
191 | } | 191 | } |
192 | 192 | ||
193 | IntEdit::IntEdit( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ) | 193 | IntEdit::IntEdit( QWidget *parent, const char *name, WFlags f ) |
194 | : QSpinBox(INT_MIN, INT_MAX, 1, parent, name) | 194 | : QSpinBox(INT_MIN, INT_MAX, 1, parent, name) |
195 | { | 195 | { |
196 | setValue(0); | 196 | setValue(0); |
197 | } | 197 | } |
198 | 198 | ||
199 | 199 | ||
200 | IntEdit::~IntEdit() {} | 200 | IntEdit::~IntEdit() {} |
201 | 201 | ||
202 | int IntEdit::value() | 202 | int IntEdit::value() |
203 | { | 203 | { |
204 | return cleanText().toInt(); | 204 | return cleanText().toInt(); |
205 | } | 205 | } |