author | zautrix <zautrix> | 2005-03-24 12:34:27 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-24 12:34:27 (UTC) |
commit | 685d04bc8f696697202f2fc0de18e61905cbb2fa (patch) (unidiff) | |
tree | 927d070c135d0025b236f6bd76143e0341ef2566 /korganizer/mainwindow.cpp | |
parent | a9e8535fd6960f454ab7009cfa996973291502a2 (diff) | |
download | kdepimpi-685d04bc8f696697202f2fc0de18e61905cbb2fa.zip kdepimpi-685d04bc8f696697202f2fc0de18e61905cbb2fa.tar.gz kdepimpi-685d04bc8f696697202f2fc0de18e61905cbb2fa.tar.bz2 |
layout fix
-rw-r--r-- | korganizer/mainwindow.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index bd9efc8..7faf675 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -955,96 +955,98 @@ void MainWindow::initActions() | |||
955 | SLOT( synchowto() ) ); | 955 | SLOT( synchowto() ) ); |
956 | action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this ); | 956 | action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this ); |
957 | action->addTo( helpMenu ); | 957 | action->addTo( helpMenu ); |
958 | connect( action, SIGNAL( activated() ), | 958 | connect( action, SIGNAL( activated() ), |
959 | SLOT( kdesynchowto() ) ); | 959 | SLOT( kdesynchowto() ) ); |
960 | action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this ); | 960 | action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this ); |
961 | action->addTo( helpMenu ); | 961 | action->addTo( helpMenu ); |
962 | connect( action, SIGNAL( activated() ), | 962 | connect( action, SIGNAL( activated() ), |
963 | SLOT( multisynchowto() ) ); | 963 | SLOT( multisynchowto() ) ); |
964 | action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this ); | 964 | action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this ); |
965 | action->addTo( helpMenu ); | 965 | action->addTo( helpMenu ); |
966 | connect( action, SIGNAL( activated() ), | 966 | connect( action, SIGNAL( activated() ), |
967 | SLOT( aboutAutoSaving() ) ); | 967 | SLOT( aboutAutoSaving() ) ); |
968 | action = new QAction( "Problemd", i18n("Known Problems..."), 0,this ); | 968 | action = new QAction( "Problemd", i18n("Known Problems..."), 0,this ); |
969 | action->addTo( helpMenu ); | 969 | action->addTo( helpMenu ); |
970 | connect( action, SIGNAL( activated() ), | 970 | connect( action, SIGNAL( activated() ), |
971 | SLOT( aboutKnownBugs() ) ); | 971 | SLOT( aboutKnownBugs() ) ); |
972 | action = new QAction( "Translate Howto", i18n("User translation..."), 0,this ); | 972 | action = new QAction( "Translate Howto", i18n("User translation..."), 0,this ); |
973 | action->addTo( helpMenu ); | 973 | action->addTo( helpMenu ); |
974 | connect( action, SIGNAL( activated() ), | 974 | connect( action, SIGNAL( activated() ), |
975 | SLOT( usertrans() ) ); | 975 | SLOT( usertrans() ) ); |
976 | action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this ); | 976 | action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this ); |
977 | action->addTo( helpMenu ); | 977 | action->addTo( helpMenu ); |
978 | connect( action, SIGNAL( activated() ), | 978 | connect( action, SIGNAL( activated() ), |
979 | SLOT( faq() ) ); | 979 | SLOT( faq() ) ); |
980 | action = new QAction( "licence", i18n("Licence..."), 0, this ); | 980 | action = new QAction( "licence", i18n("Licence..."), 0, this ); |
981 | action->addTo( helpMenu ); | 981 | action->addTo( helpMenu ); |
982 | connect( action, SIGNAL( activated() ), | 982 | connect( action, SIGNAL( activated() ), |
983 | SLOT( licence() ) ); | 983 | SLOT( licence() ) ); |
984 | action = new QAction( "about", i18n("About..."), 0, this ); | 984 | action = new QAction( "about", i18n("About..."), 0, this ); |
985 | action->addTo( helpMenu ); | 985 | action->addTo( helpMenu ); |
986 | connect( action, SIGNAL( activated() ), | 986 | connect( action, SIGNAL( activated() ), |
987 | SLOT( about() ) ); | 987 | SLOT( about() ) ); |
988 | //menuBar->insertSeparator(); | 988 | //menuBar->insertSeparator(); |
989 | 989 | ||
990 | // ****************************************************** | 990 | // ****************************************************** |
991 | // menubar icons | 991 | // menubar icons |
992 | 992 | ||
993 | 993 | ||
994 | iconToolBar->setHorizontalStretchable (true ); | 994 | iconToolBar->setHorizontalStretchable (true ); |
995 | //menuBar->insertItem( iconToolBar ); | 995 | //menuBar->insertItem( iconToolBar ); |
996 | //xdays_action | 996 | //xdays_action |
997 | if (p-> mShowIconNewEvent) | 997 | if (p-> mShowIconNewEvent) |
998 | ne_action->addTo( iconToolBar ); | 998 | ne_action->addTo( iconToolBar ); |
999 | if (p->mShowIconNewTodo ) | 999 | if (p->mShowIconNewTodo ) |
1000 | nt_action->addTo( iconToolBar ); | 1000 | nt_action->addTo( iconToolBar ); |
1001 | if (p-> mShowIconSearch) | 1001 | if (p-> mShowIconSearch) |
1002 | search_action->addTo( iconToolBar ); | 1002 | search_action->addTo( iconToolBar ); |
1003 | if (p-> mShowIconWhatsThis) | ||
1004 | QWhatsThis::whatsThisButton ( iconToolBar ); | ||
1003 | if (p-> mShowIconNext) | 1005 | if (p-> mShowIconNext) |
1004 | whatsnext_action->addTo( iconToolBar ); | 1006 | whatsnext_action->addTo( iconToolBar ); |
1005 | if (p-> mShowIconNextDays) | 1007 | if (p-> mShowIconNextDays) |
1006 | xdays_action->addTo( iconToolBar ); | 1008 | xdays_action->addTo( iconToolBar ); |
1007 | if (p-> mShowIconList) | 1009 | if (p-> mShowIconList) |
1008 | showlist_action->addTo( iconToolBar ); | 1010 | showlist_action->addTo( iconToolBar ); |
1009 | if (p-> mShowIconDay1) | 1011 | if (p-> mShowIconDay1) |
1010 | day1_action->addTo( iconToolBar ); | 1012 | day1_action->addTo( iconToolBar ); |
1011 | if (p-> mShowIconDay5) | 1013 | if (p-> mShowIconDay5) |
1012 | day5_action->addTo( iconToolBar ); | 1014 | day5_action->addTo( iconToolBar ); |
1013 | if (p-> mShowIconDay7) | 1015 | if (p-> mShowIconDay7) |
1014 | day7_action->addTo( iconToolBar ); | 1016 | day7_action->addTo( iconToolBar ); |
1015 | if (p-> mShowIconDay6) | 1017 | if (p-> mShowIconDay6) |
1016 | day6_action->addTo( iconToolBar ); | 1018 | day6_action->addTo( iconToolBar ); |
1017 | if (p-> mShowIconMonth) | 1019 | if (p-> mShowIconMonth) |
1018 | month_action->addTo( iconToolBar ); | 1020 | month_action->addTo( iconToolBar ); |
1019 | if (p-> mShowIconTodoview) | 1021 | if (p-> mShowIconTodoview) |
1020 | todoview_action->addTo( iconToolBar ); | 1022 | todoview_action->addTo( iconToolBar ); |
1021 | if (p-> mShowIconJournal) | 1023 | if (p-> mShowIconJournal) |
1022 | viewjournal_action->addTo( iconToolBar ); | 1024 | viewjournal_action->addTo( iconToolBar ); |
1023 | icon = loadPixmap( pathString + "2leftarrowB" ); | 1025 | icon = loadPixmap( pathString + "2leftarrowB" ); |
1024 | configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200, 14); | 1026 | configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200, 14); |
1025 | if (p-> mShowIconBackFast) { | 1027 | if (p-> mShowIconBackFast) { |
1026 | action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this ); | 1028 | action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this ); |
1027 | connect( action, SIGNAL( activated() ), | 1029 | connect( action, SIGNAL( activated() ), |
1028 | mView, SLOT( goPreviousMonth() ) ); | 1030 | mView, SLOT( goPreviousMonth() ) ); |
1029 | action->addTo( iconToolBar ); | 1031 | action->addTo( iconToolBar ); |
1030 | } | 1032 | } |
1031 | icon = loadPixmap( pathString + "1leftarrowB" ); | 1033 | icon = loadPixmap( pathString + "1leftarrowB" ); |
1032 | configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210,15); | 1034 | configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210,15); |
1033 | if (p-> mShowIconBack) { | 1035 | if (p-> mShowIconBack) { |
1034 | action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this ); | 1036 | action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this ); |
1035 | connect( action, SIGNAL( activated() ), | 1037 | connect( action, SIGNAL( activated() ), |
1036 | mView, SLOT( goPrevious() ) ); | 1038 | mView, SLOT( goPrevious() ) ); |
1037 | action->addTo( iconToolBar ); | 1039 | action->addTo( iconToolBar ); |
1038 | } | 1040 | } |
1039 | icon = loadPixmap( pathString + "today" ); | 1041 | icon = loadPixmap( pathString + "today" ); |
1040 | configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130); | 1042 | configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130); |
1041 | if (p-> mShowIconToday) | 1043 | if (p-> mShowIconToday) |
1042 | today_action->addTo( iconToolBar ); | 1044 | today_action->addTo( iconToolBar ); |
1043 | icon = loadPixmap( pathString + "1rightarrowB" ); | 1045 | icon = loadPixmap( pathString + "1rightarrowB" ); |
1044 | configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220); | 1046 | configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220); |
1045 | if (p-> mShowIconForward) { | 1047 | if (p-> mShowIconForward) { |
1046 | action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this ); | 1048 | action = new QAction( i18n("Go forward"), icon, i18n("Go forward"),0 , this ); |
1047 | connect( action, SIGNAL( activated() ), | 1049 | connect( action, SIGNAL( activated() ), |
1048 | mView, SLOT( goNext() ) ); | 1050 | mView, SLOT( goNext() ) ); |
1049 | action->addTo( iconToolBar ); | 1051 | action->addTo( iconToolBar ); |
1050 | } | 1052 | } |
@@ -1061,98 +1063,96 @@ void MainWindow::initActions() | |||
1061 | configureToolBarMenu->insertItem(i18n("What's This?"), 300); | 1063 | configureToolBarMenu->insertItem(i18n("What's This?"), 300); |
1062 | 1064 | ||
1063 | if (p-> mShowIconNewEvent) | 1065 | if (p-> mShowIconNewEvent) |
1064 | configureToolBarMenu->setItemChecked( 10, true ); | 1066 | configureToolBarMenu->setItemChecked( 10, true ); |
1065 | if (p->mShowIconNewTodo ) | 1067 | if (p->mShowIconNewTodo ) |
1066 | configureToolBarMenu->setItemChecked( 20, true ); | 1068 | configureToolBarMenu->setItemChecked( 20, true ); |
1067 | if (p-> mShowIconSearch) | 1069 | if (p-> mShowIconSearch) |
1068 | configureToolBarMenu->setItemChecked( 120, true ); | 1070 | configureToolBarMenu->setItemChecked( 120, true ); |
1069 | if (p-> mShowIconList) | 1071 | if (p-> mShowIconList) |
1070 | configureToolBarMenu->setItemChecked( 30, true ); | 1072 | configureToolBarMenu->setItemChecked( 30, true ); |
1071 | if (p-> mShowIconDay1) | 1073 | if (p-> mShowIconDay1) |
1072 | configureToolBarMenu->setItemChecked( 40, true ); | 1074 | configureToolBarMenu->setItemChecked( 40, true ); |
1073 | if (p-> mShowIconDay5) | 1075 | if (p-> mShowIconDay5) |
1074 | configureToolBarMenu->setItemChecked( 50, true ); | 1076 | configureToolBarMenu->setItemChecked( 50, true ); |
1075 | if (p-> mShowIconDay6) | 1077 | if (p-> mShowIconDay6) |
1076 | configureToolBarMenu->setItemChecked( 75, true ); | 1078 | configureToolBarMenu->setItemChecked( 75, true ); |
1077 | if (p-> mShowIconDay7) | 1079 | if (p-> mShowIconDay7) |
1078 | configureToolBarMenu->setItemChecked( 60, true ); | 1080 | configureToolBarMenu->setItemChecked( 60, true ); |
1079 | if (p-> mShowIconMonth) | 1081 | if (p-> mShowIconMonth) |
1080 | configureToolBarMenu->setItemChecked( 70, true ); | 1082 | configureToolBarMenu->setItemChecked( 70, true ); |
1081 | if (p-> mShowIconTodoview) | 1083 | if (p-> mShowIconTodoview) |
1082 | configureToolBarMenu->setItemChecked( 80, true ); | 1084 | configureToolBarMenu->setItemChecked( 80, true ); |
1083 | if (p-> mShowIconBackFast) | 1085 | if (p-> mShowIconBackFast) |
1084 | configureToolBarMenu->setItemChecked( 200, true ); | 1086 | configureToolBarMenu->setItemChecked( 200, true ); |
1085 | if (p-> mShowIconBack) | 1087 | if (p-> mShowIconBack) |
1086 | configureToolBarMenu->setItemChecked( 210, true ); | 1088 | configureToolBarMenu->setItemChecked( 210, true ); |
1087 | if (p-> mShowIconToday) | 1089 | if (p-> mShowIconToday) |
1088 | configureToolBarMenu->setItemChecked( 130, true ); | 1090 | configureToolBarMenu->setItemChecked( 130, true ); |
1089 | if (p-> mShowIconForward) | 1091 | if (p-> mShowIconForward) |
1090 | configureToolBarMenu->setItemChecked( 220, true ); | 1092 | configureToolBarMenu->setItemChecked( 220, true ); |
1091 | if (p-> mShowIconForwardFast) | 1093 | if (p-> mShowIconForwardFast) |
1092 | configureToolBarMenu->setItemChecked( 230, true ); | 1094 | configureToolBarMenu->setItemChecked( 230, true ); |
1093 | if (p-> mShowIconNextDays) | 1095 | if (p-> mShowIconNextDays) |
1094 | configureToolBarMenu->setItemChecked( 100, true ); | 1096 | configureToolBarMenu->setItemChecked( 100, true ); |
1095 | if (p-> mShowIconNext) | 1097 | if (p-> mShowIconNext) |
1096 | configureToolBarMenu->setItemChecked( 110, true ); | 1098 | configureToolBarMenu->setItemChecked( 110, true ); |
1097 | if (p-> mShowIconJournal) | 1099 | if (p-> mShowIconJournal) |
1098 | configureToolBarMenu->setItemChecked( 90, true ); | 1100 | configureToolBarMenu->setItemChecked( 90, true ); |
1099 | if (p-> mShowIconWhatsThis) | 1101 | if (p-> mShowIconWhatsThis) |
1100 | configureToolBarMenu->setItemChecked( 300, true ); | 1102 | configureToolBarMenu->setItemChecked( 300, true ); |
1101 | if (p-> mShowIconWeekNum) | 1103 | if (p-> mShowIconWeekNum) |
1102 | configureToolBarMenu->setItemChecked( 400, true ); | 1104 | configureToolBarMenu->setItemChecked( 400, true ); |
1103 | QLabel* dummy = new QLabel( iconToolBar ); | 1105 | QLabel* dummy = new QLabel( iconToolBar ); |
1104 | dummy->setBackgroundColor( iconToolBar->backgroundColor() ); | 1106 | dummy->setBackgroundColor( iconToolBar->backgroundColor() ); |
1105 | if (!p-> mShowIconStretch) | 1107 | if (!p-> mShowIconStretch) |
1106 | iconToolBar->setStretchableWidget ( dummy ) ; | 1108 | iconToolBar->setStretchableWidget ( dummy ) ; |
1107 | else | 1109 | else |
1108 | configureToolBarMenu->setItemChecked( 5, true ); | 1110 | configureToolBarMenu->setItemChecked( 5, true ); |
1109 | if (p-> mShowIconWhatsThis) | ||
1110 | QWhatsThis::whatsThisButton ( iconToolBar ); | ||
1111 | connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) ); | 1111 | connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) ); |
1112 | configureAgenda( p->mHourSize ); | 1112 | configureAgenda( p->mHourSize ); |
1113 | connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) ); | 1113 | connect( configureAgendaMenu, SIGNAL( activated( int ) ),this, SLOT(configureAgenda( int ) ) ); |
1114 | } | 1114 | } |
1115 | 1115 | ||
1116 | void MainWindow::exportToPhone( int mode ) | 1116 | void MainWindow::exportToPhone( int mode ) |
1117 | { | 1117 | { |
1118 | 1118 | ||
1119 | //ex2phone->insertItem(i18n("Complete calendar..."), 1 ); | 1119 | //ex2phone->insertItem(i18n("Complete calendar..."), 1 ); |
1120 | //ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); | 1120 | //ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); |
1121 | KOex2phonePrefs ex2phone; | 1121 | KOex2phonePrefs ex2phone; |
1122 | 1122 | ||
1123 | ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection ); | 1123 | ex2phone.mPhoneConnection->setText( KPimGlobalPrefs::instance()->mEx2PhoneConnection ); |
1124 | ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice ); | 1124 | ex2phone.mPhoneDevice->setText( KPimGlobalPrefs::instance()->mEx2PhoneDevice ); |
1125 | ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel ); | 1125 | ex2phone.mPhoneModel->setText( KPimGlobalPrefs::instance()->mEx2PhoneModel ); |
1126 | if ( mode == 1 ) | 1126 | if ( mode == 1 ) |
1127 | ex2phone.setCaption(i18n("Export complete calendar")); | 1127 | ex2phone.setCaption(i18n("Export complete calendar")); |
1128 | if ( mode == 2 ) | 1128 | if ( mode == 2 ) |
1129 | ex2phone.setCaption(i18n("Export filtered calendar")); | 1129 | ex2phone.setCaption(i18n("Export filtered calendar")); |
1130 | 1130 | ||
1131 | if ( !ex2phone.exec() ) { | 1131 | if ( !ex2phone.exec() ) { |
1132 | return; | 1132 | return; |
1133 | } | 1133 | } |
1134 | KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); | 1134 | KPimGlobalPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); |
1135 | KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text(); | 1135 | KPimGlobalPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text(); |
1136 | KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text(); | 1136 | KPimGlobalPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text(); |
1137 | 1137 | ||
1138 | int inFuture = 0; | 1138 | int inFuture = 0; |
1139 | if ( ex2phone.mWriteBackFuture->isChecked() ) | 1139 | if ( ex2phone.mWriteBackFuture->isChecked() ) |
1140 | inFuture = ex2phone.mWriteBackFutureWeeks->value(); | 1140 | inFuture = ex2phone.mWriteBackFutureWeeks->value(); |
1141 | QPtrList<Incidence> delSel; | 1141 | QPtrList<Incidence> delSel; |
1142 | if ( mode == 1 ) | 1142 | if ( mode == 1 ) |
1143 | delSel = mCalendar->rawIncidences(); | 1143 | delSel = mCalendar->rawIncidences(); |
1144 | if ( mode == 2 ) | 1144 | if ( mode == 2 ) |
1145 | delSel = mCalendar->incidences(); | 1145 | delSel = mCalendar->incidences(); |
1146 | CalendarLocal* cal = new CalendarLocal(); | 1146 | CalendarLocal* cal = new CalendarLocal(); |
1147 | cal->setLocalTime(); | 1147 | cal->setLocalTime(); |
1148 | Incidence *incidence = delSel.first(); | 1148 | Incidence *incidence = delSel.first(); |
1149 | QDateTime cur = QDateTime::currentDateTime().addDays( -7 ); | 1149 | QDateTime cur = QDateTime::currentDateTime().addDays( -7 ); |
1150 | QDateTime end = cur.addDays( ( inFuture +1 ) *7 ); | 1150 | QDateTime end = cur.addDays( ( inFuture +1 ) *7 ); |
1151 | while ( incidence ) { | 1151 | while ( incidence ) { |
1152 | if ( incidence->type() != "Journal" ) { | 1152 | if ( incidence->type() != "Journal" ) { |
1153 | bool add = true; | 1153 | bool add = true; |
1154 | if ( inFuture ) { | 1154 | if ( inFuture ) { |
1155 | QDateTime dt; | 1155 | QDateTime dt; |
1156 | if ( incidence->type() == "Todo" ) { | 1156 | if ( incidence->type() == "Todo" ) { |
1157 | Todo * t = (Todo*)incidence; | 1157 | Todo * t = (Todo*)incidence; |
1158 | if ( t->hasDueDate() ) | 1158 | if ( t->hasDueDate() ) |