summaryrefslogtreecommitdiff
path: root/core/pim/datebook/datebookweeklst.cpp
Unidiff
Diffstat (limited to 'core/pim/datebook/datebookweeklst.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook/datebookweeklst.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/core/pim/datebook/datebookweeklst.cpp b/core/pim/datebook/datebookweeklst.cpp
index 42a1753..af40143 100644
--- a/core/pim/datebook/datebookweeklst.cpp
+++ b/core/pim/datebook/datebookweeklst.cpp
@@ -69,13 +69,13 @@ void DateBookWeekLstHeader::pickDate() {
69 static QPopupMenu *m1 = 0; 69 static QPopupMenu *m1 = 0;
70 static DateBookMonth *picker = 0; 70 static DateBookMonth *picker = 0;
71 if ( !m1 ) { 71 if ( !m1 ) {
72 m1 = new QPopupMenu( this ); 72 m1 = new QPopupMenu( this );
73 picker = new DateBookMonth( m1, 0, TRUE ); 73 picker = new DateBookMonth( m1, 0, TRUE );
74 m1->insertItem( picker ); 74 m1->insertItem( picker );
75 connect( picker, SIGNAL( dateClicked( int, int, int ) ),this, SLOT( setDate( int, int, int ) ) ); 75 connect( picker, SIGNAL( dateClicked(int,int,int) ),this, SLOT( setDate(int,int,int) ) );
76 //connect( m1, SIGNAL( aboutToHide() ), 76 //connect( m1, SIGNAL( aboutToHide() ),
77 //this, SLOT( gotHide() ) ); 77 //this, SLOT( gotHide() ) );
78 } 78 }
79 picker->setDate( date.year(), date.month(), date.day() ); 79 picker->setDate( date.year(), date.month(), date.day() );
80 m1->popup(mapToGlobal(labelDate->pos()+QPoint(0,labelDate->height()))); 80 m1->popup(mapToGlobal(labelDate->pos()+QPoint(0,labelDate->height())));
81 picker->setFocus(); 81 picker->setFocus();
@@ -232,22 +232,22 @@ DateBookWeekLstView::DateBookWeekLstView(QValueList<EffectiveEvent> &ev,
232 else if( dayoffset == 7 ) dayoffset = 0; 232 else if( dayoffset == 7 ) dayoffset = 0;
233 233
234 for (int i=0; i<7; i++) { 234 for (int i=0; i<7; i++) {
235 // Header 235 // Header
236 DateBookWeekLstDayHdr *hdr=new DateBookWeekLstDayHdr(d.addDays(i-dayoffset), bStartOnMonday,this); 236 DateBookWeekLstDayHdr *hdr=new DateBookWeekLstDayHdr(d.addDays(i-dayoffset), bStartOnMonday,this);
237 connect(hdr, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int))); 237 connect(hdr, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int)));
238 connect(hdr, SIGNAL(addEvent(const QDateTime &, const QDateTime &, const QString &, const QString &)), 238 connect(hdr, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)),
239 this, SIGNAL(addEvent(const QDateTime &, const QDateTime &, const QString &, const QString &))); 239 this, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)));
240 layout->addWidget(hdr); 240 layout->addWidget(hdr);
241 241
242 // Events 242 // Events
243 while ( (*it).date().dayOfWeek() == dayOrder[i] && it!=ev.end() ) { 243 while ( (*it).date().dayOfWeek() == dayOrder[i] && it!=ev.end() ) {
244 if(!(((*it).end().hour()==0) && ((*it).end().minute()==0) && ((*it).startDate()!=(*it).date()))) {// Skip events ending at 00:00 starting at another day. 244 if(!(((*it).end().hour()==0) && ((*it).end().minute()==0) && ((*it).startDate()!=(*it).date()))) {// Skip events ending at 00:00 starting at another day.
245 DateBookWeekLstEvent *l=new DateBookWeekLstEvent(*it,weeklistviewconfig,this); 245 DateBookWeekLstEvent *l=new DateBookWeekLstEvent(*it,weeklistviewconfig,this);
246 layout->addWidget(l); 246 layout->addWidget(l);
247 connect (l, SIGNAL(editEvent(const Event &)), this, SIGNAL(editEvent(const Event &))); 247 connect (l, SIGNAL(editEvent(const Event&)), this, SIGNAL(editEvent(const Event&)));
248 } 248 }
249 it++; 249 it++;
250 } 250 }
251 layout->addItem(new QSpacerItem(1,1, QSizePolicy::Minimum, QSizePolicy::Expanding)); 251 layout->addItem(new QSpacerItem(1,1, QSizePolicy::Minimum, QSizePolicy::Expanding));
252 } 252 }
253} 253}
@@ -262,24 +262,24 @@ DateBookWeekLstDblView::DateBookWeekLstDblView(QValueList<EffectiveEvent> &ev1,
262 : QWidget( parent, name, fl ) 262 : QWidget( parent, name, fl )
263{ 263{
264 QHBoxLayout *layout = new QHBoxLayout( this ); 264 QHBoxLayout *layout = new QHBoxLayout( this );
265 265
266 DateBookWeekLstView *w=new DateBookWeekLstView(ev1,d,onM,this); 266 DateBookWeekLstView *w=new DateBookWeekLstView(ev1,d,onM,this);
267 layout->addWidget(w); 267 layout->addWidget(w);
268 connect (w, SIGNAL(editEvent(const Event &)), this, SIGNAL(editEvent(const Event &))); 268 connect (w, SIGNAL(editEvent(const Event&)), this, SIGNAL(editEvent(const Event&)));
269 connect (w, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int))); 269 connect (w, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int)));
270 connect (w, SIGNAL(addEvent(const QDateTime &, const QDateTime &, const QString &,const QString &)), 270 connect (w, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)),
271 this, SIGNAL(addEvent(const QDateTime &, const QDateTime &, const QString &, const QString &))); 271 this, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)));
272 272
273 273
274 w=new DateBookWeekLstView(ev2,d.addDays(7),onM,this); 274 w=new DateBookWeekLstView(ev2,d.addDays(7),onM,this);
275 layout->addWidget(w); 275 layout->addWidget(w);
276 connect (w, SIGNAL(editEvent(const Event &)), this, SIGNAL(editEvent(const Event &))); 276 connect (w, SIGNAL(editEvent(const Event&)), this, SIGNAL(editEvent(const Event&)));
277 connect (w, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int))); 277 connect (w, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int)));
278 connect (w, SIGNAL(addEvent(const QDateTime &, const QDateTime &, const QString &, const QString &)), 278 connect (w, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)),
279 this, SIGNAL(addEvent(const QDateTime &, const QDateTime &, const QString &, const QString &))); 279 this, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)));
280} 280}
281 281
282DateBookWeekLst::DateBookWeekLst( bool ap, bool onM, DateBookDB *newDB, 282DateBookWeekLst::DateBookWeekLst( bool ap, bool onM, DateBookDB *newDB,
283 QWidget *parent, 283 QWidget *parent,
284 const char *name ) 284 const char *name )
285 : QWidget( parent, name ), 285 : QWidget( parent, name ),
@@ -291,13 +291,13 @@ DateBookWeekLst::DateBookWeekLst( bool ap, bool onM, DateBookDB *newDB,
291 setFocusPolicy(StrongFocus); 291 setFocusPolicy(StrongFocus);
292 layout = new QVBoxLayout( this ); 292 layout = new QVBoxLayout( this );
293 layout->setMargin(0); 293 layout->setMargin(0);
294 294
295 header=new DateBookWeekLstHeader(onM, this); 295 header=new DateBookWeekLstHeader(onM, this);
296 layout->addWidget( header ); 296 layout->addWidget( header );
297 connect(header, SIGNAL(dateChanged(QDate &)), this, SLOT(dateChanged(QDate &))); 297 connect(header, SIGNAL(dateChanged(QDate&)), this, SLOT(dateChanged(QDate&)));
298 connect(header, SIGNAL(setDbl(bool)), this, SLOT(setDbl(bool))); 298 connect(header, SIGNAL(setDbl(bool)), this, SLOT(setDbl(bool)));
299 299
300 scroll=new QScrollView(this); 300 scroll=new QScrollView(this);
301 scroll->setResizePolicy(QScrollView::AutoOneFit); 301 scroll->setResizePolicy(QScrollView::AutoOneFit);
302 layout->addWidget(scroll); 302 layout->addWidget(scroll);
303 303
@@ -355,16 +355,16 @@ void DateBookWeekLst::getEvents() {
355 QValueList<EffectiveEvent> el2 = db->getEffectiveEvents(start2, stop); 355 QValueList<EffectiveEvent> el2 = db->getEffectiveEvents(start2, stop);
356 view=new DateBookWeekLstDblView(el,el2,start,bStartOnMonday,scroll); 356 view=new DateBookWeekLstDblView(el,el2,start,bStartOnMonday,scroll);
357 } else { 357 } else {
358 view=new DateBookWeekLstView(el,start,bStartOnMonday,scroll); 358 view=new DateBookWeekLstView(el,start,bStartOnMonday,scroll);
359 } 359 }
360 360
361 connect (view, SIGNAL(editEvent(const Event &)), this, SIGNAL(editEvent(const Event &))); 361 connect (view, SIGNAL(editEvent(const Event&)), this, SIGNAL(editEvent(const Event&)));
362 connect (view, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int))); 362 connect (view, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int)));
363 connect (view, SIGNAL(addEvent(const QDateTime &, const QDateTime &, const QString &, const QString &)), 363 connect (view, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)),
364 this, SIGNAL(addEvent(const QDateTime &, const QDateTime &, const QString &, const QString &))); 364 this, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)));
365 365
366 scroll->addChild(view); 366 scroll->addChild(view);
367 view->show(); 367 view->show();
368 scroll->updateScrollBars(); 368 scroll->updateScrollBars();
369} 369}
370 370