-rw-r--r-- | korganizer/komonthview.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index b9ce4f4..ab9a4b6 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp | |||
@@ -924,33 +924,37 @@ void MonthViewCell::resizeEvent ( QResizeEvent * e ) | |||
924 | int size = height() - mLabel->height() - lineWidth()-1; | 924 | int size = height() - mLabel->height() - lineWidth()-1; |
925 | //qDebug("LW %d ", lineWidth()); | 925 | //qDebug("LW %d ", lineWidth()); |
926 | if ( size > 0 ) | 926 | if ( size > 0 ) |
927 | verticalScrollBar()->setMaximumHeight( size ); | 927 | verticalScrollBar()->setMaximumHeight( size ); |
928 | size = width() - mLabel->width() -lineWidth()-1; | 928 | size = width() - mLabel->width() -lineWidth()-1; |
929 | if ( size > 0 ) | 929 | if ( size > 0 ) |
930 | horizontalScrollBar()->setMaximumWidth( size ); | 930 | horizontalScrollBar()->setMaximumWidth( size ); |
931 | mLabel->move( width()-lineWidth() - mLabel->width(), height()-lineWidth() - mLabel->height() ); | 931 | mLabel->move( width()-lineWidth() - mLabel->width(), height()-lineWidth() - mLabel->height() ); |
932 | //mLabel->setMaximumWidth( width() - mItemList->lineWidth()*2); | 932 | //mLabel->setMaximumWidth( width() - mItemList->lineWidth()*2); |
933 | // mItemList->resize ( width(), height () ); | 933 | // mItemList->resize ( width(), height () ); |
934 | if ( e ) | 934 | if ( e ) |
935 | KNoScrollListBox::resizeEvent ( e ); | 935 | KNoScrollListBox::resizeEvent ( e ); |
936 | } | 936 | } |
937 | 937 | ||
938 | void MonthViewCell::defaultAction( QListBoxItem *item ) | 938 | void MonthViewCell::defaultAction( QListBoxItem *item ) |
939 | { | 939 | { |
940 | if ( !item ) return; | 940 | if ( !item ) { |
941 | QDateTime dt( date(), QTime( KOPrefs::instance()->mStartTime, 0 ) ); | ||
942 | emit newEventSignal( dt ); | ||
943 | return; | ||
944 | } | ||
941 | 945 | ||
942 | MonthViewItem *eventItem = static_cast<MonthViewItem *>( item ); | 946 | MonthViewItem *eventItem = static_cast<MonthViewItem *>( item ); |
943 | Incidence *incidence = eventItem->incidence(); | 947 | Incidence *incidence = eventItem->incidence(); |
944 | if ( incidence ) mMonthView->defaultAction( incidence ); | 948 | if ( incidence ) mMonthView->defaultAction( incidence ); |
945 | } | 949 | } |
946 | void MonthViewCell::showDay() | 950 | void MonthViewCell::showDay() |
947 | { | 951 | { |
948 | emit showDaySignal( date() ); | 952 | emit showDaySignal( date() ); |
949 | } | 953 | } |
950 | void MonthViewCell::newEvent() | 954 | void MonthViewCell::newEvent() |
951 | { | 955 | { |
952 | QDateTime dt( date(), QTime( KOPrefs::instance()->mStartTime, 0 ) ); | 956 | QDateTime dt( date(), QTime( KOPrefs::instance()->mStartTime, 0 ) ); |
953 | emit newEventSignal( dt ); | 957 | emit newEventSignal( dt ); |
954 | } | 958 | } |
955 | void MonthViewCell::cellClicked( QListBoxItem *item ) | 959 | void MonthViewCell::cellClicked( QListBoxItem *item ) |
956 | { | 960 | { |
@@ -1358,32 +1362,33 @@ void KOMonthView::showDates(const QDate &start, const QDate &) | |||
1358 | wno =dayOfYear / 7; | 1362 | wno =dayOfYear / 7; |
1359 | (*weekLabels)[i]->setWeekNum( wno ); | 1363 | (*weekLabels)[i]->setWeekNum( wno ); |
1360 | date = date.addDays( 7 ); | 1364 | date = date.addDays( 7 ); |
1361 | } | 1365 | } |
1362 | updateView(); | 1366 | updateView(); |
1363 | } | 1367 | } |
1364 | 1368 | ||
1365 | void KOMonthView::showEvents(QPtrList<Event>) | 1369 | void KOMonthView::showEvents(QPtrList<Event>) |
1366 | { | 1370 | { |
1367 | qDebug("KOMonthView::selectEvents is not implemented yet. "); | 1371 | qDebug("KOMonthView::selectEvents is not implemented yet. "); |
1368 | } | 1372 | } |
1369 | 1373 | ||
1370 | void KOMonthView::changeEventDisplay(Event *, int) | 1374 | void KOMonthView::changeEventDisplay(Event *, int) |
1371 | { | 1375 | { |
1372 | // this should be re-written to be much more efficient, but this | 1376 | // this should be re-written to be much more efficient, but this |
1373 | // quick-and-dirty-hack gets the job done for right now. | 1377 | // quick-and-dirty-hack gets the job done for right now. |
1378 | qDebug("KOMonthView::changeEventDisplay "); | ||
1374 | updateView(); | 1379 | updateView(); |
1375 | } | 1380 | } |
1376 | 1381 | ||
1377 | void KOMonthView::updateView() | 1382 | void KOMonthView::updateView() |
1378 | { | 1383 | { |
1379 | 1384 | ||
1380 | if ( !updatePossible ) | 1385 | if ( !updatePossible ) |
1381 | return; | 1386 | return; |
1382 | //qDebug("UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU "); | 1387 | //qDebug("UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU "); |
1383 | //QTime ti; | 1388 | //QTime ti; |
1384 | //ti.start(); | 1389 | //ti.start(); |
1385 | clearSelection(); | 1390 | clearSelection(); |
1386 | QPtrVector<MonthViewCell> *cells; | 1391 | QPtrVector<MonthViewCell> *cells; |
1387 | if ( mShowWeekView ) { | 1392 | if ( mShowWeekView ) { |
1388 | cells = &mCellsW; | 1393 | cells = &mCellsW; |
1389 | } else { | 1394 | } else { |