Diffstat (limited to 'core/pim/datebook/dateentryimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/pim/datebook/dateentryimpl.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/pim/datebook/dateentryimpl.cpp b/core/pim/datebook/dateentryimpl.cpp index e14e2f5..c4f6c68 100644 --- a/core/pim/datebook/dateentryimpl.cpp +++ b/core/pim/datebook/dateentryimpl.cpp | |||
@@ -34,39 +34,41 @@ | |||
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 "timepicker.h" |
44 | 44 | ||
45 | #include <stdlib.h> | 45 | #include <stdlib.h> |
46 | #include <stdio.h> | ||
46 | 47 | ||
47 | /* | 48 | /* |
48 | * Constructs a DateEntry which is a child of 'parent', with the | 49 | * Constructs a DateEntry which is a child of 'parent', with the |
49 | * name 'name' and widget flags set to 'f' | 50 | * name 'name' and widget flags set to 'f' |
50 | * | 51 | * |
51 | * The dialog will by default be modeless, unless you set 'modal' to | 52 | * The dialog will by default be modeless, unless you set 'modal' to |
52 | * TRUE to construct a modal dialog. | 53 | * TRUE to construct a modal dialog. |
53 | */ | 54 | */ |
54 | 55 | ||
55 | DateEntry::DateEntry( bool startOnMonday, const QDateTime &start, | 56 | DateEntry::DateEntry( bool startOnMonday, const QDateTime &start, |
56 | const QDateTime &end, bool whichClock, QWidget* parent, | 57 | const QDateTime &end, bool whichClock, QWidget* parent, |
57 | const char* name ) | 58 | const char* name ) |
58 | : DateEntryBase( parent, name ), | 59 | : DateEntryBase( parent, name ), |
59 | ampm( whichClock ), | 60 | ampm( whichClock ), |
60 | startWeekOnMonday( startOnMonday ) | 61 | startWeekOnMonday( startOnMonday ), |
62 | m_showStart(true) | ||
61 | { | 63 | { |
62 | init(); | 64 | init(); |
63 | setDates(start,end); | 65 | setDates(start,end); |
64 | setFocusProxy(comboDescription); | 66 | setFocusProxy(comboDescription); |
65 | } | 67 | } |
66 | 68 | ||
67 | bool DateEntry::eventFilter(QObject *obj, QEvent *ev ) | 69 | bool DateEntry::eventFilter(QObject *obj, QEvent *ev ) |
68 | { | 70 | { |
69 | if( ev->type() == QEvent::FocusIn ){ | 71 | if( ev->type() == QEvent::FocusIn ){ |
70 | if( obj == comboStart ){ | 72 | if( obj == comboStart ){ |
71 | timePickerStart->setHour(startTime.hour()); | 73 | timePickerStart->setHour(startTime.hour()); |
72 | timePickerStart->setMinute(startTime.minute()); | 74 | timePickerStart->setMinute(startTime.minute()); |
@@ -104,25 +106,27 @@ static void addOrPick( QComboBox* combo, const QString& t ) | |||
104 | } | 106 | } |
105 | } | 107 | } |
106 | 108 | ||
107 | // Else add one | 109 | // Else add one |
108 | combo->insertItem(t); | 110 | combo->insertItem(t); |
109 | combo->setCurrentItem(combo->count()-1); | 111 | combo->setCurrentItem(combo->count()-1); |
110 | } | 112 | } |
111 | 113 | ||
112 | DateEntry::DateEntry( bool startOnMonday, const Event &event, bool whichClock, | 114 | DateEntry::DateEntry( bool startOnMonday, const Event &event, bool whichClock, |
113 | QWidget* parent, const char* name ) | 115 | QWidget* parent, const char* name ) |
114 | : DateEntryBase( parent, name ), | 116 | : DateEntryBase( parent, name ), |
115 | ampm( whichClock ), | 117 | ampm( whichClock ), |
116 | startWeekOnMonday( startOnMonday ) | 118 | startWeekOnMonday( startOnMonday ), |
119 | m_showStart(true) | ||
120 | |||
117 | { | 121 | { |
118 | init(); | 122 | init(); |
119 | setDates(event.start(),event.end()); | 123 | setDates(event.start(),event.end()); |
120 | comboCategory->setCategories( event.categories(), "Calendar", tr("Calendar") ); | 124 | comboCategory->setCategories( event.categories(), "Calendar", tr("Calendar") ); |
121 | if(!event.description().isEmpty()) | 125 | if(!event.description().isEmpty()) |
122 | addOrPick( comboDescription, event.description() ); | 126 | addOrPick( comboDescription, event.description() ); |
123 | if(!event.location().isEmpty()) | 127 | if(!event.location().isEmpty()) |
124 | addOrPick( comboLocation, event.location() ); | 128 | addOrPick( comboLocation, event.location() ); |
125 | checkAlarm->setChecked( event.hasAlarm() ); | 129 | checkAlarm->setChecked( event.hasAlarm() ); |
126 | checkAllDay->setChecked( event.type() == Event::AllDay ); | 130 | checkAllDay->setChecked( event.type() == Event::AllDay ); |
127 | if(!event.notes().isEmpty()) | 131 | if(!event.notes().isEmpty()) |
128 | editNote->setText(event.notes()); | 132 | editNote->setText(event.notes()); |