summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/datebook.pro4
-rw-r--r--core/pim/datebook/datebookweeklst.cpp1
-rw-r--r--core/pim/datebook/datebookweeklstdayhdr.ui8
-rw-r--r--core/pim/datebook/dateentry.ui6
-rw-r--r--core/pim/datebook/dateentryimpl.cpp1
-rw-r--r--core/pim/datebook/namespace_hack.h20
6 files changed, 31 insertions, 9 deletions
diff --git a/core/pim/datebook/datebook.pro b/core/pim/datebook/datebook.pro
index 2b2efaa..dbdd31b 100644
--- a/core/pim/datebook/datebook.pro
+++ b/core/pim/datebook/datebook.pro
@@ -1,40 +1,40 @@
1 CONFIG += qt warn_on release quick-app 1 CONFIG += qt warn_on release quick-app
2 HEADERS= datebookday.h \ 2 HEADERS= datebookday.h \
3 datebook.h \ 3 datebook.h \
4 dateentryimpl.h \ 4 dateentryimpl.h \
5 datebookdayheaderimpl.h \ 5 datebookdayheaderimpl.h \
6 datebooksettings.h \ 6 datebooksettings.h \
7 datebookweek.h \ 7 datebookweek.h \
8 datebookweeklst.h \ 8 datebookweeklst.h \
9 datebookweekheaderimpl.h \ 9 datebookweekheaderimpl.h \
10 repeatentry.h \ 10 repeatentry.h \
11 noteentryimpl.h \ 11 noteentryimpl.h \
12 onoteedit.h \ 12 onoteedit.h \
13 datebookdayallday.h 13 datebookdayallday.h
14 SOURCES= main.cpp \ 14 SOURCES= main.cpp \
15 datebookday.cpp \ 15 datebookday.cpp \
16 datebook.cpp \ 16 datebook.cpp \
17 dateentryimpl.cpp \ 17 dateentryimpl.cpp \
18 datebookdayheaderimpl.cpp \ 18 datebookdayheaderimpl.cpp \
19 datebooksettings.cpp \ 19 datebooksettings.cpp \
20 datebookweek.cpp \ 20 datebookweek.cpp \
21 datebookweeklst.cpp \ 21 datebookweeklst.cpp \
22 datebookweekheaderimpl.cpp \ 22 datebookweekheaderimpl.cpp \
23 repeatentry.cpp \ 23 repeatentry.cpp \
24 noteentryimpl.cpp \ 24 noteentryimpl.cpp \
25 onoteedit.cpp \ 25 onoteedit.cpp \
26 datebookdayallday.cpp 26 datebookdayallday.cpp
27 INTERFACES= dateentry.ui \ 27 INTERFACES= dateentry.ui \
28 datebookdayheader.ui \ 28 datebookdayheader.ui \
29 datebookweekheader.ui \ 29 datebookweekheader.ui \
30 datebookweeklstheader.ui \ 30 datebookweeklstheader.ui \
31 datebookweeklstdayhdr.ui \ 31 datebookweeklstdayhdr.ui \
32 repeatentrybase.ui \ 32 repeatentrybase.ui \
33 datebooksettingsbase.ui \ 33 datebooksettingsbase.ui \
34 noteentry.ui 34 noteentry.ui
35INCLUDEPATH += $(OPIEDIR)/include 35INCLUDEPATH += $(OPIEDIR)/include
36 DEPENDPATH+= $(OPIEDIR)/include 36 DEPENDPATH+= $(OPIEDIR)/include
37LIBS += -lqpe -lopieui2 37LIBS += -lqpe -lopieui2
38 TARGET = datebook 38 TARGET = datebook
39 39
40include ( $(OPIEDIR)/include.pro ) 40include ( $(OPIEDIR)/include.pro )
diff --git a/core/pim/datebook/datebookweeklst.cpp b/core/pim/datebook/datebookweeklst.cpp
index 30c925d..abaf3ea 100644
--- a/core/pim/datebook/datebookweeklst.cpp
+++ b/core/pim/datebook/datebookweeklst.cpp
@@ -1,256 +1,257 @@
1#include "namespace_hack.h"
1#include "datebookweeklst.h" 2#include "datebookweeklst.h"
2 3
3 4
4#include "datebook.h" 5#include "datebook.h"
5 6
6#include <qpe/datebookmonth.h> 7#include <qpe/datebookmonth.h>
7#include <qpe/config.h> 8#include <qpe/config.h>
8#include <qpe/resource.h> 9#include <qpe/resource.h>
9 10
10#include <qlayout.h> 11#include <qlayout.h>
11#include <qtoolbutton.h> 12#include <qtoolbutton.h>
12#include <qtl.h> 13#include <qtl.h>
13 14
14bool calcWeek(const QDate &d, int &week, int &year,bool startOnMonday = false); 15bool calcWeek(const QDate &d, int &week, int &year,bool startOnMonday = false);
15 16
16using namespace Opie::Ui; 17using namespace Opie::Ui;
17DateBookWeekLstHeader::DateBookWeekLstHeader(bool onM, QWidget* parent, const char* name, WFlags fl) 18DateBookWeekLstHeader::DateBookWeekLstHeader(bool onM, QWidget* parent, const char* name, WFlags fl)
18 : DateBookWeekLstHeaderBase(parent, name, fl) 19 : DateBookWeekLstHeaderBase(parent, name, fl)
19{ 20{
20 setBackgroundMode( PaletteButton ); 21 setBackgroundMode( PaletteButton );
21 labelDate->setBackgroundMode( PaletteButton ); 22 labelDate->setBackgroundMode( PaletteButton );
22 forwardweek->setBackgroundMode( PaletteButton ); 23 forwardweek->setBackgroundMode( PaletteButton );
23 forwardweek->setPixmap( Resource::loadPixmap("forward") ); 24 forwardweek->setPixmap( Resource::loadPixmap("forward") );
24 forwardmonth->setBackgroundMode( PaletteButton ); 25 forwardmonth->setBackgroundMode( PaletteButton );
25 forwardmonth->setPixmap( Resource::loadPixmap("fastforward") ); 26 forwardmonth->setPixmap( Resource::loadPixmap("fastforward") );
26 backweek->setBackgroundMode( PaletteButton ); 27 backweek->setBackgroundMode( PaletteButton );
27 backweek->setPixmap( Resource::loadPixmap("back") ); 28 backweek->setPixmap( Resource::loadPixmap("back") );
28 backmonth->setBackgroundMode( PaletteButton ); 29 backmonth->setBackgroundMode( PaletteButton );
29 backmonth->setPixmap( Resource::loadPixmap("fastback") ); 30 backmonth->setPixmap( Resource::loadPixmap("fastback") );
30 DateBookWeekLstHeaderBaseLayout->setSpacing(0); 31 DateBookWeekLstHeaderBaseLayout->setSpacing(0);
31 DateBookWeekLstHeaderBaseLayout->setMargin(0); 32 DateBookWeekLstHeaderBaseLayout->setMargin(0);
32 //setSizePolicy(QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Expanding)); 33 //setSizePolicy(QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Expanding));
33 setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed)); 34 setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed));
34 35
35 connect(backmonth, SIGNAL(clicked()), this, SLOT(prevMonth())); 36 connect(backmonth, SIGNAL(clicked()), this, SLOT(prevMonth()));
36 connect(backweek, SIGNAL(clicked()), this, SLOT(prevWeek())); 37 connect(backweek, SIGNAL(clicked()), this, SLOT(prevWeek()));
37 connect(forwardweek, SIGNAL(clicked()), this, SLOT(nextWeek())); 38 connect(forwardweek, SIGNAL(clicked()), this, SLOT(nextWeek()));
38 connect(forwardmonth, SIGNAL(clicked()), this, SLOT(nextMonth())); 39 connect(forwardmonth, SIGNAL(clicked()), this, SLOT(nextMonth()));
39 connect(labelDate, SIGNAL(clicked()), this, SLOT(pickDate())); 40 connect(labelDate, SIGNAL(clicked()), this, SLOT(pickDate()));
40 connect(dbl, SIGNAL(toggled(bool)), this, SIGNAL(setDbl(bool))); 41 connect(dbl, SIGNAL(toggled(bool)), this, SIGNAL(setDbl(bool)));
41 bStartOnMonday=onM; 42 bStartOnMonday=onM;
42} 43}
43DateBookWeekLstHeader::~DateBookWeekLstHeader(){} 44DateBookWeekLstHeader::~DateBookWeekLstHeader(){}
44 45
45void DateBookWeekLstHeader::setDate(const QDate &d) { 46void DateBookWeekLstHeader::setDate(const QDate &d) {
46 int year,week,dayofweek; 47 int year,week,dayofweek;
47 date=d; 48 date=d;
48 dayofweek=d.dayOfWeek(); 49 dayofweek=d.dayOfWeek();
49 if(bStartOnMonday) 50 if(bStartOnMonday)
50 dayofweek--; 51 dayofweek--;
51 else if( dayofweek == 7 ) 52 else if( dayofweek == 7 )
52 /* we already have the right day -7 would lead to the same week */ 53 /* we already have the right day -7 would lead to the same week */
53 dayofweek = 0; 54 dayofweek = 0;
54 55
55 date=date.addDays(-dayofweek); 56 date=date.addDays(-dayofweek);
56 57
57 calcWeek(date,week,year,bStartOnMonday); 58 calcWeek(date,week,year,bStartOnMonday);
58 QDate start=date; 59 QDate start=date;
59 QDate stop=start.addDays(6); 60 QDate stop=start.addDays(6);
60 labelDate->setText( QString::number(start.day()) + "." + 61 labelDate->setText( QString::number(start.day()) + "." +
61 Calendar::nameOfMonth( start.month() ) + "-" + 62 Calendar::nameOfMonth( start.month() ) + "-" +
62 QString::number(stop.day()) + "." + 63 QString::number(stop.day()) + "." +
63 Calendar::nameOfMonth( stop.month()) +" ("+ 64 Calendar::nameOfMonth( stop.month()) +" ("+
64 tr("w")+":"+QString::number( week ) +")"); 65 tr("w")+":"+QString::number( week ) +")");
65 date = d; // bugfix: 0001126 - date has to be the selected date, not monday! 66 date = d; // bugfix: 0001126 - date has to be the selected date, not monday!
66 emit dateChanged(date); 67 emit dateChanged(date);
67} 68}
68 69
69void DateBookWeekLstHeader::pickDate() { 70void DateBookWeekLstHeader::pickDate() {
70 static QPopupMenu *m1 = 0; 71 static QPopupMenu *m1 = 0;
71 static DateBookMonth *picker = 0; 72 static DateBookMonth *picker = 0;
72 if ( !m1 ) { 73 if ( !m1 ) {
73 m1 = new QPopupMenu( this ); 74 m1 = new QPopupMenu( this );
74 picker = new DateBookMonth( m1, 0, TRUE ); 75 picker = new DateBookMonth( m1, 0, TRUE );
75 m1->insertItem( picker ); 76 m1->insertItem( picker );
76 connect( picker, SIGNAL( dateClicked(int,int,int) ),this, SLOT( setDate(int,int,int) ) ); 77 connect( picker, SIGNAL( dateClicked(int,int,int) ),this, SLOT( setDate(int,int,int) ) );
77 //connect( m1, SIGNAL( aboutToHide() ), 78 //connect( m1, SIGNAL( aboutToHide() ),
78 //this, SLOT( gotHide() ) ); 79 //this, SLOT( gotHide() ) );
79 } 80 }
80 picker->setDate( date.year(), date.month(), date.day() ); 81 picker->setDate( date.year(), date.month(), date.day() );
81 m1->popup(mapToGlobal(labelDate->pos()+QPoint(0,labelDate->height()))); 82 m1->popup(mapToGlobal(labelDate->pos()+QPoint(0,labelDate->height())));
82 picker->setFocus(); 83 picker->setFocus();
83} 84}
84void DateBookWeekLstHeader::setDate(int y, int m, int d) { 85void DateBookWeekLstHeader::setDate(int y, int m, int d) {
85 setDate(QDate(y,m,d)); 86 setDate(QDate(y,m,d));
86} 87}
87 88
88void DateBookWeekLstHeader::nextWeek() { 89void DateBookWeekLstHeader::nextWeek() {
89 setDate(date.addDays(7)); 90 setDate(date.addDays(7));
90} 91}
91void DateBookWeekLstHeader::prevWeek() { 92void DateBookWeekLstHeader::prevWeek() {
92 setDate(date.addDays(-7)); 93 setDate(date.addDays(-7));
93} 94}
94void DateBookWeekLstHeader::nextMonth() 95void DateBookWeekLstHeader::nextMonth()
95{ 96{
96 setDate(date.addDays(28)); 97 setDate(date.addDays(28));
97} 98}
98void DateBookWeekLstHeader::prevMonth() 99void DateBookWeekLstHeader::prevMonth()
99{ 100{
100 setDate(date.addDays(-28)); 101 setDate(date.addDays(-28));
101} 102}
102 103
103DateBookWeekLstDayHdr::DateBookWeekLstDayHdr(const QDate &d, bool /* onM */, 104DateBookWeekLstDayHdr::DateBookWeekLstDayHdr(const QDate &d, bool /* onM */,
104 QWidget* parent, 105 QWidget* parent,
105 const char* name, 106 const char* name,
106 WFlags fl ) 107 WFlags fl )
107 : DateBookWeekLstDayHdrBase(parent, name, fl) { 108 : DateBookWeekLstDayHdrBase(parent, name, fl) {
108 109
109 date=d; 110 date=d;
110 111
111 static const QString wdays=tr("MTWTFSSM", "Week days"); 112 static const QString wdays=tr("MTWTFSSM", "Week days");
112 char day=wdays[d.dayOfWeek()-1]; 113 char day=wdays[d.dayOfWeek()-1];
113 114
114 //dont use dayOfWeek() to save space ! 115 //dont use dayOfWeek() to save space !
115 label->setText( QString(QObject::tr(QString(QChar(day)))) + " " +QString::number(d.day()) ); 116 label->setText( QString(QObject::tr(QString(QChar(day)))) + " " +QString::number(d.day()) );
116 117
117 add->setText("+"); 118 add->setText("+");
118 119
119 if (d == QDate::currentDate()) { 120 if (d == QDate::currentDate()) {
120 QPalette pal=label->palette(); 121 QPalette pal=label->palette();
121 pal.setColor(QColorGroup::Foreground, QColor(0,0,255)); 122 pal.setColor(QColorGroup::Foreground, QColor(0,0,255));
122 label->setPalette(pal); 123 label->setPalette(pal);
123 124
124 /* 125 /*
125 QFont f=label->font(); 126 QFont f=label->font();
126 f.setItalic(true); 127 f.setItalic(true);
127 label->setFont(f); 128 label->setFont(f);
128 label->setPalette(QPalette(QColor(0,0,255),label->backgroundColor())); 129 label->setPalette(QPalette(QColor(0,0,255),label->backgroundColor()));
129 */ 130 */
130 } else if (d.dayOfWeek() == 7) { // FIXME: Match any holiday 131 } else if (d.dayOfWeek() == 7) { // FIXME: Match any holiday
131 QPalette pal=label->palette(); 132 QPalette pal=label->palette();
132 pal.setColor(QColorGroup::Foreground, QColor(255,0,0)); 133 pal.setColor(QColorGroup::Foreground, QColor(255,0,0));
133 label->setPalette(pal); 134 label->setPalette(pal);
134 } 135 }
135 136
136 connect (label, SIGNAL(clicked()), this, SLOT(showDay())); 137 connect (label, SIGNAL(clicked()), this, SLOT(showDay()));
137 connect (add, SIGNAL(clicked()), this, SLOT(newEvent())); 138 connect (add, SIGNAL(clicked()), this, SLOT(newEvent()));
138} 139}
139 140
140void DateBookWeekLstDayHdr::showDay() { 141void DateBookWeekLstDayHdr::showDay() {
141 emit showDate(date.year(), date.month(), date.day()); 142 emit showDate(date.year(), date.month(), date.day());
142} 143}
143 144
144void DateBookWeekLstDayHdr::newEvent() { 145void DateBookWeekLstDayHdr::newEvent() {
145 QDateTime start, stop; 146 QDateTime start, stop;
146 start=stop=date; 147 start=stop=date;
147 start.setTime(QTime(10,0)); 148 start.setTime(QTime(10,0));
148 stop.setTime(QTime(12,0)); 149 stop.setTime(QTime(12,0));
149 150
150 emit addEvent(start,stop,"",0); 151 emit addEvent(start,stop,"",0);
151} 152}
152DateBookWeekLstEvent::DateBookWeekLstEvent(const EffectiveEvent &ev, 153DateBookWeekLstEvent::DateBookWeekLstEvent(const EffectiveEvent &ev,
153 int weeklistviewconfig, 154 int weeklistviewconfig,
154 QWidget* parent, 155 QWidget* parent,
155 const char* name, 156 const char* name,
156 WFlags fl ) : OClickableLabel(parent,name,fl), event(ev) 157 WFlags fl ) : OClickableLabel(parent,name,fl), event(ev)
157{ 158{
158 // old values... lastday = "__|__", middle=" |---", Firstday="00:00", 159 // old values... lastday = "__|__", middle=" |---", Firstday="00:00",
159 QString s,start,middle,end,day; 160 QString s,start,middle,end,day;
160 161
161 qDebug("weeklistviewconfig=%d",weeklistviewconfig); 162 qDebug("weeklistviewconfig=%d",weeklistviewconfig);
162 if(weeklistviewconfig==NONE) {// No times displayed. 163 if(weeklistviewconfig==NONE) {// No times displayed.
163 // start.sprintf("%.2d:%.2d-",ev.start().hour(),ev.start().minute()); 164 // start.sprintf("%.2d:%.2d-",ev.start().hour(),ev.start().minute());
164 // middle.sprintf("<--->"); 165 // middle.sprintf("<--->");
165 // end.sprintf("-%.2d:%.2d",ev.end().hour(),ev.end().minute()); 166 // end.sprintf("-%.2d:%.2d",ev.end().hour(),ev.end().minute());
166 // day.sprintf("%.2d:%.2d-%.2d:%.2d",ev.start().hour(),ev.start().minute(),ev.end().hour(),ev.end().minute()); 167 // day.sprintf("%.2d:%.2d-%.2d:%.2d",ev.start().hour(),ev.start().minute(),ev.end().hour(),ev.end().minute());
167 } else if(weeklistviewconfig==NORMAL) {// "Normal", only display start time. 168 } else if(weeklistviewconfig==NORMAL) {// "Normal", only display start time.
168 start.sprintf("%.2d:%.2d",ev.start().hour(),ev.start().minute()); 169 start.sprintf("%.2d:%.2d",ev.start().hour(),ev.start().minute());
169 middle.sprintf(" |---"); 170 middle.sprintf(" |---");
170 end.sprintf("__|__"); 171 end.sprintf("__|__");
171 day.sprintf("%.2d:%.2d",ev.start().hour(),ev.start().minute()); 172 day.sprintf("%.2d:%.2d",ev.start().hour(),ev.start().minute());
172 } else if(weeklistviewconfig==EXTENDED) { // Extended mode, display start and end times. 173 } else if(weeklistviewconfig==EXTENDED) { // Extended mode, display start and end times.
173 start.sprintf("%.2d:%.2d-",ev.start().hour(),ev.start().minute()); 174 start.sprintf("%.2d:%.2d-",ev.start().hour(),ev.start().minute());
174 middle.sprintf("<--->"); 175 middle.sprintf("<--->");
175 end.sprintf("-%.2d:%.2d",ev.end().hour(),ev.end().minute()); 176 end.sprintf("-%.2d:%.2d",ev.end().hour(),ev.end().minute());
176 day.sprintf("%.2d:%.2d-%.2d:%.2d",ev.start().hour(),ev.start().minute(),ev.end().hour(),ev.end().minute()); 177 day.sprintf("%.2d:%.2d-%.2d:%.2d",ev.start().hour(),ev.start().minute(),ev.end().hour(),ev.end().minute());
177 } 178 }
178 179
179 if(ev.event().type() == Event::Normal) { 180 if(ev.event().type() == Event::Normal) {
180 if(ev.startDate()==ev.date() && ev.endDate()==ev.date()) {// day event. 181 if(ev.startDate()==ev.date() && ev.endDate()==ev.date()) {// day event.
181 s=day; 182 s=day;
182 } else if(ev.startDate()==ev.date()) {// start event. 183 } else if(ev.startDate()==ev.date()) {// start event.
183 s=start; 184 s=start;
184 } else if(ev.endDate()==ev.date()) { // end event. 185 } else if(ev.endDate()==ev.date()) { // end event.
185 s=end; 186 s=end;
186 } else {// middle day. 187 } else {// middle day.
187 s=middle; 188 s=middle;
188 } 189 }
189 } else { 190 } else {
190 s=""; 191 s="";
191 } 192 }
192 setText(QString(s) + " " + ev.description()); 193 setText(QString(s) + " " + ev.description());
193 connect(this, SIGNAL(clicked()), this, SLOT(editMe())); 194 connect(this, SIGNAL(clicked()), this, SLOT(editMe()));
194 setAlignment( int( QLabel::WordBreak | QLabel::AlignLeft ) ); 195 setAlignment( int( QLabel::WordBreak | QLabel::AlignLeft ) );
195} 196}
196void DateBookWeekLstEvent::editMe() { 197void DateBookWeekLstEvent::editMe() {
197 emit editEvent(event.event()); 198 emit editEvent(event.event());
198} 199}
199 200
200 201
201DateBookWeekLstView::DateBookWeekLstView(QValueList<EffectiveEvent> &ev, 202DateBookWeekLstView::DateBookWeekLstView(QValueList<EffectiveEvent> &ev,
202 const QDate &d, bool onM, 203 const QDate &d, bool onM,
203 QWidget* parent, 204 QWidget* parent,
204 const char* name, WFlags fl) 205 const char* name, WFlags fl)
205 : QWidget( parent, name, fl ) 206 : QWidget( parent, name, fl )
206{ 207{
207 Config config("DateBook"); 208 Config config("DateBook");
208 config.setGroup("Main"); 209 config.setGroup("Main");
209 int weeklistviewconfig=config.readNumEntry("weeklistviewconfig", NORMAL); 210 int weeklistviewconfig=config.readNumEntry("weeklistviewconfig", NORMAL);
210 qDebug("Read weeklistviewconfig: %d",weeklistviewconfig); 211 qDebug("Read weeklistviewconfig: %d",weeklistviewconfig);
211 212
212 bStartOnMonday=onM; 213 bStartOnMonday=onM;
213 setPalette(white); 214 setPalette(white);
214 setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding)); 215 setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding));
215 216
216 QVBoxLayout *layout = new QVBoxLayout( this ); 217 QVBoxLayout *layout = new QVBoxLayout( this );
217 218
218 qBubbleSort(ev); 219 qBubbleSort(ev);
219 QValueListIterator<EffectiveEvent> it; 220 QValueListIterator<EffectiveEvent> it;
220 it=ev.begin(); 221 it=ev.begin();
221 222
222 int dayOrder[7]; 223 int dayOrder[7];
223 if (bStartOnMonday) { 224 if (bStartOnMonday) {
224 for (int d=0; d<7; d++) dayOrder[d]=d+1; 225 for (int d=0; d<7; d++) dayOrder[d]=d+1;
225 } else { 226 } else {
226 for (int d=0; d<7; d++) dayOrder[d]=d; 227 for (int d=0; d<7; d++) dayOrder[d]=d;
227 dayOrder[0]=7; 228 dayOrder[0]=7;
228 } 229 }
229 230
230 // Calculate offset to first day of week. 231 // Calculate offset to first day of week.
231 int dayoffset=d.dayOfWeek(); 232 int dayoffset=d.dayOfWeek();
232 if(bStartOnMonday) dayoffset--; 233 if(bStartOnMonday) dayoffset--;
233 else if( dayoffset == 7 ) dayoffset = 0; 234 else if( dayoffset == 7 ) dayoffset = 0;
234 235
235 for (int i=0; i<7; i++) { 236 for (int i=0; i<7; i++) {
236 // Header 237 // Header
237 DateBookWeekLstDayHdr *hdr=new DateBookWeekLstDayHdr(d.addDays(i-dayoffset), bStartOnMonday,this); 238 DateBookWeekLstDayHdr *hdr=new DateBookWeekLstDayHdr(d.addDays(i-dayoffset), bStartOnMonday,this);
238 connect(hdr, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int))); 239 connect(hdr, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int)));
239 connect(hdr, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)), 240 connect(hdr, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)),
240 this, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&))); 241 this, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)));
241 layout->addWidget(hdr); 242 layout->addWidget(hdr);
242 243
243 // Events 244 // Events
244 while ( (*it).date().dayOfWeek() == dayOrder[i] && it!=ev.end() ) { 245 while ( (*it).date().dayOfWeek() == dayOrder[i] && it!=ev.end() ) {
245 if(!(((*it).end().hour()==0) && ((*it).end().minute()==0) && ((*it).startDate()!=(*it).date()))) {// Skip events ending at 00:00 starting at another day. 246 if(!(((*it).end().hour()==0) && ((*it).end().minute()==0) && ((*it).startDate()!=(*it).date()))) {// Skip events ending at 00:00 starting at another day.
246 DateBookWeekLstEvent *l=new DateBookWeekLstEvent(*it,weeklistviewconfig,this); 247 DateBookWeekLstEvent *l=new DateBookWeekLstEvent(*it,weeklistviewconfig,this);
247 layout->addWidget(l); 248 layout->addWidget(l);
248 connect (l, SIGNAL(editEvent(const Event&)), this, SIGNAL(editEvent(const Event&))); 249 connect (l, SIGNAL(editEvent(const Event&)), this, SIGNAL(editEvent(const Event&)));
249 } 250 }
250 it++; 251 it++;
251 } 252 }
252 layout->addItem(new QSpacerItem(1,1, QSizePolicy::Minimum, QSizePolicy::Expanding)); 253 layout->addItem(new QSpacerItem(1,1, QSizePolicy::Minimum, QSizePolicy::Expanding));
253 } 254 }
254} 255}
255DateBookWeekLstView::~DateBookWeekLstView(){} 256DateBookWeekLstView::~DateBookWeekLstView(){}
256void DateBookWeekLstView::keyPressEvent(QKeyEvent *e) {e->ignore();} 257void DateBookWeekLstView::keyPressEvent(QKeyEvent *e) {e->ignore();}
diff --git a/core/pim/datebook/datebookweeklstdayhdr.ui b/core/pim/datebook/datebookweeklstdayhdr.ui
index 9499726..74ea584 100644
--- a/core/pim/datebook/datebookweeklstdayhdr.ui
+++ b/core/pim/datebook/datebookweeklstdayhdr.ui
@@ -1,145 +1,145 @@
1<!DOCTYPE UI><UI> 1<!DOCTYPE UI><UI>
2<class>DateBookWeekLstDayHdrBase</class> 2<class>DateBookWeekLstDayHdrBase</class>
3<widget> 3<widget>
4 <class>QWidget</class> 4 <class>QWidget</class>
5 <property stdset="1"> 5 <property stdset="1">
6 <name>name</name> 6 <name>name</name>
7 <cstring>DateBookWeekLstDayHdrBase</cstring> 7 <cstring>DateBookWeekLstDayHdrBase</cstring>
8 </property> 8 </property>
9 <property stdset="1"> 9 <property stdset="1">
10 <name>geometry</name> 10 <name>geometry</name>
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>106</y> 13 <y>106</y>
14 <width>621</width> 14 <width>621</width>
15 <height>5</height> 15 <height>5</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
18 <property stdset="1"> 18 <property stdset="1">
19 <name>sizePolicy</name> 19 <name>sizePolicy</name>
20 <sizepolicy> 20 <sizepolicy>
21 <hsizetype>7</hsizetype> 21 <hsizetype>7</hsizetype>
22 <vsizetype>0</vsizetype> 22 <vsizetype>0</vsizetype>
23 </sizepolicy> 23 </sizepolicy>
24 </property> 24 </property>
25 <property> 25 <property>
26 <name>layoutMargin</name> 26 <name>layoutMargin</name>
27 </property> 27 </property>
28 <hbox> 28 <hbox>
29 <property stdset="1"> 29 <property stdset="1">
30 <name>margin</name> 30 <name>margin</name>
31 <number>0</number> 31 <number>0</number>
32 </property> 32 </property>
33 <property stdset="1"> 33 <property stdset="1">
34 <name>spacing</name> 34 <name>spacing</name>
35 <number>6</number> 35 <number>6</number>
36 </property> 36 </property>
37 <widget> 37 <widget>
38 <class>Line</class> 38 <class>Line</class>
39 <property stdset="1"> 39 <property stdset="1">
40 <name>name</name> 40 <name>name</name>
41 <cstring>Line1</cstring> 41 <cstring>Line1</cstring>
42 </property> 42 </property>
43 <property stdset="1"> 43 <property stdset="1">
44 <name>minimumSize</name> 44 <name>minimumSize</name>
45 <size> 45 <size>
46 <width>0</width> 46 <width>0</width>
47 <height>0</height> 47 <height>0</height>
48 </size> 48 </size>
49 </property> 49 </property>
50 <property stdset="1"> 50 <property stdset="1">
51 <name>maximumSize</name> 51 <name>maximumSize</name>
52 <size> 52 <size>
53 <width>32767</width> 53 <width>32767</width>
54 <height>32767</height> 54 <height>32767</height>
55 </size> 55 </size>
56 </property> 56 </property>
57 <property stdset="1"> 57 <property stdset="1">
58 <name>orientation</name> 58 <name>orientation</name>
59 <enum>Horizontal</enum> 59 <enum>Horizontal</enum>
60 </property> 60 </property>
61 </widget> 61 </widget>
62 <widget> 62 <widget>
63 <class>OClickableLabel</class> 63 <class>ClickableLabel</class>
64 <property stdset="1"> 64 <property stdset="1">
65 <name>name</name> 65 <name>name</name>
66 <cstring>label</cstring> 66 <cstring>label</cstring>
67 </property> 67 </property>
68 <property stdset="1"> 68 <property stdset="1">
69 <name>sizePolicy</name> 69 <name>sizePolicy</name>
70 <sizepolicy> 70 <sizepolicy>
71 <hsizetype>0</hsizetype> 71 <hsizetype>0</hsizetype>
72 <vsizetype>0</vsizetype> 72 <vsizetype>0</vsizetype>
73 </sizepolicy> 73 </sizepolicy>
74 </property> 74 </property>
75 <property stdset="1"> 75 <property stdset="1">
76 <name>font</name> 76 <name>font</name>
77 <font> 77 <font>
78 <bold>1</bold> 78 <bold>1</bold>
79 </font> 79 </font>
80 </property> 80 </property>
81 </widget> 81 </widget>
82 <widget> 82 <widget>
83 <class>Line</class> 83 <class>Line</class>
84 <property stdset="1"> 84 <property stdset="1">
85 <name>name</name> 85 <name>name</name>
86 <cstring>Line1_2</cstring> 86 <cstring>Line1_2</cstring>
87 </property> 87 </property>
88 <property stdset="1"> 88 <property stdset="1">
89 <name>minimumSize</name> 89 <name>minimumSize</name>
90 <size> 90 <size>
91 <width>0</width> 91 <width>0</width>
92 <height>0</height> 92 <height>0</height>
93 </size> 93 </size>
94 </property> 94 </property>
95 <property stdset="1"> 95 <property stdset="1">
96 <name>maximumSize</name> 96 <name>maximumSize</name>
97 <size> 97 <size>
98 <width>32767</width> 98 <width>32767</width>
99 <height>32767</height> 99 <height>32767</height>
100 </size> 100 </size>
101 </property> 101 </property>
102 <property stdset="1"> 102 <property stdset="1">
103 <name>orientation</name> 103 <name>orientation</name>
104 <enum>Horizontal</enum> 104 <enum>Horizontal</enum>
105 </property> 105 </property>
106 </widget> 106 </widget>
107 <widget> 107 <widget>
108 <class>OClickableLabel</class> 108 <class>ClickableLabel</class>
109 <property stdset="1"> 109 <property stdset="1">
110 <name>name</name> 110 <name>name</name>
111 <cstring>add</cstring> 111 <cstring>add</cstring>
112 </property> 112 </property>
113 <property stdset="1"> 113 <property stdset="1">
114 <name>sizePolicy</name> 114 <name>sizePolicy</name>
115 <sizepolicy> 115 <sizepolicy>
116 <hsizetype>0</hsizetype> 116 <hsizetype>0</hsizetype>
117 <vsizetype>0</vsizetype> 117 <vsizetype>0</vsizetype>
118 </sizepolicy> 118 </sizepolicy>
119 </property> 119 </property>
120 </widget> 120 </widget>
121 </hbox> 121 </hbox>
122</widget> 122</widget>
123<customwidgets> 123<customwidgets>
124 <customwidget> 124 <customwidget>
125 <class>OClickableLabel</class> 125 <class>ClickableLabel</class>
126 <header location="global">opie/oclickablelabel.h</header> 126 <header location="local">namespace_hack.h</header>
127 <sizehint> 127 <sizehint>
128 <width>-1</width> 128 <width>-1</width>
129 <height>-1</height> 129 <height>-1</height>
130 </sizehint> 130 </sizehint>
131 <container>0</container> 131 <container>0</container>
132 <sizepolicy> 132 <sizepolicy>
133 <hordata>5</hordata> 133 <hordata>5</hordata>
134 <verdata>5</verdata> 134 <verdata>5</verdata>
135 </sizepolicy> 135 </sizepolicy>
136 <pixmap>image0</pixmap> 136 <pixmap>image0</pixmap>
137 </customwidget> 137 </customwidget>
138</customwidgets> 138</customwidgets>
139<images> 139<images>
140 <image> 140 <image>
141 <name>image0</name> 141 <name>image0</name>
142 <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1ddec44f503c0ae2a154410f53d0ed20e2bf6bdb656dd6861dd23d9a66591b0587fd1654235ebded6f0edcd53e419d87ae7b1f4f9b8f906d0bfe012317426a70b07bdc2f3ec77f8ed6b89559061a0343d06a124cc105596482585094bc0ae599b04646c9018926491b2205e140c485cace25755c175d0a967b622ff900b8cc9c7d29af594ea722d589167f813aa852ba07d94b9dce296e883fe7bb163f23896753</data> 142 <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1ddec44f503c0ae2a154410f53d0ed20e2bf6bdb656dd6861dd23d9a66591b0587fd1654235ebded6f0edcd53e419d87ae7b1f4f9b8f906d0bfe012317426a70b07bdc2f3ec77f8ed6b89559061a0343d06a124cc105596482585094bc0ae599b04646c9018926491b2205e140c485cace25755c175d0a967b622ff900b8cc9c7d29af594ea722d589167f813aa852ba07d94b9dce296e883fe7bb163f23896753</data>
143 </image> 143 </image>
144</images> 144</images>
145</UI> 145</UI>
diff --git a/core/pim/datebook/dateentry.ui b/core/pim/datebook/dateentry.ui
index acc607c..f776911 100644
--- a/core/pim/datebook/dateentry.ui
+++ b/core/pim/datebook/dateentry.ui
@@ -48,614 +48,614 @@
48 <property stdset="1"> 48 <property stdset="1">
49 <name>spacing</name> 49 <name>spacing</name>
50 <number>0</number> 50 <number>0</number>
51 </property> 51 </property>
52 <widget row="1" column="0" > 52 <widget row="1" column="0" >
53 <class>QLabel</class> 53 <class>QLabel</class>
54 <property stdset="1"> 54 <property stdset="1">
55 <name>name</name> 55 <name>name</name>
56 <cstring>TextLabel2</cstring> 56 <cstring>TextLabel2</cstring>
57 </property> 57 </property>
58 <property stdset="1"> 58 <property stdset="1">
59 <name>frameShape</name> 59 <name>frameShape</name>
60 <enum>MShape</enum> 60 <enum>MShape</enum>
61 </property> 61 </property>
62 <property stdset="1"> 62 <property stdset="1">
63 <name>frameShadow</name> 63 <name>frameShadow</name>
64 <enum>MShadow</enum> 64 <enum>MShadow</enum>
65 </property> 65 </property>
66 <property stdset="1"> 66 <property stdset="1">
67 <name>text</name> 67 <name>text</name>
68 <string>Location</string> 68 <string>Location</string>
69 </property> 69 </property>
70 </widget> 70 </widget>
71 <widget row="2" column="0" > 71 <widget row="2" column="0" >
72 <class>QLabel</class> 72 <class>QLabel</class>
73 <property stdset="1"> 73 <property stdset="1">
74 <name>name</name> 74 <name>name</name>
75 <cstring>TextLabel2_2</cstring> 75 <cstring>TextLabel2_2</cstring>
76 </property> 76 </property>
77 <property stdset="1"> 77 <property stdset="1">
78 <name>text</name> 78 <name>text</name>
79 <string>Category</string> 79 <string>Category</string>
80 </property> 80 </property>
81 <property> 81 <property>
82 <name>buddy</name> 82 <name>buddy</name>
83 <cstring>comboPriority</cstring> 83 <cstring>comboPriority</cstring>
84 </property> 84 </property>
85 </widget> 85 </widget>
86 <widget row="0" column="1" rowspan="1" colspan="3" > 86 <widget row="0" column="1" rowspan="1" colspan="3" >
87 <class>QComboBox</class> 87 <class>QComboBox</class>
88 <item> 88 <item>
89 <property> 89 <property>
90 <name>text</name> 90 <name>text</name>
91 <string></string> 91 <string></string>
92 </property> 92 </property>
93 </item> 93 </item>
94 <item> 94 <item>
95 <property> 95 <property>
96 <name>text</name> 96 <name>text</name>
97 <string>Meeting</string> 97 <string>Meeting</string>
98 </property> 98 </property>
99 </item> 99 </item>
100 <item> 100 <item>
101 <property> 101 <property>
102 <name>text</name> 102 <name>text</name>
103 <string>Lunch</string> 103 <string>Lunch</string>
104 </property> 104 </property>
105 </item> 105 </item>
106 <item> 106 <item>
107 <property> 107 <property>
108 <name>text</name> 108 <name>text</name>
109 <string>Dinner</string> 109 <string>Dinner</string>
110 </property> 110 </property>
111 </item> 111 </item>
112 <item> 112 <item>
113 <property> 113 <property>
114 <name>text</name> 114 <name>text</name>
115 <string>Travel</string> 115 <string>Travel</string>
116 </property> 116 </property>
117 </item> 117 </item>
118 <property stdset="1"> 118 <property stdset="1">
119 <name>name</name> 119 <name>name</name>
120 <cstring>comboDescription</cstring> 120 <cstring>comboDescription</cstring>
121 </property> 121 </property>
122 <property stdset="1"> 122 <property stdset="1">
123 <name>sizePolicy</name> 123 <name>sizePolicy</name>
124 <sizepolicy> 124 <sizepolicy>
125 <hsizetype>3</hsizetype> 125 <hsizetype>3</hsizetype>
126 <vsizetype>0</vsizetype> 126 <vsizetype>0</vsizetype>
127 </sizepolicy> 127 </sizepolicy>
128 </property> 128 </property>
129 <property stdset="1"> 129 <property stdset="1">
130 <name>editable</name> 130 <name>editable</name>
131 <bool>true</bool> 131 <bool>true</bool>
132 </property> 132 </property>
133 <property stdset="1"> 133 <property stdset="1">
134 <name>currentItem</name> 134 <name>currentItem</name>
135 <number>0</number> 135 <number>0</number>
136 </property> 136 </property>
137 <property stdset="1"> 137 <property stdset="1">
138 <name>duplicatesEnabled</name> 138 <name>duplicatesEnabled</name>
139 <bool>false</bool> 139 <bool>false</bool>
140 </property> 140 </property>
141 </widget> 141 </widget>
142 <widget row="0" column="0" > 142 <widget row="0" column="0" >
143 <class>QLabel</class> 143 <class>QLabel</class>
144 <property stdset="1"> 144 <property stdset="1">
145 <name>name</name> 145 <name>name</name>
146 <cstring>TextLabel1</cstring> 146 <cstring>TextLabel1</cstring>
147 </property> 147 </property>
148 <property stdset="1"> 148 <property stdset="1">
149 <name>text</name> 149 <name>text</name>
150 <string>Description </string> 150 <string>Description </string>
151 </property> 151 </property>
152 </widget> 152 </widget>
153 <widget row="1" column="1" rowspan="1" colspan="3" > 153 <widget row="1" column="1" rowspan="1" colspan="3" >
154 <class>QComboBox</class> 154 <class>QComboBox</class>
155 <item> 155 <item>
156 <property> 156 <property>
157 <name>text</name> 157 <name>text</name>
158 <string></string> 158 <string></string>
159 </property> 159 </property>
160 </item> 160 </item>
161 <item> 161 <item>
162 <property> 162 <property>
163 <name>text</name> 163 <name>text</name>
164 <string>Office</string> 164 <string>Office</string>
165 </property> 165 </property>
166 </item> 166 </item>
167 <item> 167 <item>
168 <property> 168 <property>
169 <name>text</name> 169 <name>text</name>
170 <string>Home</string> 170 <string>Home</string>
171 </property> 171 </property>
172 </item> 172 </item>
173 <property stdset="1"> 173 <property stdset="1">
174 <name>name</name> 174 <name>name</name>
175 <cstring>comboLocation</cstring> 175 <cstring>comboLocation</cstring>
176 </property> 176 </property>
177 <property stdset="1"> 177 <property stdset="1">
178 <name>sizePolicy</name> 178 <name>sizePolicy</name>
179 <sizepolicy> 179 <sizepolicy>
180 <hsizetype>3</hsizetype> 180 <hsizetype>3</hsizetype>
181 <vsizetype>0</vsizetype> 181 <vsizetype>0</vsizetype>
182 </sizepolicy> 182 </sizepolicy>
183 </property> 183 </property>
184 <property stdset="1"> 184 <property stdset="1">
185 <name>editable</name> 185 <name>editable</name>
186 <bool>true</bool> 186 <bool>true</bool>
187 </property> 187 </property>
188 <property stdset="1"> 188 <property stdset="1">
189 <name>currentItem</name> 189 <name>currentItem</name>
190 <number>0</number> 190 <number>0</number>
191 </property> 191 </property>
192 <property stdset="1"> 192 <property stdset="1">
193 <name>duplicatesEnabled</name> 193 <name>duplicatesEnabled</name>
194 <bool>false</bool> 194 <bool>false</bool>
195 </property> 195 </property>
196 </widget> 196 </widget>
197 <widget row="2" column="1" rowspan="1" colspan="3" > 197 <widget row="2" column="1" rowspan="1" colspan="3" >
198 <class>CategorySelect</class> 198 <class>CategorySelect</class>
199 <property stdset="1"> 199 <property stdset="1">
200 <name>name</name> 200 <name>name</name>
201 <cstring>comboCategory</cstring> 201 <cstring>comboCategory</cstring>
202 </property> 202 </property>
203 <property stdset="1"> 203 <property stdset="1">
204 <name>sizePolicy</name> 204 <name>sizePolicy</name>
205 <sizepolicy> 205 <sizepolicy>
206 <hsizetype>3</hsizetype> 206 <hsizetype>3</hsizetype>
207 <vsizetype>1</vsizetype> 207 <vsizetype>1</vsizetype>
208 </sizepolicy> 208 </sizepolicy>
209 </property> 209 </property>
210 </widget> 210 </widget>
211 <widget row="3" column="0" rowspan="2" colspan="1" > 211 <widget row="3" column="0" rowspan="2" colspan="1" >
212 <class>QLabel</class> 212 <class>QLabel</class>
213 <property stdset="1"> 213 <property stdset="1">
214 <name>name</name> 214 <name>name</name>
215 <cstring>TextLabel3</cstring> 215 <cstring>TextLabel3</cstring>
216 </property> 216 </property>
217 <property stdset="1"> 217 <property stdset="1">
218 <name>text</name> 218 <name>text</name>
219 <string>Start - End </string> 219 <string>Start - End </string>
220 </property> 220 </property>
221 </widget> 221 </widget>
222 <widget row="3" column="1" > 222 <widget row="3" column="1" >
223 <class>QPushButton</class> 223 <class>QPushButton</class>
224 <property stdset="1"> 224 <property stdset="1">
225 <name>name</name> 225 <name>name</name>
226 <cstring>buttonStart</cstring> 226 <cstring>buttonStart</cstring>
227 </property> 227 </property>
228 <property stdset="1"> 228 <property stdset="1">
229 <name>minimumSize</name> 229 <name>minimumSize</name>
230 <size> 230 <size>
231 <width>70</width> 231 <width>70</width>
232 <height>0</height> 232 <height>0</height>
233 </size> 233 </size>
234 </property> 234 </property>
235 <property stdset="1"> 235 <property stdset="1">
236 <name>maximumSize</name> 236 <name>maximumSize</name>
237 <size> 237 <size>
238 <width>70</width> 238 <width>70</width>
239 <height>32767</height> 239 <height>32767</height>
240 </size> 240 </size>
241 </property> 241 </property>
242 <property stdset="1"> 242 <property stdset="1">
243 <name>text</name> 243 <name>text</name>
244 <string>Jan 02 00</string> 244 <string>Jan 02 00</string>
245 </property> 245 </property>
246 </widget> 246 </widget>
247 <widget row="4" column="1" > 247 <widget row="4" column="1" >
248 <class>QLineEdit</class> 248 <class>QLineEdit</class>
249 <property stdset="1"> 249 <property stdset="1">
250 <name>name</name> 250 <name>name</name>
251 <cstring>comboStart</cstring> 251 <cstring>comboStart</cstring>
252 </property> 252 </property>
253 <property stdset="1"> 253 <property stdset="1">
254 <name>sizePolicy</name> 254 <name>sizePolicy</name>
255 <sizepolicy> 255 <sizepolicy>
256 <hsizetype>3</hsizetype> 256 <hsizetype>3</hsizetype>
257 <vsizetype>0</vsizetype> 257 <vsizetype>0</vsizetype>
258 </sizepolicy> 258 </sizepolicy>
259 </property> 259 </property>
260 <property stdset="1"> 260 <property stdset="1">
261 <name>minimumSize</name> 261 <name>minimumSize</name>
262 <size> 262 <size>
263 <width>70</width> 263 <width>70</width>
264 <height>0</height> 264 <height>0</height>
265 </size> 265 </size>
266 </property> 266 </property>
267 <property stdset="1"> 267 <property stdset="1">
268 <name>maximumSize</name> 268 <name>maximumSize</name>
269 <size> 269 <size>
270 <width>70</width> 270 <width>70</width>
271 <height>32767</height> 271 <height>32767</height>
272 </size> 272 </size>
273 </property> 273 </property>
274 <property stdset="1"> 274 <property stdset="1">
275 <name>alignment</name> 275 <name>alignment</name>
276 <set>AlignHCenter</set> 276 <set>AlignHCenter</set>
277 </property> 277 </property>
278 <property> 278 <property>
279 <name>hAlign</name> 279 <name>hAlign</name>
280 </property> 280 </property>
281 </widget> 281 </widget>
282 <spacer row="3" column="2" rowspan="2" colspan="1" > 282 <spacer row="3" column="2" rowspan="2" colspan="1" >
283 <property> 283 <property>
284 <name>name</name> 284 <name>name</name>
285 <cstring>Spacer1_2</cstring> 285 <cstring>Spacer1_2</cstring>
286 </property> 286 </property>
287 <property stdset="1"> 287 <property stdset="1">
288 <name>orientation</name> 288 <name>orientation</name>
289 <enum>Horizontal</enum> 289 <enum>Horizontal</enum>
290 </property> 290 </property>
291 <property stdset="1"> 291 <property stdset="1">
292 <name>sizeType</name> 292 <name>sizeType</name>
293 <enum>Expanding</enum> 293 <enum>Expanding</enum>
294 </property> 294 </property>
295 <property> 295 <property>
296 <name>sizeHint</name> 296 <name>sizeHint</name>
297 <size> 297 <size>
298 <width>20</width> 298 <width>20</width>
299 <height>20</height> 299 <height>20</height>
300 </size> 300 </size>
301 </property> 301 </property>
302 </spacer> 302 </spacer>
303 <widget row="5" column="1" rowspan="1" colspan="3" > 303 <widget row="5" column="1" rowspan="1" colspan="3" >
304 <class>OTimePicker</class> 304 <class>TimePicker</class>
305 <property stdset="1"> 305 <property stdset="1">
306 <name>name</name> 306 <name>name</name>
307 <cstring>timePickerStart</cstring> 307 <cstring>timePickerStart</cstring>
308 </property> 308 </property>
309 <property stdset="1"> 309 <property stdset="1">
310 <name>sizePolicy</name> 310 <name>sizePolicy</name>
311 <sizepolicy> 311 <sizepolicy>
312 <hsizetype>3</hsizetype> 312 <hsizetype>3</hsizetype>
313 <vsizetype>1</vsizetype> 313 <vsizetype>1</vsizetype>
314 </sizepolicy> 314 </sizepolicy>
315 </property> 315 </property>
316 </widget> 316 </widget>
317 <widget row="3" column="3" > 317 <widget row="3" column="3" >
318 <class>QPushButton</class> 318 <class>QPushButton</class>
319 <property stdset="1"> 319 <property stdset="1">
320 <name>name</name> 320 <name>name</name>
321 <cstring>buttonEnd</cstring> 321 <cstring>buttonEnd</cstring>
322 </property> 322 </property>
323 <property stdset="1"> 323 <property stdset="1">
324 <name>minimumSize</name> 324 <name>minimumSize</name>
325 <size> 325 <size>
326 <width>70</width> 326 <width>70</width>
327 <height>0</height> 327 <height>0</height>
328 </size> 328 </size>
329 </property> 329 </property>
330 <property stdset="1"> 330 <property stdset="1">
331 <name>maximumSize</name> 331 <name>maximumSize</name>
332 <size> 332 <size>
333 <width>70</width> 333 <width>70</width>
334 <height>32767</height> 334 <height>32767</height>
335 </size> 335 </size>
336 </property> 336 </property>
337 <property stdset="1"> 337 <property stdset="1">
338 <name>text</name> 338 <name>text</name>
339 <string>Jan 02 00</string> 339 <string>Jan 02 00</string>
340 </property> 340 </property>
341 </widget> 341 </widget>
342 <widget row="4" column="3" > 342 <widget row="4" column="3" >
343 <class>QLineEdit</class> 343 <class>QLineEdit</class>
344 <property stdset="1"> 344 <property stdset="1">
345 <name>name</name> 345 <name>name</name>
346 <cstring>comboEnd</cstring> 346 <cstring>comboEnd</cstring>
347 </property> 347 </property>
348 <property stdset="1"> 348 <property stdset="1">
349 <name>sizePolicy</name> 349 <name>sizePolicy</name>
350 <sizepolicy> 350 <sizepolicy>
351 <hsizetype>3</hsizetype> 351 <hsizetype>3</hsizetype>
352 <vsizetype>0</vsizetype> 352 <vsizetype>0</vsizetype>
353 </sizepolicy> 353 </sizepolicy>
354 </property> 354 </property>
355 <property stdset="1"> 355 <property stdset="1">
356 <name>minimumSize</name> 356 <name>minimumSize</name>
357 <size> 357 <size>
358 <width>70</width> 358 <width>70</width>
359 <height>0</height> 359 <height>0</height>
360 </size> 360 </size>
361 </property> 361 </property>
362 <property stdset="1"> 362 <property stdset="1">
363 <name>maximumSize</name> 363 <name>maximumSize</name>
364 <size> 364 <size>
365 <width>70</width> 365 <width>70</width>
366 <height>32767</height> 366 <height>32767</height>
367 </size> 367 </size>
368 </property> 368 </property>
369 <property stdset="1"> 369 <property stdset="1">
370 <name>alignment</name> 370 <name>alignment</name>
371 <set>AlignHCenter</set> 371 <set>AlignHCenter</set>
372 </property> 372 </property>
373 <property> 373 <property>
374 <name>hAlign</name> 374 <name>hAlign</name>
375 </property> 375 </property>
376 </widget> 376 </widget>
377 <widget row="5" column="0" > 377 <widget row="5" column="0" >
378 <class>QLabel</class> 378 <class>QLabel</class>
379 <property stdset="1"> 379 <property stdset="1">
380 <name>name</name> 380 <name>name</name>
381 <cstring>TimePickerLabel</cstring> 381 <cstring>TimePickerLabel</cstring>
382 </property> 382 </property>
383 <property stdset="1"> 383 <property stdset="1">
384 <name>text</name> 384 <name>text</name>
385 <string>Start time</string> 385 <string>Start time</string>
386 </property> 386 </property>
387 </widget> 387 </widget>
388 <widget row="6" column="0" > 388 <widget row="6" column="0" >
389 <class>QCheckBox</class> 389 <class>QCheckBox</class>
390 <property stdset="1"> 390 <property stdset="1">
391 <name>name</name> 391 <name>name</name>
392 <cstring>checkAllDay</cstring> 392 <cstring>checkAllDay</cstring>
393 </property> 393 </property>
394 <property stdset="1"> 394 <property stdset="1">
395 <name>text</name> 395 <name>text</name>
396 <string>All day</string> 396 <string>All day</string>
397 </property> 397 </property>
398 </widget> 398 </widget>
399 <widget row="7" column="0" > 399 <widget row="7" column="0" >
400 <class>QLabel</class> 400 <class>QLabel</class>
401 <property stdset="1"> 401 <property stdset="1">
402 <name>name</name> 402 <name>name</name>
403 <cstring>TextLabel3_2_2</cstring> 403 <cstring>TextLabel3_2_2</cstring>
404 </property> 404 </property>
405 <property stdset="1"> 405 <property stdset="1">
406 <name>text</name> 406 <name>text</name>
407 <string>Time zone</string> 407 <string>Time zone</string>
408 </property> 408 </property>
409 </widget> 409 </widget>
410 <widget row="7" column="1" rowspan="1" colspan="3" > 410 <widget row="7" column="1" rowspan="1" colspan="3" >
411 <class>TimeZoneSelector</class> 411 <class>TimeZoneSelector</class>
412 <property stdset="1"> 412 <property stdset="1">
413 <name>name</name> 413 <name>name</name>
414 <cstring>timezone</cstring> 414 <cstring>timezone</cstring>
415 </property> 415 </property>
416 <property stdset="1"> 416 <property stdset="1">
417 <name>sizePolicy</name> 417 <name>sizePolicy</name>
418 <sizepolicy> 418 <sizepolicy>
419 <hsizetype>3</hsizetype> 419 <hsizetype>3</hsizetype>
420 <vsizetype>1</vsizetype> 420 <vsizetype>1</vsizetype>
421 </sizepolicy> 421 </sizepolicy>
422 </property> 422 </property>
423 </widget> 423 </widget>
424 <widget row="8" column="0" > 424 <widget row="8" column="0" >
425 <class>QCheckBox</class> 425 <class>QCheckBox</class>
426 <property stdset="1"> 426 <property stdset="1">
427 <name>name</name> 427 <name>name</name>
428 <cstring>checkAlarm</cstring> 428 <cstring>checkAlarm</cstring>
429 </property> 429 </property>
430 <property stdset="1"> 430 <property stdset="1">
431 <name>enabled</name> 431 <name>enabled</name>
432 <bool>true</bool> 432 <bool>true</bool>
433 </property> 433 </property>
434 <property stdset="1"> 434 <property stdset="1">
435 <name>autoMask</name> 435 <name>autoMask</name>
436 <bool>false</bool> 436 <bool>false</bool>
437 </property> 437 </property>
438 <property stdset="1"> 438 <property stdset="1">
439 <name>text</name> 439 <name>text</name>
440 <string>&amp;Alarm</string> 440 <string>&amp;Alarm</string>
441 </property> 441 </property>
442 <property stdset="1"> 442 <property stdset="1">
443 <name>checked</name> 443 <name>checked</name>
444 <bool>false</bool> 444 <bool>false</bool>
445 </property> 445 </property>
446 </widget> 446 </widget>
447 <widget row="8" column="1" rowspan="1" colspan="2" > 447 <widget row="8" column="1" rowspan="1" colspan="2" >
448 <class>QSpinBox</class> 448 <class>QSpinBox</class>
449 <property stdset="1"> 449 <property stdset="1">
450 <name>name</name> 450 <name>name</name>
451 <cstring>spinAlarm</cstring> 451 <cstring>spinAlarm</cstring>
452 </property> 452 </property>
453 <property stdset="1"> 453 <property stdset="1">
454 <name>enabled</name> 454 <name>enabled</name>
455 <bool>false</bool> 455 <bool>false</bool>
456 </property> 456 </property>
457 <property stdset="1"> 457 <property stdset="1">
458 <name>suffix</name> 458 <name>suffix</name>
459 <string> minutes</string> 459 <string> minutes</string>
460 </property> 460 </property>
461 <property stdset="1"> 461 <property stdset="1">
462 <name>maxValue</name> 462 <name>maxValue</name>
463 <number>180</number> 463 <number>180</number>
464 </property> 464 </property>
465 <property stdset="1"> 465 <property stdset="1">
466 <name>minValue</name> 466 <name>minValue</name>
467 <number>0</number> 467 <number>0</number>
468 </property> 468 </property>
469 <property stdset="1"> 469 <property stdset="1">
470 <name>lineStep</name> 470 <name>lineStep</name>
471 <number>5</number> 471 <number>5</number>
472 </property> 472 </property>
473 <property stdset="1"> 473 <property stdset="1">
474 <name>value</name> 474 <name>value</name>
475 <number>5</number> 475 <number>5</number>
476 </property> 476 </property>
477 </widget> 477 </widget>
478 <widget row="8" column="3" > 478 <widget row="8" column="3" >
479 <class>QComboBox</class> 479 <class>QComboBox</class>
480 <item> 480 <item>
481 <property> 481 <property>
482 <name>text</name> 482 <name>text</name>
483 <string>Silent</string> 483 <string>Silent</string>
484 </property> 484 </property>
485 </item> 485 </item>
486 <item> 486 <item>
487 <property> 487 <property>
488 <name>text</name> 488 <name>text</name>
489 <string>Loud</string> 489 <string>Loud</string>
490 </property> 490 </property>
491 </item> 491 </item>
492 <property stdset="1"> 492 <property stdset="1">
493 <name>name</name> 493 <name>name</name>
494 <cstring>comboSound</cstring> 494 <cstring>comboSound</cstring>
495 </property> 495 </property>
496 <property stdset="1"> 496 <property stdset="1">
497 <name>enabled</name> 497 <name>enabled</name>
498 <bool>false</bool> 498 <bool>false</bool>
499 </property> 499 </property>
500 </widget> 500 </widget>
501 <widget row="9" column="0" > 501 <widget row="9" column="0" >
502 <class>QLabel</class> 502 <class>QLabel</class>
503 <property stdset="1"> 503 <property stdset="1">
504 <name>name</name> 504 <name>name</name>
505 <cstring>lblRepeat</cstring> 505 <cstring>lblRepeat</cstring>
506 </property> 506 </property>
507 <property stdset="1"> 507 <property stdset="1">
508 <name>text</name> 508 <name>text</name>
509 <string>Repeat</string> 509 <string>Repeat</string>
510 </property> 510 </property>
511 </widget> 511 </widget>
512 <widget row="9" column="1" rowspan="1" colspan="3" > 512 <widget row="9" column="1" rowspan="1" colspan="3" >
513 <class>QToolButton</class> 513 <class>QToolButton</class>
514 <property stdset="1"> 514 <property stdset="1">
515 <name>name</name> 515 <name>name</name>
516 <cstring>cmdRepeat</cstring> 516 <cstring>cmdRepeat</cstring>
517 </property> 517 </property>
518 <property stdset="1"> 518 <property stdset="1">
519 <name>sizePolicy</name> 519 <name>sizePolicy</name>
520 <sizepolicy> 520 <sizepolicy>
521 <hsizetype>3</hsizetype> 521 <hsizetype>3</hsizetype>
522 <vsizetype>0</vsizetype> 522 <vsizetype>0</vsizetype>
523 </sizepolicy> 523 </sizepolicy>
524 </property> 524 </property>
525 <property stdset="1"> 525 <property stdset="1">
526 <name>focusPolicy</name> 526 <name>focusPolicy</name>
527 <enum>TabFocus</enum> 527 <enum>TabFocus</enum>
528 </property> 528 </property>
529 <property stdset="1"> 529 <property stdset="1">
530 <name>text</name> 530 <name>text</name>
531 <string>No Repeat...</string> 531 <string>No Repeat...</string>
532 </property> 532 </property>
533 </widget> 533 </widget>
534 <widget row="10" column="0" rowspan="1" colspan="4" > 534 <widget row="10" column="0" rowspan="1" colspan="4" >
535 <class>QToolButton</class> 535 <class>QToolButton</class>
536 <property stdset="1"> 536 <property stdset="1">
537 <name>name</name> 537 <name>name</name>
538 <cstring>editNote</cstring> 538 <cstring>editNote</cstring>
539 </property> 539 </property>
540 <property stdset="1"> 540 <property stdset="1">
541 <name>text</name> 541 <name>text</name>
542 <string>Note...</string> 542 <string>Note...</string>
543 </property> 543 </property>
544 </widget> 544 </widget>
545 </grid> 545 </grid>
546</widget> 546</widget>
547<customwidgets> 547<customwidgets>
548 <customwidget> 548 <customwidget>
549 <class>TimeZoneSelector</class> 549 <class>TimeZoneSelector</class>
550 <header location="global">qpe/tzselect.h</header> 550 <header location="global">qpe/tzselect.h</header>
551 <sizehint> 551 <sizehint>
552 <width>21</width> 552 <width>21</width>
553 <height>10</height> 553 <height>10</height>
554 </sizehint> 554 </sizehint>
555 <container>0</container> 555 <container>0</container>
556 <sizepolicy> 556 <sizepolicy>
557 <hordata>7</hordata> 557 <hordata>7</hordata>
558 <verdata>1</verdata> 558 <verdata>1</verdata>
559 </sizepolicy> 559 </sizepolicy>
560 <pixmap>image0</pixmap> 560 <pixmap>image0</pixmap>
561 </customwidget> 561 </customwidget>
562 <customwidget> 562 <customwidget>
563 <class>CategorySelect</class> 563 <class>CategorySelect</class>
564 <header location="global">qpe/categoryselect.h</header> 564 <header location="global">qpe/categoryselect.h</header>
565 <sizehint> 565 <sizehint>
566 <width>-1</width> 566 <width>-1</width>
567 <height>-1</height> 567 <height>-1</height>
568 </sizehint> 568 </sizehint>
569 <container>0</container> 569 <container>0</container>
570 <sizepolicy> 570 <sizepolicy>
571 <hordata>7</hordata> 571 <hordata>7</hordata>
572 <verdata>1</verdata> 572 <verdata>1</verdata>
573 </sizepolicy> 573 </sizepolicy>
574 <pixmap>image1</pixmap> 574 <pixmap>image1</pixmap>
575 </customwidget> 575 </customwidget>
576 <customwidget> 576 <customwidget>
577 <class>OTimePicker</class> 577 <class>TimePicker</class>
578 <header location="local">opie/otimepicker.h</header> 578 <header location="local">namespace_hack.h</header>
579 <sizehint> 579 <sizehint>
580 <width>-1</width> 580 <width>-1</width>
581 <height>-1</height> 581 <height>-1</height>
582 </sizehint> 582 </sizehint>
583 <container>0</container> 583 <container>0</container>
584 <sizepolicy> 584 <sizepolicy>
585 <hordata>7</hordata> 585 <hordata>7</hordata>
586 <verdata>1</verdata> 586 <verdata>1</verdata>
587 </sizepolicy> 587 </sizepolicy>
588 <pixmap>image1</pixmap> 588 <pixmap>image1</pixmap>
589 </customwidget> 589 </customwidget>
590</customwidgets> 590</customwidgets>
591<images> 591<images>
592 <image> 592 <image>
593 <name>image0</name> 593 <name>image0</name>
594 <data format="XPM.GZ" length="45">789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade6523250004143a55a6b2e0026630c4f</data> 594 <data format="XPM.GZ" length="45">789cd3d7528808f055d0d2e72a2e492cc94c5648ce482c52d04a29cdcdad8c8eb5ade6523250004143a55a6b2e0026630c4f</data>
595 </image> 595 </image>
596 <image> 596 <image>
597 <name>image1</name> 597 <name>image1</name>
598 <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data> 598 <data format="XPM.GZ" length="646">789c6dd2c10ac2300c00d07bbf2234b7229d1be245fc04c5a3201e4615f430059d0711ff5ddb2e6bb236ec90eed134cb5a19d8ef36602af5ecdbfeeac05dda0798d3abebde87e3faa374d3807fa0d633a52d38d8de6f679fe33fc776e196f53cd010188256a3600a292882096246517815ca99884606e18044a3a40d91824820924265a7923a2e8bcd05f33db1173e002913175f2a6be6d3294871a2d95fa00e8a94ee017b69d339d90df1e77c57ea072ede6758</data>
599 </image> 599 </image>
600</images> 600</images>
601<connections> 601<connections>
602 <connection> 602 <connection>
603 <sender>checkAlarm</sender> 603 <sender>checkAlarm</sender>
604 <signal>toggled(bool)</signal> 604 <signal>toggled(bool)</signal>
605 <receiver>spinAlarm</receiver> 605 <receiver>spinAlarm</receiver>
606 <slot>setEnabled(bool)</slot> 606 <slot>setEnabled(bool)</slot>
607 </connection> 607 </connection>
608 <connection> 608 <connection>
609 <sender>comboEnd</sender> 609 <sender>comboEnd</sender>
610 <signal>textChanged(const QString&amp;)</signal> 610 <signal>textChanged(const QString&amp;)</signal>
611 <receiver>DateEntryBase</receiver> 611 <receiver>DateEntryBase</receiver>
612 <slot>endTimeChanged( const QString &amp; )</slot> 612 <slot>endTimeChanged( const QString &amp; )</slot>
613 </connection> 613 </connection>
614 <connection> 614 <connection>
615 <sender>cmdRepeat</sender> 615 <sender>cmdRepeat</sender>
616 <signal>clicked()</signal> 616 <signal>clicked()</signal>
617 <receiver>DateEntryBase</receiver> 617 <receiver>DateEntryBase</receiver>
618 <slot>slotRepeat()</slot> 618 <slot>slotRepeat()</slot>
619 </connection> 619 </connection>
620 <connection> 620 <connection>
621 <sender>comboStart</sender> 621 <sender>comboStart</sender>
622 <signal>textChanged(const QString &amp;)</signal> 622 <signal>textChanged(const QString &amp;)</signal>
623 <receiver>DateEntryBase</receiver> 623 <receiver>DateEntryBase</receiver>
624 <slot>startTimeEdited( const QString &amp; )</slot> 624 <slot>startTimeEdited( const QString &amp; )</slot>
625 </connection> 625 </connection>
626 <connection> 626 <connection>
627 <sender>checkAllDay</sender> 627 <sender>checkAllDay</sender>
628 <signal>toggled(bool)</signal> 628 <signal>toggled(bool)</signal>
629 <receiver>comboEnd</receiver> 629 <receiver>comboEnd</receiver>
630 <slot>setDisabled(bool)</slot> 630 <slot>setDisabled(bool)</slot>
631 </connection> 631 </connection>
632 <connection> 632 <connection>
633 <sender>checkAllDay</sender> 633 <sender>checkAllDay</sender>
634 <signal>toggled(bool)</signal> 634 <signal>toggled(bool)</signal>
635 <receiver>timePickerStart</receiver> 635 <receiver>timePickerStart</receiver>
636 <slot>setDisabled(bool)</slot> 636 <slot>setDisabled(bool)</slot>
637 </connection> 637 </connection>
638 <connection> 638 <connection>
639 <sender>checkAlarm</sender> 639 <sender>checkAlarm</sender>
640 <signal>toggled(bool)</signal> 640 <signal>toggled(bool)</signal>
641 <receiver>comboSound</receiver> 641 <receiver>comboSound</receiver>
642 <slot>setEnabled(bool)</slot> 642 <slot>setEnabled(bool)</slot>
643 </connection> 643 </connection>
644 <connection> 644 <connection>
645 <sender>checkAllDay</sender> 645 <sender>checkAllDay</sender>
646 <signal>toggled(bool)</signal> 646 <signal>toggled(bool)</signal>
647 <receiver>comboStart</receiver> 647 <receiver>comboStart</receiver>
648 <slot>setDisabled(bool)</slot> 648 <slot>setDisabled(bool)</slot>
649 </connection> 649 </connection>
650 <slot access="public">endDateChanged( const QString &amp; )</slot> 650 <slot access="public">endDateChanged( const QString &amp; )</slot>
651 <slot access="public">endDateChanged( int, int, int )</slot> 651 <slot access="public">endDateChanged( int, int, int )</slot>
652 <slot access="public">endTimeChanged( const QString &amp; )</slot> 652 <slot access="public">endTimeChanged( const QString &amp; )</slot>
653 <slot access="public">slotRepeat()</slot> 653 <slot access="public">slotRepeat()</slot>
654 <slot access="public">slotWait( int )</slot> 654 <slot access="public">slotWait( int )</slot>
655 <slot access="public">startDateChanged( const QString &amp; )</slot> 655 <slot access="public">startDateChanged( const QString &amp; )</slot>
656 <slot access="public">startDateChanged(int, int, int)</slot> 656 <slot access="public">startDateChanged(int, int, int)</slot>
657 <slot access="public">startTimeEdited( const QString &amp; )</slot> 657 <slot access="public">startTimeEdited( const QString &amp; )</slot>
658 <slot access="public">typeChanged( const QString &amp; )</slot> 658 <slot access="public">typeChanged( const QString &amp; )</slot>
659 <slot access="public">tzexecute(void)</slot> 659 <slot access="public">tzexecute(void)</slot>
660</connections> 660</connections>
661</UI> 661</UI>
diff --git a/core/pim/datebook/dateentryimpl.cpp b/core/pim/datebook/dateentryimpl.cpp
index dbff18f..7b4716f 100644
--- a/core/pim/datebook/dateentryimpl.cpp
+++ b/core/pim/datebook/dateentryimpl.cpp
@@ -1,276 +1,277 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "namespace_hack.h"
21#include "dateentryimpl.h" 22#include "dateentryimpl.h"
22#include "repeatentry.h" 23#include "repeatentry.h"
23 24
24#include <qpe/qpeapplication.h> 25#include <qpe/qpeapplication.h>
25#include <qpe/categoryselect.h> 26#include <qpe/categoryselect.h>
26#include <qpe/datebookmonth.h> 27#include <qpe/datebookmonth.h>
27#include <qpe/tzselect.h> 28#include <qpe/tzselect.h>
28 29
29#include <qlineedit.h> 30#include <qlineedit.h>
30#include <qspinbox.h> 31#include <qspinbox.h>
31 32
32#include <opie2/otimepicker.h> 33#include <opie2/otimepicker.h>
33#include "onoteedit.h" 34#include "onoteedit.h"
34 35
35#include <stdlib.h> 36#include <stdlib.h>
36#include <stdio.h> 37#include <stdio.h>
37 38
38/* 39/*
39 * Constructs a DateEntry which is a child of 'parent', with the 40 * Constructs a DateEntry which is a child of 'parent', with the
40 * name 'name' and widget flags set to 'f' 41 * name 'name' and widget flags set to 'f'
41 * 42 *
42 * The dialog will by default be modeless, unless you set 'modal' to 43 * The dialog will by default be modeless, unless you set 'modal' to
43 * TRUE to construct a modal dialog. 44 * TRUE to construct a modal dialog.
44 */ 45 */
45 46
46DateEntry::DateEntry( bool startOnMonday, const QDateTime &start, 47DateEntry::DateEntry( bool startOnMonday, const QDateTime &start,
47 const QDateTime &end, bool whichClock, QWidget* parent, 48 const QDateTime &end, bool whichClock, QWidget* parent,
48 const char* name ) 49 const char* name )
49 : DateEntryBase( parent, name ), 50 : DateEntryBase( parent, name ),
50 ampm( whichClock ), 51 ampm( whichClock ),
51 startWeekOnMonday( startOnMonday ), 52 startWeekOnMonday( startOnMonday ),
52 m_showStart(true) 53 m_showStart(true)
53{ 54{
54 init(); 55 init();
55 setDates(start,end); 56 setDates(start,end);
56 setFocusProxy(comboDescription); 57 setFocusProxy(comboDescription);
57} 58}
58 59
59bool DateEntry::eventFilter(QObject *obj, QEvent *ev ) 60bool DateEntry::eventFilter(QObject *obj, QEvent *ev )
60{ 61{
61 if( ev->type() == QEvent::FocusIn ){ 62 if( ev->type() == QEvent::FocusIn ){
62 if( obj == comboStart ){ 63 if( obj == comboStart ){
63 timePickerStart->setHour(startTime.hour()); 64 timePickerStart->setHour(startTime.hour());
64 timePickerStart->setMinute(startTime.minute()); 65 timePickerStart->setMinute(startTime.minute());
65 TimePickerLabel->setText( tr("Start Time" ) ); 66 TimePickerLabel->setText( tr("Start Time" ) );
66 m_showStart= true; 67 m_showStart= true;
67 }else if( obj == comboEnd ){ 68 }else if( obj == comboEnd ){
68 timePickerStart->setHour(endTime.hour()); 69 timePickerStart->setHour(endTime.hour());
69 timePickerStart->setMinute(endTime.minute()); 70 timePickerStart->setMinute(endTime.minute());
70 TimePickerLabel->setText( tr("End Time") ); 71 TimePickerLabel->setText( tr("End Time") );
71 m_showStart = false; 72 m_showStart = false;
72 } 73 }
73 } else if( ev->type() == QEvent::FocusOut ){ 74 } else if( ev->type() == QEvent::FocusOut ){
74// if( obj == comboEnd ){ 75// if( obj == comboEnd ){
75// QString s; 76// QString s;
76// s.sprintf("%.2d:%.2d",endTime.hour(), endTime.minute()); 77// s.sprintf("%.2d:%.2d",endTime.hour(), endTime.minute());
77// comboEnd->setText(s); 78// comboEnd->setText(s);
78// } 79// }
79// else if( obj == comboStart ){ 80// else if( obj == comboStart ){
80// QString s; 81// QString s;
81// s.sprintf("%.2d:%.2d",startTime.hour(), startTime.minute()); 82// s.sprintf("%.2d:%.2d",startTime.hour(), startTime.minute());
82// comboStart->setText(s); 83// comboStart->setText(s);
83// } 84// }
84 } 85 }
85 86
86 return false; 87 return false;
87} 88}
88 89
89static void addOrPick( QComboBox* combo, const QString& t ) 90static void addOrPick( QComboBox* combo, const QString& t )
90{ 91{
91 // Pick an item if one excists 92 // Pick an item if one excists
92 for (int i=0; i<combo->count(); i++) { 93 for (int i=0; i<combo->count(); i++) {
93 if ( combo->text(i) == t ) { 94 if ( combo->text(i) == t ) {
94 combo->setCurrentItem(i); 95 combo->setCurrentItem(i);
95 return; 96 return;
96 } 97 }
97 } 98 }
98 99
99 // Else add one 100 // Else add one
100 combo->insertItem(t); 101 combo->insertItem(t);
101 combo->setCurrentItem(combo->count()-1); 102 combo->setCurrentItem(combo->count()-1);
102} 103}
103 104
104DateEntry::DateEntry( bool startOnMonday, const Event &event, bool whichClock, 105DateEntry::DateEntry( bool startOnMonday, const Event &event, bool whichClock,
105 QWidget* parent, const char* name ) 106 QWidget* parent, const char* name )
106 : DateEntryBase( parent, name ), 107 : DateEntryBase( parent, name ),
107 ampm( whichClock ), 108 ampm( whichClock ),
108 startWeekOnMonday( startOnMonday ), 109 startWeekOnMonday( startOnMonday ),
109 m_showStart(true) 110 m_showStart(true)
110 111
111{ 112{
112 init(); 113 init();
113 setDates(event.start(),event.end()); 114 setDates(event.start(),event.end());
114 comboCategory->setCategories( event.categories(), "Calendar", tr("Calendar") ); 115 comboCategory->setCategories( event.categories(), "Calendar", tr("Calendar") );
115 if(!event.description().isEmpty()) 116 if(!event.description().isEmpty())
116 addOrPick( comboDescription, event.description() ); 117 addOrPick( comboDescription, event.description() );
117 if(!event.location().isEmpty()) 118 if(!event.location().isEmpty())
118 addOrPick( comboLocation, event.location() ); 119 addOrPick( comboLocation, event.location() );
119 checkAlarm->setChecked( event.hasAlarm() ); 120 checkAlarm->setChecked( event.hasAlarm() );
120 checkAllDay->setChecked( event.type() == Event::AllDay ); 121 checkAllDay->setChecked( event.type() == Event::AllDay );
121 if(!event.notes().isEmpty()) noteStr=event.notes(); 122 if(!event.notes().isEmpty()) noteStr=event.notes();
122 else noteStr=""; 123 else noteStr="";
123 spinAlarm->setValue(event.alarmTime()); 124 spinAlarm->setValue(event.alarmTime());
124 if ( event.alarmSound() != Event::Silent ) 125 if ( event.alarmSound() != Event::Silent )
125 comboSound->setCurrentItem( 1 ); 126 comboSound->setCurrentItem( 1 );
126 if ( event.hasRepeat() ) { 127 if ( event.hasRepeat() ) {
127 rp = event.repeatPattern(); 128 rp = event.repeatPattern();
128 cmdRepeat->setText( tr("Repeat...") ); 129 cmdRepeat->setText( tr("Repeat...") );
129 } 130 }
130 setRepeatLabel(); 131 setRepeatLabel();
131} 132}
132 133
133void DateEntry::setDates( const QDateTime& s, const QDateTime& e ) 134void DateEntry::setDates( const QDateTime& s, const QDateTime& e )
134{ 135{
135 startDate = s.date(); 136 startDate = s.date();
136 endDate = e.date(); 137 endDate = e.date();
137 startTime = s.time(); 138 startTime = s.time();
138 endTime = e.time(); 139 endTime = e.time();
139 140
140 startDateChanged( s.date().year(), s.date().month(), s.date().day() ); 141 startDateChanged( s.date().year(), s.date().month(), s.date().day() );
141 endDateChanged( e.date().year(), e.date().month(), e.date().day() ); 142 endDateChanged( e.date().year(), e.date().month(), e.date().day() );
142 143
143 updateTimeEdit(true,true); 144 updateTimeEdit(true,true);
144} 145}
145 146
146void DateEntry::updateTimeEdit(bool s, bool e) { 147void DateEntry::updateTimeEdit(bool s, bool e) {
147 148
148 // Comboboxes 149 // Comboboxes
149 QString strStart, strEnd; 150 QString strStart, strEnd;
150 int shour, ehour; 151 int shour, ehour;
151 if ( ampm ) { 152 if ( ampm ) {
152 shour = startTime.hour(); 153 shour = startTime.hour();
153 ehour = endTime.hour(); 154 ehour = endTime.hour();
154 if ( shour >= 12 ) { 155 if ( shour >= 12 ) {
155 if ( shour > 12 ) 156 if ( shour > 12 )
156 shour -= 12; 157 shour -= 12;
157 strStart.sprintf( "%d:%02d PM", shour, startTime.minute() ); 158 strStart.sprintf( "%d:%02d PM", shour, startTime.minute() );
158 } else { 159 } else {
159 if ( shour == 0 ) 160 if ( shour == 0 )
160 shour = 12; 161 shour = 12;
161 strStart.sprintf( "%d:%02d AM", shour, startTime.minute() ); 162 strStart.sprintf( "%d:%02d AM", shour, startTime.minute() );
162 } 163 }
163 if ( ehour == 24 && endTime.minute() == 0 ) { 164 if ( ehour == 24 && endTime.minute() == 0 ) {
164 strEnd = "11:59 PM"; // or "midnight" 165 strEnd = "11:59 PM"; // or "midnight"
165 } else if ( ehour >= 12 ) { 166 } else if ( ehour >= 12 ) {
166 if ( ehour > 12 ) 167 if ( ehour > 12 )
167 ehour -= 12; 168 ehour -= 12;
168 strEnd.sprintf( "%d:%02d PM", ehour, endTime.minute() ); 169 strEnd.sprintf( "%d:%02d PM", ehour, endTime.minute() );
169 } else { 170 } else {
170 if ( ehour == 0 ) 171 if ( ehour == 0 )
171 ehour = 12; 172 ehour = 12;
172 strEnd.sprintf( "%d:%02d AM", ehour, endTime.minute() ); 173 strEnd.sprintf( "%d:%02d AM", ehour, endTime.minute() );
173 } 174 }
174 } else { 175 } else {
175 strStart.sprintf( "%02d:%02d", startTime.hour(), startTime.minute() ); 176 strStart.sprintf( "%02d:%02d", startTime.hour(), startTime.minute() );
176 strEnd.sprintf( "%02d:%02d", endTime.hour(), endTime.minute() ); 177 strEnd.sprintf( "%02d:%02d", endTime.hour(), endTime.minute() );
177 } 178 }
178 179
179 if (s) comboStart->setText(strStart); 180 if (s) comboStart->setText(strStart);
180 if (e) comboEnd->setText(strEnd); 181 if (e) comboEnd->setText(strEnd);
181} 182}
182 183
183void DateEntry::init() 184void DateEntry::init()
184{ 185{
185 comboDescription->setInsertionPolicy(QComboBox::AtCurrent); 186 comboDescription->setInsertionPolicy(QComboBox::AtCurrent);
186 comboLocation->setInsertionPolicy(QComboBox::AtCurrent); 187 comboLocation->setInsertionPolicy(QComboBox::AtCurrent);
187 188
188 initCombos(); 189 initCombos();
189 QPopupMenu *m1 = new QPopupMenu( this ); 190 QPopupMenu *m1 = new QPopupMenu( this );
190 startPicker = new DateBookMonth( m1, 0, TRUE ); 191 startPicker = new DateBookMonth( m1, 0, TRUE );
191 m1->insertItem( startPicker ); 192 m1->insertItem( startPicker );
192 buttonStart->setPopup( m1 ); 193 buttonStart->setPopup( m1 );
193 connect( startPicker, SIGNAL( dateClicked(int,int,int) ), 194 connect( startPicker, SIGNAL( dateClicked(int,int,int) ),
194 this, SLOT( startDateChanged(int,int,int) ) ); 195 this, SLOT( startDateChanged(int,int,int) ) );
195 196
196 //Let start button change both start and end dates 197 //Let start button change both start and end dates
197 connect( startPicker, SIGNAL( dateClicked(int,int,int) ), 198 connect( startPicker, SIGNAL( dateClicked(int,int,int) ),
198 this, SLOT( endDateChanged(int,int,int) ) ); 199 this, SLOT( endDateChanged(int,int,int) ) );
199 connect( qApp, SIGNAL( clockChanged(bool) ), 200 connect( qApp, SIGNAL( clockChanged(bool) ),
200 this, SLOT( slotChangeClock(bool) ) ); 201 this, SLOT( slotChangeClock(bool) ) );
201 connect( qApp, SIGNAL(weekChanged(bool)), 202 connect( qApp, SIGNAL(weekChanged(bool)),
202 this, SLOT(slotChangeStartOfWeek(bool)) ); 203 this, SLOT(slotChangeStartOfWeek(bool)) );
203 204
204 connect( editNote, SIGNAL(clicked()), 205 connect( editNote, SIGNAL(clicked()),
205 this, SLOT(slotEditNote()) ); 206 this, SLOT(slotEditNote()) );
206 207
207 QPopupMenu *m2 = new QPopupMenu( this ); 208 QPopupMenu *m2 = new QPopupMenu( this );
208 endPicker = new DateBookMonth( m2, 0, TRUE ); 209 endPicker = new DateBookMonth( m2, 0, TRUE );
209 m2->insertItem( endPicker ); 210 m2->insertItem( endPicker );
210 buttonEnd->setPopup( m2 ); 211 buttonEnd->setPopup( m2 );
211 connect( endPicker, SIGNAL( dateClicked(int,int,int) ), 212 connect( endPicker, SIGNAL( dateClicked(int,int,int) ),
212 this, SLOT( endDateChanged(int,int,int) ) ); 213 this, SLOT( endDateChanged(int,int,int) ) );
213 214
214 connect(timePickerStart, SIGNAL( timeChanged(const QTime&) ), 215 connect(timePickerStart, SIGNAL( timeChanged(const QTime&) ),
215 this, SLOT( startTimePicked(const QTime&) )); 216 this, SLOT( startTimePicked(const QTime&) ));
216 // install eventFilters 217 // install eventFilters
217 comboEnd->installEventFilter( this ); 218 comboEnd->installEventFilter( this );
218 comboStart->installEventFilter( this ); 219 comboStart->installEventFilter( this );
219} 220}
220 221
221/* 222/*
222 * Destroys the object and frees any allocated resources 223 * Destroys the object and frees any allocated resources
223 */ 224 */
224DateEntry::~DateEntry() 225DateEntry::~DateEntry()
225{ 226{
226 // no need to delete child widgets, Qt does it all for us 227 // no need to delete child widgets, Qt does it all for us
227 //cout << "Del: " << comboStart->currentText() << endl; 228 //cout << "Del: " << comboStart->currentText() << endl;
228} 229}
229 230
230/* 231/*
231 * public slot 232 * public slot
232 */ 233 */
233 234
234void DateEntry::slotEditNote() { 235void DateEntry::slotEditNote() {
235 QString s; 236 QString s;
236 s = "<B>"+ TimeString::longDateString( startDate ) + "</B>"; 237 s = "<B>"+ TimeString::longDateString( startDate ) + "</B>";
237// s.sprintf("<B>%d/%d</B> ", startDate.day(), startDate.month()); 238// s.sprintf("<B>%d/%d</B> ", startDate.day(), startDate.month());
238 NoteEntry noteDlg(s+comboDescription->currentText(), noteStr, 239 NoteEntry noteDlg(s+comboDescription->currentText(), noteStr,
239 this,0,TRUE); 240 this,0,TRUE);
240 241
241 if ( QPEApplication::execDialog( &noteDlg ) ) { 242 if ( QPEApplication::execDialog( &noteDlg ) ) {
242 noteStr=noteDlg.note->text(); 243 noteStr=noteDlg.note->text();
243 } 244 }
244 245
245} 246}
246 247
247void DateEntry::endDateChanged( int y, int m, int d ) 248void DateEntry::endDateChanged( int y, int m, int d )
248{ 249{
249 endDate.setYMD( y, m, d ); 250 endDate.setYMD( y, m, d );
250 if ( endDate < startDate ) { 251 if ( endDate < startDate ) {
251 endDate = startDate; 252 endDate = startDate;
252 } 253 }
253 254
254 buttonEnd->setText( TimeString::shortDate( endDate ) ); 255 buttonEnd->setText( TimeString::shortDate( endDate ) );
255 256
256 endPicker->setDate( endDate.year(), endDate.month(), endDate.day() ); 257 endPicker->setDate( endDate.year(), endDate.month(), endDate.day() );
257} 258}
258 259
259static QTime parseTime( const QString& s, bool ampm ) 260static QTime parseTime( const QString& s, bool ampm )
260{ 261{
261 QTime tmpTime; 262 QTime tmpTime;
262 QStringList l = QStringList::split( ':', s ); 263 QStringList l = QStringList::split( ':', s );
263 int hour = l[0].toInt(); 264 int hour = l[0].toInt();
264 if ( ampm ) { 265 if ( ampm ) {
265 int i=0; 266 int i=0;
266 while (i<int(l[1].length()) && l[1][i]>='0' && l[1][i]<='9') 267 while (i<int(l[1].length()) && l[1][i]>='0' && l[1][i]<='9')
267 i++; 268 i++;
268 QString digits = l[1].left(i); 269 QString digits = l[1].left(i);
269 if ( l[1].contains( "PM", FALSE ) ) { 270 if ( l[1].contains( "PM", FALSE ) ) {
270 if ( hour != 12 ) 271 if ( hour != 12 )
271 hour += 12; 272 hour += 12;
272 } else { 273 } else {
273 if ( hour == 12 ) 274 if ( hour == 12 )
274 hour = 0; 275 hour = 0;
275 } 276 }
276 l[1] = digits; 277 l[1] = digits;
diff --git a/core/pim/datebook/namespace_hack.h b/core/pim/datebook/namespace_hack.h
new file mode 100644
index 0000000..c15b5ed
--- a/dev/null
+++ b/core/pim/datebook/namespace_hack.h
@@ -0,0 +1,20 @@
1#ifndef NAME_SPACE_HACK_H
2#define NAME_SPACE_HACK_H
3
4#include <opie2/otimepicker.h>
5#include <opie2/oclickablelabel.h>
6
7class TimePicker : public Opie::Ui::OTimePicker {
8public:
9 TimePicker( QWidget* p = 0, const char* name = 0, WFlags fl = 0 )
10 : Opie::Ui::OTimePicker(p,name,fl){}
11
12};
13class ClickableLabel : public Opie::Ui::OClickableLabel {
14public:
15 ClickableLabel(QWidget *p=0,const char* name=0, WFlags fl = 0 )
16 : Opie::Ui::OClickableLabel(p,name,fl){}
17};
18
19
20#endif