-rw-r--r-- | korganizer/koagendaview.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index c1b149f..6e65a03 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp | |||
@@ -332,96 +332,97 @@ void EventIndicator::drawContents(QPainter *p) | |||
332 | setColor = true; | 332 | setColor = true; |
333 | 333 | ||
334 | int cellWidth = contentsRect().right()/mColumns; | 334 | int cellWidth = contentsRect().right()/mColumns; |
335 | int xOffset = KOGlobals::self()->reverseLayout() ? | 335 | int xOffset = KOGlobals::self()->reverseLayout() ? |
336 | (mColumns - 1 - i)*cellWidth + cellWidth/2 -mPixmap.width()/2 : | 336 | (mColumns - 1 - i)*cellWidth + cellWidth/2 -mPixmap.width()/2 : |
337 | i*cellWidth + cellWidth/2 -mPixmap.width()/2; | 337 | i*cellWidth + cellWidth/2 -mPixmap.width()/2; |
338 | pa.drawPixmap(QPoint(mXOffset + xOffset,0),mPixmap); | 338 | pa.drawPixmap(QPoint(mXOffset + xOffset,0),mPixmap); |
339 | //qDebug("222draw pix %d ",xOffset ); | 339 | //qDebug("222draw pix %d ",xOffset ); |
340 | 340 | ||
341 | } | 341 | } |
342 | 342 | ||
343 | } | 343 | } |
344 | pa.end(); | 344 | pa.end(); |
345 | 345 | ||
346 | } | 346 | } |
347 | } | 347 | } |
348 | 348 | ||
349 | void EventIndicator::setXOffset( int x ) | 349 | void EventIndicator::setXOffset( int x ) |
350 | { | 350 | { |
351 | mXOffset = x; | 351 | mXOffset = x; |
352 | } | 352 | } |
353 | void EventIndicator::setPaintWidget( KDGanttMinimizeSplitter * w ) | 353 | void EventIndicator::setPaintWidget( KDGanttMinimizeSplitter * w ) |
354 | { | 354 | { |
355 | mPaintWidget = w; | 355 | mPaintWidget = w; |
356 | setMaximumHeight(0); | 356 | setMaximumHeight(0); |
357 | setMinimumHeight(0); | 357 | setMinimumHeight(0); |
358 | } | 358 | } |
359 | void EventIndicator::changeColumns(int columns) | 359 | void EventIndicator::changeColumns(int columns) |
360 | { | 360 | { |
361 | mColumns = columns; | 361 | mColumns = columns; |
362 | mEnabled.resize(mColumns); | 362 | mEnabled.resize(mColumns); |
363 | 363 | ||
364 | update(); | 364 | update(); |
365 | } | 365 | } |
366 | 366 | ||
367 | void EventIndicator::enableColumn(int column, bool enable) | 367 | void EventIndicator::enableColumn(int column, bool enable) |
368 | { | 368 | { |
369 | mEnabled[column] = enable; | 369 | mEnabled[column] = enable; |
370 | } | 370 | } |
371 | 371 | ||
372 | 372 | ||
373 | //////////////////////////////////////////////////////////////////////////// | 373 | //////////////////////////////////////////////////////////////////////////// |
374 | //////////////////////////////////////////////////////////////////////////// | 374 | //////////////////////////////////////////////////////////////////////////// |
375 | //////////////////////////////////////////////////////////////////////////// | 375 | //////////////////////////////////////////////////////////////////////////// |
376 | 376 | ||
377 | KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : | 377 | KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : |
378 | KOEventView (cal,parent,name) | 378 | KOEventView (cal,parent,name) |
379 | { | 379 | { |
380 | flag_blockfillAgenda = false; | ||
380 | mBlockUpdating = true; | 381 | mBlockUpdating = true; |
381 | mStartHour = 8; | 382 | mStartHour = 8; |
382 | mSelectedDates.append(QDate::currentDate()); | 383 | mSelectedDates.append(QDate::currentDate()); |
383 | 384 | ||
384 | mLayoutDayLabels = 0; | 385 | mLayoutDayLabels = 0; |
385 | mDayLabelsFrame = 0; | 386 | mDayLabelsFrame = 0; |
386 | mDayLabels = 0; | 387 | mDayLabels = 0; |
387 | bool isRTL = KOGlobals::self()->reverseLayout(); | 388 | bool isRTL = KOGlobals::self()->reverseLayout(); |
388 | QPixmap expandPix; | 389 | QPixmap expandPix; |
389 | if ( KOPrefs::instance()->mVerticalScreen ) { | 390 | if ( KOPrefs::instance()->mVerticalScreen ) { |
390 | expandPix = SmallIcon( "1updownarrow" ); | 391 | expandPix = SmallIcon( "1updownarrow" ); |
391 | } else { | 392 | } else { |
392 | expandPix = SmallIcon("1leftrightarrow" ); | 393 | expandPix = SmallIcon("1leftrightarrow" ); |
393 | } | 394 | } |
394 | 395 | ||
395 | QBoxLayout *topLayout = new QVBoxLayout(this); | 396 | QBoxLayout *topLayout = new QVBoxLayout(this); |
396 | 397 | ||
397 | // Create day name labels for agenda columns | 398 | // Create day name labels for agenda columns |
398 | // Create agenda splitter | 399 | // Create agenda splitter |
399 | 400 | ||
400 | mSplitterAgenda = new KDGanttMinimizeSplitter( Qt::Vertical, this); | 401 | mSplitterAgenda = new KDGanttMinimizeSplitter( Qt::Vertical, this); |
401 | mSplitterAgenda->setMinimizeDirection ( KDGanttMinimizeSplitter::Up ); | 402 | mSplitterAgenda->setMinimizeDirection ( KDGanttMinimizeSplitter::Up ); |
402 | topLayout->addWidget( mSplitterAgenda ); | 403 | topLayout->addWidget( mSplitterAgenda ); |
403 | mAllDayFrame = new QHBox(mSplitterAgenda); | 404 | mAllDayFrame = new QHBox(mSplitterAgenda); |
404 | mAllDayFrame->setFocusPolicy(NoFocus); | 405 | mAllDayFrame->setFocusPolicy(NoFocus); |
405 | QWidget *agendaFrame = new QWidget(mSplitterAgenda); | 406 | QWidget *agendaFrame = new QWidget(mSplitterAgenda); |
406 | agendaFrame->setFocusPolicy(NoFocus); | 407 | agendaFrame->setFocusPolicy(NoFocus); |
407 | 408 | ||
408 | // Create all-day agenda widget | 409 | // Create all-day agenda widget |
409 | mDummyAllDayLeft = new QVBox( mAllDayFrame ); | 410 | mDummyAllDayLeft = new QVBox( mAllDayFrame ); |
410 | 411 | ||
411 | mExpandButton = new QPushButton(mDummyAllDayLeft); | 412 | mExpandButton = new QPushButton(mDummyAllDayLeft); |
412 | mExpandButton->setPixmap( expandPix ); | 413 | mExpandButton->setPixmap( expandPix ); |
413 | int widebut = mExpandButton->sizeHint().width()+4; | 414 | int widebut = mExpandButton->sizeHint().width()+4; |
414 | int heibut = mExpandButton->sizeHint().height()+4; | 415 | int heibut = mExpandButton->sizeHint().height()+4; |
415 | if ( heibut > widebut ) | 416 | if ( heibut > widebut ) |
416 | widebut = heibut ; | 417 | widebut = heibut ; |
417 | 418 | ||
418 | //mExpandButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, | 419 | //mExpandButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, |
419 | // QSizePolicy::Fixed ) ); | 420 | // QSizePolicy::Fixed ) ); |
420 | mExpandButton->setFixedSize( widebut, widebut); | 421 | mExpandButton->setFixedSize( widebut, widebut); |
421 | connect( mExpandButton, SIGNAL( clicked() ), SIGNAL( toggleExpand() ) ); | 422 | connect( mExpandButton, SIGNAL( clicked() ), SIGNAL( toggleExpand() ) ); |
422 | mExpandButton->setFocusPolicy(NoFocus); | 423 | mExpandButton->setFocusPolicy(NoFocus); |
423 | mAllDayAgenda = new KOAgenda(1,mAllDayFrame); | 424 | mAllDayAgenda = new KOAgenda(1,mAllDayFrame); |
424 | mAllDayAgenda->setFocusPolicy(NoFocus); | 425 | mAllDayAgenda->setFocusPolicy(NoFocus); |
425 | QLabel *dummyAllDayRight = new QLabel (mAllDayFrame); | 426 | QLabel *dummyAllDayRight = new QLabel (mAllDayFrame); |
426 | 427 | ||
427 | // Create event context menu for all day agenda | 428 | // Create event context menu for all day agenda |
@@ -1097,100 +1098,99 @@ void KOAgendaView::updateEventDates(KOAgendaItem *item, int type) | |||
1097 | else | 1098 | else |
1098 | emit incidenceChanged(item->incidence(), KOGlobals::EVENTEDITED); | 1099 | emit incidenceChanged(item->incidence(), KOGlobals::EVENTEDITED); |
1099 | item->updateItem(); | 1100 | item->updateItem(); |
1100 | } | 1101 | } |
1101 | 1102 | ||
1102 | void KOAgendaView::showDates( const QDate &start, const QDate &end ) | 1103 | void KOAgendaView::showDates( const QDate &start, const QDate &end ) |
1103 | { | 1104 | { |
1104 | // kdDebug() << "KOAgendaView::selectDates" << endl; | 1105 | // kdDebug() << "KOAgendaView::selectDates" << endl; |
1105 | 1106 | ||
1106 | mSelectedDates.clear(); | 1107 | mSelectedDates.clear(); |
1107 | // qDebug("KOAgendaView::showDates "); | 1108 | // qDebug("KOAgendaView::showDates "); |
1108 | QDate d = start; | 1109 | QDate d = start; |
1109 | while (d <= end) { | 1110 | while (d <= end) { |
1110 | mSelectedDates.append(d); | 1111 | mSelectedDates.append(d); |
1111 | d = d.addDays( 1 ); | 1112 | d = d.addDays( 1 ); |
1112 | } | 1113 | } |
1113 | 1114 | ||
1114 | // and update the view | 1115 | // and update the view |
1115 | fillAgenda(); | 1116 | fillAgenda(); |
1116 | } | 1117 | } |
1117 | 1118 | ||
1118 | 1119 | ||
1119 | void KOAgendaView::showEvents(QPtrList<Event>) | 1120 | void KOAgendaView::showEvents(QPtrList<Event>) |
1120 | { | 1121 | { |
1121 | kdDebug() << "KOAgendaView::showEvents() is not yet implemented" << endl; | 1122 | kdDebug() << "KOAgendaView::showEvents() is not yet implemented" << endl; |
1122 | } | 1123 | } |
1123 | 1124 | ||
1124 | void KOAgendaView::changeEventDisplay(Event *, int) | 1125 | void KOAgendaView::changeEventDisplay(Event *, int) |
1125 | { | 1126 | { |
1126 | // qDebug("KOAgendaView::changeEventDisplay "); | 1127 | // qDebug("KOAgendaView::changeEventDisplay "); |
1127 | // kdDebug() << "KOAgendaView::changeEventDisplay" << endl; | 1128 | // kdDebug() << "KOAgendaView::changeEventDisplay" << endl; |
1128 | // this should be re-written to be MUCH smarter. Right now we | 1129 | // this should be re-written to be MUCH smarter. Right now we |
1129 | // are just playing dumb. | 1130 | // are just playing dumb. |
1130 | fillAgenda(); | 1131 | fillAgenda(); |
1131 | } | 1132 | } |
1132 | 1133 | ||
1133 | void KOAgendaView::fillAgenda(const QDate &) | 1134 | void KOAgendaView::fillAgenda(const QDate &) |
1134 | { | 1135 | { |
1135 | // qDebug("KOAgendaView::fillAgenda "); | 1136 | // qDebug("KOAgendaView::fillAgenda "); |
1136 | fillAgenda(); | 1137 | fillAgenda(); |
1137 | } | 1138 | } |
1138 | 1139 | ||
1139 | void KOAgendaView::fillAgenda() | 1140 | void KOAgendaView::fillAgenda() |
1140 | { | 1141 | { |
1141 | if ( globalFlagBlockStartup ) | 1142 | if ( globalFlagBlockStartup ) |
1142 | return; | 1143 | return; |
1143 | if ( globalFlagBlockAgenda == 1 ) | 1144 | if ( globalFlagBlockAgenda == 1 ) |
1144 | return; | 1145 | return; |
1145 | static bool onlyOne = false; | 1146 | if ( flag_blockfillAgenda ) |
1146 | if ( onlyOne ) | ||
1147 | return; | 1147 | return; |
1148 | onlyOne = true; | 1148 | flag_blockfillAgenda = true; |
1149 | //if ( globalFlagBlockAgenda == 2 ) | 1149 | //if ( globalFlagBlockAgenda == 2 ) |
1150 | //globalFlagBlockAgenda = 0; | 1150 | //globalFlagBlockAgenda = 0; |
1151 | // globalFlagBlockPainting = false; | 1151 | // globalFlagBlockPainting = false; |
1152 | if ( globalFlagBlockAgenda == 0 ) | 1152 | if ( globalFlagBlockAgenda == 0 ) |
1153 | globalFlagBlockAgenda = 1; | 1153 | globalFlagBlockAgenda = 1; |
1154 | // clearView(); | 1154 | // clearView(); |
1155 | //qDebug("fillAgenda()++++ "); | 1155 | //qDebug("fillAgenda()++++ "); |
1156 | globalFlagBlockAgendaItemPaint = 1; | 1156 | globalFlagBlockAgendaItemPaint = 1; |
1157 | 1157 | ||
1158 | mAllDayAgenda->changeColumns(mSelectedDates.count()); | 1158 | mAllDayAgenda->changeColumns(mSelectedDates.count()); |
1159 | mAgenda->changeColumns(mSelectedDates.count()); | 1159 | mAgenda->changeColumns(mSelectedDates.count()); |
1160 | qApp->processEvents(); | 1160 | qApp->processEvents(); |
1161 | mEventIndicatorTop->changeColumns(mSelectedDates.count()); | 1161 | mEventIndicatorTop->changeColumns(mSelectedDates.count()); |
1162 | mEventIndicatorBottom->changeColumns(mSelectedDates.count()); | 1162 | mEventIndicatorBottom->changeColumns(mSelectedDates.count()); |
1163 | setHolidayMasks(); | 1163 | setHolidayMasks(); |
1164 | 1164 | ||
1165 | mMinY.resize(mSelectedDates.count()); | 1165 | mMinY.resize(mSelectedDates.count()); |
1166 | mMaxY.resize(mSelectedDates.count()); | 1166 | mMaxY.resize(mSelectedDates.count()); |
1167 | 1167 | ||
1168 | QPtrList<Event> dayEvents; | 1168 | QPtrList<Event> dayEvents; |
1169 | 1169 | ||
1170 | // ToDo items shall be displayed for the day they are due, but only showed today if they are already overdue. | 1170 | // ToDo items shall be displayed for the day they are due, but only showed today if they are already overdue. |
1171 | // Therefore, gtodoset all of them. | 1171 | // Therefore, gtodoset all of them. |
1172 | QPtrList<Todo> todos = calendar()->todos(); | 1172 | QPtrList<Todo> todos = calendar()->todos(); |
1173 | 1173 | ||
1174 | mAgenda->setDateList(mSelectedDates); | 1174 | mAgenda->setDateList(mSelectedDates); |
1175 | 1175 | ||
1176 | QDate today = QDate::currentDate(); | 1176 | QDate today = QDate::currentDate(); |
1177 | 1177 | ||
1178 | DateList::ConstIterator dit; | 1178 | DateList::ConstIterator dit; |
1179 | int curCol = 0; | 1179 | int curCol = 0; |
1180 | int maxCol = mSelectedDates.count()-1; | 1180 | int maxCol = mSelectedDates.count()-1; |
1181 | for( dit = mSelectedDates.begin(); dit != mSelectedDates.end(); ++dit ) { | 1181 | for( dit = mSelectedDates.begin(); dit != mSelectedDates.end(); ++dit ) { |
1182 | QDate currentDate = *dit; | 1182 | QDate currentDate = *dit; |
1183 | // kdDebug() << "KOAgendaView::fillAgenda(): " << currentDate.toString() | 1183 | // kdDebug() << "KOAgendaView::fillAgenda(): " << currentDate.toString() |
1184 | // << endl; | 1184 | // << endl; |
1185 | 1185 | ||
1186 | dayEvents = calendar()->events(currentDate,false); | 1186 | dayEvents = calendar()->events(currentDate,false); |
1187 | 1187 | ||
1188 | // Default values, which can never be reached | 1188 | // Default values, which can never be reached |
1189 | mMinY[curCol] = mAgenda->timeToY(QTime(23,59)) + 1; | 1189 | mMinY[curCol] = mAgenda->timeToY(QTime(23,59)) + 1; |
1190 | mMaxY[curCol] = mAgenda->timeToY(QTime(0,0)) - 1; | 1190 | mMaxY[curCol] = mAgenda->timeToY(QTime(0,0)) - 1; |
1191 | 1191 | ||
1192 | unsigned int numEvent; | 1192 | unsigned int numEvent; |
1193 | //qDebug("+++++NUMEVENT %d", dayEvents.count()); | 1193 | //qDebug("+++++NUMEVENT %d", dayEvents.count()); |
1194 | for(numEvent=0;numEvent<dayEvents.count();++numEvent) { | 1194 | for(numEvent=0;numEvent<dayEvents.count();++numEvent) { |
1195 | Event *event = dayEvents.at(numEvent); | 1195 | Event *event = dayEvents.at(numEvent); |
1196 | if ( !KOPrefs::instance()->mShowSyncEvents && event->uid().left(2) == QString("la") ) | 1196 | if ( !KOPrefs::instance()->mShowSyncEvents && event->uid().left(2) == QString("la") ) |
@@ -1309,97 +1309,97 @@ void KOAgendaView::fillAgenda() | |||
1309 | if ( fillIn ) { | 1309 | if ( fillIn ) { |
1310 | if ( (todo->doesFloat() || overdue ) && !todo->hasCompletedDate() ) { // Todo has no due-time set or is already overdue | 1310 | if ( (todo->doesFloat() || overdue ) && !todo->hasCompletedDate() ) { // Todo has no due-time set or is already overdue |
1311 | if ( KOPrefs::instance()->mShowTodoInAgenda ) | 1311 | if ( KOPrefs::instance()->mShowTodoInAgenda ) |
1312 | mAllDayAgenda->insertAllDayItem(todo, currentDate, curCol, curCol); | 1312 | mAllDayAgenda->insertAllDayItem(todo, currentDate, curCol, curCol); |
1313 | } | 1313 | } |
1314 | else { | 1314 | else { |
1315 | QDateTime dt; | 1315 | QDateTime dt; |
1316 | if ( todo->hasCompletedDate() ) | 1316 | if ( todo->hasCompletedDate() ) |
1317 | dt = todo->completed(); | 1317 | dt = todo->completed(); |
1318 | else | 1318 | else |
1319 | dt = todo->dtDue();; | 1319 | dt = todo->dtDue();; |
1320 | 1320 | ||
1321 | 1321 | ||
1322 | int endY = mAgenda->timeToY(dt.time()) - 1; | 1322 | int endY = mAgenda->timeToY(dt.time()) - 1; |
1323 | int hi = (18/KOPrefs::instance()->mHourSize); | 1323 | int hi = (18/KOPrefs::instance()->mHourSize); |
1324 | //qDebug("hei %d ",KOPrefs::instance()->mHourSize); | 1324 | //qDebug("hei %d ",KOPrefs::instance()->mHourSize); |
1325 | int startY = endY -hi; | 1325 | int startY = endY -hi; |
1326 | 1326 | ||
1327 | mAgenda->insertItem(todo,currentDate,curCol,startY,endY); | 1327 | mAgenda->insertItem(todo,currentDate,curCol,startY,endY); |
1328 | 1328 | ||
1329 | if (startY < mMinY[curCol]) mMinY[curCol] = startY; | 1329 | if (startY < mMinY[curCol]) mMinY[curCol] = startY; |
1330 | if (endY > mMaxY[curCol]) mMaxY[curCol] = endY; | 1330 | if (endY > mMaxY[curCol]) mMaxY[curCol] = endY; |
1331 | } | 1331 | } |
1332 | } | 1332 | } |
1333 | } | 1333 | } |
1334 | // ---------- display Todos] -------------- | 1334 | // ---------- display Todos] -------------- |
1335 | 1335 | ||
1336 | ++curCol; | 1336 | ++curCol; |
1337 | } | 1337 | } |
1338 | mAgenda->hideUnused(); | 1338 | mAgenda->hideUnused(); |
1339 | mAllDayAgenda->hideUnused(); | 1339 | mAllDayAgenda->hideUnused(); |
1340 | mAgenda->checkScrollBoundaries(); | 1340 | mAgenda->checkScrollBoundaries(); |
1341 | deleteSelectedDateTime(); | 1341 | deleteSelectedDateTime(); |
1342 | createDayLabels(); | 1342 | createDayLabels(); |
1343 | emit incidenceSelected( 0 ); | 1343 | emit incidenceSelected( 0 ); |
1344 | 1344 | ||
1345 | if ( globalFlagBlockAgenda == 2 ) { | 1345 | if ( globalFlagBlockAgenda == 2 ) { |
1346 | if ( KOPrefs::instance()->mSetTimeToDayStartAt ) | 1346 | if ( KOPrefs::instance()->mSetTimeToDayStartAt ) |
1347 | setStartHour( KOPrefs::instance()->mDayBegins ); | 1347 | setStartHour( KOPrefs::instance()->mDayBegins ); |
1348 | else if ( KOPrefs::instance()->mCenterOnCurrentTime ) | 1348 | else if ( KOPrefs::instance()->mCenterOnCurrentTime ) |
1349 | setStartHour( QTime::currentTime ().hour() ); | 1349 | setStartHour( QTime::currentTime ().hour() ); |
1350 | } | 1350 | } |
1351 | qApp->processEvents(); | 1351 | qApp->processEvents(); |
1352 | globalFlagBlockAgenda = 0; | 1352 | globalFlagBlockAgenda = 0; |
1353 | mAllDayAgenda->drawContentsToPainter(); | 1353 | mAllDayAgenda->drawContentsToPainter(); |
1354 | mAgenda->drawContentsToPainter(); | 1354 | mAgenda->drawContentsToPainter(); |
1355 | repaintAgenda(); | 1355 | repaintAgenda(); |
1356 | startIdleTimeout(); | 1356 | startIdleTimeout(); |
1357 | onlyOne = false; | 1357 | flag_blockfillAgenda = false; |
1358 | } | 1358 | } |
1359 | void KOAgendaView::repaintAgenda() | 1359 | void KOAgendaView::repaintAgenda() |
1360 | { | 1360 | { |
1361 | mAgenda->viewport()->repaint( false ); | 1361 | mAgenda->viewport()->repaint( false ); |
1362 | mAllDayAgenda->viewport()->repaint( false ); | 1362 | mAllDayAgenda->viewport()->repaint( false ); |
1363 | mAgenda->finishUpdate(); | 1363 | mAgenda->finishUpdate(); |
1364 | mAllDayAgenda->finishUpdate(); | 1364 | mAllDayAgenda->finishUpdate(); |
1365 | } | 1365 | } |
1366 | 1366 | ||
1367 | 1367 | ||
1368 | void KOAgendaView::clearView() | 1368 | void KOAgendaView::clearView() |
1369 | { | 1369 | { |
1370 | mAllDayAgenda->clear(); | 1370 | mAllDayAgenda->clear(); |
1371 | mAgenda->clear(); | 1371 | mAgenda->clear(); |
1372 | } | 1372 | } |
1373 | void KOAgendaView::clearList() | 1373 | void KOAgendaView::clearList() |
1374 | { | 1374 | { |
1375 | clearView(); | 1375 | clearView(); |
1376 | mAllDayAgenda->hideUnused(); | 1376 | mAllDayAgenda->hideUnused(); |
1377 | mAgenda->hideUnused(); | 1377 | mAgenda->hideUnused(); |
1378 | } | 1378 | } |
1379 | 1379 | ||
1380 | void KOAgendaView::printPreview(CalPrinter *calPrinter, const QDate &fd, | 1380 | void KOAgendaView::printPreview(CalPrinter *calPrinter, const QDate &fd, |
1381 | const QDate &td) | 1381 | const QDate &td) |
1382 | { | 1382 | { |
1383 | #ifndef KORG_NOPRINTER | 1383 | #ifndef KORG_NOPRINTER |
1384 | if (fd == td) | 1384 | if (fd == td) |
1385 | calPrinter->preview(CalPrinter::Day, fd, td); | 1385 | calPrinter->preview(CalPrinter::Day, fd, td); |
1386 | else | 1386 | else |
1387 | calPrinter->preview(CalPrinter::Week, fd, td); | 1387 | calPrinter->preview(CalPrinter::Week, fd, td); |
1388 | #endif | 1388 | #endif |
1389 | } | 1389 | } |
1390 | 1390 | ||
1391 | // void KOAgendaView::updateMovedTodo() | 1391 | // void KOAgendaView::updateMovedTodo() |
1392 | // { | 1392 | // { |
1393 | // // updateConfig(); | 1393 | // // updateConfig(); |
1394 | // // emit updateTodoViews(); | 1394 | // // emit updateTodoViews(); |
1395 | // } | 1395 | // } |
1396 | 1396 | ||
1397 | void KOAgendaView::slotShowDateView( int mode , int d ) | 1397 | void KOAgendaView::slotShowDateView( int mode , int d ) |
1398 | { | 1398 | { |
1399 | if ( d >= mSelectedDates.count() ) { | 1399 | if ( d >= mSelectedDates.count() ) { |
1400 | qDebug("KOAgendaView::slotShowDateView datecounterror %d %d ", d, mSelectedDates.count() ); | 1400 | qDebug("KOAgendaView::slotShowDateView datecounterror %d %d ", d, mSelectedDates.count() ); |
1401 | 1401 | ||
1402 | } else { | 1402 | } else { |
1403 | QDate day = mSelectedDates[d]; | 1403 | QDate day = mSelectedDates[d]; |
1404 | emit showDateView(mode , day ); | 1404 | emit showDateView(mode , day ); |
1405 | } | 1405 | } |