summaryrefslogtreecommitdiff
authorumopapisdn <umopapisdn>2003-03-23 23:15:30 (UTC)
committer umopapisdn <umopapisdn>2003-03-23 23:15:30 (UTC)
commitc8205a610f350b8bde7c5aa0522944f0418f1fc9 (patch) (unidiff)
treea368df7e0ebdf794614897ee9b729ecc80d9f838
parent6985dcb99ffcbee33785ca7f0aa1a1717581f934 (diff)
downloadopie-c8205a610f350b8bde7c5aa0522944f0418f1fc9.zip
opie-c8205a610f350b8bde7c5aa0522944f0418f1fc9.tar.gz
opie-c8205a610f350b8bde7c5aa0522944f0418f1fc9.tar.bz2
Bugfix: (bug #0000728) Well, not really a bugfix maybe. The bug is that an
all day event doesn't show up other than the first day. This is due to a limitation in qpe. This fix just disables the possibility of making an all day event span more than 1 day in the event entry form.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/dateentry.cpp255
1 files changed, 255 insertions, 0 deletions
diff --git a/core/pim/datebook/dateentry.cpp b/core/pim/datebook/dateentry.cpp
new file mode 100644
index 0000000..95ddee8
--- a/dev/null
+++ b/core/pim/datebook/dateentry.cpp
@@ -0,0 +1,255 @@
1/****************************************************************************
2** Form implementation generated from reading ui file 'dateentry.ui'
3**
4** Created: Mon Mar 10 20:50:24 2003
5** by: The User Interface Compiler (uic)
6**
7** WARNING! All changes made in this file will be lost!
8****************************************************************************/
9#include "dateentry.h"
10
11#include <qcheckbox.h>
12#include <qcombobox.h>
13#include <qlabel.h>
14#include <qlineedit.h>
15#include <qpe/categoryselect.h>
16#include <qpe/tzselect.h>
17#include <qpushbutton.h>
18#include <qspinbox.h>
19#include <qtoolbutton.h>
20#include "timepicker.h"
21#include <qlayout.h>
22#include <qvariant.h>
23#include <qtooltip.h>
24#include <qwhatsthis.h>
25
26/*
27 * Constructs a DateEntryBase which is a child of 'parent', with the
28 * name 'name' and widget flags set to 'f'
29 */
30DateEntryBase::DateEntryBase( QWidget* parent, const char* name, WFlags fl )
31 : QWidget( parent, name, fl )
32{
33 if ( !name )
34 setName( "DateEntryBase" );
35 resize( 242, 339 );
36 setCaption( tr( "New Event" ) );
37 DateEntryBaseLayout = new QGridLayout( this );
38 DateEntryBaseLayout->setSpacing( 0 );
39 DateEntryBaseLayout->setMargin( 2 );
40
41 TextLabel2 = new QLabel( this, "TextLabel2" );
42 TextLabel2->setFrameShape( QLabel::MShape );
43 TextLabel2->setFrameShadow( QLabel::MShadow );
44 TextLabel2->setText( tr( "Location" ) );
45
46 DateEntryBaseLayout->addWidget( TextLabel2, 1, 0 );
47
48 TextLabel2_2 = new QLabel( this, "TextLabel2_2" );
49 TextLabel2_2->setText( tr( "Category" ) );
50
51 DateEntryBaseLayout->addWidget( TextLabel2_2, 2, 0 );
52
53 comboDescription = new QComboBox( FALSE, this, "comboDescription" );
54 comboDescription->insertItem( tr( "" ) );
55 comboDescription->insertItem( tr( "Meeting" ) );
56 comboDescription->insertItem( tr( "Lunch" ) );
57 comboDescription->insertItem( tr( "Dinner" ) );
58 comboDescription->insertItem( tr( "Travel" ) );
59 comboDescription->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, comboDescription->sizePolicy().hasHeightForWidth() ) );
60 comboDescription->setEditable( TRUE );
61 comboDescription->setCurrentItem( 0 );
62 comboDescription->setDuplicatesEnabled( FALSE );
63
64 DateEntryBaseLayout->addMultiCellWidget( comboDescription, 0, 0, 1, 3 );
65
66 TextLabel1 = new QLabel( this, "TextLabel1" );
67 TextLabel1->setText( tr( "Description " ) );
68
69 DateEntryBaseLayout->addWidget( TextLabel1, 0, 0 );
70
71 comboLocation = new QComboBox( FALSE, this, "comboLocation" );
72 comboLocation->insertItem( tr( "" ) );
73 comboLocation->insertItem( tr( "Office" ) );
74 comboLocation->insertItem( tr( "Home" ) );
75 comboLocation->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, comboLocation->sizePolicy().hasHeightForWidth() ) );
76 comboLocation->setEditable( TRUE );
77 comboLocation->setCurrentItem( 0 );
78 comboLocation->setDuplicatesEnabled( FALSE );
79
80 DateEntryBaseLayout->addMultiCellWidget( comboLocation, 1, 1, 1, 3 );
81
82 comboCategory = new CategorySelect( this, "comboCategory" );
83
84 DateEntryBaseLayout->addMultiCellWidget( comboCategory, 2, 2, 1, 3 );
85
86 TextLabel3 = new QLabel( this, "TextLabel3" );
87 TextLabel3->setText( tr( "Start - End " ) );
88
89 DateEntryBaseLayout->addMultiCellWidget( TextLabel3, 3, 4, 0, 0 );
90
91 buttonStart = new QPushButton( this, "buttonStart" );
92 buttonStart->setText( tr( "Jan 02 00" ) );
93 buttonStart->setMinimumSize( QSize( 70, 0 ) );
94 buttonStart->setMaximumSize( QSize( 70, 32767 ) );
95
96 DateEntryBaseLayout->addWidget( buttonStart, 3, 1 );
97
98 comboStart = new QLineEdit( this, "comboStart" );
99 comboStart->setMinimumSize( QSize( 70, 0 ) );
100 comboStart->setMaximumSize( QSize( 70, 32767 ) );
101 comboStart->setAlignment( int( QLineEdit::AlignHCenter ) );
102
103 DateEntryBaseLayout->addWidget( comboStart, 4, 1 );
104 QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
105 DateEntryBaseLayout->addMultiCell( spacer, 3, 4, 2, 2 );
106
107 timePickerStart = new TimePicker( this, "timePickerStart" );
108
109 DateEntryBaseLayout->addMultiCellWidget( timePickerStart, 5, 5, 1, 3 );
110
111 buttonEnd = new QPushButton( this, "buttonEnd" );
112 buttonEnd->setText( tr( "Jan 02 00" ) );
113 buttonEnd->setMinimumSize( QSize( 70, 0 ) );
114 buttonEnd->setMaximumSize( QSize( 70, 32767 ) );
115
116 DateEntryBaseLayout->addWidget( buttonEnd, 3, 3 );
117
118 comboEnd = new QLineEdit( this, "comboEnd" );
119 comboEnd->setMinimumSize( QSize( 70, 0 ) );
120 comboEnd->setMaximumSize( QSize( 70, 32767 ) );
121 comboEnd->setAlignment( int( QLineEdit::AlignHCenter ) );
122
123 DateEntryBaseLayout->addWidget( comboEnd, 4, 3 );
124
125 TimePickerLabel = new QLabel( this, "TimePickerLabel" );
126 TimePickerLabel->setText( tr( "Start time" ) );
127
128 DateEntryBaseLayout->addWidget( TimePickerLabel, 5, 0 );
129
130 checkAllDay = new QCheckBox( this, "checkAllDay" );
131 checkAllDay->setText( tr( "All day" ) );
132
133 DateEntryBaseLayout->addWidget( checkAllDay, 6, 0 );
134
135 TextLabel3_2_2 = new QLabel( this, "TextLabel3_2_2" );
136 TextLabel3_2_2->setText( tr( "Time zone" ) );
137
138 DateEntryBaseLayout->addWidget( TextLabel3_2_2, 7, 0 );
139
140 timezone = new TimeZoneSelector( this, "timezone" );
141
142 DateEntryBaseLayout->addMultiCellWidget( timezone, 7, 7, 1, 3 );
143
144 checkAlarm = new QCheckBox( this, "checkAlarm" );
145 checkAlarm->setEnabled( TRUE );
146 checkAlarm->setAutoMask( FALSE );
147 checkAlarm->setText( tr( "&Alarm" ) );
148 checkAlarm->setChecked( FALSE );
149
150 DateEntryBaseLayout->addWidget( checkAlarm, 8, 0 );
151
152 spinAlarm = new QSpinBox( this, "spinAlarm" );
153 spinAlarm->setEnabled( FALSE );
154 spinAlarm->setSuffix( tr( " minutes" ) );
155 spinAlarm->setMaxValue( 180 );
156 spinAlarm->setMinValue( 0 );
157 spinAlarm->setLineStep( 5 );
158 spinAlarm->setValue( 5 );
159
160 DateEntryBaseLayout->addMultiCellWidget( spinAlarm, 8, 8, 1, 2 );
161
162 comboSound = new QComboBox( FALSE, this, "comboSound" );
163 comboSound->insertItem( tr( "Silent" ) );
164 comboSound->insertItem( tr( "Loud" ) );
165 comboSound->setEnabled( FALSE );
166
167 DateEntryBaseLayout->addWidget( comboSound, 8, 3 );
168
169 lblRepeat = new QLabel( this, "lblRepeat" );
170 lblRepeat->setText( tr( "Repeat" ) );
171
172 DateEntryBaseLayout->addWidget( lblRepeat, 9, 0 );
173
174 cmdRepeat = new QToolButton( this, "cmdRepeat" );
175 cmdRepeat->setFocusPolicy( QToolButton::TabFocus );
176 cmdRepeat->setText( tr( "No Repeat..." ) );
177 cmdRepeat->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, cmdRepeat->sizePolicy().hasHeightForWidth() ) );
178
179 DateEntryBaseLayout->addMultiCellWidget( cmdRepeat, 9, 9, 1, 3 );
180
181 editNote = new QToolButton( this, "editNote" );
182 editNote->setText( tr( "Note..." ) );
183
184 DateEntryBaseLayout->addMultiCellWidget( editNote, 10, 10, 0, 3 );
185
186 // signals and slots connections
187 connect( checkAlarm, SIGNAL( toggled(bool) ), spinAlarm, SLOT( setEnabled(bool) ) );
188 connect( comboEnd, SIGNAL( textChanged(const QString&) ), this, SLOT( endTimeChanged( const QString & ) ) );
189 connect( cmdRepeat, SIGNAL( clicked() ), this, SLOT( slotRepeat() ) );
190 connect( comboStart, SIGNAL( textChanged(const QString &) ), this, SLOT( startTimeEdited( const QString & ) ) );
191 connect( checkAllDay, SIGNAL( toggled(bool) ), comboEnd, SLOT( setDisabled(bool) ) );
192 connect( checkAllDay, SIGNAL( toggled(bool) ), timePickerStart, SLOT( setDisabled(bool) ) );
193 connect( checkAlarm, SIGNAL( toggled(bool) ), comboSound, SLOT( setEnabled(bool) ) );
194 connect( checkAllDay, SIGNAL( toggled(bool) ), comboStart, SLOT( setDisabled(bool) ) );
195 connect( checkAllDay, SIGNAL( toggled(bool) ), buttonEnd, SLOT( setDisabled(bool) ) );
196}
197
198/*
199 * Destroys the object and frees any allocated resources
200 */
201DateEntryBase::~DateEntryBase()
202{
203 // no need to delete child widgets, Qt does it all for us
204}
205
206void DateEntryBase::endDateChanged( const QString & )
207{
208 qWarning( "DateEntryBase::endDateChanged( const QString & ): Not implemented yet!" );
209}
210
211void DateEntryBase::endDateChanged( int, int, int )
212{
213 qWarning( "DateEntryBase::endDateChanged( int, int, int ): Not implemented yet!" );
214}
215
216void DateEntryBase::endTimeChanged( const QString & )
217{
218 qWarning( "DateEntryBase::endTimeChanged( const QString & ): Not implemented yet!" );
219}
220
221void DateEntryBase::slotRepeat()
222{
223 qWarning( "DateEntryBase::slotRepeat(): Not implemented yet!" );
224}
225
226void DateEntryBase::slotWait( int )
227{
228 qWarning( "DateEntryBase::slotWait( int ): Not implemented yet!" );
229}
230
231void DateEntryBase::startDateChanged( const QString & )
232{
233 qWarning( "DateEntryBase::startDateChanged( const QString & ): Not implemented yet!" );
234}
235
236void DateEntryBase::startDateChanged(int, int, int)
237{
238 qWarning( "DateEntryBase::startDateChanged(int, int, int): Not implemented yet!" );
239}
240
241void DateEntryBase::startTimeEdited( const QString & )
242{
243 qWarning( "DateEntryBase::startTimeEdited( const QString & ): Not implemented yet!" );
244}
245
246void DateEntryBase::typeChanged( const QString & )
247{
248 qWarning( "DateEntryBase::typeChanged( const QString & ): Not implemented yet!" );
249}
250
251void DateEntryBase::tzexecute(void)
252{
253 qWarning( "DateEntryBase::tzexecute(void): Not implemented yet!" );
254}
255