summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-03-29 10:41:27 (UTC)
committer zautrix <zautrix>2005-03-29 10:41:27 (UTC)
commit4af444fb7071d37c966f002f4971d209971679c9 (patch) (unidiff)
treef451274ed211bc85503a83acecd377368734c828 /korganizer
parenta5d52c19d2cd9b008e5cf41d5c7d2c193df7ee46 (diff)
downloadkdepimpi-4af444fb7071d37c966f002f4971d209971679c9.zip
kdepimpi-4af444fb7071d37c966f002f4971d209971679c9.tar.gz
kdepimpi-4af444fb7071d37c966f002f4971d209971679c9.tar.bz2
toolbar setup options added
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koprefs.cpp10
-rw-r--r--korganizer/koprefs.h4
-rw-r--r--korganizer/mainwindow.cpp30
3 files changed, 44 insertions, 0 deletions
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp
index 1e68a44..97ab4e8 100644
--- a/korganizer/koprefs.cpp
+++ b/korganizer/koprefs.cpp
@@ -92,6 +92,16 @@ KOPrefs::KOPrefs() :
92 addItemBool("ShowIconStretch",&mShowIconStretch,true); 92 addItemBool("ShowIconStretch",&mShowIconStretch,true);
93 addItemBool("ShowIconFilter",&mShowIconFilter,false); 93 addItemBool("ShowIconFilter",&mShowIconFilter,false);
94 addItemBool("ShowIconOnetoolbar",&mShowIconOnetoolbar,true); 94 addItemBool("ShowIconOnetoolbar",&mShowIconOnetoolbar,true);
95
96 bool addIcons = false;
97#ifdef DESKTOP_VERSION
98 addIcons = true;
99#endif
100 addItemBool("ShowIconNavigator",&mShowIconNavigator,addIcons);
101 addItemBool("ShowIconAllday",&mShowIconAllday,addIcons);
102 addItemBool("ShowIconFilterview",&mShowIconFilterview,addIcons);
103 addItemBool("ShowIconToggleFull",&mShowIconToggleFull,addIcons);
104
95 addItemInt("LastLoadedLanguage",&mOldLanguage,0); 105 addItemInt("LastLoadedLanguage",&mOldLanguage,0);
96 106
97 addItemBool("AskForQuit",&mAskForQuit,false); 107 addItemBool("AskForQuit",&mAskForQuit,false);
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h
index fbce6ea..3a07348 100644
--- a/korganizer/koprefs.h
+++ b/korganizer/koprefs.h
@@ -187,6 +187,10 @@ class KOPrefs : public KPimPrefs
187 bool mShowIconJournal; 187 bool mShowIconJournal;
188 bool mShowIconFilter; 188 bool mShowIconFilter;
189 bool mShowIconOnetoolbar; 189 bool mShowIconOnetoolbar;
190 bool mShowIconNavigator;
191 bool mShowIconAllday;
192 bool mShowIconFilterview;
193 bool mShowIconToggleFull;
190 194
191 bool mShowIconStretch; 195 bool mShowIconStretch;
192 196
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 8e52968..8a4c7eb 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -725,19 +725,33 @@ void MainWindow::initActions()
725 mView, SLOT( goToday() ) ); 725 mView, SLOT( goToday() ) );
726 viewMenu->insertSeparator(); 726 viewMenu->insertSeparator();
727 727
728 // ***********************
729 if ( KOPrefs::instance()->mVerticalScreen ) {
730 icon = SmallIcon( "1updownarrow" );
731 } else {
732 icon = SmallIcon("1leftrightarrow" );
733 }
734 configureToolBarMenu->insertItem(icon, i18n("Toggle Fullscreen"), 28 );
735 QAction* FSaction = new QAction( i18n("Toggle Fullscreen"), icon, i18n("Toggle Fullscreen"), 0, this );
736 FSaction->addTo( viewMenu );
737 connect( FSaction, SIGNAL( activated() ), mView, SLOT( toggleExpand() ));
738
728 icon = loadPixmap( pathString + "navi" ); 739 icon = loadPixmap( pathString + "navi" );
740 configureToolBarMenu->insertItem(icon, i18n("Toggle DateNavigator"), 22 );
729 action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); 741 action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this );
730 action->addTo( viewMenu ); 742 action->addTo( viewMenu );
731 connect( action, SIGNAL( activated() ), 743 connect( action, SIGNAL( activated() ),
732 mView, SLOT( toggleDateNavigatorWidget() ) ); 744 mView, SLOT( toggleDateNavigatorWidget() ) );
733 mToggleNav = action ; 745 mToggleNav = action ;
734 icon = loadPixmap( pathString + "filter" ); 746 icon = loadPixmap( pathString + "filter" );
747 configureToolBarMenu->insertItem(icon, i18n("Toggle FilterView"), 26 );
735 action = new QAction( i18n("Toggle FilterView"), icon, i18n("Toggle FilterView"), 0, this ); 748 action = new QAction( i18n("Toggle FilterView"), icon, i18n("Toggle FilterView"), 0, this );
736 action->addTo( viewMenu ); 749 action->addTo( viewMenu );
737 connect( action, SIGNAL( activated() ), 750 connect( action, SIGNAL( activated() ),
738 mView, SLOT( toggleFilter() ) ); 751 mView, SLOT( toggleFilter() ) );
739 mToggleFilter = action; 752 mToggleFilter = action;
740 icon = loadPixmap( pathString + "allday" ); 753 icon = loadPixmap( pathString + "allday" );
754 configureToolBarMenu->insertItem(icon, i18n("Toggle Allday"), 24 );
741 action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this ); 755 action = new QAction( i18n("Toggle Allday"), icon,i18n("Toggle Allday"), 0, this );
742 action->addTo( viewMenu ); 756 action->addTo( viewMenu );
743 connect( action, SIGNAL( activated() ), 757 connect( action, SIGNAL( activated() ),
@@ -761,6 +775,12 @@ void MainWindow::initActions()
761 action->addTo( iconToolBar ); 775 action->addTo( iconToolBar );
762 viewMenu->insertSeparator(); 776 viewMenu->insertSeparator();
763 777
778 if ( p-> mShowIconToggleFull )
779 FSaction->addTo( iconToolBar );
780 if ( p->mShowIconNavigator ) mToggleNav ->addTo( iconToolBar );
781 if ( p->mShowIconFilterview ) mToggleFilter->addTo( iconToolBar );
782 if ( p->mShowIconAllday ) mToggleAllday->addTo( iconToolBar );
783
764 784
765 icon = loadPixmap( pathString + "whatsnext" ); 785 icon = loadPixmap( pathString + "whatsnext" );
766 configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110 ); 786 configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110 );
@@ -1152,6 +1172,12 @@ void MainWindow::initActions()
1152 1172
1153 configureToolBarMenu->insertItem(i18n("What's This?"), 300, 6); 1173 configureToolBarMenu->insertItem(i18n("What's This?"), 300, 6);
1154 1174
1175
1176 if ( p->mShowIconNavigator ) configureToolBarMenu->setItemChecked( 22 , true);
1177 if ( p->mShowIconAllday ) configureToolBarMenu->setItemChecked( 24 , true);
1178 if ( p->mShowIconFilterview ) configureToolBarMenu->setItemChecked( 26 , true);
1179 if ( p->mShowIconToggleFull ) configureToolBarMenu->setItemChecked( 28 , true);
1180
1155 if (p-> mShowIconNewEvent) 1181 if (p-> mShowIconNewEvent)
1156 configureToolBarMenu->setItemChecked( 10, true ); 1182 configureToolBarMenu->setItemChecked( 10, true );
1157 if (p->mShowIconNewTodo ) 1183 if (p->mShowIconNewTodo )
@@ -2018,6 +2044,10 @@ void MainWindow::configureToolBar( int item )
2018 p-> mShowIconFilter = configureToolBarMenu->isItemChecked( 7 ); 2044 p-> mShowIconFilter = configureToolBarMenu->isItemChecked( 7 );
2019 p-> mShowIconNewEvent= configureToolBarMenu->isItemChecked( 10 ); 2045 p-> mShowIconNewEvent= configureToolBarMenu->isItemChecked( 10 );
2020 p->mShowIconNewTodo = configureToolBarMenu->isItemChecked( 20 ); 2046 p->mShowIconNewTodo = configureToolBarMenu->isItemChecked( 20 );
2047 p->mShowIconNavigator = configureToolBarMenu->isItemChecked( 22 );
2048 p->mShowIconAllday = configureToolBarMenu->isItemChecked( 24 );
2049 p->mShowIconFilterview = configureToolBarMenu->isItemChecked( 26 );
2050 p->mShowIconToggleFull = configureToolBarMenu->isItemChecked( 28 );
2021 p-> mShowIconSearch= configureToolBarMenu->isItemChecked( 120 ); 2051 p-> mShowIconSearch= configureToolBarMenu->isItemChecked( 120 );
2022 p-> mShowIconList= configureToolBarMenu->isItemChecked( 30 ); 2052 p-> mShowIconList= configureToolBarMenu->isItemChecked( 30 );
2023 p-> mShowIconDay1= configureToolBarMenu->isItemChecked( 40 ); 2053 p-> mShowIconDay1= configureToolBarMenu->isItemChecked( 40 );