summaryrefslogtreecommitdiffabout
path: root/korganizer/koagendaview.cpp
Unidiff
Diffstat (limited to 'korganizer/koagendaview.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koagendaview.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index b9909d6..2996acb 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -479,26 +479,26 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
479 479
480 // these blank widgets make the All Day Event box line up with the agenda 480 // these blank widgets make the All Day Event box line up with the agenda
481 dummyAllDayRight->setFixedWidth(mAgenda->verticalScrollBar()->width()); 481 dummyAllDayRight->setFixedWidth(mAgenda->verticalScrollBar()->width());
482 dummyAgendaRight->setFixedWidth(mAgenda->verticalScrollBar()->width()); 482 dummyAgendaRight->setFixedWidth(mAgenda->verticalScrollBar()->width());
483 mDummyAllDayLeft->setFixedWidth(mTimeLabels->width()); 483 mDummyAllDayLeft->setFixedWidth(mTimeLabels->width());
484 484
485 // Scrolling 485 // Scrolling
486 connect(mAgenda->verticalScrollBar(),SIGNAL(valueChanged(int)), 486 connect(mAgenda->verticalScrollBar(),SIGNAL(valueChanged(int)),
487 mTimeLabels, SLOT(positionChanged())); 487 mTimeLabels, SLOT(positionChanged()));
488 connect(mTimeLabels->verticalScrollBar(),SIGNAL(valueChanged(int)), 488 connect(mTimeLabels->verticalScrollBar(),SIGNAL(valueChanged(int)),
489 SLOT(setContentsPos(int))); 489 SLOT(setContentsPos(int)));
490 490
491 connect(mAgenda,SIGNAL(showDateView( int, QDate )),SIGNAL(showDateView( int, QDate ))); 491 connect(mAgenda,SIGNAL(showDateView( int, int)),SLOT(slotShowDateView( int, int )));
492 connect(mAllDayAgenda,SIGNAL(showDateView( int, QDate )),SIGNAL(showDateView( int, QDate ))); 492 connect(mAllDayAgenda,SIGNAL(showDateView( int, int )), SLOT(slotShowDateView( int, int ) ));
493 493
494 // Create/Show/Edit/Delete Event 494 // Create/Show/Edit/Delete Event
495 connect(mAgenda,SIGNAL(newEventSignal(int,int)), 495 connect(mAgenda,SIGNAL(newEventSignal(int,int)),
496 SLOT(newEvent(int,int))); 496 SLOT(newEvent(int,int)));
497 connect(mAgenda,SIGNAL(newTodoSignal(int,int)), 497 connect(mAgenda,SIGNAL(newTodoSignal(int,int)),
498 SLOT(newTodo(int,int))); 498 SLOT(newTodo(int,int)));
499 connect(mAgenda,SIGNAL(newEventSignal(int,int,int,int)), 499 connect(mAgenda,SIGNAL(newEventSignal(int,int,int,int)),
500 SLOT(newEvent(int,int,int,int))); 500 SLOT(newEvent(int,int,int,int)));
501 connect(mAllDayAgenda,SIGNAL(newEventSignal(int,int)), 501 connect(mAllDayAgenda,SIGNAL(newEventSignal(int,int)),
502 SLOT(newEventAllDay(int,int))); 502 SLOT(newEventAllDay(int,int)));
503 connect(mAllDayAgenda,SIGNAL(newTodoSignal(int,int)), 503 connect(mAllDayAgenda,SIGNAL(newTodoSignal(int,int)),
504 SLOT(newTodoAllDay(int,int))); 504 SLOT(newTodoAllDay(int,int)));
@@ -1301,24 +1301,35 @@ void KOAgendaView::printPreview(CalPrinter *calPrinter, const QDate &fd,
1301 calPrinter->preview(CalPrinter::Day, fd, td); 1301 calPrinter->preview(CalPrinter::Day, fd, td);
1302 else 1302 else
1303 calPrinter->preview(CalPrinter::Week, fd, td); 1303 calPrinter->preview(CalPrinter::Week, fd, td);
1304#endif 1304#endif
1305} 1305}
1306 1306
1307// void KOAgendaView::updateMovedTodo() 1307// void KOAgendaView::updateMovedTodo()
1308// { 1308// {
1309// // updateConfig(); 1309// // updateConfig();
1310// // emit updateTodoViews(); 1310// // emit updateTodoViews();
1311// } 1311// }
1312 1312
1313void KOAgendaView::slotShowDateView( int mode , int d )
1314{
1315 if ( d >= mSelectedDates.count() ) {
1316 qDebug("KOAgendaView::slotShowDateView datecounterror %d d ", d, mSelectedDates.count() );
1317
1318 } else {
1319 QDate day = mSelectedDates[d];
1320 emit showDateView(mode , day );
1321 }
1322
1323}
1313void KOAgendaView::newEvent(int gx, int gy) 1324void KOAgendaView::newEvent(int gx, int gy)
1314{ 1325{
1315 if (!mSelectedDates.count()) return; 1326 if (!mSelectedDates.count()) return;
1316 1327
1317 QDate day = mSelectedDates[gx]; 1328 QDate day = mSelectedDates[gx];
1318 1329
1319 QTime time = mAgenda->gyToTime(gy); 1330 QTime time = mAgenda->gyToTime(gy);
1320 QDateTime dt(day,time); 1331 QDateTime dt(day,time);
1321 // if ( dt < QDateTime::currentDateTime () ) 1332 // if ( dt < QDateTime::currentDateTime () )
1322 // dt = QDateTime::currentDateTime ().addSecs( 3600 ); 1333 // dt = QDateTime::currentDateTime ().addSecs( 3600 );
1323 emit newEventSignal(dt); 1334 emit newEventSignal(dt);
1324} 1335}