Diffstat (limited to 'core/pim/datebook/timepicker.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/pim/datebook/timepicker.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/core/pim/datebook/timepicker.cpp b/core/pim/datebook/timepicker.cpp index 43e05ad..f2cb71d 100644 --- a/core/pim/datebook/timepicker.cpp +++ b/core/pim/datebook/timepicker.cpp | |||
@@ -3,7 +3,6 @@ | |||
3 | #include <qbuttongroup.h> | 3 | #include <qbuttongroup.h> |
4 | #include <qtoolbutton.h> | 4 | #include <qtoolbutton.h> |
5 | #include <qlayout.h> | 5 | #include <qlayout.h> |
6 | #include "clickablelabel.h" | ||
7 | #include <qstring.h> | 6 | #include <qstring.h> |
8 | #include <stdio.h> | 7 | #include <stdio.h> |
9 | 8 | ||
@@ -13,7 +12,7 @@ TimePicker::TimePicker(QWidget* parent, const char* name, | |||
13 | { | 12 | { |
14 | QVBoxLayout *vbox=new QVBoxLayout(this); | 13 | QVBoxLayout *vbox=new QVBoxLayout(this); |
15 | 14 | ||
16 | ClickableLabel *r; | 15 | OClickableLabel *r; |
17 | QString s; | 16 | QString s; |
18 | 17 | ||
19 | // Hour Row | 18 | // Hour Row |
@@ -23,7 +22,7 @@ TimePicker::TimePicker(QWidget* parent, const char* name, | |||
23 | 22 | ||
24 | 23 | ||
25 | for (int i=0; i<24; i++) { | 24 | for (int i=0; i<24; i++) { |
26 | r=new ClickableLabel(row); | 25 | r=new OClickableLabel(row); |
27 | hourLst.append(r); | 26 | hourLst.append(r); |
28 | s.sprintf("%.2d",i); | 27 | s.sprintf("%.2d",i); |
29 | r->setText(s); | 28 | r->setText(s); |
@@ -46,7 +45,7 @@ TimePicker::TimePicker(QWidget* parent, const char* name, | |||
46 | vbox->addWidget(row); | 45 | vbox->addWidget(row); |
47 | 46 | ||
48 | for (int i=0; i<60; i+=5) { | 47 | for (int i=0; i<60; i+=5) { |
49 | r=new ClickableLabel(row); | 48 | r=new OClickableLabel(row); |
50 | minuteLst.append(r); | 49 | minuteLst.append(r); |
51 | s.sprintf("%.2d",i); | 50 | s.sprintf("%.2d",i); |
52 | r->setText(s); | 51 | r->setText(s); |
@@ -60,10 +59,10 @@ TimePicker::TimePicker(QWidget* parent, const char* name, | |||
60 | 59 | ||
61 | void TimePicker::slotHour(bool b) { | 60 | void TimePicker::slotHour(bool b) { |
62 | 61 | ||
63 | ClickableLabel *r = (ClickableLabel *) sender(); | 62 | OClickableLabel *r = (OClickableLabel *) sender(); |
64 | 63 | ||
65 | if (b) { | 64 | if (b) { |
66 | QValueListIterator<ClickableLabel *> it; | 65 | QValueListIterator<OClickableLabel *> it; |
67 | for (it=hourLst.begin(); it!=hourLst.end(); it++) { | 66 | for (it=hourLst.begin(); it!=hourLst.end(); it++) { |
68 | if (*it != r) (*it)->setOn(false); | 67 | if (*it != r) (*it)->setOn(false); |
69 | else tm.setHMS((*it)->text().toInt(), tm.minute(), 0); | 68 | else tm.setHMS((*it)->text().toInt(), tm.minute(), 0); |
@@ -77,10 +76,10 @@ void TimePicker::slotHour(bool b) { | |||
77 | 76 | ||
78 | void TimePicker::slotMinute(bool b) { | 77 | void TimePicker::slotMinute(bool b) { |
79 | 78 | ||
80 | ClickableLabel *r = (ClickableLabel *) sender(); | 79 | OClickableLabel *r = (OClickableLabel *) sender(); |
81 | 80 | ||
82 | if (b) { | 81 | if (b) { |
83 | QValueListIterator<ClickableLabel *> it; | 82 | QValueListIterator<OClickableLabel *> it; |
84 | for (it=minuteLst.begin(); it!=minuteLst.end(); it++) { | 83 | for (it=minuteLst.begin(); it!=minuteLst.end(); it++) { |
85 | if (*it != r) (*it)->setOn(false); | 84 | if (*it != r) (*it)->setOn(false); |
86 | else tm.setHMS(tm.hour(),(*it)->text().toInt(), 0); | 85 | else tm.setHMS(tm.hour(),(*it)->text().toInt(), 0); |
@@ -97,7 +96,7 @@ void TimePicker::setMinute(int m) { | |||
97 | QString minute; | 96 | QString minute; |
98 | minute.sprintf("%.2d",m); | 97 | minute.sprintf("%.2d",m); |
99 | 98 | ||
100 | QValueListIterator<ClickableLabel *> it; | 99 | QValueListIterator<OClickableLabel *> it; |
101 | for (it=minuteLst.begin(); it!=minuteLst.end(); it++) { | 100 | for (it=minuteLst.begin(); it!=minuteLst.end(); it++) { |
102 | if ((*it)->text() == minute) (*it)->setOn(true); | 101 | if ((*it)->text() == minute) (*it)->setOn(true); |
103 | else (*it)->setOn(false); | 102 | else (*it)->setOn(false); |
@@ -111,7 +110,7 @@ void TimePicker::setHour(int h) { | |||
111 | QString hour; | 110 | QString hour; |
112 | hour.sprintf("%.2d",h); | 111 | hour.sprintf("%.2d",h); |
113 | 112 | ||
114 | QValueListIterator<ClickableLabel *> it; | 113 | QValueListIterator<OClickableLabel *> it; |
115 | for (it=hourLst.begin(); it!=hourLst.end(); it++) { | 114 | for (it=hourLst.begin(); it!=hourLst.end(); it++) { |
116 | if ((*it)->text() == hour) (*it)->setOn(true); | 115 | if ((*it)->text() == hour) (*it)->setOn(true); |
117 | else (*it)->setOn(false); | 116 | else (*it)->setOn(false); |