author | zautrix <zautrix> | 2005-03-29 10:41:27 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-29 10:41:27 (UTC) |
commit | 4af444fb7071d37c966f002f4971d209971679c9 (patch) (side-by-side diff) | |
tree | f451274ed211bc85503a83acecd377368734c828 | |
parent | a5d52c19d2cd9b008e5cf41d5c7d2c193df7ee46 (diff) | |
download | kdepimpi-4af444fb7071d37c966f002f4971d209971679c9.zip kdepimpi-4af444fb7071d37c966f002f4971d209971679c9.tar.gz kdepimpi-4af444fb7071d37c966f002f4971d209971679c9.tar.bz2 |
toolbar setup options added
-rw-r--r-- | bin/kdepim/korganizer/allday.png | bin | 279 -> 657 bytes | |||
-rw-r--r-- | bin/kdepim/korganizer/navi.png | bin | 518 -> 667 bytes | |||
-rw-r--r-- | korganizer/koprefs.cpp | 10 | ||||
-rw-r--r-- | korganizer/koprefs.h | 4 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 30 |
5 files changed, 44 insertions, 0 deletions
diff --git a/bin/kdepim/korganizer/allday.png b/bin/kdepim/korganizer/allday.png Binary files differindex 735eae2..41cefd5 100644 --- a/bin/kdepim/korganizer/allday.png +++ b/bin/kdepim/korganizer/allday.png diff --git a/bin/kdepim/korganizer/navi.png b/bin/kdepim/korganizer/navi.png Binary files differindex 9cb0fab..93c6aaa 100644 --- a/bin/kdepim/korganizer/navi.png +++ b/bin/kdepim/korganizer/navi.png diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index 1e68a44..97ab4e8 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp @@ -79,32 +79,42 @@ KOPrefs::KOPrefs() : addItemBool("ShowIconDay7",&mShowIconDay7,true); addItemBool("ShowIconMonth",&mShowIconMonth,true); addItemBool("ShowIconTodoview",&mShowIconTodoview,true); addItemBool("ShowIconBackFast",&mShowIconBackFast,true); addItemBool("ShowIconBack",&mShowIconBack,true); addItemBool("ShowIconToday",&mShowIconToday,true); addItemBool("ShowIconForward",&mShowIconForward,true); addItemBool("ShowIconForwardFast",&mShowIconForwardFast,true); addItemBool("ShowIconWhatsThis",&mShowIconWhatsThis,true); addItemBool("ShowIconWeekNum",&mShowIconWeekNum,true); addItemBool("ShowIconNextDays",&mShowIconNextDays,true); addItemBool("ShowIconNext",&mShowIconNext,true); addItemBool("ShowIconJournal",&mShowIconJournal,true); addItemBool("ShowIconStretch",&mShowIconStretch,true); addItemBool("ShowIconFilter",&mShowIconFilter,false); addItemBool("ShowIconOnetoolbar",&mShowIconOnetoolbar,true); + + bool addIcons = false; +#ifdef DESKTOP_VERSION + addIcons = true; +#endif + addItemBool("ShowIconNavigator",&mShowIconNavigator,addIcons); + addItemBool("ShowIconAllday",&mShowIconAllday,addIcons); + addItemBool("ShowIconFilterview",&mShowIconFilterview,addIcons); + addItemBool("ShowIconToggleFull",&mShowIconToggleFull,addIcons); + addItemInt("LastLoadedLanguage",&mOldLanguage,0); addItemBool("AskForQuit",&mAskForQuit,false); #ifndef DESKTOP_VERSION addItemBool("ShowFullMenu",&mShowFullMenu,false); #else addItemBool("ShowFullMenu",&mShowFullMenu,true); #endif addItemBool("ToolBarHor",&mToolBarHor, true ); addItemBool("ToolBarUp",&mToolBarUp, false ); addItemBool("ToolBarHorV",&mToolBarHorV, true ); addItemBool("ToolBarUpV",&mToolBarUpV, false ); addItemBool("ToolBarHorN",&mToolBarHorN, true ); addItemBool("ToolBarUpN",&mToolBarUpN, false ); addItemBool("ToolBarHorF",&mToolBarHorF, true ); diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h index fbce6ea..3a07348 100644 --- a/korganizer/koprefs.h +++ b/korganizer/koprefs.h @@ -174,32 +174,36 @@ class KOPrefs : public KPimPrefs bool mShowIconDay6; bool mShowIconDay7; bool mShowIconMonth; bool mShowIconTodoview; bool mShowIconBackFast; bool mShowIconBack; bool mShowIconToday; bool mShowIconForward; bool mShowIconForwardFast; bool mShowIconWhatsThis; bool mShowIconWeekNum; bool mShowIconNextDays; bool mShowIconNext; bool mShowIconJournal; bool mShowIconFilter; bool mShowIconOnetoolbar; + bool mShowIconNavigator; + bool mShowIconAllday; + bool mShowIconFilterview; + bool mShowIconToggleFull; bool mShowIconStretch; bool mToolBarHor; bool mToolBarUp; bool mToolBarHorV; bool mToolBarUpV; bool mToolBarHorN; bool mToolBarUpN; bool mToolBarHorF; bool mToolBarUpF; bool mToolBarMiniIcons; bool mAskForQuit; bool mUsePassWd; bool mShowSyncEvents; diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 8e52968..8a4c7eb 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -712,68 +712,88 @@ void MainWindow::initActions() connect( ne_action, SIGNAL( activated() ), mView, SLOT( newEvent() ) ); icon = loadPixmap( pathString + "newtodo" ); configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); nt_action->addTo( actionMenu ); connect( nt_action, SIGNAL( activated() ), mView, SLOT( newTodo() ) ); icon = loadPixmap( pathString + "today" ); QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); today_action->addTo( viewMenu ); connect( today_action, SIGNAL( activated() ), mView, SLOT( goToday() ) ); viewMenu->insertSeparator(); + // *********************** + if ( KOPrefs::instance()->mVerticalScreen ) { + icon = SmallIcon( "1updownarrow" ); + } else { + icon = SmallIcon("1leftrightarrow" ); + } + configureToolBarMenu->insertItem(icon, i18n("Toggle Fullscreen"), 28 ); + QAction* FSaction = new QAction( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this ); + FSaction->addTo( viewMenu ); + connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() )); + icon = loadPixmap( pathString + "navi" ); + configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 ); action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); action->addTo( viewMenu ); connect( action, SIGNAL( activated() ), mView, SLOT( toggleDateNavigatorWidget() ) ); mToggleNav = action ; icon = loadPixmap( pathString + "filter" ); + configureToolBarMenu->insertItem(icon, i18n("Toggle FilterView"), 26 ); action = new QAction( i18n("Toggle FilterView"), icon, i18n("Toggle FilterView"), 0, this ); action->addTo( viewMenu ); connect( action, SIGNAL( activated() ), mView, SLOT( toggleFilter() ) ); mToggleFilter = action; icon = loadPixmap( pathString + "allday" ); + configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 ); action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this ); action->addTo( viewMenu ); connect( action, SIGNAL( activated() ), mView, SLOT( toggleAllDaySize() ) ); mToggleAllday = action; connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), mToggleNav, SLOT( setEnabled ( bool ) ) ); connect( mView->viewManager(), SIGNAL( signalFullScreen( bool ) ), mToggleFilter, SLOT( setEnabled ( bool ) ) ); connect( mView->viewManager(), SIGNAL( signalAgendaView( bool ) ), mToggleAllday, SLOT( setEnabled ( bool ) ) ); viewMenu->insertSeparator(); icon = loadPixmap( pathString + "picker" ); action = new QAction( i18n("Date Picker"), icon, i18n("Date Picker"), 0, this ); action->addTo( viewMenu ); connect( action, SIGNAL( activated() ), mView, SLOT( showDatePicker() ) ); action->addTo( iconToolBar ); viewMenu->insertSeparator(); + if ( p-> mShowIconToggleFull ) + FSaction->addTo( iconToolBar ); + if ( p->mShowIconNavigator ) mToggleNav ->addTo( iconToolBar ); + if ( p->mShowIconFilterview ) mToggleFilter->addTo( iconToolBar ); + if ( p->mShowIconAllday ) mToggleAllday->addTo( iconToolBar ); + icon = loadPixmap( pathString + "whatsnext" ); configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110 ); QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); whatsnext_action->addTo( viewMenu ); connect( whatsnext_action, SIGNAL( activated() ), mView->viewManager(), SLOT( showWhatsNextView() ) ); icon = loadPixmap( pathString + "xdays" ); configureToolBarMenu->insertItem(icon, i18n("Next days"), 100 ); QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this ); xdays_action->addTo( viewMenu ); connect( xdays_action, SIGNAL( activated() ), mView->viewManager(), SLOT( showNextXView() ) ); @@ -1139,32 +1159,38 @@ void MainWindow::initActions() connect( action, SIGNAL( activated() ), mView, SLOT( goNext() ) ); action->addTo( navigatorToolBar ); } icon = loadPixmap( pathString + "2rightarrowB" ); configureToolBarMenu->insertItem(icon, i18n("Next month"), 230); if (p-> mShowIconForwardFast) { action = new QAction( i18n("Next month"), icon, i18n("Next month"),0 , this ); connect( action, SIGNAL( activated() ), mView, SLOT( goNextMonth() ) ); action->addTo( navigatorToolBar ); } configureToolBarMenu->insertItem(i18n("What's This?"), 300, 6); + + if ( p->mShowIconNavigator ) configureToolBarMenu->setItemChecked( 22 , true); + if ( p->mShowIconAllday ) configureToolBarMenu->setItemChecked( 24 , true); + if ( p->mShowIconFilterview ) configureToolBarMenu->setItemChecked( 26 , true); + if ( p->mShowIconToggleFull ) configureToolBarMenu->setItemChecked( 28 , true); + if (p-> mShowIconNewEvent) configureToolBarMenu->setItemChecked( 10, true ); if (p->mShowIconNewTodo ) configureToolBarMenu->setItemChecked( 20, true ); if (p-> mShowIconSearch) configureToolBarMenu->setItemChecked( 120, true ); if (p-> mShowIconList) configureToolBarMenu->setItemChecked( 30, true ); if (p-> mShowIconDay1) configureToolBarMenu->setItemChecked( 40, true ); if (p-> mShowIconDay5) configureToolBarMenu->setItemChecked( 50, true ); if (p-> mShowIconDay6) configureToolBarMenu->setItemChecked( 75, true ); if (p-> mShowIconDay7) configureToolBarMenu->setItemChecked( 60, true ); @@ -2005,32 +2031,36 @@ void MainWindow::updateFilterToolbar() } void MainWindow::selectFilterPopup( int fil ) { selectFilter( fil + 1 ); } void MainWindow::configureToolBar( int item ) { configureToolBarMenu->setItemChecked( item, !configureToolBarMenu-> isItemChecked ( item ) ); KOPrefs *p = KOPrefs::instance(); p-> mShowIconStretch= configureToolBarMenu->isItemChecked( 5 ); p-> mShowIconOnetoolbar = configureToolBarMenu->isItemChecked( 6 ); p-> mShowIconFilter = configureToolBarMenu->isItemChecked( 7 ); p-> mShowIconNewEvent= configureToolBarMenu->isItemChecked( 10 ); p->mShowIconNewTodo = configureToolBarMenu->isItemChecked( 20 ); + p->mShowIconNavigator = configureToolBarMenu->isItemChecked( 22 ); + p->mShowIconAllday = configureToolBarMenu->isItemChecked( 24 ); + p->mShowIconFilterview = configureToolBarMenu->isItemChecked( 26 ); + p->mShowIconToggleFull = configureToolBarMenu->isItemChecked( 28 ); p-> mShowIconSearch= configureToolBarMenu->isItemChecked( 120 ); p-> mShowIconList= configureToolBarMenu->isItemChecked( 30 ); p-> mShowIconDay1= configureToolBarMenu->isItemChecked( 40 ); p-> mShowIconDay5= configureToolBarMenu->isItemChecked( 50 ); p-> mShowIconDay6= configureToolBarMenu->isItemChecked( 75 ); p-> mShowIconDay7= configureToolBarMenu->isItemChecked( 60 ); p-> mShowIconMonth= configureToolBarMenu->isItemChecked( 70 ); p-> mShowIconTodoview= configureToolBarMenu->isItemChecked( 80 ); p-> mShowIconBackFast= configureToolBarMenu->isItemChecked( 200 ); p-> mShowIconBack = configureToolBarMenu->isItemChecked( 210 ); p-> mShowIconToday= configureToolBarMenu->isItemChecked( 130 ); p-> mShowIconForward= configureToolBarMenu->isItemChecked( 220 ); p-> mShowIconForwardFast= configureToolBarMenu->isItemChecked( 230 ); p-> mShowIconNextDays= configureToolBarMenu->isItemChecked( 100 ); p-> mShowIconNext= configureToolBarMenu->isItemChecked( 110 ); p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 ); |