Diffstat (limited to 'core/pim/datebook/dateentryimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/datebook/dateentryimpl.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/core/pim/datebook/dateentryimpl.cpp b/core/pim/datebook/dateentryimpl.cpp index 33b9d9b..13d2ce2 100644 --- a/core/pim/datebook/dateentryimpl.cpp +++ b/core/pim/datebook/dateentryimpl.cpp | |||
@@ -19,100 +19,100 @@ | |||
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include "dateentryimpl.h" | 21 | #include "dateentryimpl.h" |
22 | #include "repeatentry.h" | 22 | #include "repeatentry.h" |
23 | 23 | ||
24 | #include <qpe/qpeapplication.h> | 24 | #include <qpe/qpeapplication.h> |
25 | #include <qpe/categoryselect.h> | 25 | #include <qpe/categoryselect.h> |
26 | #include <qpe/datebookmonth.h> | 26 | #include <qpe/datebookmonth.h> |
27 | #include <qpe/global.h> | 27 | #include <qpe/global.h> |
28 | #include <qpe/timeconversion.h> | 28 | #include <qpe/timeconversion.h> |
29 | #include <qpe/timestring.h> | 29 | #include <qpe/timestring.h> |
30 | #include <qpe/tzselect.h> | 30 | #include <qpe/tzselect.h> |
31 | 31 | ||
32 | #include <qevent.h> | 32 | #include <qevent.h> |
33 | #include <qcheckbox.h> | 33 | #include <qcheckbox.h> |
34 | #include <qcombobox.h> | 34 | #include <qcombobox.h> |
35 | #include <qlayout.h> | 35 | #include <qlayout.h> |
36 | #include <qlineedit.h> | 36 | #include <qlineedit.h> |
37 | #include <qmultilineedit.h> | 37 | #include <qmultilineedit.h> |
38 | #include <qpopupmenu.h> | 38 | #include <qpopupmenu.h> |
39 | #include <qscrollview.h> | 39 | #include <qscrollview.h> |
40 | #include <qspinbox.h> | 40 | #include <qspinbox.h> |
41 | #include <qtoolbutton.h> | 41 | #include <qtoolbutton.h> |
42 | 42 | ||
43 | #include "timepicker.h" | 43 | #include <opie/otimepicker.h> |
44 | #include "onoteedit.h" | 44 | #include "onoteedit.h" |
45 | 45 | ||
46 | #include <stdlib.h> | 46 | #include <stdlib.h> |
47 | #include <stdio.h> | 47 | #include <stdio.h> |
48 | 48 | ||
49 | /* | 49 | /* |
50 | * Constructs a DateEntry which is a child of 'parent', with the | 50 | * Constructs a DateEntry which is a child of 'parent', with the |
51 | * name 'name' and widget flags set to 'f' | 51 | * name 'name' and widget flags set to 'f' |
52 | * | 52 | * |
53 | * The dialog will by default be modeless, unless you set 'modal' to | 53 | * The dialog will by default be modeless, unless you set 'modal' to |
54 | * TRUE to construct a modal dialog. | 54 | * TRUE to construct a modal dialog. |
55 | */ | 55 | */ |
56 | 56 | ||
57 | DateEntry::DateEntry( bool startOnMonday, const QDateTime &start, | 57 | DateEntry::DateEntry( bool startOnMonday, const QDateTime &start, |
58 | const QDateTime &end, bool whichClock, QWidget* parent, | 58 | const QDateTime &end, bool whichClock, QWidget* parent, |
59 | const char* name ) | 59 | const char* name ) |
60 | : DateEntryBase( parent, name ), | 60 | : DateEntryBase( parent, name ), |
61 | ampm( whichClock ), | 61 | ampm( whichClock ), |
62 | startWeekOnMonday( startOnMonday ), | 62 | startWeekOnMonday( startOnMonday ), |
63 | m_showStart(true) | 63 | m_showStart(true) |
64 | { | 64 | { |
65 | init(); | 65 | init(); |
66 | setDates(start,end); | 66 | setDates(start,end); |
67 | setFocusProxy(comboDescription); | 67 | setFocusProxy(comboDescription); |
68 | } | 68 | } |
69 | 69 | ||
70 | bool DateEntry::eventFilter(QObject *obj, QEvent *ev ) | 70 | bool DateEntry::eventFilter(QObject *obj, QEvent *ev ) |
71 | { | 71 | { |
72 | if( ev->type() == QEvent::FocusIn ){ | 72 | if( ev->type() == QEvent::FocusIn ){ |
73 | if( obj == comboStart ){ | 73 | if( obj == comboStart ){ |
74 | timePickerStart->setHour(startTime.hour()); | 74 | timePickerStart->setHour(startTime.hour()); |
75 | timePickerStart->setMinute(startTime.minute()); | 75 | timePickerStart->setMinute(startTime.minute()); |
76 | TimePickerLabel->setText( tr("Start Time" ) ); | 76 | TimePickerLabel->setText( tr("Start Time" ) ); |
77 | m_showStart= true; | 77 | m_showStart= true; |
78 | }else if( obj == comboEnd ){ | 78 | }else if( obj == comboEnd ){ |
79 | timePickerStart->setHour(endTime.hour()); | 79 | timePickerStart->setHour(endTime.hour()); |
80 | timePickerStart->setMinute(endTime.minute()); | 80 | timePickerStart->setMinute(endTime.minute()); |
81 | TimePickerLabel->setText( tr("End Time") ); | 81 | TimePickerLabel->setText( tr("End Time") ); |
82 | m_showStart = false; | 82 | m_showStart = false; |
83 | } | 83 | } |
84 | } else if( ev->type() == QEvent::FocusOut ){ | 84 | } else if( ev->type() == QEvent::FocusOut ){ |
85 | if( obj == comboEnd ){ | 85 | // if( obj == comboEnd ){ |
86 | QString s; | 86 | // QString s; |
87 | s.sprintf("%.2d:%.2d",endTime.hour(), endTime.minute()); | 87 | // s.sprintf("%.2d:%.2d",endTime.hour(), endTime.minute()); |
88 | comboEnd->setText(s); | 88 | // comboEnd->setText(s); |
89 | } | 89 | // } |
90 | else if( obj == comboStart ){ | 90 | // else if( obj == comboStart ){ |
91 | QString s; | 91 | // QString s; |
92 | s.sprintf("%.2d:%.2d",startTime.hour(), startTime.minute()); | 92 | // s.sprintf("%.2d:%.2d",startTime.hour(), startTime.minute()); |
93 | comboStart->setText(s); | 93 | // comboStart->setText(s); |
94 | } | 94 | // } |
95 | } | 95 | } |
96 | 96 | ||
97 | return false; | 97 | return false; |
98 | } | 98 | } |
99 | 99 | ||
100 | static void addOrPick( QComboBox* combo, const QString& t ) | 100 | static void addOrPick( QComboBox* combo, const QString& t ) |
101 | { | 101 | { |
102 | // Pick an item if one excists | 102 | // Pick an item if one excists |
103 | for (int i=0; i<combo->count(); i++) { | 103 | for (int i=0; i<combo->count(); i++) { |
104 | if ( combo->text(i) == t ) { | 104 | if ( combo->text(i) == t ) { |
105 | combo->setCurrentItem(i); | 105 | combo->setCurrentItem(i); |
106 | return; | 106 | return; |
107 | } | 107 | } |
108 | } | 108 | } |
109 | 109 | ||
110 | // Else add one | 110 | // Else add one |
111 | combo->insertItem(t); | 111 | combo->insertItem(t); |
112 | combo->setCurrentItem(combo->count()-1); | 112 | combo->setCurrentItem(combo->count()-1); |
113 | } | 113 | } |
114 | 114 | ||
115 | DateEntry::DateEntry( bool startOnMonday, const Event &event, bool whichClock, | 115 | DateEntry::DateEntry( bool startOnMonday, const Event &event, bool whichClock, |
116 | QWidget* parent, const char* name ) | 116 | QWidget* parent, const char* name ) |
117 | : DateEntryBase( parent, name ), | 117 | : DateEntryBase( parent, name ), |
118 | ampm( whichClock ), | 118 | ampm( whichClock ), |