author | zautrix <zautrix> | 2005-04-17 08:24:43 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-17 08:24:43 (UTC) |
commit | fd67a473a94c5a3d63a89c52fb8f612cb19b5363 (patch) (unidiff) | |
tree | d5adc24b8c2662118934fb5ab7f6ac690ae21153 | |
parent | 6cf5cc7d0b12af6bdc722e469f3f5aa293016c7d (diff) | |
download | kdepimpi-fd67a473a94c5a3d63a89c52fb8f612cb19b5363.zip kdepimpi-fd67a473a94c5a3d63a89c52fb8f612cb19b5363.tar.gz kdepimpi-fd67a473a94c5a3d63a89c52fb8f612cb19b5363.tar.bz2 |
fixes
-rw-r--r-- | bin/kdepim/timetrackerhowto.txt | 68 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 10 | ||||
-rw-r--r-- | korganizer/mainwindow.h | 1 | ||||
-rw-r--r-- | libkcal/todo.cpp | 4 |
4 files changed, 80 insertions, 3 deletions
diff --git a/bin/kdepim/timetrackerhowto.txt b/bin/kdepim/timetrackerhowto.txt new file mode 100644 index 0000000..69fe1ea --- a/dev/null +++ b/bin/kdepim/timetrackerhowto.txt | |||
@@ -0,0 +1,68 @@ | |||
1 | |||
2 | KO/Pi timetracker HowTo | ||
3 | |||
4 | In KO/Pi you can set a todo in a "running" state to track your working time on that todo. | ||
5 | This Howto is about to use that timetracking feature. | ||
6 | |||
7 | CONTENT: | ||
8 | |||
9 | 0) Tracking time - setting a todo to started and stopped | ||
10 | 1) Getting the time information | ||
11 | 2) Overview and analysis of the timetracking data | ||
12 | |||
13 | ******************************************** | ||
14 | 0) Tracking time - setting a todo to started | ||
15 | ******************************************** | ||
16 | |||
17 | To track time open the todo view in KO/Pi. | ||
18 | There you can set a todo to the "running" state. | ||
19 | You can do this by choosing "Start/Stop todo.." from the context menu for that todo or by double clicking on the start time or start date column of that todo. | ||
20 | A started todo is displayed green and the start time and date values in the todo list are displaying the start time. | ||
21 | If a parent todo with a running sub todo is displayed closed in the todo view that parent todo is displayed green as well. | ||
22 | If a todo is running the running information is stored every five minutes (not configureable). | ||
23 | (Nothing is changed in the todo itself: If the todo has a start datetime set only the display changes for the time this todo is set to running.) | ||
24 | You can edit a running todo as usual. | ||
25 | If you delete a running todo its running information is saved automatically | ||
26 | You can set the todo to "stopped" in the same way. | ||
27 | If a todo is set to "stopped" within 30 seconds after the start, nothing is stored. | ||
28 | If a todo is set to stopped, its running information is stored in the directory | ||
29 | <yourhome>/kdepim/apps/timetrackerdir/ | ||
30 | If you close the application all running todos are set to stopped and the running information is stored automatically. | ||
31 | That does mean: If you start KO/Pi there will be no todo in the "running" state. | ||
32 | |||
33 | ******************************************** | ||
34 | 1) Getting the time information | ||
35 | ******************************************** | ||
36 | |||
37 | All data is stored in the dir | ||
38 | <yourhome>/kdepim/apps/timetrackerdir/ | ||
39 | |||
40 | There are two kind of files: | ||
41 | E.g. | ||
42 | 20050417-090628-libkcal-1503885238.271.ics | ||
43 | and | ||
44 | libkcal-1387036159.309.ics | ||
45 | |||
46 | The filenames with the datetime at the beginning contains the actual tracking data: | ||
47 | The datetime part of the filename is the start datetime of this run of that todo. | ||
48 | The same value you can find in the file as "DTSTART" value. | ||
49 | The end datetime of the tracking you can find in the file as the "DUE" value. | ||
50 | |||
51 | A file without a datetime at the beginning | ||
52 | (libkcal-1387036159.309.ics in our example) | ||
53 | contains no timetracking information and contains only information about a parent todo of a todo with timetracking information. | ||
54 | This file is needed to display the parent-child relationchip you can see in the KO/Pi todo view in the timetracking overview application: | ||
55 | |||
56 | ******************************************** | ||
57 | 2) Overview and analysis of the timetracking data | ||
58 | ******************************************** | ||
59 | |||
60 | Because every timetracking run is stored in a single file it is easy to merge the data from several computers of the same person or from several persons by copying all the files into the same directory. | ||
61 | There is an application which reads the content of that directory and displays the running information of each todo in a so called timetable "Gantt" view. | ||
62 | It makes it possible to create and print reports for specific time frames. | ||
63 | The default display is exactly like the parent-child relationchip displayed in the KO/Pi todo view, but it is possible to sort items by categories and by attendees. | ||
64 | This program will only be available for the desktop (Windows and Linux). | ||
65 | This program is not free open source software. | ||
66 | There are no decisions about the distribution model (licence model and price) yet. | ||
67 | You can find more information about that program after the beginning of June 2005 at www.pi-sync.net. | ||
68 | \ No newline at end of file | ||
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index ffc4d9a..8e5d108 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -1041,97 +1041,101 @@ void MainWindow::initActions() | |||
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 ) |
@@ -1356,96 +1360,100 @@ 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") + |
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h index 3151f50..f2a6c60 100644 --- a/korganizer/mainwindow.h +++ b/korganizer/mainwindow.h | |||
@@ -23,96 +23,97 @@ class KSyncProfile; | |||
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: |
diff --git a/libkcal/todo.cpp b/libkcal/todo.cpp index 6a6c137..002d3f2 100644 --- a/libkcal/todo.cpp +++ b/libkcal/todo.cpp | |||
@@ -50,131 +50,131 @@ Todo::Todo(const Todo &t) : QObject(),Incidence(t) | |||
50 | mHasDueDate = t.mHasDueDate; | 50 | mHasDueDate = t.mHasDueDate; |
51 | mCompleted = t.mCompleted; | 51 | mCompleted = t.mCompleted; |
52 | mHasCompletedDate = t.mHasCompletedDate; | 52 | mHasCompletedDate = t.mHasCompletedDate; |
53 | mPercentComplete = t.mPercentComplete; | 53 | mPercentComplete = t.mPercentComplete; |
54 | mRunning = false; | 54 | mRunning = false; |
55 | mRunSaveTimer = 0; | 55 | mRunSaveTimer = 0; |
56 | } | 56 | } |
57 | 57 | ||
58 | Todo::~Todo() | 58 | Todo::~Todo() |
59 | { | 59 | { |
60 | setRunning( false ); | 60 | setRunning( false ); |
61 | //qDebug("Todo::~Todo() "); | 61 | //qDebug("Todo::~Todo() "); |
62 | } | 62 | } |
63 | 63 | ||
64 | void Todo::setRunning( bool run ) | 64 | void Todo::setRunning( bool run ) |
65 | { | 65 | { |
66 | if ( run == mRunning ) | 66 | if ( run == mRunning ) |
67 | return; | 67 | return; |
68 | //qDebug("Todo::setRunning %d ", run); | 68 | //qDebug("Todo::setRunning %d ", run); |
69 | if ( !mRunSaveTimer ) { | 69 | if ( !mRunSaveTimer ) { |
70 | mRunSaveTimer = new QTimer ( this ); | 70 | mRunSaveTimer = new QTimer ( this ); |
71 | connect ( mRunSaveTimer, SIGNAL( timeout() ), this , SLOT ( saveRunningInfoToFile() ) ); | 71 | connect ( mRunSaveTimer, SIGNAL( timeout() ), this , SLOT ( saveRunningInfoToFile() ) ); |
72 | } | 72 | } |
73 | mRunning = run; | 73 | mRunning = run; |
74 | if ( mRunning ) { | 74 | if ( mRunning ) { |
75 | mRunSaveTimer->start( 1000 * 60 * 5 ); // 5 min | 75 | mRunSaveTimer->start( 1000 * 60 * 5 ); // 5 min |
76 | mRunStart = QDateTime::currentDateTime(); | 76 | mRunStart = QDateTime::currentDateTime(); |
77 | } else { | 77 | } else { |
78 | mRunSaveTimer->stop(); | 78 | mRunSaveTimer->stop(); |
79 | saveRunningInfoToFile(); | 79 | saveRunningInfoToFile(); |
80 | } | 80 | } |
81 | } | 81 | } |
82 | 82 | ||
83 | void Todo::saveRunningInfoToFile() | 83 | void Todo::saveRunningInfoToFile() |
84 | { | 84 | { |
85 | //qDebug("Todo::saveRunningInfoToFile() %s", summary().latin1()); | 85 | //qDebug("Todo::saveRunningInfoToFile() %s", summary().latin1()); |
86 | if ( mRunStart.secsTo ( QDateTime::currentDateTime() ) < 30 ) { | 86 | if ( mRunStart.secsTo ( QDateTime::currentDateTime() ) < 30 ) { |
87 | qDebug("Running time < 30 seconds. Skipped. "); | 87 | qDebug("Running time < 30 seconds. Skipped. "); |
88 | return; | 88 | return; |
89 | } | 89 | } |
90 | QString dir = KGlobalSettings::timeTrackerDir(); | 90 | QString dir = KGlobalSettings::timeTrackerDir(); |
91 | //qDebug("%s ", dir.latin1()); | 91 | //qDebug("%s ", dir.latin1()); |
92 | QString file = "%1%2%3-%4%5%6-"; | 92 | QString file = "%1%2%3-%4%5%6-"; |
93 | file = file.arg( mRunStart.date().year(), 4).arg( mRunStart.date().month(),2 ).arg( mRunStart.date().day(), 2 ).arg( mRunStart.time().hour(),2 ).arg( mRunStart.time().minute(),2 ).arg( mRunStart.time().second(),2 ); | 93 | file = file.arg( mRunStart.date().year(), 4).arg( mRunStart.date().month(),2 ).arg( mRunStart.date().day(), 2 ).arg( mRunStart.time().hour(),2 ).arg( mRunStart.time().minute(),2 ).arg( mRunStart.time().second(),2 ); |
94 | file.replace ( QRegExp (" "), "0" ); | 94 | file.replace ( QRegExp (" "), "0" ); |
95 | file += uid(); | 95 | file += uid(); |
96 | //qDebug("File %s ",file.latin1() ); | 96 | //qDebug("File %s ",file.latin1() ); |
97 | CalendarLocal cal; | 97 | CalendarLocal cal; |
98 | cal.setTimeZoneId( " 00:00 Europe/London(UTC)" ); | 98 | cal.setLocalTime(); |
99 | Todo * to = (Todo*) clone(); | 99 | Todo * to = (Todo*) clone(); |
100 | to->setFloats( false ); | 100 | to->setFloats( false ); |
101 | to->setDtStart( mRunStart ); | 101 | to->setDtStart( mRunStart ); |
102 | to->setHasStartDate( true ); | 102 | to->setHasStartDate( true ); |
103 | to->setDtDue( QDateTime::currentDateTime() ); | 103 | to->setDtDue( QDateTime::currentDateTime() ); |
104 | to->setHasDueDate( true ); | 104 | to->setHasDueDate( true ); |
105 | to->setUid( file ); | 105 | to->setUid( file ); |
106 | cal.addIncidence( to ); | 106 | cal.addIncidence( to ); |
107 | ICalFormat format; | 107 | ICalFormat format; |
108 | file = dir +"/" +file +".ics"; | 108 | file = dir +"/" +file +".ics"; |
109 | format.save( &cal, file ); | 109 | format.save( &cal, file ); |
110 | saveParents(); | 110 | saveParents(); |
111 | 111 | ||
112 | } | 112 | } |
113 | void Todo::saveParents() | 113 | void Todo::saveParents() |
114 | { | 114 | { |
115 | if (!relatedTo() ) | 115 | if (!relatedTo() ) |
116 | return; | 116 | return; |
117 | Incidence * inc = relatedTo(); | 117 | Incidence * inc = relatedTo(); |
118 | if ( inc->type() != "Todo" ) | 118 | if ( inc->type() != "Todo" ) |
119 | return; | 119 | return; |
120 | Todo* to = (Todo*)inc; | 120 | Todo* to = (Todo*)inc; |
121 | bool saveTodo = false; | 121 | bool saveTodo = false; |
122 | QString file = KGlobalSettings::timeTrackerDir() + "/"+ to->uid() + ".ics"; | 122 | QString file = KGlobalSettings::timeTrackerDir() + "/"+ to->uid() + ".ics"; |
123 | QFileInfo fi ( file ); | 123 | QFileInfo fi ( file ); |
124 | if ( fi.exists() ) { | 124 | if ( fi.exists() ) { |
125 | if ( fi.lastModified () < to->lastModified ()) | 125 | if ( fi.lastModified () < to->lastModified ()) |
126 | saveTodo = true; | 126 | saveTodo = true; |
127 | } else { | 127 | } else { |
128 | saveTodo = true; | 128 | saveTodo = true; |
129 | } | 129 | } |
130 | if ( saveTodo ) { | 130 | if ( saveTodo ) { |
131 | CalendarLocal cal; | 131 | CalendarLocal cal; |
132 | cal.setTimeZoneId( " 00:00 Europe/London(UTC)" ); | 132 | cal.setLocalTime(); |
133 | Todo * par = (Todo *) to->clone(); | 133 | Todo * par = (Todo *) to->clone(); |
134 | cal.addIncidence( par ); | 134 | cal.addIncidence( par ); |
135 | ICalFormat format; | 135 | ICalFormat format; |
136 | format.save( &cal, file ); | 136 | format.save( &cal, file ); |
137 | } | 137 | } |
138 | to->saveParents(); | 138 | to->saveParents(); |
139 | } | 139 | } |
140 | 140 | ||
141 | int Todo::runTime() | 141 | int Todo::runTime() |
142 | { | 142 | { |
143 | if ( !mRunning ) | 143 | if ( !mRunning ) |
144 | return 0; | 144 | return 0; |
145 | return mRunStart.secsTo( QDateTime::currentDateTime() ); | 145 | return mRunStart.secsTo( QDateTime::currentDateTime() ); |
146 | } | 146 | } |
147 | bool Todo::hasRunningSub() | 147 | bool Todo::hasRunningSub() |
148 | { | 148 | { |
149 | if ( mRunning ) | 149 | if ( mRunning ) |
150 | return true; | 150 | return true; |
151 | Incidence *aTodo; | 151 | Incidence *aTodo; |
152 | for (aTodo = mRelations.first(); aTodo; aTodo = mRelations.next()) { | 152 | for (aTodo = mRelations.first(); aTodo; aTodo = mRelations.next()) { |
153 | if ( ((Todo*)aTodo)->hasRunningSub() ) | 153 | if ( ((Todo*)aTodo)->hasRunningSub() ) |
154 | return true; | 154 | return true; |
155 | } | 155 | } |
156 | return false; | 156 | return false; |
157 | } | 157 | } |
158 | Incidence *Todo::clone() | 158 | Incidence *Todo::clone() |
159 | { | 159 | { |
160 | return new Todo(*this); | 160 | return new Todo(*this); |
161 | } | 161 | } |
162 | 162 | ||
163 | bool Todo::contains ( Todo* from ) | 163 | bool Todo::contains ( Todo* from ) |
164 | { | 164 | { |
165 | 165 | ||
166 | if ( !from->summary().isEmpty() ) | 166 | if ( !from->summary().isEmpty() ) |
167 | if ( !summary().startsWith( from->summary() )) | 167 | if ( !summary().startsWith( from->summary() )) |
168 | return false; | 168 | return false; |
169 | if ( from->hasStartDate() ) { | 169 | if ( from->hasStartDate() ) { |
170 | if ( !hasStartDate() ) | 170 | if ( !hasStartDate() ) |
171 | return false; | 171 | return false; |
172 | if ( from->dtStart() != dtStart()) | 172 | if ( from->dtStart() != dtStart()) |
173 | return false; | 173 | return false; |
174 | } | 174 | } |
175 | if ( from->hasDueDate() ){ | 175 | if ( from->hasDueDate() ){ |
176 | if ( !hasDueDate() ) | 176 | if ( !hasDueDate() ) |
177 | return false; | 177 | return false; |
178 | if ( from->dtDue() != dtDue()) | 178 | if ( from->dtDue() != dtDue()) |
179 | return false; | 179 | return false; |
180 | } | 180 | } |