-rw-r--r-- | korganizer/mainwindow.cpp | 10 | ||||
-rw-r--r-- | korganizer/mainwindow.h | 1 |
2 files changed, 10 insertions, 1 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index ffc4d9a..8e5d108 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -993,193 +993,197 @@ void MainWindow::initActions() | |||
993 | connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) ); | 993 | connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) ); |
994 | importMenu->insertSeparator(); | 994 | importMenu->insertSeparator(); |
995 | importMenu->insertItem( i18n("Import"), importMenu_X ); | 995 | importMenu->insertItem( i18n("Import"), importMenu_X ); |
996 | //importMenu->insertSeparator(); | 996 | //importMenu->insertSeparator(); |
997 | action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0, | 997 | action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0, |
998 | this ); | 998 | this ); |
999 | action->addTo( exportMenu_X ); | 999 | action->addTo( exportMenu_X ); |
1000 | connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) ); | 1000 | connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) ); |
1001 | 1001 | ||
1002 | 1002 | ||
1003 | //LR | 1003 | //LR |
1004 | QPopupMenu *ex2phone = new QPopupMenu( this ); | 1004 | QPopupMenu *ex2phone = new QPopupMenu( this ); |
1005 | ex2phone->insertItem(i18n("Complete calendar..."), 1 ); | 1005 | ex2phone->insertItem(i18n("Complete calendar..."), 1 ); |
1006 | ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); | 1006 | ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); |
1007 | connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) ); | 1007 | connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) ); |
1008 | exportMenu_X->insertItem( i18n("Export to phone"), ex2phone ); | 1008 | exportMenu_X->insertItem( i18n("Export to phone"), ex2phone ); |
1009 | 1009 | ||
1010 | importMenu->insertItem( i18n("Export"), exportMenu_X ); | 1010 | importMenu->insertItem( i18n("Export"), exportMenu_X ); |
1011 | #ifndef DESKTOP_VERSION | 1011 | #ifndef DESKTOP_VERSION |
1012 | //importMenu->insertSeparator(); | 1012 | //importMenu->insertSeparator(); |
1013 | brAction = new QAction( "beam toggle", i18n("Beam receive enabled"), 0, | 1013 | brAction = new QAction( "beam toggle", i18n("Beam receive enabled"), 0, |
1014 | this ); | 1014 | this ); |
1015 | brAction->addTo( beamMenu_X ); | 1015 | brAction->addTo( beamMenu_X ); |
1016 | brAction->setToggleAction (true ) ; | 1016 | brAction->setToggleAction (true ) ; |
1017 | connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) ); | 1017 | connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) ); |
1018 | 1018 | ||
1019 | action = new QAction( "beam all", i18n("Beam complete calendar..."), 0, | 1019 | action = new QAction( "beam all", i18n("Beam complete calendar..."), 0, |
1020 | this ); | 1020 | this ); |
1021 | action->addTo( beamMenu_X ); | 1021 | action->addTo( beamMenu_X ); |
1022 | connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) ); | 1022 | connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) ); |
1023 | 1023 | ||
1024 | action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, | 1024 | action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, |
1025 | this ); | 1025 | this ); |
1026 | action->addTo( beamMenu_X ); | 1026 | action->addTo( beamMenu_X ); |
1027 | connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) ); | 1027 | connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) ); |
1028 | importMenu->insertItem( i18n("Beam"), beamMenu_X ); | 1028 | importMenu->insertItem( i18n("Beam"), beamMenu_X ); |
1029 | #else | 1029 | #else |
1030 | //importMenu->insertSeparator(); | 1030 | //importMenu->insertSeparator(); |
1031 | icon = loadPixmap( pathString + "print" ); | 1031 | icon = loadPixmap( pathString + "print" ); |
1032 | action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); | 1032 | action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); |
1033 | action->addTo( beamMenu_X ); | 1033 | action->addTo( beamMenu_X ); |
1034 | connect( action, SIGNAL( activated() ), | 1034 | connect( action, SIGNAL( activated() ), |
1035 | this, SLOT( printCal() ) ); | 1035 | this, SLOT( printCal() ) ); |
1036 | 1036 | ||
1037 | icon = loadPixmap( pathString + "print" ); | 1037 | icon = loadPixmap( pathString + "print" ); |
1038 | action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); | 1038 | action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); |
1039 | action->addTo( beamMenu_X ); | 1039 | action->addTo( beamMenu_X ); |
1040 | connect( action, SIGNAL( activated() ), | 1040 | connect( action, SIGNAL( activated() ), |
1041 | this, SLOT( printSel() ) ); | 1041 | this, SLOT( printSel() ) ); |
1042 | action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this ); | 1042 | action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this ); |
1043 | action->addTo( beamMenu_X ); | 1043 | action->addTo( beamMenu_X ); |
1044 | connect( action, SIGNAL( activated() ), | 1044 | connect( action, SIGNAL( activated() ), |
1045 | mView->viewManager(), SLOT( slotprintWNV() ) ); | 1045 | mView->viewManager(), SLOT( slotprintWNV() ) ); |
1046 | 1046 | ||
1047 | action = new QAction( i18n("Print selected event / todo..."),icon,i18n("Print selected event / todo..."), 0, this ); | 1047 | action = new QAction( i18n("Print selected event / todo..."),icon,i18n("Print selected event / todo..."), 0, this ); |
1048 | action->addTo( beamMenu_X ); | 1048 | action->addTo( beamMenu_X ); |
1049 | connect( action, SIGNAL( activated() ), | 1049 | connect( action, SIGNAL( activated() ), |
1050 | mView, SLOT( slotprintSelInc() ) ); | 1050 | mView, SLOT( slotprintSelInc() ) ); |
1051 | 1051 | ||
1052 | 1052 | ||
1053 | importMenu->insertItem( i18n("Print"), beamMenu_X ); | 1053 | importMenu->insertItem( i18n("Print"), beamMenu_X ); |
1054 | #endif | 1054 | #endif |
1055 | importMenu->insertSeparator(); | 1055 | importMenu->insertSeparator(); |
1056 | action = new QAction( "manage cat", i18n("Manage new categories..."), 0, | 1056 | action = new QAction( "manage cat", i18n("Manage new categories..."), 0, |
1057 | this ); | 1057 | this ); |
1058 | action->addTo( importMenu ); | 1058 | action->addTo( importMenu ); |
1059 | connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); | 1059 | connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); |
1060 | importMenu->insertSeparator(); | 1060 | importMenu->insertSeparator(); |
1061 | action = new QAction( "beam all", i18n("Save"), 0, | 1061 | action = new QAction( "beam all", i18n("Save"), 0, |
1062 | this ); | 1062 | this ); |
1063 | action->addTo( importMenu ); | 1063 | action->addTo( importMenu ); |
1064 | connect( action, SIGNAL( activated() ), this, SLOT( save() ) ); | 1064 | connect( action, SIGNAL( activated() ), this, SLOT( save() ) ); |
1065 | action = new QAction( "beam all", i18n("Exit (+save)"), 0, | 1065 | action = new QAction( "beam all", i18n("Exit (+save)"), 0, |
1066 | this ); | 1066 | this ); |
1067 | action->addTo( importMenu ); | 1067 | action->addTo( importMenu ); |
1068 | connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); | 1068 | connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); |
1069 | 1069 | ||
1070 | //menuBar->insertItem( "Configure",configureMenu ); | 1070 | //menuBar->insertItem( "Configure",configureMenu ); |
1071 | //configureMenu->insertItem( "Toolbar",configureToolBarMenu ); | 1071 | //configureMenu->insertItem( "Toolbar",configureToolBarMenu ); |
1072 | icon = loadPixmap( "korganizer/korganizer" ); | 1072 | icon = loadPixmap( "korganizer/korganizer" ); |
1073 | 1073 | ||
1074 | action = new QAction( "Whats New", i18n("What's new?"), 0,this ); | 1074 | action = new QAction( "Whats New", i18n("What's new?"), 0,this ); |
1075 | action->addTo( helpMenu ); | 1075 | action->addTo( helpMenu ); |
1076 | connect( action, SIGNAL( activated() ), | 1076 | connect( action, SIGNAL( activated() ), |
1077 | SLOT( whatsNew() ) ); | 1077 | SLOT( whatsNew() ) ); |
1078 | action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this ); | 1078 | action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this ); |
1079 | action->addTo( helpMenu ); | 1079 | action->addTo( helpMenu ); |
1080 | connect( action, SIGNAL( activated() ), | 1080 | connect( action, SIGNAL( activated() ), |
1081 | SLOT( features() ) ); | 1081 | SLOT( features() ) ); |
1082 | action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); | 1082 | action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); |
1083 | action->addTo( helpMenu ); | 1083 | action->addTo( helpMenu ); |
1084 | connect( action, SIGNAL( activated() ), | 1084 | connect( action, SIGNAL( activated() ), |
1085 | SLOT( keyBindings() ) ); | 1085 | SLOT( keyBindings() ) ); |
1086 | action = new QAction( "Storage Howto", i18n("Storage HowTo..."), 0,this ); | 1086 | action = new QAction( "Storage Howto", i18n("Storage HowTo..."), 0,this ); |
1087 | action->addTo( helpMenu ); | 1087 | action->addTo( helpMenu ); |
1088 | connect( action, SIGNAL( activated() ), | 1088 | connect( action, SIGNAL( activated() ), |
1089 | SLOT( storagehowto() ) ); | 1089 | SLOT( storagehowto() ) ); |
1090 | action = new QAction( "Timetracking Howto", i18n("Timetracking HowTo..."), 0,this ); | ||
1091 | action->addTo( helpMenu ); | ||
1092 | connect( action, SIGNAL( activated() ), | ||
1093 | SLOT( timetrackinghowto() ) ); | ||
1090 | action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this ); | 1094 | action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this ); |
1091 | action->addTo( helpMenu ); | 1095 | action->addTo( helpMenu ); |
1092 | connect( action, SIGNAL( activated() ), | 1096 | connect( action, SIGNAL( activated() ), |
1093 | SLOT( synchowto() ) ); | 1097 | SLOT( synchowto() ) ); |
1094 | action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this ); | 1098 | action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this ); |
1095 | action->addTo( helpMenu ); | 1099 | action->addTo( helpMenu ); |
1096 | connect( action, SIGNAL( activated() ), | 1100 | connect( action, SIGNAL( activated() ), |
1097 | SLOT( kdesynchowto() ) ); | 1101 | SLOT( kdesynchowto() ) ); |
1098 | action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this ); | 1102 | action = new QAction( "Multi Sync Howto", i18n("Multi Sync HowTo..."), 0,this ); |
1099 | action->addTo( helpMenu ); | 1103 | action->addTo( helpMenu ); |
1100 | connect( action, SIGNAL( activated() ), | 1104 | connect( action, SIGNAL( activated() ), |
1101 | SLOT( multisynchowto() ) ); | 1105 | SLOT( multisynchowto() ) ); |
1102 | action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this ); | 1106 | action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this ); |
1103 | action->addTo( helpMenu ); | 1107 | action->addTo( helpMenu ); |
1104 | connect( action, SIGNAL( activated() ), | 1108 | connect( action, SIGNAL( activated() ), |
1105 | SLOT( aboutAutoSaving() ) ); | 1109 | SLOT( aboutAutoSaving() ) ); |
1106 | action = new QAction( "Problemd", i18n("Known Problems..."), 0,this ); | 1110 | action = new QAction( "Problemd", i18n("Known Problems..."), 0,this ); |
1107 | action->addTo( helpMenu ); | 1111 | action->addTo( helpMenu ); |
1108 | connect( action, SIGNAL( activated() ), | 1112 | connect( action, SIGNAL( activated() ), |
1109 | SLOT( aboutKnownBugs() ) ); | 1113 | SLOT( aboutKnownBugs() ) ); |
1110 | action = new QAction( "Translate Howto", i18n("User translation..."), 0,this ); | 1114 | action = new QAction( "Translate Howto", i18n("User translation..."), 0,this ); |
1111 | action->addTo( helpMenu ); | 1115 | action->addTo( helpMenu ); |
1112 | connect( action, SIGNAL( activated() ), | 1116 | connect( action, SIGNAL( activated() ), |
1113 | SLOT( usertrans() ) ); | 1117 | SLOT( usertrans() ) ); |
1114 | action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this ); | 1118 | action = new QAction( "Frequently asked questions", i18n("FAQ..."), 0,this ); |
1115 | action->addTo( helpMenu ); | 1119 | action->addTo( helpMenu ); |
1116 | connect( action, SIGNAL( activated() ), | 1120 | connect( action, SIGNAL( activated() ), |
1117 | SLOT( faq() ) ); | 1121 | SLOT( faq() ) ); |
1118 | action = new QAction( "licence", i18n("Licence..."), 0, this ); | 1122 | action = new QAction( "licence", i18n("Licence..."), 0, this ); |
1119 | action->addTo( helpMenu ); | 1123 | action->addTo( helpMenu ); |
1120 | connect( action, SIGNAL( activated() ), | 1124 | connect( action, SIGNAL( activated() ), |
1121 | SLOT( licence() ) ); | 1125 | SLOT( licence() ) ); |
1122 | action = new QAction( "about", i18n("About..."), 0, this ); | 1126 | action = new QAction( "about", i18n("About..."), 0, this ); |
1123 | action->addTo( helpMenu ); | 1127 | action->addTo( helpMenu ); |
1124 | connect( action, SIGNAL( activated() ), | 1128 | connect( action, SIGNAL( activated() ), |
1125 | SLOT( about() ) ); | 1129 | SLOT( about() ) ); |
1126 | //menuBar->insertSeparator(); | 1130 | //menuBar->insertSeparator(); |
1127 | 1131 | ||
1128 | // ****************************************************** | 1132 | // ****************************************************** |
1129 | // menubar icons | 1133 | // menubar icons |
1130 | 1134 | ||
1131 | 1135 | ||
1132 | 1136 | ||
1133 | //menuBar->insertItem( iconToolBar ); | 1137 | //menuBar->insertItem( iconToolBar ); |
1134 | //xdays_action | 1138 | //xdays_action |
1135 | if (p-> mShowIconNewEvent) | 1139 | if (p-> mShowIconNewEvent) |
1136 | ne_action->addTo( iconToolBar ); | 1140 | ne_action->addTo( iconToolBar ); |
1137 | if (p->mShowIconNewTodo ) | 1141 | if (p->mShowIconNewTodo ) |
1138 | nt_action->addTo( iconToolBar ); | 1142 | nt_action->addTo( iconToolBar ); |
1139 | if (p-> mShowIconSearch) | 1143 | if (p-> mShowIconSearch) |
1140 | search_action->addTo( iconToolBar ); | 1144 | search_action->addTo( iconToolBar ); |
1141 | if (p-> mShowIconWhatsThis) | 1145 | if (p-> mShowIconWhatsThis) |
1142 | QWhatsThis::whatsThisButton ( iconToolBar ); | 1146 | QWhatsThis::whatsThisButton ( iconToolBar ); |
1143 | if (p-> mShowIconNext) | 1147 | if (p-> mShowIconNext) |
1144 | whatsnext_action->addTo( viewToolBar ); | 1148 | whatsnext_action->addTo( viewToolBar ); |
1145 | if (p-> mShowIconNextDays) | 1149 | if (p-> mShowIconNextDays) |
1146 | xdays_action->addTo( viewToolBar ); | 1150 | xdays_action->addTo( viewToolBar ); |
1147 | if (p-> mShowIconJournal) | 1151 | if (p-> mShowIconJournal) |
1148 | viewjournal_action->addTo( viewToolBar ); | 1152 | viewjournal_action->addTo( viewToolBar ); |
1149 | if (p-> mShowIconDay1) | 1153 | if (p-> mShowIconDay1) |
1150 | day1_action->addTo( viewToolBar ); | 1154 | day1_action->addTo( viewToolBar ); |
1151 | if (p-> mShowIconDay5) | 1155 | if (p-> mShowIconDay5) |
1152 | day5_action->addTo( viewToolBar ); | 1156 | day5_action->addTo( viewToolBar ); |
1153 | if (p-> mShowIconDay7) | 1157 | if (p-> mShowIconDay7) |
1154 | day7_action->addTo( viewToolBar ); | 1158 | day7_action->addTo( viewToolBar ); |
1155 | if (p-> mShowIconDay6) | 1159 | if (p-> mShowIconDay6) |
1156 | day6_action->addTo( viewToolBar ); | 1160 | day6_action->addTo( viewToolBar ); |
1157 | if (p-> mShowIconMonth) | 1161 | if (p-> mShowIconMonth) |
1158 | month_action->addTo( viewToolBar ); | 1162 | month_action->addTo( viewToolBar ); |
1159 | if (p-> mShowIconList) | 1163 | if (p-> mShowIconList) |
1160 | showlist_action->addTo( viewToolBar ); | 1164 | showlist_action->addTo( viewToolBar ); |
1161 | if (p-> mShowIconTodoview) | 1165 | if (p-> mShowIconTodoview) |
1162 | todoview_action->addTo( viewToolBar ); | 1166 | todoview_action->addTo( viewToolBar ); |
1163 | 1167 | ||
1164 | icon = loadPixmap( pathString + "2leftarrowB" ); | 1168 | icon = loadPixmap( pathString + "2leftarrowB" ); |
1165 | configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200); | 1169 | configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200); |
1166 | if (p-> mShowIconBackFast) { | 1170 | if (p-> mShowIconBackFast) { |
1167 | action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this ); | 1171 | action = new QAction( i18n("Prev. month"), icon, i18n("Prev. month"),0 , this ); |
1168 | connect( action, SIGNAL( activated() ), | 1172 | connect( action, SIGNAL( activated() ), |
1169 | mView, SLOT( goPreviousMonth() ) ); | 1173 | mView, SLOT( goPreviousMonth() ) ); |
1170 | action->addTo( navigatorToolBar ); | 1174 | action->addTo( navigatorToolBar ); |
1171 | } | 1175 | } |
1172 | icon = loadPixmap( pathString + "1leftarrowB" ); | 1176 | icon = loadPixmap( pathString + "1leftarrowB" ); |
1173 | configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210); | 1177 | configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210); |
1174 | if (p-> mShowIconBack) { | 1178 | if (p-> mShowIconBack) { |
1175 | action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this ); | 1179 | action = new QAction( i18n("Go backward"), icon, i18n("Go backward"),0 , this ); |
1176 | connect( action, SIGNAL( activated() ), | 1180 | connect( action, SIGNAL( activated() ), |
1177 | mView, SLOT( goPrevious() ) ); | 1181 | mView, SLOT( goPrevious() ) ); |
1178 | action->addTo( navigatorToolBar ); | 1182 | action->addTo( navigatorToolBar ); |
1179 | } | 1183 | } |
1180 | icon = loadPixmap( pathString + "today" ); | 1184 | icon = loadPixmap( pathString + "today" ); |
1181 | configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130); | 1185 | configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130); |
1182 | if (p-> mShowIconToday) | 1186 | if (p-> mShowIconToday) |
1183 | today_action->addTo( navigatorToolBar ); | 1187 | today_action->addTo( navigatorToolBar ); |
1184 | icon = loadPixmap( pathString + "1rightarrowB" ); | 1188 | icon = loadPixmap( pathString + "1rightarrowB" ); |
1185 | configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220); | 1189 | configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220); |
@@ -1308,192 +1312,196 @@ void MainWindow::exportToPhone( int mode ) | |||
1308 | CalendarLocal* cal = new CalendarLocal(); | 1312 | CalendarLocal* cal = new CalendarLocal(); |
1309 | cal->setLocalTime(); | 1313 | cal->setLocalTime(); |
1310 | Incidence *incidence = delSel.first(); | 1314 | Incidence *incidence = delSel.first(); |
1311 | QDateTime cur = QDateTime::currentDateTime().addDays( -7 ); | 1315 | QDateTime cur = QDateTime::currentDateTime().addDays( -7 ); |
1312 | QDateTime end = cur.addDays( ( inFuture +1 ) *7 ); | 1316 | QDateTime end = cur.addDays( ( inFuture +1 ) *7 ); |
1313 | while ( incidence ) { | 1317 | while ( incidence ) { |
1314 | if ( incidence->type() != "Journal" ) { | 1318 | if ( incidence->type() != "Journal" ) { |
1315 | bool add = true; | 1319 | bool add = true; |
1316 | if ( inFuture ) { | 1320 | if ( inFuture ) { |
1317 | QDateTime dt; | 1321 | QDateTime dt; |
1318 | if ( incidence->type() == "Todo" ) { | 1322 | if ( incidence->type() == "Todo" ) { |
1319 | Todo * t = (Todo*)incidence; | 1323 | Todo * t = (Todo*)incidence; |
1320 | if ( t->hasDueDate() ) | 1324 | if ( t->hasDueDate() ) |
1321 | dt = t->dtDue(); | 1325 | dt = t->dtDue(); |
1322 | else | 1326 | else |
1323 | dt = cur.addSecs( 62 ); | 1327 | dt = cur.addSecs( 62 ); |
1324 | } | 1328 | } |
1325 | else { | 1329 | else { |
1326 | bool ok; | 1330 | bool ok; |
1327 | dt = incidence->getNextOccurence( cur, &ok ); | 1331 | dt = incidence->getNextOccurence( cur, &ok ); |
1328 | if ( !ok ) | 1332 | if ( !ok ) |
1329 | dt = cur.addSecs( -62 ); | 1333 | dt = cur.addSecs( -62 ); |
1330 | } | 1334 | } |
1331 | if ( dt < cur || dt > end ) { | 1335 | if ( dt < cur || dt > end ) { |
1332 | add = false; | 1336 | add = false; |
1333 | } | 1337 | } |
1334 | } | 1338 | } |
1335 | if ( add ) { | 1339 | if ( add ) { |
1336 | Incidence *in = incidence->clone(); | 1340 | Incidence *in = incidence->clone(); |
1337 | cal->addIncidence( in ); | 1341 | cal->addIncidence( in ); |
1338 | } | 1342 | } |
1339 | } | 1343 | } |
1340 | incidence = delSel.next(); | 1344 | incidence = delSel.next(); |
1341 | } | 1345 | } |
1342 | PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, | 1346 | PhoneAccess::writeConfig( KPimGlobalPrefs::instance()->mEx2PhoneDevice, |
1343 | KPimGlobalPrefs::instance()->mEx2PhoneConnection, | 1347 | KPimGlobalPrefs::instance()->mEx2PhoneConnection, |
1344 | KPimGlobalPrefs::instance()->mEx2PhoneModel ); | 1348 | KPimGlobalPrefs::instance()->mEx2PhoneModel ); |
1345 | 1349 | ||
1346 | setCaption( i18n("Writing to phone...")); | 1350 | setCaption( i18n("Writing to phone...")); |
1347 | if ( PhoneFormat::writeToPhone( cal ) ) | 1351 | if ( PhoneFormat::writeToPhone( cal ) ) |
1348 | setCaption( i18n("Export to phone successful!")); | 1352 | setCaption( i18n("Export to phone successful!")); |
1349 | else | 1353 | else |
1350 | setCaption( i18n("Error exporting to phone!")); | 1354 | setCaption( i18n("Error exporting to phone!")); |
1351 | delete cal; | 1355 | delete cal; |
1352 | } | 1356 | } |
1353 | 1357 | ||
1354 | 1358 | ||
1355 | void MainWindow::setDefaultPreferences() | 1359 | void MainWindow::setDefaultPreferences() |
1356 | { | 1360 | { |
1357 | KOPrefs *p = KOPrefs::instance(); | 1361 | KOPrefs *p = KOPrefs::instance(); |
1358 | 1362 | ||
1359 | p->mCompactDialogs = true; | 1363 | p->mCompactDialogs = true; |
1360 | p->mConfirm = true; | 1364 | p->mConfirm = true; |
1361 | // p->mEnableQuickTodo = false; | 1365 | // p->mEnableQuickTodo = false; |
1362 | 1366 | ||
1363 | } | 1367 | } |
1364 | 1368 | ||
1365 | QString MainWindow::resourcePath() | 1369 | QString MainWindow::resourcePath() |
1366 | { | 1370 | { |
1367 | return KGlobal::iconLoader()->iconPath(); | 1371 | return KGlobal::iconLoader()->iconPath(); |
1368 | } | 1372 | } |
1369 | 1373 | ||
1370 | void MainWindow::displayText( QString text ,QString cap ) | 1374 | void MainWindow::displayText( QString text ,QString cap ) |
1371 | { | 1375 | { |
1372 | QDialog dia( this, "name", true ); ; | 1376 | QDialog dia( this, "name", true ); ; |
1373 | dia.setCaption( cap ); | 1377 | dia.setCaption( cap ); |
1374 | QVBoxLayout* lay = new QVBoxLayout( &dia ); | 1378 | QVBoxLayout* lay = new QVBoxLayout( &dia ); |
1375 | lay->setSpacing( 3 ); | 1379 | lay->setSpacing( 3 ); |
1376 | lay->setMargin( 3 ); | 1380 | lay->setMargin( 3 ); |
1377 | QTextBrowser tb ( &dia ); | 1381 | QTextBrowser tb ( &dia ); |
1378 | lay->addWidget( &tb ); | 1382 | lay->addWidget( &tb ); |
1379 | tb.setText( text ); | 1383 | tb.setText( text ); |
1380 | #ifdef DESKTOP_VERSION | 1384 | #ifdef DESKTOP_VERSION |
1381 | dia.resize( 640, 480); | 1385 | dia.resize( 640, 480); |
1382 | #else | 1386 | #else |
1383 | dia.showMaximized(); | 1387 | dia.showMaximized(); |
1384 | #endif | 1388 | #endif |
1385 | dia.exec(); | 1389 | dia.exec(); |
1386 | } | 1390 | } |
1387 | 1391 | ||
1388 | void MainWindow::features() | 1392 | void MainWindow::features() |
1389 | { | 1393 | { |
1390 | 1394 | ||
1391 | KApplication::showFile( i18n("KO/Pi Features and hints"), "kdepim/korganizer/featuresKOPI.txt" ); | 1395 | KApplication::showFile( i18n("KO/Pi Features and hints"), "kdepim/korganizer/featuresKOPI.txt" ); |
1392 | } | 1396 | } |
1393 | 1397 | ||
1394 | void MainWindow::usertrans() | 1398 | void MainWindow::usertrans() |
1395 | { | 1399 | { |
1396 | 1400 | ||
1397 | KApplication::showFile( i18n("KO/Pi User translation HowTo"), "kdepim/korganizer/usertranslationHOWTO.txt" ); | 1401 | KApplication::showFile( i18n("KO/Pi User translation HowTo"), "kdepim/korganizer/usertranslationHOWTO.txt" ); |
1398 | } | 1402 | } |
1399 | 1403 | ||
1400 | void MainWindow::storagehowto() | 1404 | void MainWindow::storagehowto() |
1401 | { | 1405 | { |
1402 | KApplication::showFile( "KDE-Pim/Pi Storage HowTo", "kdepim/storagehowto.txt" ); | 1406 | KApplication::showFile( "KDE-Pim/Pi Storage HowTo", "kdepim/storagehowto.txt" ); |
1403 | } | 1407 | } |
1408 | void MainWindow::timetrackinghowto() | ||
1409 | { | ||
1410 | KApplication::showFile( "KO/Pi Timetracking HowTo", "kdepim/timetrackerhowto.txt" ); | ||
1411 | } | ||
1404 | void MainWindow::kdesynchowto() | 1412 | void MainWindow::kdesynchowto() |
1405 | { | 1413 | { |
1406 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" ); | 1414 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" ); |
1407 | } | 1415 | } |
1408 | void MainWindow::multisynchowto() | 1416 | void MainWindow::multisynchowto() |
1409 | { | 1417 | { |
1410 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" ); | 1418 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" ); |
1411 | } | 1419 | } |
1412 | void MainWindow::synchowto() | 1420 | void MainWindow::synchowto() |
1413 | { | 1421 | { |
1414 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); | 1422 | KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); |
1415 | } | 1423 | } |
1416 | void MainWindow::faq() | 1424 | void MainWindow::faq() |
1417 | { | 1425 | { |
1418 | KApplication::showFile( i18n("KO/Pi FAQ"), "kdepim/korganizer/kopiFAQ.txt" ); | 1426 | KApplication::showFile( i18n("KO/Pi FAQ"), "kdepim/korganizer/kopiFAQ.txt" ); |
1419 | 1427 | ||
1420 | } | 1428 | } |
1421 | void MainWindow::whatsNew() | 1429 | void MainWindow::whatsNew() |
1422 | { | 1430 | { |
1423 | KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" ); | 1431 | KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" ); |
1424 | 1432 | ||
1425 | } | 1433 | } |
1426 | void MainWindow::licence() | 1434 | void MainWindow::licence() |
1427 | { | 1435 | { |
1428 | KApplication::showLicence(); | 1436 | KApplication::showLicence(); |
1429 | 1437 | ||
1430 | } | 1438 | } |
1431 | void MainWindow::about() | 1439 | void MainWindow::about() |
1432 | { | 1440 | { |
1433 | QString version; | 1441 | QString version; |
1434 | #include <../version> | 1442 | #include <../version> |
1435 | QMessageBox::about( this, i18n("About KOrganizer/Pi"), | 1443 | QMessageBox::about( this, i18n("About KOrganizer/Pi"), |
1436 | i18n("KOrganizer/Platform-independent\n") + | 1444 | i18n("KOrganizer/Platform-independent\n") + |
1437 | "(KO/Pi) " + version + " - " + | 1445 | "(KO/Pi) " + version + " - " + |
1438 | 1446 | ||
1439 | #ifdef DESKTOP_VERSION | 1447 | #ifdef DESKTOP_VERSION |
1440 | i18n("Desktop Edition\n") + | 1448 | i18n("Desktop Edition\n") + |
1441 | #else | 1449 | #else |
1442 | i18n("PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n") + | 1450 | i18n("PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n") + |
1443 | #endif | 1451 | #endif |
1444 | i18n("(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!") ); | 1452 | i18n("(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!") ); |
1445 | } | 1453 | } |
1446 | void MainWindow::keyBindings() | 1454 | void MainWindow::keyBindings() |
1447 | { | 1455 | { |
1448 | QString cap = i18n("KO/Pi Keys + Colors"); | 1456 | QString cap = i18n("KO/Pi Keys + Colors"); |
1449 | QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") + | 1457 | QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") + |
1450 | i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+ | 1458 | i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+ |
1451 | i18n("<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n") + | 1459 | i18n("<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n") + |
1452 | i18n("<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n") + | 1460 | i18n("<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n") + |
1453 | i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") + | 1461 | i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") + |
1454 | i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+ | 1462 | i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+ |
1455 | i18n("<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n")+ | 1463 | i18n("<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n")+ |
1456 | i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+ | 1464 | i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+ |
1457 | i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+ | 1465 | i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+ |
1458 | i18n("<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ")+ | 1466 | i18n("<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ")+ |
1459 | i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+ | 1467 | i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+ |
1460 | i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+ | 1468 | i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+ |
1461 | i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+ | 1469 | i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+ |
1462 | i18n("<p><b>K</b>: Week view in Month view syle</p>\n")+ | 1470 | i18n("<p><b>K</b>: Week view in Month view syle</p>\n")+ |
1463 | i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+ | 1471 | i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+ |
1464 | i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+ | 1472 | i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+ |
1465 | i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n")+ | 1473 | i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n")+ |
1466 | i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+ | 1474 | i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+ |
1467 | i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+ | 1475 | i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+ |
1468 | i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+ | 1476 | i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+ |
1469 | i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+ | 1477 | i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+ |
1470 | i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+ | 1478 | i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+ |
1471 | i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+ | 1479 | i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+ |
1472 | i18n("<p><h3>In agenda view:</h3></p>\n") + | 1480 | i18n("<p><h3>In agenda view:</h3></p>\n") + |
1473 | i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+ | 1481 | i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+ |
1474 | i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+ | 1482 | i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+ |
1475 | i18n("<p><h3>In todo view:</h3></p>\n") + | 1483 | i18n("<p><h3>In todo view:</h3></p>\n") + |
1476 | i18n("<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n")+ | 1484 | i18n("<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n")+ |
1477 | i18n("<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n")+ | 1485 | i18n("<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n")+ |
1478 | i18n("<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n")+ | 1486 | i18n("<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n")+ |
1479 | i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+ | 1487 | i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+ |
1480 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ | 1488 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ |
1481 | i18n("<p><b>return</b>: Mark item as completed+one step down.</p>\n")+ | 1489 | i18n("<p><b>return</b>: Mark item as completed+one step down.</p>\n")+ |
1482 | i18n("<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n")+ | 1490 | i18n("<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n")+ |
1483 | i18n("<p><h3>In list view:</h3></p>\n") + | 1491 | i18n("<p><h3>In list view:</h3></p>\n") + |
1484 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ | 1492 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ |
1485 | i18n("<p><b>return</b>: Select item+one step down</p>\n")+ | 1493 | i18n("<p><b>return</b>: Select item+one step down</p>\n")+ |
1486 | i18n("<p><b>return+shift</b>: Deselect item+one step down</p>\n")+ | 1494 | i18n("<p><b>return+shift</b>: Deselect item+one step down</p>\n")+ |
1487 | i18n("<p><b>up/down</b>: Next/prev item</p>\n")+ | 1495 | i18n("<p><b>up/down</b>: Next/prev item</p>\n")+ |
1488 | i18n("<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n")+ | 1496 | i18n("<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n")+ |
1489 | i18n("<p><b>shift+up/down</b>: Goto first/last item</p>\n")+ | 1497 | i18n("<p><b>shift+up/down</b>: Goto first/last item</p>\n")+ |
1490 | i18n("<p><h3>In event/todo viewer:</h3></p>\n") + | 1498 | i18n("<p><h3>In event/todo viewer:</h3></p>\n") + |
1491 | i18n("<p><b>I,C</b>: Close dialog.</p>\n")+ | 1499 | i18n("<p><b>I,C</b>: Close dialog.</p>\n")+ |
1492 | i18n("<p><b>A</b>: Show agenda view.</p>\n")+ | 1500 | i18n("<p><b>A</b>: Show agenda view.</p>\n")+ |
1493 | i18n("<p><b>E</b>: Edit item</p>\n") + | 1501 | i18n("<p><b>E</b>: Edit item</p>\n") + |
1494 | i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") + | 1502 | i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") + |
1495 | i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") + | 1503 | i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") + |
1496 | i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+ | 1504 | i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+ |
1497 | i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+ | 1505 | i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+ |
1498 | i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+ | 1506 | i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+ |
1499 | i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+ | 1507 | i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+ |
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h index 3151f50..f2a6c60 100644 --- a/korganizer/mainwindow.h +++ b/korganizer/mainwindow.h | |||
@@ -1,166 +1,167 @@ | |||
1 | #ifndef KORGE_MAINWINDOW_H | 1 | #ifndef KORGE_MAINWINDOW_H |
2 | #define KORGE_MAINWINDOW_H | 2 | #define KORGE_MAINWINDOW_H |
3 | 3 | ||
4 | #include <qmainwindow.h> | 4 | #include <qmainwindow.h> |
5 | #include <qtimer.h> | 5 | #include <qtimer.h> |
6 | #include <qdict.h> | 6 | #include <qdict.h> |
7 | #include <qfile.h> | 7 | #include <qfile.h> |
8 | #include <qmenubar.h> | 8 | #include <qmenubar.h> |
9 | #include <qtextstream.h> | 9 | #include <qtextstream.h> |
10 | #include <qregexp.h> | 10 | #include <qregexp.h> |
11 | 11 | ||
12 | #include <libkcal/incidence.h> | 12 | #include <libkcal/incidence.h> |
13 | #include "simplealarmclient.h" | 13 | #include "simplealarmclient.h" |
14 | #include <ksyncmanager.h> | 14 | #include <ksyncmanager.h> |
15 | #ifndef DESKTOP_VERSION | 15 | #ifndef DESKTOP_VERSION |
16 | #include <qcopchannel_qws.h> | 16 | #include <qcopchannel_qws.h> |
17 | #endif | 17 | #endif |
18 | class QAction; | 18 | class QAction; |
19 | class CalendarView; | 19 | class CalendarView; |
20 | class KSyncProfile; | 20 | class KSyncProfile; |
21 | #ifdef DESKTOP_VERSION | 21 | #ifdef DESKTOP_VERSION |
22 | 22 | ||
23 | #define QPEToolBar QToolBar | 23 | #define QPEToolBar QToolBar |
24 | #define QPEMenuBar QMenuBar | 24 | #define QPEMenuBar QMenuBar |
25 | #endif | 25 | #endif |
26 | class QPEToolBar; | 26 | class QPEToolBar; |
27 | class QPEMenuBar; | 27 | class QPEMenuBar; |
28 | 28 | ||
29 | 29 | ||
30 | namespace KCal { | 30 | namespace KCal { |
31 | class CalendarLocal; | 31 | class CalendarLocal; |
32 | } | 32 | } |
33 | 33 | ||
34 | class KOMenuBar : public QMenuBar | 34 | class KOMenuBar : public QMenuBar |
35 | { | 35 | { |
36 | public: | 36 | public: |
37 | KOMenuBar( QWidget *parent=0 ): QMenuBar (parent ) {;} | 37 | KOMenuBar( QWidget *parent=0 ): QMenuBar (parent ) {;} |
38 | QSize sizeHint () const{ qDebug("sizejint ");return QSize ( 40,25 );} | 38 | QSize sizeHint () const{ qDebug("sizejint ");return QSize ( 40,25 );} |
39 | }; | 39 | }; |
40 | 40 | ||
41 | using namespace KCal; | 41 | using namespace KCal; |
42 | 42 | ||
43 | class MainWindow : public QMainWindow | 43 | class MainWindow : public QMainWindow |
44 | { | 44 | { |
45 | Q_OBJECT | 45 | Q_OBJECT |
46 | public: | 46 | public: |
47 | MainWindow( QWidget *parent = 0, const char *name = 0, QString command = ""); | 47 | MainWindow( QWidget *parent = 0, const char *name = 0, QString command = ""); |
48 | ~MainWindow(); | 48 | ~MainWindow(); |
49 | bool beamReceiveEnabled(); | 49 | bool beamReceiveEnabled(); |
50 | static QString defaultFileName(); | 50 | static QString defaultFileName(); |
51 | static QString syncFileName(); | 51 | static QString syncFileName(); |
52 | static QString resourcePath(); | 52 | static QString resourcePath(); |
53 | public slots: | 53 | public slots: |
54 | void setCaption ( const QString & ); | 54 | void setCaption ( const QString & ); |
55 | void updateWeekNum(const KCal::DateList &); | 55 | void updateWeekNum(const KCal::DateList &); |
56 | void updateWeek(QDate); | 56 | void updateWeek(QDate); |
57 | void updateFilterToolbar(); | 57 | void updateFilterToolbar(); |
58 | virtual void showMaximized (); | 58 | virtual void showMaximized (); |
59 | void configureAgenda( int ); | 59 | void configureAgenda( int ); |
60 | void recieve( const QCString& msg, const QByteArray& data ); | 60 | void recieve( const QCString& msg, const QByteArray& data ); |
61 | protected slots: | 61 | protected slots: |
62 | void setCaptionToDates(); | 62 | void setCaptionToDates(); |
63 | void weekAction(); | 63 | void weekAction(); |
64 | void about(); | 64 | void about(); |
65 | void licence(); | 65 | void licence(); |
66 | void faq(); | 66 | void faq(); |
67 | void usertrans(); | 67 | void usertrans(); |
68 | void features(); | 68 | void features(); |
69 | void synchowto(); | 69 | void synchowto(); |
70 | void storagehowto(); | 70 | void storagehowto(); |
71 | void timetrackinghowto(); | ||
71 | void kdesynchowto(); | 72 | void kdesynchowto(); |
72 | void multisynchowto(); | 73 | void multisynchowto(); |
73 | void whatsNew(); | 74 | void whatsNew(); |
74 | void keyBindings(); | 75 | void keyBindings(); |
75 | void aboutAutoSaving();; | 76 | void aboutAutoSaving();; |
76 | void aboutKnownBugs(); | 77 | void aboutKnownBugs(); |
77 | 78 | ||
78 | void processIncidenceSelection( Incidence * ); | 79 | void processIncidenceSelection( Incidence * ); |
79 | 80 | ||
80 | void importQtopia(); | 81 | void importQtopia(); |
81 | void importBday(); | 82 | void importBday(); |
82 | void importOL(); | 83 | void importOL(); |
83 | void importIcal(); | 84 | void importIcal(); |
84 | void importFile( QString, bool ); | 85 | void importFile( QString, bool ); |
85 | void quickImportIcal(); | 86 | void quickImportIcal(); |
86 | 87 | ||
87 | void slotModifiedChanged( bool ); | 88 | void slotModifiedChanged( bool ); |
88 | 89 | ||
89 | void save(); | 90 | void save(); |
90 | void saveStopTimer(); | 91 | void saveStopTimer(); |
91 | void configureToolBar( int ); | 92 | void configureToolBar( int ); |
92 | void printSel(); | 93 | void printSel(); |
93 | void printCal(); | 94 | void printCal(); |
94 | void saveCalendar(); | 95 | void saveCalendar(); |
95 | void loadCalendar(); | 96 | void loadCalendar(); |
96 | void exportVCalendar(); | 97 | void exportVCalendar(); |
97 | void fillFilterMenu(); | 98 | void fillFilterMenu(); |
98 | void fillFilterMenuTB(); | 99 | void fillFilterMenuTB(); |
99 | void selectFilter( int ); | 100 | void selectFilter( int ); |
100 | void fillFilterMenuPopup(); | 101 | void fillFilterMenuPopup(); |
101 | void selectFilterPopup( int ); | 102 | void selectFilterPopup( int ); |
102 | void exportToPhone( int ); | 103 | void exportToPhone( int ); |
103 | void toggleBeamReceive(); | 104 | void toggleBeamReceive(); |
104 | void disableBR(bool); | 105 | void disableBR(bool); |
105 | signals: | 106 | signals: |
106 | void selectWeek ( int ); | 107 | void selectWeek ( int ); |
107 | private slots: | 108 | private slots: |
108 | void showConfigureAgenda(); | 109 | void showConfigureAgenda(); |
109 | void getFile( bool ); | 110 | void getFile( bool ); |
110 | void syncFileRequest(); | 111 | void syncFileRequest(); |
111 | 112 | ||
112 | protected: | 113 | protected: |
113 | void hideEvent ( QHideEvent * ); | 114 | void hideEvent ( QHideEvent * ); |
114 | QString sentSyncFile(); | 115 | QString sentSyncFile(); |
115 | void displayText( QString, QString); | 116 | void displayText( QString, QString); |
116 | void enableIncidenceActions( bool ); | 117 | void enableIncidenceActions( bool ); |
117 | 118 | ||
118 | private: | 119 | private: |
119 | bool mBRdisabled; | 120 | bool mBRdisabled; |
120 | #ifndef DESKTOP_VERSION | 121 | #ifndef DESKTOP_VERSION |
121 | QCopChannel* infrared; | 122 | QCopChannel* infrared; |
122 | #endif | 123 | #endif |
123 | QAction* brAction; | 124 | QAction* brAction; |
124 | KSyncManager* mSyncManager; | 125 | KSyncManager* mSyncManager; |
125 | bool mClosed; | 126 | bool mClosed; |
126 | void saveOnClose(); | 127 | void saveOnClose(); |
127 | bool mFlagKeyPressed; | 128 | bool mFlagKeyPressed; |
128 | bool mBlockAtStartup; | 129 | bool mBlockAtStartup; |
129 | QPEToolBar *iconToolBar; | 130 | QPEToolBar *iconToolBar; |
130 | QPEToolBar *viewToolBar; | 131 | QPEToolBar *viewToolBar; |
131 | QPEToolBar *navigatorToolBar; | 132 | QPEToolBar *navigatorToolBar; |
132 | QPEToolBar *filterToolBar; | 133 | QPEToolBar *filterToolBar; |
133 | QPEMenuBar *filterMenubar; | 134 | QPEMenuBar *filterMenubar; |
134 | QPopupMenu * filterPopupMenu; | 135 | QPopupMenu * filterPopupMenu; |
135 | void initActions(); | 136 | void initActions(); |
136 | void setDefaultPreferences(); | 137 | void setDefaultPreferences(); |
137 | void resizeEvent( QResizeEvent* e); | 138 | void resizeEvent( QResizeEvent* e); |
138 | void keyPressEvent ( QKeyEvent * ) ; | 139 | void keyPressEvent ( QKeyEvent * ) ; |
139 | void keyReleaseEvent ( QKeyEvent * ) ; | 140 | void keyReleaseEvent ( QKeyEvent * ) ; |
140 | QPopupMenu *configureToolBarMenu; | 141 | QPopupMenu *configureToolBarMenu; |
141 | QPopupMenu *selectFilterMenu; | 142 | QPopupMenu *selectFilterMenu; |
142 | QPopupMenu *selectFilterMenuTB; | 143 | QPopupMenu *selectFilterMenuTB; |
143 | QPopupMenu *configureAgendaMenu, *syncMenu; | 144 | QPopupMenu *configureAgendaMenu, *syncMenu; |
144 | CalendarLocal *mCalendar; | 145 | CalendarLocal *mCalendar; |
145 | CalendarView *mView; | 146 | CalendarView *mView; |
146 | QAction *mNewSubTodoAction; | 147 | QAction *mNewSubTodoAction; |
147 | QAction *mWeekAction; | 148 | QAction *mWeekAction; |
148 | QFont mWeekFont; | 149 | QFont mWeekFont; |
149 | QPixmap mWeekPixmap; | 150 | QPixmap mWeekPixmap; |
150 | QColor mWeekBgColor; | 151 | QColor mWeekBgColor; |
151 | 152 | ||
152 | QAction *mShowAction; | 153 | QAction *mShowAction; |
153 | QAction *mEditAction; | 154 | QAction *mEditAction; |
154 | QAction *mDeleteAction; | 155 | QAction *mDeleteAction; |
155 | QAction *mCloneAction; | 156 | QAction *mCloneAction; |
156 | QAction *mMoveAction; | 157 | QAction *mMoveAction; |
157 | QAction *mBeamAction; | 158 | QAction *mBeamAction; |
158 | QAction *mCancelAction; | 159 | QAction *mCancelAction; |
159 | 160 | ||
160 | QAction *mToggleNav; | 161 | QAction *mToggleNav; |
161 | QAction *mToggleFilter; | 162 | QAction *mToggleFilter; |
162 | QAction *mToggleAllday; | 163 | QAction *mToggleAllday; |
163 | QAction *actionFilterMenuTB; | 164 | QAction *actionFilterMenuTB; |
164 | 165 | ||
165 | void closeEvent( QCloseEvent* ce ); | 166 | void closeEvent( QCloseEvent* ce ); |
166 | SimpleAlarmClient mAlarmClient; | 167 | SimpleAlarmClient mAlarmClient; |