summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/calendarview.cpp31
-rw-r--r--korganizer/calendarview.h1
-rw-r--r--korganizer/komonthview.cpp5
-rw-r--r--korganizer/koprefs.cpp28
-rw-r--r--korganizer/ktimeedit.cpp6
-rw-r--r--korganizer/mainwindow.cpp27
-rw-r--r--korganizer/navigatorbar.cpp3
7 files changed, 66 insertions, 35 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 0fbaa9a..a9de65a 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -2415,136 +2415,139 @@ void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel )
2415 else { 2415 else {
2416 description.sprintf(i18n(" %d items?"),delSel.count() ); 2416 description.sprintf(i18n(" %d items?"),delSel.count() );
2417 } 2417 }
2418 while ( incidence ) { 2418 while ( incidence ) {
2419 Incidence *in = incidence->clone(); 2419 Incidence *in = incidence->clone();
2420 if ( ! in->summary().isEmpty() ) { 2420 if ( ! in->summary().isEmpty() ) {
2421 in->setDescription(""); 2421 in->setDescription("");
2422 } else { 2422 } else {
2423 in->setSummary( in->description().left(20)); 2423 in->setSummary( in->description().left(20));
2424 in->setDescription(""); 2424 in->setDescription("");
2425 } 2425 }
2426 if ( addText ) 2426 if ( addText )
2427 description += in->summary() + "\n"; 2427 description += in->summary() + "\n";
2428 cal->addIncidence( in ); 2428 cal->addIncidence( in );
2429 incidence = delSel.next(); 2429 incidence = delSel.next();
2430 } 2430 }
2431 if ( beamDialog->beamVcal() ) { 2431 if ( beamDialog->beamVcal() ) {
2432 fn += ".vcs"; 2432 fn += ".vcs";
2433 FileStorage storage( cal, fn, new VCalFormat ); 2433 FileStorage storage( cal, fn, new VCalFormat );
2434 storage.save(); 2434 storage.save();
2435 } else { 2435 } else {
2436 fn += ".ics"; 2436 fn += ".ics";
2437 FileStorage storage( cal, fn, new ICalFormat( ) ); 2437 FileStorage storage( cal, fn, new ICalFormat( ) );
2438 storage.save(); 2438 storage.save();
2439 } 2439 }
2440 delete cal; 2440 delete cal;
2441 mes = i18n("KO/Pi: Ready for beaming"); 2441 mes = i18n("KO/Pi: Ready for beaming");
2442 topLevelWidget()->setCaption(mes); 2442 topLevelWidget()->setCaption(mes);
2443 KApplication::convert2latin1( fn ); 2443 KApplication::convert2latin1( fn );
2444#ifndef DESKTOP_VERSION 2444#ifndef DESKTOP_VERSION
2445 Ir *ir = new Ir( this ); 2445 Ir *ir = new Ir( this );
2446 connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); 2446 connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) );
2447 ir->send( fn, description, "text/x-vCalendar" ); 2447 ir->send( fn, description, "text/x-vCalendar" );
2448#endif 2448#endif
2449 } 2449 }
2450} 2450}
2451void CalendarView::beamDone( Ir *ir ) 2451void CalendarView::beamDone( Ir *ir )
2452{ 2452{
2453#ifndef DESKTOP_VERSION 2453#ifndef DESKTOP_VERSION
2454 delete ir; 2454 delete ir;
2455#endif 2455#endif
2456 topLevelWidget()->setCaption( i18n("KO/Pi: Beaming done.") ); 2456 topLevelWidget()->setCaption( i18n("KO/Pi: Beaming done.") );
2457 topLevelWidget()->raise(); 2457 topLevelWidget()->raise();
2458} 2458}
2459 2459
2460void CalendarView::moveIncidence(Incidence * inc ) 2460void CalendarView::moveIncidence(Incidence * inc )
2461{ 2461{
2462 if ( !inc ) return; 2462 if ( !inc ) return;
2463 // qDebug("showDatePickerForIncidence( ) "); 2463 showDatePickerPopup();
2464 if ( mDateFrame->isVisible() )
2465 mDateFrame->hide();
2466 else {
2467 int w =mDatePicker->sizeHint().width()+2*mDateFrame->lineWidth() ;
2468 int h = mDatePicker->sizeHint().height()+2*mDateFrame->lineWidth() ;
2469 int dw = QApplication::desktop()->width();
2470 int dh = QApplication::desktop()->height();
2471 mDateFrame->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
2472 mDateFrame->show();
2473 }
2474 mDatePickerMode = 2; 2464 mDatePickerMode = 2;
2475 mMoveIncidence = inc ; 2465 mMoveIncidence = inc ;
2476 QDate da; 2466 QDate da;
2477 if ( mMoveIncidence->type() == "Todo" ) { 2467 if ( mMoveIncidence->type() == "Todo" ) {
2478 Todo * to = (Todo *) mMoveIncidence; 2468 Todo * to = (Todo *) mMoveIncidence;
2479 if ( to->hasDueDate() ) 2469 if ( to->hasDueDate() )
2480 da = to->dtDue().date(); 2470 da = to->dtDue().date();
2481 else 2471 else
2482 da = QDate::currentDate(); 2472 da = QDate::currentDate();
2483 } else { 2473 } else {
2484 da = mMoveIncidence->dtStart().date(); 2474 da = mMoveIncidence->dtStart().date();
2485 } 2475 }
2486 //PENDING set date for recurring incidence to date of recurrence 2476 //PENDING set date for recurring incidence to date of recurrence
2487 //mMoveIncidenceOldDate; 2477 //mMoveIncidenceOldDate;
2488 mDatePicker->setDate( da ); 2478 mDatePicker->setDate( da );
2489} 2479}
2490void CalendarView::showDatePicker( ) 2480void CalendarView::showDatePickerPopup()
2491{ 2481{
2492 //qDebug("CalendarView::showDatePicker( ) ");
2493 if ( mDateFrame->isVisible() ) 2482 if ( mDateFrame->isVisible() )
2494 mDateFrame->hide(); 2483 mDateFrame->hide();
2495 else { 2484 else {
2485 int offX = 0, offY = 0;
2486#ifdef DESKTOP_VERSION
2487 int w =mDatePicker->sizeHint().width() ;
2488 int h = mDatePicker->sizeHint().height() ;
2489 int dw = topLevelWidget()->width();
2490 int dh = topLevelWidget()->height();
2491 offX = topLevelWidget()->x();
2492 offY = topLevelWidget()->y();
2493#else
2496 int w =mDatePicker->sizeHint().width() ; 2494 int w =mDatePicker->sizeHint().width() ;
2497 int h = mDatePicker->sizeHint().height() ; 2495 int h = mDatePicker->sizeHint().height() ;
2498 int dw = QApplication::desktop()->width(); 2496 int dw = QApplication::desktop()->width();
2499 int dh = QApplication::desktop()->height(); 2497 int dh = QApplication::desktop()->height();
2500 mDateFrame->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h ); 2498#endif
2499 mDateFrame->setGeometry( (dw-w)/2+offX, (dh - h )/2+offY ,w,h );
2501 mDateFrame->show(); 2500 mDateFrame->show();
2502 } 2501 }
2502}
2503void CalendarView::showDatePicker( )
2504{
2505 showDatePickerPopup();
2503 mDatePickerMode = 1; 2506 mDatePickerMode = 1;
2504 mDatePicker->setDate( mNavigator->selectedDates().first() ); 2507 mDatePicker->setDate( mNavigator->selectedDates().first() );
2505} 2508}
2506 2509
2507void CalendarView::showEventEditor() 2510void CalendarView::showEventEditor()
2508{ 2511{
2509#ifdef DESKTOP_VERSION 2512#ifdef DESKTOP_VERSION
2510 mEventEditor->show(); 2513 mEventEditor->show();
2511#else 2514#else
2512 if ( mEventEditor->width() < QApplication::desktop()->width() -60 || mEventEditor->width() > QApplication::desktop()->width() ) { 2515 if ( mEventEditor->width() < QApplication::desktop()->width() -60 || mEventEditor->width() > QApplication::desktop()->width() ) {
2513 topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); 2516 topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") );
2514 qDebug("KO: CalendarView: recreate mEventEditor %d %d", mEventEditor->width(), QApplication::desktop()->width() ); 2517 qDebug("KO: CalendarView: recreate mEventEditor %d %d", mEventEditor->width(), QApplication::desktop()->width() );
2515 qApp->processEvents(); 2518 qApp->processEvents();
2516 delete mEventEditor; 2519 delete mEventEditor;
2517 mEventEditor = mDialogManager->getEventEditor(); 2520 mEventEditor = mDialogManager->getEventEditor();
2518 topLevelWidget()->setCaption( i18n("") ); 2521 topLevelWidget()->setCaption( i18n("") );
2519 } 2522 }
2520 mEventEditor->showMaximized(); 2523 mEventEditor->showMaximized();
2521#endif 2524#endif
2522} 2525}
2523void CalendarView::showTodoEditor() 2526void CalendarView::showTodoEditor()
2524{ 2527{
2525#ifdef DESKTOP_VERSION 2528#ifdef DESKTOP_VERSION
2526 mTodoEditor->show(); 2529 mTodoEditor->show();
2527#else 2530#else
2528 if ( mTodoEditor->width() < QApplication::desktop()->width() -60|| mTodoEditor->width() > QApplication::desktop()->width() ) { 2531 if ( mTodoEditor->width() < QApplication::desktop()->width() -60|| mTodoEditor->width() > QApplication::desktop()->width() ) {
2529 topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") ); 2532 topLevelWidget()->setCaption( i18n("Recreating edit dialog. Please wait...") );
2530 qDebug("KO: CalendarView: recreate mTodoEditor %d %d ", mTodoEditor->width() ,QApplication::desktop()->width() ); 2533 qDebug("KO: CalendarView: recreate mTodoEditor %d %d ", mTodoEditor->width() ,QApplication::desktop()->width() );
2531 qApp->processEvents(); 2534 qApp->processEvents();
2532 delete mTodoEditor; 2535 delete mTodoEditor;
2533 mTodoEditor = mDialogManager->getTodoEditor(); 2536 mTodoEditor = mDialogManager->getTodoEditor();
2534 topLevelWidget()->setCaption( i18n("") ); 2537 topLevelWidget()->setCaption( i18n("") );
2535 } 2538 }
2536 mTodoEditor->showMaximized(); 2539 mTodoEditor->showMaximized();
2537#endif 2540#endif
2538} 2541}
2539 2542
2540void CalendarView::cloneIncidence() 2543void CalendarView::cloneIncidence()
2541{ 2544{
2542 Incidence *incidence = currentSelection(); 2545 Incidence *incidence = currentSelection();
2543 if ( !incidence ) incidence = mTodoList->selectedIncidences().first(); 2546 if ( !incidence ) incidence = mTodoList->selectedIncidences().first();
2544 if ( incidence ) { 2547 if ( incidence ) {
2545 cloneIncidence(incidence); 2548 cloneIncidence(incidence);
2546 } 2549 }
2547} 2550}
2548void CalendarView::moveIncidence() 2551void CalendarView::moveIncidence()
2549{ 2552{
2550 Incidence *incidence = currentSelection(); 2553 Incidence *incidence = currentSelection();
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index 731298d..e626ea3 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -397,96 +397,97 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
397 void showFilter(bool visible); 397 void showFilter(bool visible);
398 void updateFilter(); 398 void updateFilter();
399 void filterEdited(); 399 void filterEdited();
400 void selectFilter( int ); 400 void selectFilter( int );
401 KOFilterView *filterView(); 401 KOFilterView *filterView();
402 402
403 void showIntro(); 403 void showIntro();
404 404
405 /** Move the curdatepient view date to today */ 405 /** Move the curdatepient view date to today */
406 void goToday(); 406 void goToday();
407 407
408 /** Move to the next date(s) in the current view */ 408 /** Move to the next date(s) in the current view */
409 void goNext(); 409 void goNext();
410 410
411 /** Move to the previous date(s) in the current view */ 411 /** Move to the previous date(s) in the current view */
412 void goPrevious(); 412 void goPrevious();
413 /** Move to the next date(s) in the current view */ 413 /** Move to the next date(s) in the current view */
414 void goNextMonth(); 414 void goNextMonth();
415 415
416 /** Move to the previous date(s) in the current view */ 416 /** Move to the previous date(s) in the current view */
417 void goPreviousMonth(); 417 void goPreviousMonth();
418 418
419 void toggleExpand(); 419 void toggleExpand();
420 void toggleDateNavigatorWidget(); 420 void toggleDateNavigatorWidget();
421 void toggleAllDaySize(); 421 void toggleAllDaySize();
422 void dialogClosing(Incidence *); 422 void dialogClosing(Incidence *);
423 423
424 /** Look for new messages in the inbox */ 424 /** Look for new messages in the inbox */
425 void lookForIncomingMessages(); 425 void lookForIncomingMessages();
426 /** Look for new messages in the outbox */ 426 /** Look for new messages in the outbox */
427 void lookForOutgoingMessages(); 427 void lookForOutgoingMessages();
428 428
429 void processMainViewSelection( Incidence * ); 429 void processMainViewSelection( Incidence * );
430 void processTodoListSelection( Incidence * ); 430 void processTodoListSelection( Incidence * );
431 431
432 void processIncidenceSelection( Incidence * ); 432 void processIncidenceSelection( Incidence * );
433 433
434 void purgeCompleted(); 434 void purgeCompleted();
435 bool removeCompletedSubTodos( Todo* ); 435 bool removeCompletedSubTodos( Todo* );
436 void slotCalendarChanged(); 436 void slotCalendarChanged();
437 bool importBday(); 437 bool importBday();
438 bool addAnniversary( QDate data, QString name, KCal::Attendee* a , bool birthday ); 438 bool addAnniversary( QDate data, QString name, KCal::Attendee* a , bool birthday );
439 bool importQtopia( const QString &categoriesFile, 439 bool importQtopia( const QString &categoriesFile,
440 const QString &datebookFile, 440 const QString &datebookFile,
441 const QString &tasklistFile ); 441 const QString &tasklistFile );
442 void syncExternal( int mode ); 442 void syncExternal( int mode );
443 void slotSelectPickerDate( QDate ) ; 443 void slotSelectPickerDate( QDate ) ;
444 void showDatePicker( ) ; 444 void showDatePicker( ) ;
445 void showDatePickerPopup() ;
445 void moveIncidence(Incidence *) ; 446 void moveIncidence(Incidence *) ;
446 void beamIncidence(Incidence *) ; 447 void beamIncidence(Incidence *) ;
447 void beamCalendar() ; 448 void beamCalendar() ;
448 void beamFilteredCalendar() ; 449 void beamFilteredCalendar() ;
449 void beamIncidenceList(QPtrList<Incidence>) ; 450 void beamIncidenceList(QPtrList<Incidence>) ;
450 void manageCategories(); 451 void manageCategories();
451 int addCategories(); 452 int addCategories();
452 void removeCategories(); 453 void removeCategories();
453 void setSyncDevice( QString ); 454 void setSyncDevice( QString );
454 void setSyncName( QString ); 455 void setSyncName( QString );
455 void showDay( QDate ); 456 void showDay( QDate );
456 void undo_delete(); 457 void undo_delete();
457 protected slots: 458 protected slots:
458 void timerAlarm(); 459 void timerAlarm();
459 void suspendAlarm(); 460 void suspendAlarm();
460 void beamDone( Ir *ir ); 461 void beamDone( Ir *ir );
461 /** Select a view or adapt the current view to display the specified dates. */ 462 /** Select a view or adapt the current view to display the specified dates. */
462 void showDates( const KCal::DateList & ); 463 void showDates( const KCal::DateList & );
463 void selectWeekNum ( int ); 464 void selectWeekNum ( int );
464 465
465 public: 466 public:
466 // show a standard warning 467 // show a standard warning
467 // returns KMsgBox::yesNoCancel() 468 // returns KMsgBox::yesNoCancel()
468 int msgCalModified(); 469 int msgCalModified();
469 virtual bool sync(KSyncManager* manager, QString filename, int mode); 470 virtual bool sync(KSyncManager* manager, QString filename, int mode);
470 471
471 virtual bool syncExternal(KSyncManager* manager, QString resource); 472 virtual bool syncExternal(KSyncManager* manager, QString resource);
472 virtual void removeSyncInfo( QString syncProfile); 473 virtual void removeSyncInfo( QString syncProfile);
473 void setSyncManager(KSyncManager* manager); 474 void setSyncManager(KSyncManager* manager);
474 void setLoadedFileVersion(QDateTime); 475 void setLoadedFileVersion(QDateTime);
475 bool checkFileVersion(QString fn); 476 bool checkFileVersion(QString fn);
476 bool checkFileChanged(QString fn); 477 bool checkFileChanged(QString fn);
477 Event* getLastSyncEvent(); 478 Event* getLastSyncEvent();
478 /** Adapt navigation units correpsonding to step size of navigation of the 479 /** Adapt navigation units correpsonding to step size of navigation of the
479 * current view. 480 * current view.
480 */ 481 */
481 void adaptNavigationUnits(); 482 void adaptNavigationUnits();
482 bool synchronizeCalendar( Calendar* local, Calendar* remote, int mode ); 483 bool synchronizeCalendar( Calendar* local, Calendar* remote, int mode );
483 int takeEvent( Incidence* local, Incidence* remote, int mode, bool full = false ); 484 int takeEvent( Incidence* local, Incidence* remote, int mode, bool full = false );
484 //Attendee* getYourAttendee(Event *event); 485 //Attendee* getYourAttendee(Event *event);
485 void setBlockShowDates( bool b ) { mBlockShowDates = b ;} 486 void setBlockShowDates( bool b ) { mBlockShowDates = b ;}
486 protected: 487 protected:
487 void schedule(Scheduler::Method, Incidence *incidence = 0); 488 void schedule(Scheduler::Method, Incidence *incidence = 0);
488 489
489 // returns KMsgBox::OKCandel() 490 // returns KMsgBox::OKCandel()
490 int msgItemDelete(const QString name); 491 int msgItemDelete(const QString name);
491 void showEventEditor(); 492 void showEventEditor();
492 void showTodoEditor(); 493 void showTodoEditor();
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 6ae4c6f..02d2585 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -880,98 +880,101 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
880 for( row = 0; row < mNumWeeks; ++row ) { 880 for( row = 0; row < mNumWeeks; ++row ) {
881 for( col = 0; col < mDaysPerWeek; ++col ) { 881 for( col = 0; col < mDaysPerWeek; ++col ) {
882 MonthViewCell *cell = new MonthViewCell( this, mMonthView ); 882 MonthViewCell *cell = new MonthViewCell( this, mMonthView );
883 mCells.insert( row * mDaysPerWeek + col, cell ); 883 mCells.insert( row * mDaysPerWeek + col, cell );
884 884
885 connect( cell, SIGNAL( defaultAction( Incidence * ) ), 885 connect( cell, SIGNAL( defaultAction( Incidence * ) ),
886 SLOT( defaultAction( Incidence * ) ) ); 886 SLOT( defaultAction( Incidence * ) ) );
887 connect( cell, SIGNAL( newEventSignal( QDateTime ) ), 887 connect( cell, SIGNAL( newEventSignal( QDateTime ) ),
888 SIGNAL( newEventSignal( QDateTime ) ) ); 888 SIGNAL( newEventSignal( QDateTime ) ) );
889 connect( cell, SIGNAL( showDaySignal( QDate ) ), 889 connect( cell, SIGNAL( showDaySignal( QDate ) ),
890 SIGNAL( showDaySignal( QDate ) ) ); 890 SIGNAL( showDaySignal( QDate ) ) );
891 } 891 }
892 } 892 }
893 mCellsW.resize( mDaysPerWeek ); 893 mCellsW.resize( mDaysPerWeek );
894 for( col = 0; col < mDaysPerWeek; ++col ) { 894 for( col = 0; col < mDaysPerWeek; ++col ) {
895 MonthViewCell *cell = new MonthViewCell( this, mWeekView ); 895 MonthViewCell *cell = new MonthViewCell( this, mWeekView );
896 mCellsW.insert( col, cell ); 896 mCellsW.insert( col, cell );
897 897
898 connect( cell, SIGNAL( defaultAction( Incidence * ) ), 898 connect( cell, SIGNAL( defaultAction( Incidence * ) ),
899 SLOT( defaultAction( Incidence * ) ) ); 899 SLOT( defaultAction( Incidence * ) ) );
900 connect( cell, SIGNAL( newEventSignal( QDateTime ) ), 900 connect( cell, SIGNAL( newEventSignal( QDateTime ) ),
901 SIGNAL( newEventSignal( QDateTime ) ) ); 901 SIGNAL( newEventSignal( QDateTime ) ) );
902 connect( cell, SIGNAL( showDaySignal( QDate ) ), 902 connect( cell, SIGNAL( showDaySignal( QDate ) ),
903 SIGNAL( showDaySignal( QDate ) ) ); 903 SIGNAL( showDaySignal( QDate ) ) );
904 cell->updateConfig(KOPrefs::instance()->mMonthViewUsesBigFont ); 904 cell->updateConfig(KOPrefs::instance()->mMonthViewUsesBigFont );
905 } 905 }
906 906
907 //connect( mWeekLabels[mNumWeeks], SIGNAL( clicked() ), SLOT( switchView() ) ); 907 //connect( mWeekLabels[mNumWeeks], SIGNAL( clicked() ), SLOT( switchView() ) );
908 mContextMenu = eventPopup(); 908 mContextMenu = eventPopup();
909 // updateConfig(); //useless here... 909 // updateConfig(); //useless here...
910 // ... but we need mWidthLongDayLabel computed 910 // ... but we need mWidthLongDayLabel computed
911 QFontMetrics fontmetric(mDayLabels[0]->font()); 911 QFontMetrics fontmetric(mDayLabels[0]->font());
912 mWidthLongDayLabel = 0; 912 mWidthLongDayLabel = 0;
913 for (int i = 0; i < 7; i++) { 913 for (int i = 0; i < 7; i++) {
914 int width = fontmetric.width(KOGlobals::self()->calendarSystem()->weekDayName(i+1)); 914 int width = fontmetric.width(KOGlobals::self()->calendarSystem()->weekDayName(i+1));
915 if ( width > mWidthLongDayLabel ) mWidthLongDayLabel = width; 915 if ( width > mWidthLongDayLabel ) mWidthLongDayLabel = width;
916 } 916 }
917 917
918 //mWeekLabels[mNumWeeks]->setText( i18n("W")); 918 //mWeekLabels[mNumWeeks]->setText( i18n("W"));
919 919
920 if ( mShowWeekView ) 920 if ( mShowWeekView )
921 mWidStack->raiseWidget( mWeekView ); 921 mWidStack->raiseWidget( mWeekView );
922 else 922 else
923 mWidStack->raiseWidget( mMonthView ); 923 mWidStack->raiseWidget( mMonthView );
924 924
925 emit incidenceSelected( 0 ); 925 emit incidenceSelected( 0 );
926#ifndef DESKTOP_VERSION 926#ifndef DESKTOP_VERSION
927 resize( QApplication::desktop()->size() ); 927 resize( QApplication::desktop()->size() );
928 computeLayout(); 928#else
929 resize(640, 480 );
929#endif 930#endif
931 computeLayout();
932
930} 933}
931 934
932KOMonthView::~KOMonthView() 935KOMonthView::~KOMonthView()
933{ 936{
934 delete mContextMenu; 937 delete mContextMenu;
935} 938}
936 939
937void KOMonthView::selectInternalWeekNum ( int n ) 940void KOMonthView::selectInternalWeekNum ( int n )
938{ 941{
939 switchView(); 942 switchView();
940 emit selectWeekNum ( n ); 943 emit selectWeekNum ( n );
941} 944}
942 945
943int KOMonthView::currentWeek() 946int KOMonthView::currentWeek()
944{ 947{
945 if ( mShowWeekView ) 948 if ( mShowWeekView )
946 return mWeekLabelsW[0]->getWeekNum(); 949 return mWeekLabelsW[0]->getWeekNum();
947 return mWeekLabels[0]->getWeekNum(); 950 return mWeekLabels[0]->getWeekNum();
948} 951}
949void KOMonthView::switchView() 952void KOMonthView::switchView()
950{ 953{
951 954
952 if ( selectedCell( ) ) 955 if ( selectedCell( ) )
953 selectedCell()->deselect(); 956 selectedCell()->deselect();
954 mShowWeekView = !mShowWeekView; 957 mShowWeekView = !mShowWeekView;
955 KOPrefs::instance()->mMonthViewWeek = mShowWeekView; 958 KOPrefs::instance()->mMonthViewWeek = mShowWeekView;
956 if ( clPending ) { 959 if ( clPending ) {
957 computeLayout(); 960 computeLayout();
958 updateConfig(); 961 updateConfig();
959 } 962 }
960 if ( mShowWeekView ) 963 if ( mShowWeekView )
961 mWidStack->raiseWidget( mWeekView ); 964 mWidStack->raiseWidget( mWeekView );
962 else 965 else
963 mWidStack->raiseWidget( mMonthView ); 966 mWidStack->raiseWidget( mMonthView );
964 clPending = false; 967 clPending = false;
965} 968}
966 969
967int KOMonthView::maxDatesHint() 970int KOMonthView::maxDatesHint()
968{ 971{
969 return mNumCells; 972 return mNumCells;
970} 973}
971 974
972int KOMonthView::currentDateCount() 975int KOMonthView::currentDateCount()
973{ 976{
974 return mNumCells; 977 return mNumCells;
975} 978}
976 979
977QPtrList<Incidence> KOMonthView::selectedIncidences() 980QPtrList<Incidence> KOMonthView::selectedIncidences()
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index 576c265..5bfe2a1 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -1,218 +1,222 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include <time.h> 24#include <time.h>
25#ifndef _WIN32_ 25#ifndef _WIN32_
26#include <unistd.h> 26#include <unistd.h>
27#endif 27#endif
28#include <qdir.h> 28#include <qdir.h>
29#include <qtextstream.h> 29#include <qtextstream.h>
30#include <qtextcodec.h> 30#include <qtextcodec.h>
31#include <qstring.h> 31#include <qstring.h>
32#include <qregexp.h> 32#include <qregexp.h>
33#include <qfont.h> 33#include <qfont.h>
34#include <qcolor.h> 34#include <qcolor.h>
35#include <qstringlist.h> 35#include <qstringlist.h>
36#include <stdlib.h> 36#include <stdlib.h>
37 37
38#include <kglobal.h> 38#include <kglobal.h>
39#include <kglobalsettings.h>
39#include <kconfig.h> 40#include <kconfig.h>
40#include <klocale.h> 41#include <klocale.h>
41#include <kdebug.h> 42#include <kdebug.h>
42#include <kemailsettings.h> 43#include <kemailsettings.h>
43#include <kstaticdeleter.h> 44#include <kstaticdeleter.h>
44#include <libkdepim/kpimglobalprefs.h> 45#include <libkdepim/kpimglobalprefs.h>
45 46
46#include "koprefs.h" 47#include "koprefs.h"
47#include "mainwindow.h" 48#include "mainwindow.h"
48 49
49KOPrefs *KOPrefs::mInstance = 0; 50KOPrefs *KOPrefs::mInstance = 0;
50static KStaticDeleter<KOPrefs> insd; 51static KStaticDeleter<KOPrefs> insd;
51 52
52KOPrefs::KOPrefs() : 53KOPrefs::KOPrefs() :
53 KPimPrefs("korganizerrc") 54 KPimPrefs("korganizerrc")
54{ 55{
55 mCategoryColors.setAutoDelete(true); 56 mCategoryColors.setAutoDelete(true);
56 fillMailDefaults(); 57 fillMailDefaults();
57 mDefaultCategoryColor = QColor(175,210,255);//196,196,196); 58 mDefaultCategoryColor = QColor(175,210,255);//196,196,196);
58 QColor defaultHolidayColor = QColor(255,0,0); 59 QColor defaultHolidayColor = QColor(255,0,0);
59 QColor defaultHighlightColor = QColor(129,112,255);//64,64,255); 60 QColor defaultHighlightColor = QColor(129,112,255);//64,64,255);
60 QColor defaultAgendaBgColor = QColor(239,241,169);//128,128,128); 61 QColor defaultAgendaBgColor = QColor(239,241,169);//128,128,128);
61 QColor defaultWorkingHoursColor = QColor(170,223,150);//160,160,160); 62 QColor defaultWorkingHoursColor = QColor(170,223,150);//160,160,160);
62 QColor defaultTodoDueTodayColor = QColor(255,220,100); 63 QColor defaultTodoDueTodayColor = QColor(255,220,100);
63 QColor defaultTodoOverdueColor = QColor(255,153,125); 64 QColor defaultTodoOverdueColor = QColor(255,153,125);
64 65
66 /*
65 mTimeBarFont = QFont("helvetica",10);//,QFont::Bold); 67 mTimeBarFont = QFont("helvetica",10);//,QFont::Bold);
66 mDefaultViewFont = QFont("helvetica",10); 68 mDefaultViewFont = QFont("helvetica",10);
67 mDefaultMonthViewFont = QFont("helvetica",8); 69 mDefaultMonthViewFont = QFont("helvetica",8);
68 mMarcusBainsFont= QFont("helvetica",10); 70 mMarcusBainsFont= QFont("helvetica",10);
69 mDateNavigatorFont= QFont("helvetica",10, QFont::Bold); 71 mDateNavigatorFont= QFont("helvetica",10, QFont::Bold);
70 mEditBoxFont = QFont("helvetica",12); 72 mEditBoxFont = QFont("helvetica",12);
71 mJornalViewFont = QFont("helvetica",12); 73 mJornalViewFont = QFont("helvetica",12);
74 */
75
72 76
73 KPrefs::setCurrentGroup("General"); 77 KPrefs::setCurrentGroup("General");
74 78
75 79
76 addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); 80 addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false);
77 81
78 addItemBool("ShowIconNewTodo",&mShowIconNewTodo,true); 82 addItemBool("ShowIconNewTodo",&mShowIconNewTodo,true);
79 addItemBool("ShowIconNewEvent",&mShowIconNewEvent,true); 83 addItemBool("ShowIconNewEvent",&mShowIconNewEvent,true);
80 addItemBool("ShowIconSearch",&mShowIconSearch,true); 84 addItemBool("ShowIconSearch",&mShowIconSearch,true);
81 addItemBool("ShowIconList",&mShowIconList,true); 85 addItemBool("ShowIconList",&mShowIconList,true);
82 addItemBool("ShowIconDay1",&mShowIconDay1,true); 86 addItemBool("ShowIconDay1",&mShowIconDay1,true);
83 addItemBool("ShowIconDay5",&mShowIconDay5,true); 87 addItemBool("ShowIconDay5",&mShowIconDay5,true);
84 addItemBool("ShowIconDay7",&mShowIconDay7,true); 88 addItemBool("ShowIconDay7",&mShowIconDay7,true);
85 addItemBool("ShowIconMonth",&mShowIconMonth,true); 89 addItemBool("ShowIconMonth",&mShowIconMonth,true);
86 addItemBool("ShowIconTodoview",&mShowIconTodoview,true); 90 addItemBool("ShowIconTodoview",&mShowIconTodoview,true);
87 addItemBool("ShowIconBackFast",&mShowIconBackFast,true); 91 addItemBool("ShowIconBackFast",&mShowIconBackFast,true);
88 addItemBool("ShowIconBack",&mShowIconBack,true); 92 addItemBool("ShowIconBack",&mShowIconBack,true);
89 addItemBool("ShowIconToday",&mShowIconToday,true); 93 addItemBool("ShowIconToday",&mShowIconToday,true);
90 addItemBool("ShowIconForward",&mShowIconForward,true); 94 addItemBool("ShowIconForward",&mShowIconForward,true);
91 addItemBool("ShowIconForwardFast",&mShowIconForwardFast,true); 95 addItemBool("ShowIconForwardFast",&mShowIconForwardFast,true);
92 addItemBool("ShowIconWhatsThis",&mShowIconWhatsThis,true); 96 addItemBool("ShowIconWhatsThis",&mShowIconWhatsThis,true);
93 addItemBool("ShowIconNextDays",&mShowIconNextDays,true); 97 addItemBool("ShowIconNextDays",&mShowIconNextDays,true);
94 addItemBool("ShowIconNext",&mShowIconNext,true); 98 addItemBool("ShowIconNext",&mShowIconNext,true);
95 addItemBool("ShowIconJournal",&mShowIconJournal,true); 99 addItemBool("ShowIconJournal",&mShowIconJournal,true);
96 addItemBool("ShowIconStretch",&mShowIconStretch,true); 100 addItemBool("ShowIconStretch",&mShowIconStretch,true);
97 addItemInt("LastLoadedLanguage",&mOldLanguage,0); 101 addItemInt("LastLoadedLanguage",&mOldLanguage,0);
98 102
99 addItemBool("AskForQuit",&mAskForQuit,false); 103 addItemBool("AskForQuit",&mAskForQuit,false);
100 104
101#ifndef DESKTOP_VERSION 105#ifndef DESKTOP_VERSION
102 addItemBool("ShowFullMenu",&mShowFullMenu,false); 106 addItemBool("ShowFullMenu",&mShowFullMenu,false);
103#else 107#else
104 addItemBool("ShowFullMenu",&mShowFullMenu,true); 108 addItemBool("ShowFullMenu",&mShowFullMenu,true);
105#endif 109#endif
106 addItemBool("ToolBarHor",&mToolBarHor, true ); 110 addItemBool("ToolBarHor",&mToolBarHor, true );
107 addItemBool("ToolBarUp",&mToolBarUp, false ); 111 addItemBool("ToolBarUp",&mToolBarUp, false );
108 addItemBool("ToolBarMiniIcons",&mToolBarMiniIcons, false ); 112 addItemBool("ToolBarMiniIcons",&mToolBarMiniIcons, false );
109 addItemInt("Whats Next Days",&mWhatsNextDays,3); 113 addItemInt("Whats Next Days",&mWhatsNextDays,3);
110 addItemInt("Whats Next Prios",&mWhatsNextPrios,1); 114 addItemInt("Whats Next Prios",&mWhatsNextPrios,1);
111 115
112 addItemBool("ShowTodoInAgenda",&mShowTodoInAgenda,true); 116 addItemBool("ShowTodoInAgenda",&mShowTodoInAgenda,true);
113 addItemBool("ShowTimeInAgenda",&mShowTimeInAgenda,true); 117 addItemBool("ShowTimeInAgenda",&mShowTimeInAgenda,true);
114 addItemBool("HideNonStartedTodos",&mHideNonStartedTodos,false); 118 addItemBool("HideNonStartedTodos",&mHideNonStartedTodos,false);
115 addItemBool("ShowCompletedTodo",&mShowCompletedTodo,true); 119 addItemBool("ShowCompletedTodo",&mShowCompletedTodo,true);
116 addItemInt("AllDay Size",&mAllDaySize,28); 120 addItemInt("AllDay Size",&mAllDaySize,28);
117 QString defAlarm = KGlobal::iconLoader()->iconPath()+"koalarm.wav"; 121 QString defAlarm = KGlobal::iconLoader()->iconPath()+"koalarm.wav";
118 addItemString("DefaultAlarmFile",&mDefaultAlarmFile,defAlarm ); 122 addItemString("DefaultAlarmFile",&mDefaultAlarmFile,defAlarm );
119 123
120 addItemStringList("LocationDefaults",&mLocationDefaults ); 124 addItemStringList("LocationDefaults",&mLocationDefaults );
121 addItemStringList("EventSummary User",&mEventSummaryUser); 125 addItemStringList("EventSummary User",&mEventSummaryUser);
122 addItemStringList("TodoSummary User",&mTodoSummaryUser); 126 addItemStringList("TodoSummary User",&mTodoSummaryUser);
123 127
124 addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); 128 addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false);
125 addItemBool("Enable Project View",&mEnableProjectView,false); 129 addItemBool("Enable Project View",&mEnableProjectView,false);
126 addItemBool("Auto Save",&mAutoSave,false); 130 addItemBool("Auto Save",&mAutoSave,false);
127 addItemInt("Auto Save Interval",&mAutoSaveInterval,3); 131 addItemInt("Auto Save Interval",&mAutoSaveInterval,3);
128 addItemBool("Confirm Deletes",&mConfirm,true); 132 addItemBool("Confirm Deletes",&mConfirm,true);
129 addItemString("Archive File",&mArchiveFile); 133 addItemString("Archive File",&mArchiveFile);
130 addItemString("Html Export File",&mHtmlExportFile, 134 addItemString("Html Export File",&mHtmlExportFile,
131 QDir::homeDirPath() + "/" + i18n("Default export file", "calendar.html")); 135 QDir::homeDirPath() + "/" + i18n("Default export file", "calendar.html"));
132 addItemBool("Html With Save",&mHtmlWithSave,false); 136 addItemBool("Html With Save",&mHtmlWithSave,false);
133 137
134 KPrefs::setCurrentGroup("Personal Settings"); 138 KPrefs::setCurrentGroup("Personal Settings");
135 139
136 addItemInt("Mail Client",&mMailClient,MailClientKMail); 140 addItemInt("Mail Client",&mMailClient,MailClientKMail);
137 addItemBool("Use Control Center Email",&mEmailControlCenter,false); 141 addItemBool("Use Control Center Email",&mEmailControlCenter,false);
138 addItemBool("Bcc",&mBcc,false); 142 addItemBool("Bcc",&mBcc,false);
139 143
140 KPrefs::setCurrentGroup("Time & Date"); 144 KPrefs::setCurrentGroup("Time & Date");
141 145
142 146
143 addItemInt("Default Start Time",&mStartTime,10); 147 addItemInt("Default Start Time",&mStartTime,10);
144 addItemInt("Default Duration",&mDefaultDuration,2); 148 addItemInt("Default Duration",&mDefaultDuration,2);
145 addItemInt("Default Alarm Time",&mAlarmTime,3); 149 addItemInt("Default Alarm Time",&mAlarmTime,3);
146 KPrefs::setCurrentGroup("AlarmSettings"); 150 KPrefs::setCurrentGroup("AlarmSettings");
147 addItemInt("AlarmPlayBeeps",&mAlarmPlayBeeps,20); 151 addItemInt("AlarmPlayBeeps",&mAlarmPlayBeeps,20);
148 addItemInt("AlarmSuspendTime",&mAlarmSuspendTime,7); 152 addItemInt("AlarmSuspendTime",&mAlarmSuspendTime,7);
149 addItemInt("AlarmSuspendCount",&mAlarmSuspendCount,5); 153 addItemInt("AlarmSuspendCount",&mAlarmSuspendCount,5);
150 addItemInt("AlarmBeepInterval",&mAlarmBeepInterval,3); 154 addItemInt("AlarmBeepInterval",&mAlarmBeepInterval,3);
151 155
152 156
153 KPrefs::setCurrentGroup("Calendar"); 157 KPrefs::setCurrentGroup("Calendar");
154 158
155 addItemInt("Default Calendar Format",&mDefaultFormat,FormatICalendar); 159 addItemInt("Default Calendar Format",&mDefaultFormat,FormatICalendar);
156 160
157 KPrefs::setCurrentGroup("Fonts"); 161 KPrefs::setCurrentGroup("Fonts");
158 // qDebug(" KPrefs::setCurrentGroup(Fonts); "); 162 // qDebug(" KPrefs::setCurrentGroup(Fonts); ");
159 addItemFont("TimeBar Font",&mTimeBarFont); 163 addItemFont("TimeBar Font",&mTimeBarFont,KGlobalSettings::generalFont() );
160 addItemFont("MonthView Font",&mMonthViewFont); 164 addItemFont("MonthView Font",&mMonthViewFont,KGlobalSettings::generalFont());
161 addItemFont("AgendaView Font",&mAgendaViewFont); 165 addItemFont("AgendaView Font",&mAgendaViewFont,KGlobalSettings::generalFont());
162 addItemFont("MarcusBains Font",&mMarcusBainsFont); 166 addItemFont("MarcusBains Font",&mMarcusBainsFont,KGlobalSettings::generalFont());
163 addItemFont("TimeLabels Font",&mTimeLabelsFont); 167 addItemFont("TimeLabels Font",&mTimeLabelsFont,KGlobalSettings::generalFont());
164 addItemFont("TodoView Font",&mTodoViewFont); 168 addItemFont("TodoView Font",&mTodoViewFont,KGlobalSettings::generalFont());
165 addItemFont("ListView Font",&mListViewFont); 169 addItemFont("ListView Font",&mListViewFont,KGlobalSettings::generalFont());
166 addItemFont("DateNavigator Font",&mDateNavigatorFont); 170 addItemFont("DateNavigator Font",&mDateNavigatorFont,KGlobalSettings::generalFont());
167 addItemFont("EditBox Font",&mEditBoxFont); 171 addItemFont("EditBox Font",&mEditBoxFont,KGlobalSettings::generalFont());
168 addItemFont("JournalView Font",&mJornalViewFont); 172 addItemFont("JournalView Font",&mJornalViewFont,KGlobalSettings::generalFont());
169 addItemFont("WhatsNextView Font",&mWhatsNextFont); 173 addItemFont("WhatsNextView Font",&mWhatsNextFont,KGlobalSettings::generalFont());
170 addItemFont("EventView Font",&mEventViewFont); 174 addItemFont("EventView Font",&mEventViewFont,KGlobalSettings::generalFont());
171 175
172 KPrefs::setCurrentGroup("RemoteSyncing"); 176 KPrefs::setCurrentGroup("RemoteSyncing");
173 addItemString("ActiveSyncPort",&mActiveSyncPort,"9197" ); 177 addItemString("ActiveSyncPort",&mActiveSyncPort,"9197" );
174 addItemString("ActiveSyncIP",&mActiveSyncIP,"192.168.0.40" ); 178 addItemString("ActiveSyncIP",&mActiveSyncIP,"192.168.0.40" );
175 addItemBool("ShowSyncEvents",&mShowSyncEvents,false); 179 addItemBool("ShowSyncEvents",&mShowSyncEvents,false);
176 addItemInt("LastSyncTime",&mLastSyncTime,0); 180 addItemInt("LastSyncTime",&mLastSyncTime,0);
177 181
178#ifdef _WIN32_ 182#ifdef _WIN32_
179 QString hdp= locateLocal("data","korganizer")+"\\\\"; 183 QString hdp= locateLocal("data","korganizer")+"\\\\";
180#else 184#else
181 QString hdp= locateLocal("data","korganizer")+"/"; 185 QString hdp= locateLocal("data","korganizer")+"/";
182#endif 186#endif
183 187
184 KPrefs::setCurrentGroup("LoadSaveFileNames"); 188 KPrefs::setCurrentGroup("LoadSaveFileNames");
185 189
186 addItemString("LastImportFile", &mLastImportFile ,hdp +"import.ics" ); 190 addItemString("LastImportFile", &mLastImportFile ,hdp +"import.ics" );
187 addItemString("LastVcalFile", &mLastVcalFile ,hdp +"export.vcs" ); 191 addItemString("LastVcalFile", &mLastVcalFile ,hdp +"export.vcs" );
188 addItemString("LastSaveFile", &mLastSaveFile ,hdp +"mybackup.ics" ); 192 addItemString("LastSaveFile", &mLastSaveFile ,hdp +"mybackup.ics" );
189 addItemString("LastLoadFile", &mLastLoadFile ,hdp +"mybackup.ics" ); 193 addItemString("LastLoadFile", &mLastLoadFile ,hdp +"mybackup.ics" );
190 194
191 195
192 KPrefs::setCurrentGroup("Locale"); 196 KPrefs::setCurrentGroup("Locale");
193 addItemBool("ShortDateInViewer",&mShortDateInViewer,false); 197 addItemBool("ShortDateInViewer",&mShortDateInViewer,false);
194 198
195 199
196 KPrefs::setCurrentGroup("Colors"); 200 KPrefs::setCurrentGroup("Colors");
197 addItemColor("Holiday Color",&mHolidayColor,defaultHolidayColor); 201 addItemColor("Holiday Color",&mHolidayColor,defaultHolidayColor);
198 addItemColor("Highlight Color",&mHighlightColor,defaultHighlightColor); 202 addItemColor("Highlight Color",&mHighlightColor,defaultHighlightColor);
199 addItemColor("Event Color",&mEventColor,mDefaultCategoryColor); 203 addItemColor("Event Color",&mEventColor,mDefaultCategoryColor);
200 addItemColor("Todo done Color",&mTodoDoneColor,QColor(111,255,115) ); 204 addItemColor("Todo done Color",&mTodoDoneColor,QColor(111,255,115) );
201 addItemColor("Agenda Background Color",&mAgendaBgColor,defaultAgendaBgColor); 205 addItemColor("Agenda Background Color",&mAgendaBgColor,defaultAgendaBgColor);
202 addItemColor("WorkingHours Color",&mWorkingHoursColor,defaultWorkingHoursColor); 206 addItemColor("WorkingHours Color",&mWorkingHoursColor,defaultWorkingHoursColor);
203 addItemColor("Todo due today Color",&mTodoDueTodayColor,defaultTodoDueTodayColor); 207 addItemColor("Todo due today Color",&mTodoDueTodayColor,defaultTodoDueTodayColor);
204 addItemColor("Todo overdue Color",&mTodoOverdueColor,defaultTodoOverdueColor); 208 addItemColor("Todo overdue Color",&mTodoOverdueColor,defaultTodoOverdueColor);
205 addItemColor("MonthViewEvenColor",&mMonthViewEvenColor,QColor( 160,160,255 )); 209 addItemColor("MonthViewEvenColor",&mMonthViewEvenColor,QColor( 160,160,255 ));
206 addItemColor("MonthViewOddColor",&mMonthViewOddColor,QColor( 160,255,160 )); 210 addItemColor("MonthViewOddColor",&mMonthViewOddColor,QColor( 160,255,160 ));
207 addItemColor("MonthViewHolidayColor",&mMonthViewHolidayColor,QColor( 255,160,160 )); 211 addItemColor("MonthViewHolidayColor",&mMonthViewHolidayColor,QColor( 255,160,160 ));
208 addItemBool("MonthViewUsesDayColors",&mMonthViewUsesDayColors,true); 212 addItemBool("MonthViewUsesDayColors",&mMonthViewUsesDayColors,true);
209 addItemBool("MonthViewSatSunTog",&mMonthViewSatSunTog,true); 213 addItemBool("MonthViewSatSunTog",&mMonthViewSatSunTog,true);
210 addItemBool("MonthViewWeek",&mMonthViewWeek,false); 214 addItemBool("MonthViewWeek",&mMonthViewWeek,false);
211 addItemBool("HightlightDateTimeEdit",&mHightlightDateTimeEdit,false); 215 addItemBool("HightlightDateTimeEdit",&mHightlightDateTimeEdit,false);
212 addItemColor("AppColor1",&mAppColor1,QColor( 130,170,255 )); 216 addItemColor("AppColor1",&mAppColor1,QColor( 130,170,255 ));
213 addItemColor("AppColor2",&mAppColor2,QColor( 174,216,255 )); 217 addItemColor("AppColor2",&mAppColor2,QColor( 174,216,255 ));
214 addItemBool("UseAppColors",&mUseAppColors,false); 218 addItemBool("UseAppColors",&mUseAppColors,false);
215 219
216 220
217 221
218 KPrefs::setCurrentGroup("Views"); 222 KPrefs::setCurrentGroup("Views");
diff --git a/korganizer/ktimeedit.cpp b/korganizer/ktimeedit.cpp
index 5222ac9..61a0931 100644
--- a/korganizer/ktimeedit.cpp
+++ b/korganizer/ktimeedit.cpp
@@ -4,99 +4,101 @@
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 13 GNU General Public License for more details.
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 18
19 As a special exception, permission is given to link this program 19 As a special exception, permission is given to link this program
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#include <qkeycode.h> 24#include <qkeycode.h>
25#include <qcombobox.h> 25#include <qcombobox.h>
26#include <qdatetime.h> 26#include <qdatetime.h>
27#include <qlineedit.h> 27#include <qlineedit.h>
28#include <qlistbox.h> 28#include <qlistbox.h>
29#include <qapplication.h> 29#include <qapplication.h>
30 30
31#include <kmessagebox.h> 31#include <kmessagebox.h>
32#include <kglobal.h> 32#include <kglobal.h>
33#include <kdebug.h> 33#include <kdebug.h>
34#include <klocale.h> 34#include <klocale.h>
35#include <kpimglobalprefs.h> 35#include <kpimglobalprefs.h>
36 36
37#include "ktimeedit.h" 37#include "ktimeedit.h"
38#include "koprefs.h" 38#include "koprefs.h"
39#include <qvalidator.h> 39#include <qvalidator.h>
40 40
41// Validator for a time value with only hours and minutes (no seconds) 41// Validator for a time value with only hours and minutes (no seconds)
42// Mostly locale aware. Author: David Faure <faure@kde.org> 42// Mostly locale aware. Author: David Faure <faure@kde.org>
43 43
44// KTimeWidget/QTimeEdit provide nicer editing, but don't provide a combobox. 44// KTimeWidget/QTimeEdit provide nicer editing, but don't provide a combobox.
45// Difficult to get all in one... 45// Difficult to get all in one...
46// But Qt-3.2 will offer QLineEdit::setMask, so a "99:99" mask would help. 46// But Qt-3.2 will offer QLineEdit::setMask, so a "99:99" mask would help.
47KOTimeEdit::KOTimeEdit(QWidget *parent, QTime qt, const char *name) 47KOTimeEdit::KOTimeEdit(QWidget *parent, QTime qt, const char *name)
48 : QComboBox(TRUE, parent, name) 48 : QComboBox(TRUE, parent, name)
49{ 49{
50 setInsertionPolicy(NoInsertion); 50 setInsertionPolicy(NoInsertion);
51 mFlagKeyPressed = false; 51 mFlagKeyPressed = false;
52 52 if ( QApplication::desktop()->height() <= 480 ) {
53 if ( QApplication::desktop()->width() < 650 )
54 setSizeLimit ( 6 ); 53 setSizeLimit ( 6 );
54 } else {
55 setSizeLimit ( 12 );
56 }
55 mTime = qt; 57 mTime = qt;
56 58
57// mNoTimeString = i18n("No Time"); 59// mNoTimeString = i18n("No Time");
58// insertItem( mNoTimeString ); 60// insertItem( mNoTimeString );
59 61
60 // Fill combo box with selection of times in localized format. 62 // Fill combo box with selection of times in localized format.
61 QTime timeEntry(0,0,0); 63 QTime timeEntry(0,0,0);
62 do { 64 do {
63 insertItem(KGlobal::locale()->formatTime(timeEntry)); 65 insertItem(KGlobal::locale()->formatTime(timeEntry));
64 timeEntry = timeEntry.addSecs(60*15); 66 timeEntry = timeEntry.addSecs(60*15);
65 } while (!timeEntry.isNull()); 67 } while (!timeEntry.isNull());
66 // Add end of day. 68 // Add end of day.
67 insertItem( KGlobal::locale()->formatTime( QTime( 23, 59, 59 ) ) ); 69 insertItem( KGlobal::locale()->formatTime( QTime( 23, 59, 59 ) ) );
68 70
69 updateText(); 71 updateText();
70 setFocusPolicy(QWidget::StrongFocus); 72 setFocusPolicy(QWidget::StrongFocus);
71 73
72 connect(this, SIGNAL(activated(int)), this, SLOT(activ(int))); 74 connect(this, SIGNAL(activated(int)), this, SLOT(activ(int)));
73 connect(this, SIGNAL(highlighted(int)), this, SLOT(hilit(int))); 75 connect(this, SIGNAL(highlighted(int)), this, SLOT(hilit(int)));
74 connect(this,SIGNAL(textChanged(const QString&)),this,SLOT(changedText())); 76 connect(this,SIGNAL(textChanged(const QString&)),this,SLOT(changedText()));
75 QFontMetrics fm ( font() ); 77 QFontMetrics fm ( font() );
76 QString timeString = "24:00"; 78 QString timeString = "24:00";
77 if ( KPimGlobalPrefs::instance()->mPreferredTime == 1 ) 79 if ( KPimGlobalPrefs::instance()->mPreferredTime == 1 )
78 timeString = "02:00pm"; 80 timeString = "02:00pm";
79 int addSpace = 32; 81 int addSpace = 32;
80 if ( QApplication::desktop()->width() > 320 ) 82 if ( QApplication::desktop()->width() > 320 )
81 timeString += ":00"; 83 timeString += ":00";
82 setFixedWidth(fm.width( timeString ) + 32 ); 84 setFixedWidth(fm.width( timeString ) + 32 );
83 85
84 // Highlight Background and Textcolor change from default 86 // Highlight Background and Textcolor change from default
85 QPalette palette = QWidget::palette(); 87 QPalette palette = QWidget::palette();
86 unsigned char red, green, blue; 88 unsigned char red, green, blue;
87 red = palette.color( QPalette::Normal , QColorGroup::Background ).red() - 10; 89 red = palette.color( QPalette::Normal , QColorGroup::Background ).red() - 10;
88 green = palette.color( QPalette::Normal , QColorGroup::Background ).green() - 10; 90 green = palette.color( QPalette::Normal , QColorGroup::Background ).green() - 10;
89 blue = palette.color( QPalette::Normal , QColorGroup::Background ).blue() - 10; 91 blue = palette.color( QPalette::Normal , QColorGroup::Background ).blue() - 10;
90 palette.setColor( QColorGroup::Highlight, QColor(red,green,blue) ); 92 palette.setColor( QColorGroup::Highlight, QColor(red,green,blue) );
91 palette.setColor( QColorGroup::HighlightedText, palette.color( QPalette::Normal , QColorGroup::Foreground ) ); 93 palette.setColor( QColorGroup::HighlightedText, palette.color( QPalette::Normal , QColorGroup::Foreground ) );
92 setPalette( palette ); 94 setPalette( palette );
93} 95}
94 96
95KOTimeEdit::~KOTimeEdit() 97KOTimeEdit::~KOTimeEdit()
96{ 98{
97} 99}
98 100
99bool KOTimeEdit::hasTime() const 101bool KOTimeEdit::hasTime() const
100{ 102{
101 // Can't happen 103 // Can't happen
102 if ( currentText().isEmpty() ) return false; 104 if ( currentText().isEmpty() ) return false;
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 7810bf9..61c39f5 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -1985,65 +1985,82 @@ void MainWindow::exportVCalendar()
1985 KOPrefs::instance()->mLastVcalFile = fn; 1985 KOPrefs::instance()->mLastVcalFile = fn;
1986 if ( fn.length() > 20 ) 1986 if ( fn.length() > 20 )
1987 mes = i18n("KO/Pi:Exported to ...%1").arg(fn.right(20)) ; 1987 mes = i18n("KO/Pi:Exported to ...%1").arg(fn.right(20)) ;
1988 else 1988 else
1989 mes = i18n("KO/Pi:Exported to %1").arg(fn ); 1989 mes = i18n("KO/Pi:Exported to %1").arg(fn );
1990 setCaption(mes); 1990 setCaption(mes);
1991 } 1991 }
1992 } 1992 }
1993 1993
1994} 1994}
1995 1995
1996void MainWindow::syncFileRequest() 1996void MainWindow::syncFileRequest()
1997{ 1997{
1998 if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { 1998 if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) {
1999 mSyncManager->slotSyncMenu( 999 ); 1999 mSyncManager->slotSyncMenu( 999 );
2000 } 2000 }
2001 save(); 2001 save();
2002} 2002}
2003void MainWindow::getFile( bool success ) 2003void MainWindow::getFile( bool success )
2004{ 2004{
2005 if ( ! success ) { 2005 if ( ! success ) {
2006 setCaption( i18n("Error receiving file. Nothing changed!") ); 2006 setCaption( i18n("Error receiving file. Nothing changed!") );
2007 return; 2007 return;
2008 } 2008 }
2009 mView->openCalendar( defaultFileName() ); 2009 mView->openCalendar( defaultFileName() );
2010 if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) { 2010 if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) {
2011 mSyncManager->slotSyncMenu( 999 ); 2011 mSyncManager->slotSyncMenu( 999 );
2012 } 2012 }
2013 setCaption( i18n("Pi-Sync successful!") ); 2013 setCaption( i18n("Pi-Sync successful!") );
2014} 2014}
2015 2015
2016void MainWindow::printSel( ) 2016void MainWindow::printSel( )
2017{ 2017{
2018 mView->viewManager()->agendaView()->agenda()->printSelection(); 2018 mView->viewManager()->agendaView()->agenda()->printSelection();
2019} 2019}
2020 2020
2021void MainWindow::printCal() 2021void MainWindow::printCal()
2022{ 2022{
2023 mView->print();//mCp->showDialog(); 2023 mView->print();//mCp->showDialog();
2024} 2024}
2025 2025
2026 2026
2027#include "libkdepim/kdatepicker.h" 2027#include "libkdepim/kdatepicker.h"
2028#include <kdatetbl.h> 2028#include <kdatetbl.h>
2029void MainWindow::weekAction() 2029void MainWindow::weekAction()
2030{ 2030{
2031 int month; 2031 int month;
2032 KPopupFrame* popup = new KPopupFrame(this); 2032 KPopupFrame* popup = new KPopupFrame(this);
2033 int size = 12; 2033 KDateInternalWeekPicker* picker = new KDateInternalWeekPicker(10, popup);
2034 if ( QApplication::desktop()->width() >= 480 )
2035 size = 18;
2036 KDateInternalWeekPicker* picker = new KDateInternalWeekPicker(size, popup);
2037 // ----- 2034 // -----
2038 picker->resize(picker->sizeHint()); 2035 picker->resize(picker->sizeHint());
2039 popup->setMainWidget(picker); 2036 popup->setMainWidget(picker);
2040 picker->setFocus(); 2037 picker->setFocus();
2041 connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int))); 2038 connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int)));
2042 if(popup->exec(iconToolBar->mapToGlobal(QPoint(0, iconToolBar->height())))) 2039 int x = 0;
2040 int y = iconToolBar->height();
2041 int dX = 0;
2042 int dY = 0;
2043 if ( iconToolBar->orientation () == Qt:: Horizontal ) {
2044 if ( iconToolBar->y() > height()/2 ) {
2045 dY = iconToolBar->height()+picker->sizeHint().height();
2046 y = 0;
2047 }
2048 } else {
2049 if ( iconToolBar->x() > width()/2 ) { // right side
2050 x=0;
2051 dX= iconToolBar->width()+picker->sizeHint().width();
2052 y = 0;
2053 } else {
2054 x= iconToolBar->width();
2055 y = 0;
2056 }
2057 }
2058 qDebug("dax %d dy %d %d %d ", dX, dY, iconToolBar->x(), iconToolBar->y() );
2059 if(popup->exec(iconToolBar->mapToGlobal(QPoint(x,y)-QPoint( dX,dY))))
2043 { 2060 {
2044 month = picker->getResult(); 2061 month = picker->getResult();
2045 emit selectWeek ( month ); 2062 emit selectWeek ( month );
2046 //qDebug("weekSelected %d ", month); 2063 //qDebug("weekSelected %d ", month);
2047 } 2064 }
2048 delete popup; 2065 delete popup;
2049} 2066}
diff --git a/korganizer/navigatorbar.cpp b/korganizer/navigatorbar.cpp
index f05e6f6..4a31c77 100644
--- a/korganizer/navigatorbar.cpp
+++ b/korganizer/navigatorbar.cpp
@@ -1,112 +1,113 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 3
4 Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org> 4 Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org>
5 5
6 This program is free software; you can redistribute it and/or modify 6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by 7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or 8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version. 9 (at your option) any later version.
10 10
11 This program is distributed in the hope that it will be useful, 11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details. 14 GNU General Public License for more details.
15 15
16 You should have received a copy of the GNU General Public License 16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software 17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 19
20 As a special exception, permission is given to link this program 20 As a special exception, permission is given to link this program
21 with any edition of Qt, and distribute the resulting executable, 21 with any edition of Qt, and distribute the resulting executable,
22 without including the source code for Qt in the source distribution. 22 without including the source code for Qt in the source distribution.
23*/ 23*/
24 24
25#include <qstring.h> 25#include <qstring.h>
26#include <qtooltip.h> 26#include <qtooltip.h>
27#include <qpushbutton.h> 27#include <qpushbutton.h>
28#include <qlayout.h> 28#include <qlayout.h>
29#include <qframe.h> 29#include <qframe.h>
30#include <qlabel.h> 30#include <qlabel.h>
31#include <qpopupmenu.h> 31#include <qpopupmenu.h>
32#include <qapplication.h> 32#include <qapplication.h>
33 33
34#include <kdebug.h> 34#include <kdebug.h>
35#include <klocale.h> 35#include <klocale.h>
36#include <kglobal.h> 36#include <kglobal.h>
37#include <kiconloader.h> 37#include <kiconloader.h>
38#include "libkdepim/kdatepicker.h" 38#include "libkdepim/kdatepicker.h"
39#include <knotifyclient.h> 39#include <knotifyclient.h>
40#include "kdatetbl.h" 40#include "kdatetbl.h"
41 41
42#include "koglobals.h" 42#include "koglobals.h"
43#include <kglobalsettings.h>
43#include "koprefs.h" 44#include "koprefs.h"
44#ifndef KORG_NOPLUGINS 45#ifndef KORG_NOPLUGINS
45#include "kocore.h" 46#include "kocore.h"
46#endif 47#endif
47 48
48#include <kcalendarsystem.h> 49#include <kcalendarsystem.h>
49 50
50#include "navigatorbar.h" 51#include "navigatorbar.h"
51 52
52NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *name ) 53NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *name )
53 : QWidget( parent, name ) 54 : QWidget( parent, name )
54{ 55{
55 QBoxLayout *topLayout = new QHBoxLayout( this ); 56 QBoxLayout *topLayout = new QHBoxLayout( this );
56 57
57 // Set up the control buttons and date label 58 // Set up the control buttons and date label
58 mCtrlFrame = new QFrame( this ); 59 mCtrlFrame = new QFrame( this );
59 mCtrlFrame->setFrameStyle(QFrame::Panel|QFrame::Raised); 60 mCtrlFrame->setFrameStyle(QFrame::Panel|QFrame::Raised);
60 mCtrlFrame->setLineWidth(1); 61 mCtrlFrame->setLineWidth(1);
61 62
62 topLayout->addWidget( mCtrlFrame ); 63 topLayout->addWidget( mCtrlFrame );
63 64
64 QFont tfont = font(); 65 QFont tfont = KGlobalSettings::generalFont();//font();
65 if ( QApplication::desktop()->width() >= 480 ) 66 if ( QApplication::desktop()->width() >= 480 )
66 tfont.setPointSize(tfont.pointSize()+2); 67 tfont.setPointSize(tfont.pointSize()+2);
67 tfont.setBold(true); 68 tfont.setBold(true);
68 69
69 bool isRTL = KOGlobals::self()->reverseLayout(); 70 bool isRTL = KOGlobals::self()->reverseLayout();
70#ifndef DESKTOP_VERSION 71#ifndef DESKTOP_VERSION
71 bool isDesktop = false; 72 bool isDesktop = false;
72#else 73#else
73 bool isDesktop = true; 74 bool isDesktop = true;
74#endif 75#endif
75 if ( QString ( name ) == QString("useBigPixmaps") && QApplication::desktop()->width() > 320 ) 76 if ( QString ( name ) == QString("useBigPixmaps") && QApplication::desktop()->width() > 320 )
76 isDesktop = true; 77 isDesktop = true;
77 // Create backward navigation buttons 78 // Create backward navigation buttons
78 mPrevYear = new QPushButton( mCtrlFrame ); 79 mPrevYear = new QPushButton( mCtrlFrame );
79 mPrevYear->setPixmap( SmallIcon( isDesktop ? "2leftarrowB" : "2leftarrow" ) ); 80 mPrevYear->setPixmap( SmallIcon( isDesktop ? "2leftarrowB" : "2leftarrow" ) );
80 QToolTip::add( mPrevYear, i18n("Previous Year") ); 81 QToolTip::add( mPrevYear, i18n("Previous Year") );
81 82
82 mPrevMonth = new QPushButton( mCtrlFrame ); 83 mPrevMonth = new QPushButton( mCtrlFrame );
83 mPrevMonth->setPixmap( SmallIcon( isDesktop ? "1leftarrowB" : "1leftarrow") ); 84 mPrevMonth->setPixmap( SmallIcon( isDesktop ? "1leftarrowB" : "1leftarrow") );
84 QToolTip::add( mPrevMonth, i18n("Previous Month") ); 85 QToolTip::add( mPrevMonth, i18n("Previous Month") );
85 86
86 // Create forward navigation buttons 87 // Create forward navigation buttons
87 mNextMonth = new QPushButton( mCtrlFrame ); 88 mNextMonth = new QPushButton( mCtrlFrame );
88 mNextMonth->setPixmap( SmallIcon( isDesktop ? "1rightarrowB" : "1rightarrow") ); 89 mNextMonth->setPixmap( SmallIcon( isDesktop ? "1rightarrowB" : "1rightarrow") );
89 QToolTip::add( mNextMonth, i18n("Next Month") ); 90 QToolTip::add( mNextMonth, i18n("Next Month") );
90 91
91 mNextYear = new QPushButton( mCtrlFrame ); 92 mNextYear = new QPushButton( mCtrlFrame );
92 mNextYear->setPixmap( SmallIcon( isDesktop ? "2rightarrowB": "2rightarrow") ); 93 mNextYear->setPixmap( SmallIcon( isDesktop ? "2rightarrowB": "2rightarrow") );
93 QToolTip::add( mNextYear, i18n("Next Year") ); 94 QToolTip::add( mNextYear, i18n("Next Year") );
94 mSelectMonth = new QPushButton( mCtrlFrame ); 95 mSelectMonth = new QPushButton( mCtrlFrame );
95 // Create month name label 96 // Create month name label
96 //selectMonth->setFont( tfont ); 97 //selectMonth->setFont( tfont );
97 // selectMonth->setAlignment( AlignCenter ); 98 // selectMonth->setAlignment( AlignCenter );
98 //mDateLabel = new QLabel( selectMonth ); 99 //mDateLabel = new QLabel( selectMonth );
99 //mDateLabel->setFont( tfont ); 100 //mDateLabel->setFont( tfont );
100 //mDateLabel->setAlignment( AlignCenter ); 101 //mDateLabel->setAlignment( AlignCenter );
101 if ( QString ( name ) == QString("useBigPixmaps") ) { 102 if ( QString ( name ) == QString("useBigPixmaps") ) {
102 mNextMonth->setFlat( true); 103 mNextMonth->setFlat( true);
103 mNextYear->setFlat( true); 104 mNextYear->setFlat( true);
104 mSelectMonth->setFlat( true); 105 mSelectMonth->setFlat( true);
105 mPrevYear->setFlat( true); 106 mPrevYear->setFlat( true);
106 mPrevMonth->setFlat( true); 107 mPrevMonth->setFlat( true);
107 } 108 }
108 mSelectMonth->setFont( tfont ); 109 mSelectMonth->setFont( tfont );
109 // Set minimum width to width of widest month name label 110 // Set minimum width to width of widest month name label
110 int i; 111 int i;
111 int maxwidth = 0; 112 int maxwidth = 0;
112 QFontMetrics fm ( mSelectMonth->font() ); 113 QFontMetrics fm ( mSelectMonth->font() );