summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-03-25 13:47:53 (UTC)
committer zautrix <zautrix>2005-03-25 13:47:53 (UTC)
commit5a0130ffdbf03fa5b881f856b41d081e91e1958b (patch) (unidiff)
treec71ac939789927dd9c77f2c6e88b910008db7f9b /korganizer
parente3b935f4e24086117213662e670ab26cb2ad8822 (diff)
downloadkdepimpi-5a0130ffdbf03fa5b881f856b41d081e91e1958b.zip
kdepimpi-5a0130ffdbf03fa5b881f856b41d081e91e1958b.tar.gz
kdepimpi-5a0130ffdbf03fa5b881f856b41d081e91e1958b.tar.bz2
layout fixes
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/komonthview.cpp68
-rw-r--r--korganizer/komonthview.h1
2 files changed, 44 insertions, 25 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 38cfda7..12233ee 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -709,108 +709,97 @@ void MonthViewCell::insertTodo(Todo *todo)
709 709
710 } else { 710 } else {
711 if (cat.isEmpty()) { 711 if (cat.isEmpty()) {
712 pal = QPalette(KOPrefs::instance()->mEventColor, KOPrefs::instance()->mEventColor); 712 pal = QPalette(KOPrefs::instance()->mEventColor, KOPrefs::instance()->mEventColor);
713 } else { 713 } else {
714 pal = QPalette(*(KOPrefs::instance()->categoryColor(cat)), *(KOPrefs::instance()->categoryColor(cat))); 714 pal = QPalette(*(KOPrefs::instance()->categoryColor(cat)), *(KOPrefs::instance()->categoryColor(cat)));
715 } 715 }
716 } 716 }
717 717
718 } else { 718 } else {
719 pal = mStandardPalette ; 719 pal = mStandardPalette ;
720 } 720 }
721 item->setPalette( pal ); 721 item->setPalette( pal );
722 item->setRecur( todo->recurrence()->doesRecur() ); 722 item->setRecur( todo->recurrence()->doesRecur() );
723 item->setAlarm( todo->isAlarmEnabled() ); 723 item->setAlarm( todo->isAlarmEnabled() );
724 item->setMoreInfo( todo->description().length() > 0 ); 724 item->setMoreInfo( todo->description().length() > 0 );
725 if ( insertNewItem) 725 if ( insertNewItem)
726 insertItem( item ); 726 insertItem( item );
727 mToolTip.append( text ); 727 mToolTip.append( text );
728} 728}
729void MonthViewCell::repaintfinishUpdateCell() 729void MonthViewCell::repaintfinishUpdateCell()
730{ 730{
731 MonthViewItem *mitem = (MonthViewItem*) firstItem (); 731 MonthViewItem *mitem = (MonthViewItem*) firstItem ();
732 while ( mitem ) { 732 while ( mitem ) {
733 mitem->setBlockRepaint( false ); 733 mitem->setBlockRepaint( false );
734 updateItem ( mitem ); 734 updateItem ( mitem );
735 mitem = (MonthViewItem *)mitem->next(); 735 mitem = (MonthViewItem *)mitem->next();
736 } 736 }
737} 737}
738void MonthViewCell::finishUpdateCell() 738void MonthViewCell::finishUpdateCell()
739{ 739{
740 while ( mCurrentAvailItem ) { 740 while ( mCurrentAvailItem ) {
741 MonthViewItem *item = mCurrentAvailItem; 741 MonthViewItem *item = mCurrentAvailItem;
742 mCurrentAvailItem = (MonthViewItem *)item->next(); 742 mCurrentAvailItem = (MonthViewItem *)item->next();
743 mAvailItemList.append( item ); 743 mAvailItemList.append( item );
744 takeItem ( item ); 744 takeItem ( item );
745 } 745 }
746 746
747 747
748#ifdef DESKTOP_VERSION 748#ifdef DESKTOP_VERSION
749 if (mToolTip.count() > 0 ) { 749 if (mToolTip.count() > 0 ) {
750 mToolTip.sort(); 750 mToolTip.sort();
751 QToolTip::add(this,mToolTip.join("\n"),toolTipGroup(),""); 751 QToolTip::add(this,mToolTip.join("\n"),toolTipGroup(),"");
752 } 752 }
753#endif 753#endif
754 sort(); 754 sort();
755 //setMyPalette(); 755 //setMyPalette();
756 setMyPalette(); 756 setMyPalette();
757 QString text;
758 bool smallDisplay = QApplication::desktop()->width() < 320 && KOPrefs::instance()->mMonthViewSatSunTog;
759 if ( KOPrefs::instance()->mMonthViewWeek || KOGlobals::self()->calendarSystem()->day( mDate ) == 1 || (mDate.dayOfWeek() == 7 && !smallDisplay ) || KOPrefs::instance()->mMonthShowShort) {
760 text = KOGlobals::self()->calendarSystem()->monthName( mDate, true ) + " ";
761 mLabel->resize( mLabelBigSize );
762 text += QString::number( KOGlobals::self()->calendarSystem()->day(mDate) );
763 } else {
764 mLabel->resize( mLabelSize );
765 text += QString::number( KOGlobals::self()->calendarSystem()->day(mDate) );
766 }
767 757
768 mLabel->setText( text );
769 resizeEvent( 0 ); 758 resizeEvent( 0 );
770 759
771} 760}
772void MonthViewCell::updateCell() 761void MonthViewCell::updateCell()
773{ 762{
774 //qDebug("MonthViewCell::updateCell() "); 763 //qDebug("MonthViewCell::updateCell() ");
775 if ( !mMonthView->isUpdatePossible() ) 764 if ( !mMonthView->isUpdatePossible() )
776 return; 765 return;
777 startUpdateCell(); 766 startUpdateCell();
778 //mLabel->setMaximumWidth( width() - mItemList->lineWidth()*2); 767 //mLabel->setMaximumWidth( width() - mItemList->lineWidth()*2);
779 QPtrList<Event> events = mMonthView->calendar()->events( mDate, true ); 768 QPtrList<Event> events = mMonthView->calendar()->events( mDate, true );
780 Event *event; 769 Event *event;
781 for( event = events.first(); event; event = events.next() ) { // for event 770 for( event = events.first(); event; event = events.next() ) { // for event
782 insertEvent(event); 771 insertEvent(event);
783 } 772 }
784 // insert due todos 773 // insert due todos
785 QPtrList<Todo> todos = mMonthView->calendar()->todos( mDate ); 774 QPtrList<Todo> todos = mMonthView->calendar()->todos( mDate );
786 Todo *todo; 775 Todo *todo;
787 for(todo = todos.first(); todo; todo = todos.next()) { 776 for(todo = todos.first(); todo; todo = todos.next()) {
788 insertTodo( todo ); 777 insertTodo( todo );
789 } 778 }
790 finishUpdateCell(); 779 finishUpdateCell();
791 // if ( isVisible()) 780 // if ( isVisible())
792 //qApp->processEvents(); 781 //qApp->processEvents();
793} 782}
794 783
795void MonthViewCell::updateConfig( bool bigFont ) // = false 784void MonthViewCell::updateConfig( bool bigFont ) // = false
796{ 785{
797 786
798 if ( bigFont ) { 787 if ( bigFont ) {
799 QFont fo = KOPrefs::instance()->mMonthViewFont; 788 QFont fo = KOPrefs::instance()->mMonthViewFont;
800 int ps = fo.pointSize() + 2; 789 int ps = fo.pointSize() + 2;
801 if ( ps < 18 ) 790 if ( ps < 18 )
802 ps += 2; 791 ps += 2;
803 fo.setPointSize( ps ); 792 fo.setPointSize( ps );
804 setFont( fo ); 793 setFont( fo );
805 } else 794 } else
806 setFont( KOPrefs::instance()->mMonthViewFont ); 795 setFont( KOPrefs::instance()->mMonthViewFont );
807 796
808 QFontMetrics fm( font() ); 797 QFontMetrics fm( font() );
809 mLabelSize = fm.size( 0, "30" ) + QSize( 4, 2 ); 798 mLabelSize = fm.size( 0, "30" ) + QSize( 4, 2 );
810 mLabelBigSize = fm.size( 0, "Mag 30" ) + QSize( 2, 2 ); 799 mLabelBigSize = fm.size( 0, "Mag 30" ) + QSize( 2, 2 );
811 mHolidayPalette = mStandardPalette; 800 mHolidayPalette = mStandardPalette;
812 mPrimaryPalette = mStandardPalette; 801 mPrimaryPalette = mStandardPalette;
813 mNonPrimaryPalette = mStandardPalette; 802 mNonPrimaryPalette = mStandardPalette;
814 if ( KOPrefs::instance()->mMonthViewUsesDayColors ) { 803 if ( KOPrefs::instance()->mMonthViewUsesDayColors ) {
815 mHolidayPalette.setColor(QColorGroup::Base, KOPrefs::instance()->mMonthViewHolidayColor ); 804 mHolidayPalette.setColor(QColorGroup::Base, KOPrefs::instance()->mMonthViewHolidayColor );
816 mHolidayPalette.setColor(QColorGroup::Background, KOPrefs::instance()->mMonthViewHolidayColor ); 805 mHolidayPalette.setColor(QColorGroup::Background, KOPrefs::instance()->mMonthViewHolidayColor );
@@ -850,96 +839,111 @@ void MonthViewCell::enableScrollBars( bool enabled )
850 setHScrollBarMode(QScrollView::AlwaysOff); 839 setHScrollBarMode(QScrollView::AlwaysOff);
851 } 840 }
852} 841}
853 842
854Incidence *MonthViewCell::selectedIncidence() 843Incidence *MonthViewCell::selectedIncidence()
855{ 844{
856 int index = currentItem(); 845 int index = currentItem();
857 if ( index < 0 ) return 0; 846 if ( index < 0 ) return 0;
858 847
859 MonthViewItem *mitem = 848 MonthViewItem *mitem =
860 static_cast<MonthViewItem *>( item( index ) ); 849 static_cast<MonthViewItem *>( item( index ) );
861 850
862 if ( !mitem ) return 0; 851 if ( !mitem ) return 0;
863 852
864 return mitem->incidence(); 853 return mitem->incidence();
865} 854}
866 855
867QDate MonthViewCell::selectedIncidenceDate() 856QDate MonthViewCell::selectedIncidenceDate()
868{ 857{
869 QDate qd; 858 QDate qd;
870 int index = currentItem(); 859 int index = currentItem();
871 if ( index < 0 ) return qd; 860 if ( index < 0 ) return qd;
872 861
873 MonthViewItem *mitem = 862 MonthViewItem *mitem =
874 static_cast<MonthViewItem *>( item( index ) ); 863 static_cast<MonthViewItem *>( item( index ) );
875 864
876 if ( !mitem ) return qd; 865 if ( !mitem ) return qd;
877 866
878 return mitem->incidenceDate(); 867 return mitem->incidenceDate();
879} 868}
880 869
881void MonthViewCell::deselect() 870void MonthViewCell::deselect()
882{ 871{
883 clearSelection(); 872 clearSelection();
884 enableScrollBars( false ); 873 enableScrollBars( false );
885 // updateCell(); 874 // updateCell();
886} 875}
887void MonthViewCell::select() 876void MonthViewCell::select()
888{ 877{
889 ;// updateCell(); 878 ;// updateCell();
890} 879}
891 880
892void MonthViewCell::resizeEvent ( QResizeEvent * e ) 881void MonthViewCell::resizeEvent ( QResizeEvent * e )
893{ 882{
894 if ( !mMonthView->isUpdatePossible() ) 883 if ( !mMonthView->isUpdatePossible() )
895 return; 884 return;
896 //qDebug("++++++++++++++MonthViewCell::resizeEvent %d %d ", width(), height()); 885 //qDebug("++++++++++++++MonthViewCell::resizeEvent %d %d ", width(), height());
897 deselect(); 886 deselect();
887 mLabel->setMaximumHeight( height() - lineWidth()*2 );
888
889 QString text;
890 mLabel->setText( text );
891 bool smallDisplay = QApplication::desktop()->width() < 320 && KOPrefs::instance()->mMonthViewSatSunTog;
892 if ( KOPrefs::instance()->mMonthViewWeek || KOGlobals::self()->calendarSystem()->day( mDate ) == 1 || (mDate.dayOfWeek() == 7 && !smallDisplay ) || KOPrefs::instance()->mMonthShowShort) {
893 text = KOGlobals::self()->calendarSystem()->monthName( mDate, true ) + " ";
894 mLabel->resize( mLabelBigSize );
895 text += QString::number( KOGlobals::self()->calendarSystem()->day(mDate) );
896 } else {
897 mLabel->resize( mLabelSize );
898 text += QString::number( KOGlobals::self()->calendarSystem()->day(mDate) );
899 }
900 mLabel->setText( text );
901
898 int size = height() - mLabel->height() - lineWidth()-1; 902 int size = height() - mLabel->height() - lineWidth()-1;
899 //qDebug("LW %d ", lineWidth()); 903 //qDebug("LW %d ", lineWidth());
900 if ( size > 0 ) 904 if ( size > 0 )
901 verticalScrollBar()->setMaximumHeight( size ); 905 verticalScrollBar()->setMaximumHeight( size );
902 size = width() - mLabel->width() -lineWidth()-1; 906 size = width() - mLabel->width() -lineWidth()-1;
903 if ( size > 0 ) 907 if ( size > 0 )
904 horizontalScrollBar()->setMaximumWidth( size ); 908 horizontalScrollBar()->setMaximumWidth( size );
905 mLabel->move( width()-lineWidth() - mLabel->width(), height()-lineWidth() - mLabel->height() ); 909 mLabel->move( width()-lineWidth() - mLabel->width(), height()-lineWidth() - mLabel->height() );
906 //mLabel->setMaximumWidth( width() - mItemList->lineWidth()*2); 910 //mLabel->setMaximumWidth( width() - mItemList->lineWidth()*2);
907 // mItemList->resize ( width(), height () ); 911 // mItemList->resize ( width(), height () );
908 if ( e ) 912 if ( e )
909 KNoScrollListBox::resizeEvent ( e ); 913 KNoScrollListBox::resizeEvent ( e );
910} 914}
911 915
912void MonthViewCell::defaultAction( QListBoxItem *item ) 916void MonthViewCell::defaultAction( QListBoxItem *item )
913{ 917{
914 if ( !item ) return; 918 if ( !item ) return;
915 919
916 MonthViewItem *eventItem = static_cast<MonthViewItem *>( item ); 920 MonthViewItem *eventItem = static_cast<MonthViewItem *>( item );
917 Incidence *incidence = eventItem->incidence(); 921 Incidence *incidence = eventItem->incidence();
918 if ( incidence ) mMonthView->defaultAction( incidence ); 922 if ( incidence ) mMonthView->defaultAction( incidence );
919} 923}
920void MonthViewCell::showDay() 924void MonthViewCell::showDay()
921{ 925{
922 emit showDaySignal( date() ); 926 emit showDaySignal( date() );
923} 927}
924void MonthViewCell::newEvent() 928void MonthViewCell::newEvent()
925{ 929{
926 QDateTime dt( date(), QTime( KOPrefs::instance()->mStartTime, 0 ) ); 930 QDateTime dt( date(), QTime( KOPrefs::instance()->mStartTime, 0 ) );
927 emit newEventSignal( dt ); 931 emit newEventSignal( dt );
928} 932}
929void MonthViewCell::cellClicked( QListBoxItem *item ) 933void MonthViewCell::cellClicked( QListBoxItem *item )
930{ 934{
931 static QListBoxItem * lastClicked = 0; 935 static QListBoxItem * lastClicked = 0;
932 if ( item == 0 ) { 936 if ( item == 0 ) {
933 QDateTime dt( date(), QTime( KOPrefs::instance()->mStartTime, 0 ) ); 937 QDateTime dt( date(), QTime( KOPrefs::instance()->mStartTime, 0 ) );
934 emit newEventSignal( dt ); 938 emit newEventSignal( dt );
935 return; 939 return;
936 } 940 }
937 /* 941 /*
938 if ( lastClicked ) 942 if ( lastClicked )
939 if ( ! item ) { 943 if ( ! item ) {
940 if ( lastClicked->listBox() != item->listBox() ) 944 if ( lastClicked->listBox() != item->listBox() )
941 lastClicked->listBox()->clearSelection(); 945 lastClicked->listBox()->clearSelection();
942 } 946 }
943 */ 947 */
944 948
945 mMonthView->setSelectedCell( this ); 949 mMonthView->setSelectedCell( this );
@@ -1403,360 +1407,374 @@ void KOMonthView::updateView()
1403 if ( invalid ) 1407 if ( invalid )
1404 break; 1408 break;
1405 invalid = true; 1409 invalid = true;
1406 //qDebug("invalid %s", event->summary().latin1()); 1410 //qDebug("invalid %s", event->summary().latin1());
1407 incidenceStart = QDateTime( mStartDate ).addSecs( -2 );; 1411 incidenceStart = QDateTime( mStartDate ).addSecs( -2 );;
1408 } 1412 }
1409 if ( last ) 1413 if ( last )
1410 break; 1414 break;
1411 bool ok; 1415 bool ok;
1412 incidenceStart = event->getNextOccurence( incidenceStart.addSecs( 1 ) ,&ok ); 1416 incidenceStart = event->getNextOccurence( incidenceStart.addSecs( 1 ) ,&ok );
1413 if ( ! ok ) 1417 if ( ! ok )
1414 break; 1418 break;
1415 if ( incidenceStart.date() > endDate ) 1419 if ( incidenceStart.date() > endDate )
1416 break; 1420 break;
1417 } 1421 }
1418 } else { // no recur 1422 } else { // no recur
1419 int st = event->dtStart().date().daysTo( endDate ); 1423 int st = event->dtStart().date().daysTo( endDate );
1420 if ( st >= 0 ) { // start before timeend 1424 if ( st >= 0 ) { // start before timeend
1421 int end = mStartDate.daysTo( event->dtEnd().date() ); 1425 int end = mStartDate.daysTo( event->dtEnd().date() );
1422 if ( end >= 0 ) { // end after timestart --- got one! 1426 if ( end >= 0 ) { // end after timestart --- got one!
1423 //normalize 1427 //normalize
1424 st = timeSpan - st; 1428 st = timeSpan - st;
1425 if ( st < 0 ) st = 0; 1429 if ( st < 0 ) st = 0;
1426 if ( end > timeSpan ) end = timeSpan; 1430 if ( end > timeSpan ) end = timeSpan;
1427 int iii; 1431 int iii;
1428 for ( iii = st;iii<= end;++iii) 1432 for ( iii = st;iii<= end;++iii)
1429 (*cells)[iii]->insertEvent( event ); 1433 (*cells)[iii]->insertEvent( event );
1430 } 1434 }
1431 } 1435 }
1432 } 1436 }
1433 } 1437 }
1434 // insert due todos 1438 // insert due todos
1435 QPtrList<Todo> todos = calendar()->todos( ); 1439 QPtrList<Todo> todos = calendar()->todos( );
1436 Todo *todo; 1440 Todo *todo;
1437 for(todo = todos.first(); todo; todo = todos.next()) { 1441 for(todo = todos.first(); todo; todo = todos.next()) {
1438 //insertTodo( todo ); 1442 //insertTodo( todo );
1439 if ( todo->hasDueDate() ) { 1443 if ( todo->hasDueDate() ) {
1440 int day = mStartDate.daysTo( todo->dtDue().date() ); 1444 int day = mStartDate.daysTo( todo->dtDue().date() );
1441 if ( day >= 0 && day < timeSpan + 1) { 1445 if ( day >= 0 && day < timeSpan + 1) {
1442 (*cells)[day]->insertTodo( todo ); 1446 (*cells)[day]->insertTodo( todo );
1443 } 1447 }
1444 } 1448 }
1445 } 1449 }
1446 1450
1447 for( i = 0; i < timeSpan+1; ++i ) { 1451 for( i = 0; i < timeSpan+1; ++i ) {
1448 (*cells)[i]->finishUpdateCell(); 1452 (*cells)[i]->finishUpdateCell();
1449 } 1453 }
1450 processSelectionChange(); 1454 processSelectionChange();
1451 qApp->processEvents(); 1455 //qApp->processEvents();
1452 for( i = 0; i < timeSpan+1; ++i ) { 1456 for( i = 0; i < timeSpan+1; ++i ) {
1453 (*cells)[i]->repaintfinishUpdateCell(); 1457 (*cells)[i]->repaintfinishUpdateCell();
1454 } 1458 }
1455 (*cells)[0]->setFocus(); 1459 (*cells)[0]->setFocus();
1456 1460
1457 1461
1458#else 1462#else
1459 // old code 1463 // old code
1460 //qDebug("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "); 1464 //qDebug("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ");
1461 int i; 1465 int i;
1462 for( i = 0; i < (*cells).count(); ++i ) { 1466 for( i = 0; i < (*cells).count(); ++i ) {
1463 (*cells)[i]->updateCell(); 1467 (*cells)[i]->updateCell();
1464 } 1468 }
1465 1469
1466 //qDebug("KOMonthView::updateView() "); 1470 //qDebug("KOMonthView::updateView() ");
1467 processSelectionChange(); 1471 processSelectionChange();
1468 // qDebug("---------------------------------------------------------------------+ "); 1472 // qDebug("---------------------------------------------------------------------+ ");
1469 (*cells)[0]->setFocus(); 1473 (*cells)[0]->setFocus();
1470#endif 1474#endif
1471 1475
1472 //qDebug("update time %d ", ti.elapsed()); 1476 //qDebug("update time %d ", ti.elapsed());
1473} 1477}
1474 1478
1475void KOMonthView::resizeEvent(QResizeEvent * e) 1479void KOMonthView::resizeEvent(QResizeEvent * e)
1476{ 1480{
1477 qDebug("KOMonthView::resizeEvent %d %d -- %d %d ", e->size().width(), e->size().height(), e->oldSize().width(), e->oldSize().height()); 1481 //qDebug("KOMonthView::resizeEvent %d %d -- %d %d ", e->size().width(), e->size().height(), e->oldSize().width(), e->oldSize().height());
1478 if ( isVisible() ) { 1482 if ( isVisible() ) {
1479 qDebug("KOMonthView::isVisible "); 1483 //qDebug("KOMonthView::isVisible ");
1480 slotComputeLayout(); 1484 slotComputeLayout();
1481 } else 1485 } else
1482 mComputeLayoutTimer->start( 100 ); 1486 mComputeLayoutTimer->start( 100 );
1483} 1487}
1484 1488
1485void KOMonthView::slotComputeLayout() 1489void KOMonthView::slotComputeLayout()
1486{ 1490{
1487 mComputeLayoutTimer->stop(); 1491 mComputeLayoutTimer->stop();
1488 qDebug("KOMonthView::Post - resizeEvent %d %d ", width(), height() ); 1492 //qDebug("KOMonthView::Post - resizeEvent %d %d ", width(), height() );
1489 computeLayout(); 1493 computeLayout();
1490 clPending = true; 1494 clPending = true;
1491 if ( mShowWeekView ) 1495 if ( mShowWeekView )
1492 mCellsW[0]->setFocus(); 1496 mCellsW[0]->setFocus();
1493 else 1497 else
1494 mCells[0]->setFocus(); 1498 mCells[0]->setFocus();
1495 1499
1496} 1500}
1497void KOMonthView::computeLayoutWeek() 1501void KOMonthView::computeLayoutWeek()
1498{ 1502{
1499 static int lastWid = 0; 1503 static int lastWid = 0;
1500 static int lastHei = 0; 1504 static int lastHei = 0;
1501 int daysToShow; 1505 int daysToShow;
1502 bool combinedSatSun = false; 1506 bool combinedSatSun = false;
1503 if (mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ) { 1507 if (mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ) {
1504 daysToShow = 6; 1508 daysToShow = 6;
1505 combinedSatSun = true; 1509 combinedSatSun = true;
1506 } 1510 }
1507 int tWid = topLevelWidget()->size().width(); 1511 int tWid = topLevelWidget()->size().width();
1508 int tHei = topLevelWidget()->size().height(); 1512 int tHei = topLevelWidget()->size().height();
1509 1513
1510 int wid = width();//e 1514 int wid = width();//e
1511 int hei = height()-1-mNavigatorBar->height(); 1515 int hei = height()-1-mNavigatorBar->height();
1512 1516
1513 if ( ((wid *3)/2) < tWid && (( hei *3) /2) < tHei ) 1517 if ( ((wid *3)/2) < tWid && (( hei *3) /2) < tHei )
1514 return; 1518 return;
1515 1519
1516 if ( lastWid == width() && lastHei == height() ) { 1520 if ( lastWid == width() && lastHei == height() ) {
1517 qDebug("KOListWeekView::No compute layout needed "); 1521 //qDebug("KOListWeekView::No compute layout needed ");
1518 return; 1522 return;
1519 } 1523 }
1520 lastWid = width(); 1524 lastWid = width();
1521 lastHei = height(); 1525 lastHei = height();
1522 1526
1523 1527
1524 if ( wid < hei ) 1528 if ( wid < hei )
1525 daysToShow = 2; 1529 daysToShow = 2;
1526 else 1530 else
1527 daysToShow = 3; 1531 daysToShow = 3;
1528 mShowSatSunComp = true; 1532 mShowSatSunComp = true;
1529 combinedSatSun = true; 1533 combinedSatSun = true;
1530 1534
1531 //qDebug("KOMonthView::computeLayout() WWW ------------------------------------ "); 1535 //qDebug("KOMonthView::computeLayout() WWW ------------------------------------ ");
1532 QFontMetrics fm ( mWeekLabels[0]->font() ); 1536 QFontMetrics fm ( mWeekLabels[0]->font() );
1533 int weeklabelwid = fm.width( "888" ); 1537 int weeklabelwid = fm.width( "888" );
1534 wid -= weeklabelwid; 1538 wid -= weeklabelwid;
1535 1539
1536 int colWid = wid / daysToShow; 1540 int colWid = wid / daysToShow;
1537 int lastCol = wid - ( colWid*6 ); 1541 int lastCol = wid - ( colWid*6 );
1538 int dayLabelHei = mDayLabelsW[0]->sizeHint().height(); 1542 int dayLabelHei = mDayLabelsW[0]->sizeHint().height();
1539 int cellHei = (hei - (5- daysToShow )*dayLabelHei) /(5- daysToShow ); 1543 int cellHei = (hei - (5- daysToShow )*dayLabelHei) /(5- daysToShow );
1540 int colModulo = wid % daysToShow; 1544 int colModulo = wid % daysToShow;
1541 int rowModulo = (hei- (5- daysToShow )*dayLabelHei) % daysToShow-1; 1545 int rowModulo = (hei- (5- daysToShow )*dayLabelHei) % daysToShow-1;
1542 //qDebug("rowmod %d ", rowModulo); 1546 //qDebug("rowmod %d ", rowModulo);
1543 int i; 1547 int i;
1544 int x,y,w,h; 1548 int x,y,w,h;
1545 x= 0; 1549 x= 0;
1546 y= 0; 1550 y= 0;
1547 w = colWid; 1551 w = colWid;
1548 h = dayLabelHei ; 1552 h = dayLabelHei ;
1549 for ( i = 0; i < 7; i++) { 1553 for ( i = 0; i < 7; i++) {
1550 if ( i && !( i % daysToShow) && i < 6) { 1554 if ( i && !( i % daysToShow) && i < 6) {
1551 y += hei/(5-daysToShow); 1555 y += hei/(5-daysToShow);
1552 x = 0; 1556 x = 0;
1553 w = colWid; 1557 w = colWid;
1554 } 1558 }
1555 if ( ((i) % daysToShow) >= daysToShow-colModulo ) { 1559 if ( ((i) % daysToShow) >= daysToShow-colModulo ) {
1556 ++w; 1560 ++w;
1557 } 1561 }
1558 if ( i >= 5 ) { 1562 if ( i >= 5 ) {
1559 mDayLabelsW[i]->setGeometry( x+weeklabelwid,y,w/2+w%2,h); 1563 mDayLabelsW[i]->setGeometry( x+weeklabelwid,y,w/2+w%2,h);
1560 x -= (w/2 ); 1564 x -= (w/2 );
1561 } 1565 }
1562 else 1566 else
1563 mDayLabelsW[i]->setGeometry( x+weeklabelwid,y,w,h); 1567 mDayLabelsW[i]->setGeometry( x+weeklabelwid,y,w,h);
1564 x += w; 1568 x += w;
1565 } 1569 }
1566 x= 0; 1570 x= 0;
1567 y= dayLabelHei; 1571 y= dayLabelHei;
1568 w = colWid; 1572 w = colWid;
1569 h = cellHei; 1573 h = cellHei;
1574 int max = 0;
1570 for ( i = 0; i < mCellsW.count(); ++i) { 1575 for ( i = 0; i < mCellsW.count(); ++i) {
1571 if ( i > 6 ) { 1576 if ( i > 6 ) {
1572 mCellsW[i]->hide(); 1577 mCellsW[i]->hide();
1573 continue; 1578 continue;
1574 } 1579 }
1575 1580
1576 w = colWid; 1581 w = colWid;
1577 if ( ((i) % daysToShow) >= daysToShow-colModulo ) { 1582 if ( ((i) % daysToShow) >= daysToShow-colModulo ) {
1578 ++w; 1583 ++w;
1579 } 1584 }
1580 if ( i == (daysToShow-1-rowModulo)*7) 1585 if ( i == (daysToShow-1-rowModulo)*7)
1581 ++h; 1586 ++h;
1582 1587
1583 if ( i >= 5 ) { 1588 if ( i >= 5 ) {
1584 if ( i ==5 ) { 1589 if ( i ==5 ) {
1585 mCellsW[i]->setGeometry ( x+weeklabelwid,y,w,h/2 ); 1590 max = h/2;
1591 mCellsW[i]->setGeometry ( x+weeklabelwid,y,w,max );
1586 x -= w ;y += h/2; 1592 x -= w ;y += h/2;
1587 } else { 1593 } else {
1588 if ( ((i-1) % daysToShow) >= daysToShow-colModulo ) { 1594 if ( ((i-1) % daysToShow) >= daysToShow-colModulo ) {
1589 ++w; 1595 ++w;
1590 } 1596 }
1591 mCellsW[i]->setGeometry ( x+weeklabelwid,y,w,h-h/2 ); 1597 max = h-h/2;
1598 mCellsW[i]->setGeometry ( x+weeklabelwid,y,w,max );
1592 y -= h/2; 1599 y -= h/2;
1593 } 1600 }
1594 } else 1601 } else {
1602 max = h;
1595 mCellsW[i]->setGeometry ( x+weeklabelwid,y,w,h ); 1603 mCellsW[i]->setGeometry ( x+weeklabelwid,y,w,h );
1604 }
1596 1605
1597 1606
1598 x += w; 1607 x += w;
1599 if ( x + w/2 > wid ) { 1608 if ( x + w/2 > wid ) {
1600 x = 0; 1609 x = 0;
1601 y += h+dayLabelHei ; 1610 y += h+dayLabelHei ;
1602 } 1611 }
1612 //mCellsW[i]->dateLabel()->setMaximumHeight( max - mCellsW[i]->lineWidth()*2 );
1603 } 1613 }
1604 y= dayLabelHei; 1614 y= dayLabelHei;
1605 h = cellHei ; 1615 h = cellHei ;
1606 mWeekLabelsW[0]->setGeometry( 0,y,weeklabelwid,hei-dayLabelHei); 1616 mWeekLabelsW[0]->setGeometry( 0,y,weeklabelwid,hei-dayLabelHei);
1607 mWeekLabelsW[1]->setGeometry( 0,0,weeklabelwid,dayLabelHei); 1617 mWeekLabelsW[1]->setGeometry( 0,0,weeklabelwid,dayLabelHei);
1608 // qDebug("RRRRRRRRRRRRR %d %d old %d %d", e->size().width(),e->size().height() , e->oldSize().width(),e->oldSize().height()); 1618 // qDebug("RRRRRRRRRRRRR %d %d old %d %d", e->size().width(),e->size().height() , e->oldSize().width(),e->oldSize().height());
1609 //qDebug("parent %d %d ", topLevelWidget()->size().width(), topLevelWidget()->size().height()); 1619 //qDebug("parent %d %d ", topLevelWidget()->size().width(), topLevelWidget()->size().height());
1610 mShortDayLabelsW = mDayLabelsW[0]->width()-2 < mWidthLongDayLabel ; 1620 mShortDayLabelsW = mDayLabelsW[0]->width()-2 < mWidthLongDayLabel ;
1611 updateDayLabels(); 1621 updateDayLabels();
1612 //bool forceUpdate = !updatePossible; 1622 //bool forceUpdate = !updatePossible;
1613 updatePossible = true; 1623 updatePossible = true;
1614 //mWeekLabels[mNumWeeks]->setText( i18n("M")); 1624 //mWeekLabels[mNumWeeks]->setText( i18n("M"));
1615 //if ( forceUpdate ) 1625 //if ( forceUpdate )
1616 // updateView(); 1626 // updateView();
1617} 1627}
1618void KOMonthView::computeLayout() 1628void KOMonthView::computeLayout()
1619{ 1629{
1620 1630
1621 1631
1622 static int lastWid = 0; 1632 static int lastWid = 0;
1623 static int lastHei = 0; 1633 static int lastHei = 0;
1624 1634
1625 if ( mShowWeekView ){ 1635 if ( mShowWeekView ){
1626 computeLayoutWeek(); 1636 computeLayoutWeek();
1627 return; 1637 return;
1628 } 1638 }
1629 int daysToShow = 7; 1639 int daysToShow = 7;
1630 bool combinedSatSun = false; 1640 bool combinedSatSun = false;
1631 if (mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ) { 1641 if (mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ) {
1632 daysToShow = 6; 1642 daysToShow = 6;
1633 combinedSatSun = true; 1643 combinedSatSun = true;
1634 } 1644 }
1635 int tWid = topLevelWidget()->size().width(); 1645 int tWid = topLevelWidget()->size().width();
1636 int tHei = topLevelWidget()->size().height(); 1646 int tHei = topLevelWidget()->size().height();
1637 1647
1638 int wid = width();//e 1648 int wid = width();//e
1639 int hei = height()-1-mNavigatorBar->height(); 1649 int hei = height()-1-mNavigatorBar->height();
1640 1650
1641 if ( ((wid *3)/2) < tWid && (( hei *3) /2) < tHei ) { 1651 if ( ((wid *3)/2) < tWid && (( hei *3) /2) < tHei ) {
1642 return; 1652 return;
1643 } 1653 }
1644 if ( lastWid == width() && lastHei == height() ){ 1654 if ( lastWid == width() && lastHei == height() ){
1645 qDebug("KOMonthview::No compute layout needed "); 1655 //qDebug("KOMonthview::No compute layout needed ");
1646 return; 1656 return;
1647 } 1657 }
1648 1658
1649 lastWid = width(); 1659 lastWid = width();
1650 lastHei = height(); 1660 lastHei = height();
1651 qDebug("KOMonthView::computeLayout() MMM ------------------- "); 1661 //qDebug("KOMonthView::computeLayout() MMM ------------------- ");
1652 QFontMetrics fm ( mWeekLabels[0]->font() ); 1662 QFontMetrics fm ( mWeekLabels[0]->font() );
1653 int weeklabelwid = fm.width( "888" ); 1663 int weeklabelwid = fm.width( "888" );
1654 wid -= weeklabelwid; 1664 wid -= weeklabelwid;
1655 1665
1656 int colWid = wid / daysToShow; 1666 int colWid = wid / daysToShow;
1657 int lastCol = wid - ( colWid*6 ); 1667 int lastCol = wid - ( colWid*6 );
1658 int dayLabelHei = mDayLabels[0]->sizeHint().height(); 1668 int dayLabelHei = mDayLabels[0]->sizeHint().height();
1659 int cellHei = (hei - dayLabelHei) /6; 1669 int cellHei = (hei - dayLabelHei) /6;
1660 int colModulo = wid % daysToShow; 1670 int colModulo = wid % daysToShow;
1661 int rowModulo = (hei- dayLabelHei) % 6; 1671 int rowModulo = (hei- dayLabelHei) % 6;
1662 //qDebug("rowmod %d ", rowModulo); 1672 //qDebug("rowmod %d ", rowModulo);
1663 int i; 1673 int i;
1664 int x,y,w,h; 1674 int x,y,w,h;
1665 x= 0; 1675 x= 0;
1666 y= 0; 1676 y= 0;
1667 w = colWid; 1677 w = colWid;
1668 h = dayLabelHei ; 1678 h = dayLabelHei ;
1669 for ( i = 0; i < 7; i++) { 1679 for ( i = 0; i < 7; i++) {
1670 if ( i == daysToShow-colModulo ) 1680 if ( i == daysToShow-colModulo )
1671 ++w; 1681 ++w;
1672 if ( combinedSatSun ) { 1682 if ( combinedSatSun ) {
1673 if ( i >= daysToShow-1 ) { 1683 if ( i >= daysToShow-1 ) {
1674 mDayLabels[i]->setGeometry( x+weeklabelwid,y,w/2,h); 1684 mDayLabels[i]->setGeometry( x+weeklabelwid,y,w/2,h);
1675 x -= w/2 ; 1685 x -= w/2 ;
1676 } 1686 }
1677 else 1687 else
1678 mDayLabels[i]->setGeometry( x+weeklabelwid,y,w,h); 1688 mDayLabels[i]->setGeometry( x+weeklabelwid,y,w,h);
1679 } else 1689 } else
1680 mDayLabels[i]->setGeometry( x+weeklabelwid,y,w,h); 1690 mDayLabels[i]->setGeometry( x+weeklabelwid,y,w,h);
1681 x += w; 1691 x += w;
1682 } 1692 }
1683 x= 0; 1693 x= 0;
1684 y= dayLabelHei; 1694 y= dayLabelHei;
1685 w = colWid; 1695 w = colWid;
1686 h = cellHei ; 1696 h = cellHei ;
1697 int max = 0;
1687 for ( i = 0; i < mCells.count(); ++i) { 1698 for ( i = 0; i < mCells.count(); ++i) {
1688 //qDebug("iii %d ", i); 1699 //qDebug("iii %d ", i);
1689 w = colWid; 1700 w = colWid;
1690 if ( ((i) % 7) >= 7-colModulo ) { 1701 if ( ((i) % 7) >= 7-colModulo ) {
1691 ++w; 1702 ++w;
1692 } 1703 }
1693 if ( i == (6-rowModulo)*7) 1704 if ( i == (6-rowModulo)*7)
1694 ++h; 1705 ++h;
1695 if ( combinedSatSun ) { 1706 if ( combinedSatSun ) {
1696 if ( (i)%7 >= daysToShow-1 ) { 1707 if ( (i)%7 >= daysToShow-1 ) {
1697 if ( (i)%7 == daysToShow-1 ) { 1708 if ( (i)%7 == daysToShow-1 ) {
1698 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h/2 ); 1709 max = h/2;
1710 mCells[i]->setGeometry ( x+weeklabelwid,y,w,max );
1699 x -= w ;y += h/2; 1711 x -= w ;y += h/2;
1700 } else { 1712 } else {
1701 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h-h/2 ); 1713 max = h-h/2;
1714 mCells[i]->setGeometry ( x+weeklabelwid,y,w,max );
1702 y -= h/2; 1715 y -= h/2;
1703 } 1716 }
1704 } else 1717 } else {
1718 max = h;
1705 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h ); 1719 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h );
1720 }
1706 1721
1707 } 1722 }
1708 else 1723 else {
1724 max = h;
1709 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h ); 1725 mCells[i]->setGeometry ( x+weeklabelwid,y,w,h );
1726 }
1710 x += w; 1727 x += w;
1711 if ( x + w/2 > wid ) { 1728 if ( x + w/2 > wid ) {
1712 x = 0; 1729 x = 0;
1713 y += h; 1730 y += h;
1714 } 1731 }
1732 //mCells[i]->dateLabel()->setMaximumHeight( max- mCells[i]->lineWidth()*2 );
1715 } 1733 }
1716 y= dayLabelHei; 1734 y= dayLabelHei;
1717 h = cellHei ; 1735 h = cellHei ;
1718 for ( i = 0; i < 6; i++) { 1736 for ( i = 0; i < 6; i++) {
1719 if ( i == (6-rowModulo)) 1737 if ( i == (6-rowModulo))
1720 ++h; 1738 ++h;
1721 mWeekLabels[i]->setGeometry( 0,y,weeklabelwid,h); 1739 mWeekLabels[i]->setGeometry( 0,y,weeklabelwid,h);
1722 y += h; 1740 y += h;
1723 } 1741 }
1724 mWeekLabels[6]->setGeometry( 0,0,weeklabelwid,dayLabelHei); 1742 mWeekLabels[6]->setGeometry( 0,0,weeklabelwid,dayLabelHei);
1725 // qDebug("RRRRRRRRRRRRR %d %d old %d %d", e->size().width(),e->size().height() , e->oldSize().width(),e->oldSize().height()); 1743 // qDebug("RRRRRRRRRRRRR %d %d old %d %d", e->size().width(),e->size().height() , e->oldSize().width(),e->oldSize().height());
1726 //qDebug("parent %d %d ", topLevelWidget()->size().width(), topLevelWidget()->size().height()); 1744 //qDebug("parent %d %d ", topLevelWidget()->size().width(), topLevelWidget()->size().height());
1727 mShortDayLabelsM = mDayLabels[0]->width()-2 < mWidthLongDayLabel ; 1745 mShortDayLabelsM = mDayLabels[0]->width()-2 < mWidthLongDayLabel ;
1728 updateDayLabels(); 1746 updateDayLabels();
1729 //bool forceUpdate = !updatePossible; 1747 //bool forceUpdate = !updatePossible;
1730 updatePossible = true; 1748 updatePossible = true;
1731 //mWeekLabels[mNumWeeks]->setText( i18n("W")); 1749 //mWeekLabels[mNumWeeks]->setText( i18n("W"));
1732} 1750}
1733 1751
1734void KOMonthView::showContextMenu( Incidence *incidence ) 1752void KOMonthView::showContextMenu( Incidence *incidence )
1735{ 1753{
1736 mContextMenu->showIncidencePopup(incidence); 1754 mContextMenu->showIncidencePopup(incidence);
1737 /* 1755 /*
1738 if( incidence && incidence->type() == "Event" ) { 1756 if( incidence && incidence->type() == "Event" ) {
1739 Event *event = static_cast<Event *>(incidence); 1757 Event *event = static_cast<Event *>(incidence);
1740 mContextMenu->showEventPopup(event); 1758 mContextMenu->showEventPopup(event);
1741 } else { 1759 } else {
1742 kdDebug() << "MonthView::showContextMenu(): cast failed." << endl; 1760 kdDebug() << "MonthView::showContextMenu(): cast failed." << endl;
1743 } 1761 }
1744 */ 1762 */
1745} 1763}
1746MonthViewCell * KOMonthView::selectedCell( ) 1764MonthViewCell * KOMonthView::selectedCell( )
1747{ 1765{
1748 return mSelectedCell; 1766 return mSelectedCell;
1749} 1767}
1750void KOMonthView::setSelectedCell( MonthViewCell *cell ) 1768void KOMonthView::setSelectedCell( MonthViewCell *cell )
1751{ 1769{
1752 //qDebug("KOMonthView::setSelectedCell "); 1770 //qDebug("KOMonthView::setSelectedCell ");
1753 if ( mSelectedCell && mSelectedCell != cell ) { 1771 if ( mSelectedCell && mSelectedCell != cell ) {
1754 MonthViewCell * mvc = mSelectedCell; 1772 MonthViewCell * mvc = mSelectedCell;
1755 mSelectedCell = cell; 1773 mSelectedCell = cell;
1756 mvc->deselect(); 1774 mvc->deselect();
1757 } else 1775 } else
1758 mSelectedCell = cell; 1776 mSelectedCell = cell;
1759 // if ( mSelectedCell ) 1777 // if ( mSelectedCell )
1760 // mSelectedCell->select(); 1778 // mSelectedCell->select();
1761 if ( !mSelectedCell ) 1779 if ( !mSelectedCell )
1762 emit incidenceSelected( 0 ); 1780 emit incidenceSelected( 0 );
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h
index b997c1a..a58f6b8 100644
--- a/korganizer/komonthview.h
+++ b/korganizer/komonthview.h
@@ -114,96 +114,97 @@ class MonthViewItem: public QListBoxItem
114 virtual int width(const QListBox *) const; 114 virtual int width(const QListBox *) const;
115 115
116 private: 116 private:
117 bool mblockRepaint; 117 bool mblockRepaint;
118 int mMultiday; 118 int mMultiday;
119 bool mRecur; 119 bool mRecur;
120 bool mAlarm; 120 bool mAlarm;
121 bool mReply; 121 bool mReply;
122 bool mInfo; 122 bool mInfo;
123 123
124 QPalette mPalette; 124 QPalette mPalette;
125 QDate mDate; 125 QDate mDate;
126 126
127 Incidence *mIncidence; 127 Incidence *mIncidence;
128}; 128};
129 129
130 130
131class KOMonthView; 131class KOMonthView;
132 132
133class MonthViewCell : public KNoScrollListBox 133class MonthViewCell : public KNoScrollListBox
134{ 134{
135 Q_OBJECT 135 Q_OBJECT
136 public: 136 public:
137 MonthViewCell(KOMonthView *,QWidget* ); 137 MonthViewCell(KOMonthView *,QWidget* );
138 ~MonthViewCell() {mAvailItemList.setAutoDelete( true );} 138 ~MonthViewCell() {mAvailItemList.setAutoDelete( true );}
139 139
140 void setDate( const QDate & ); 140 void setDate( const QDate & );
141 QDate date() const; 141 QDate date() const;
142 142
143 void setPrimary( bool ); 143 void setPrimary( bool );
144 bool isPrimary() const; 144 bool isPrimary() const;
145 145
146 void setHoliday( bool ); 146 void setHoliday( bool );
147 void setHoliday( const QString & ); 147 void setHoliday( const QString & );
148 148
149 void updateCell(); 149 void updateCell();
150 void startUpdateCell(); 150 void startUpdateCell();
151 void finishUpdateCell(); 151 void finishUpdateCell();
152 void repaintfinishUpdateCell(); 152 void repaintfinishUpdateCell();
153 void insertEvent(Event *); 153 void insertEvent(Event *);
154 void insertTodo(Todo *); 154 void insertTodo(Todo *);
155 155
156 void updateConfig( bool bigFont = false ); 156 void updateConfig( bool bigFont = false );
157 157
158 void enableScrollBars( bool ); 158 void enableScrollBars( bool );
159 159
160 Incidence *selectedIncidence(); 160 Incidence *selectedIncidence();
161 QDate selectedIncidenceDate(); 161 QDate selectedIncidenceDate();
162 QPushButton * dateLabel() { return mLabel; }
162 163
163 void deselect(); 164 void deselect();
164 void select(); 165 void select();
165 166
166#ifdef DESKTOP_VERSION 167#ifdef DESKTOP_VERSION
167 static QToolTipGroup *toolTipGroup(); 168 static QToolTipGroup *toolTipGroup();
168#endif 169#endif
169 signals: 170 signals:
170 void defaultAction( Incidence * ); 171 void defaultAction( Incidence * );
171 void newEventSignal( QDateTime ); 172 void newEventSignal( QDateTime );
172 void showDaySignal( QDate ); 173 void showDaySignal( QDate );
173 174
174 protected: 175 protected:
175 QStringList mToolTip; 176 QStringList mToolTip;
176 void resizeEvent( QResizeEvent * ); 177 void resizeEvent( QResizeEvent * );
177 178
178 179
179public slots: 180public slots:
180 void showDay(); 181 void showDay();
181 182
182 protected slots: 183 protected slots:
183 void defaultAction( QListBoxItem * ); 184 void defaultAction( QListBoxItem * );
184 void contextMenu( QListBoxItem * ); 185 void contextMenu( QListBoxItem * );
185 void selection( QListBoxItem * ); 186 void selection( QListBoxItem * );
186 void cellClicked( QListBoxItem * ); 187 void cellClicked( QListBoxItem * );
187 void newEvent(); 188 void newEvent();
188 189
189 private: 190 private:
190 MonthViewItem* mCurrentAvailItem; 191 MonthViewItem* mCurrentAvailItem;
191 QPtrList <MonthViewItem> mAvailItemList; 192 QPtrList <MonthViewItem> mAvailItemList;
192 KOMonthView *mMonthView; 193 KOMonthView *mMonthView;
193 int currentPalette; 194 int currentPalette;
194 195
195 QDate mDate; 196 QDate mDate;
196 bool mPrimary; 197 bool mPrimary;
197 bool mHoliday; 198 bool mHoliday;
198 QString mHolidayString; 199 QString mHolidayString;
199 200
200 //QLabel *mLabel; 201 //QLabel *mLabel;
201 QPushButton *mLabel; 202 QPushButton *mLabel;
202 //QListBox *mItemList; 203 //QListBox *mItemList;
203#ifdef DESKTOP_VERSION 204#ifdef DESKTOP_VERSION
204 static QToolTipGroup *mToolTipGroup; 205 static QToolTipGroup *mToolTipGroup;
205#endif 206#endif
206 QSize mLabelSize; 207 QSize mLabelSize;
207 QSize mLabelBigSize; 208 QSize mLabelBigSize;
208 QPalette mHolidayPalette; 209 QPalette mHolidayPalette;
209 QPalette mStandardPalette; 210 QPalette mStandardPalette;