author | ulf69 <ulf69> | 2004-08-17 00:13:25 (UTC) |
---|---|---|
committer | ulf69 <ulf69> | 2004-08-17 00:13:25 (UTC) |
commit | f3875aba68f175e8da32462f64b12fc46bc31102 (patch) (unidiff) | |
tree | c17a6e839a27ddfdc80699739e9934327a4a8610 /korganizer | |
parent | ab3b10a5018152dedbdb64d0d5a4bd8ec752ccdb (diff) | |
download | kdepimpi-f3875aba68f175e8da32462f64b12fc46bc31102.zip kdepimpi-f3875aba68f175e8da32462f64b12fc46bc31102.tar.gz kdepimpi-f3875aba68f175e8da32462f64b12fc46bc31102.tar.bz2 |
added listener for reults of Ka/Pi
-rw-r--r-- | korganizer/mainwindow.cpp | 500 |
1 files changed, 258 insertions, 242 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 6c0aa9b..4b00062 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -13,5 +13,6 @@ | |||
13 | #include <qlabel.h> | 13 | #include <qlabel.h> |
14 | #include <qwmatrix.h> | 14 | #include <qmap.h> |
15 | #include <qtextbrowser.h> | 15 | #include <qwmatrix.h> |
16 | #include <qtextstream.h> | 16 | #include <qtextbrowser.h> |
17 | #include <qtextstream.h> | ||
17 | #ifndef DESKTOP_VERSION | 18 | #ifndef DESKTOP_VERSION |
@@ -22,4 +23,4 @@ | |||
22 | #include <qpe/qpeapplication.h> | 23 | #include <qpe/qpeapplication.h> |
23 | #include <qtopia/alarmserver.h> | 24 | #include <qtopia/alarmserver.h> |
24 | #include <qtopia/qcopenvelope_qws.h> | 25 | #include <qtopia/qcopenvelope_qws.h> |
25 | #else | 26 | #else |
@@ -53,3 +54,5 @@ | |||
53 | #include "simplealarmclient.h" | 54 | #include "simplealarmclient.h" |
54 | using namespace KCal; | 55 | #include "externalapphandler.h" |
56 | |||
57 | using namespace KCal; | ||
55 | #ifndef _WIN32_ | 58 | #ifndef _WIN32_ |
@@ -68,3 +71,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : | |||
68 | setFont( QFont("Arial"), 14 ); | 71 | setFont( QFont("Arial"), 14 ); |
69 | #endif | 72 | #endif |
70 | 73 | ||
@@ -72,3 +75,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : | |||
72 | QString confFile = locateLocal("config","korganizerrc"); | 75 | QString confFile = locateLocal("config","korganizerrc"); |
73 | QFileInfo finf ( confFile ); | 76 | QFileInfo finf ( confFile ); |
74 | bool showWarning = !finf.exists(); | 77 | bool showWarning = !finf.exists(); |
@@ -82,3 +85,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : | |||
82 | // p->mHourSize = 6; | 85 | // p->mHourSize = 6; |
83 | // } | 86 | // } |
84 | if ( p->mHourSize > 18 ) | 87 | if ( p->mHourSize > 18 ) |
@@ -104,4 +107,4 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : | |||
104 | mBlockSaveFlag = false; | 107 | mBlockSaveFlag = false; |
105 | mCalendarModifiedFlag = false; | 108 | mCalendarModifiedFlag = false; |
106 | 109 | ||
107 | QLabel* splash = new QLabel(i18n("KO/Pi is starting ... "), this ); | 110 | QLabel* splash = new QLabel(i18n("KO/Pi is starting ... "), this ); |
@@ -118,5 +121,5 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : | |||
118 | //mView->resize(splash->size() ); | 121 | //mView->resize(splash->size() ); |
119 | initActions(); | 122 | initActions(); |
120 | #ifndef DESKTOP_VERSION | 123 | #ifndef DESKTOP_VERSION |
121 | iconToolBar->show(); | 124 | iconToolBar->show(); |
122 | qApp->processEvents(); | 125 | qApp->processEvents(); |
@@ -135,3 +138,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : | |||
135 | //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); | 138 | //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); |
136 | mView->readSettings(); | 139 | mView->readSettings(); |
137 | bool oldOpened = false; | 140 | bool oldOpened = false; |
@@ -150,3 +153,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : | |||
150 | oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/korganizer/mycalendar.ics"); | 153 | oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/korganizer/mycalendar.ics"); |
151 | finfo.setFile( oldFile ); | 154 | finfo.setFile( oldFile ); |
152 | if (finfo.exists() ) { | 155 | if (finfo.exists() ) { |
@@ -155,3 +158,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : | |||
155 | qApp->processEvents(); | 158 | qApp->processEvents(); |
156 | } | 159 | } |
157 | } | 160 | } |
@@ -177,3 +180,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : | |||
177 | SLOT( slotModifiedChanged( bool ) ) ); | 180 | SLOT( slotModifiedChanged( bool ) ) ); |
178 | 181 | ||
179 | 182 | ||
@@ -186,3 +189,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : | |||
186 | mView->show(); | 189 | mView->show(); |
187 | delete splash; | 190 | delete splash; |
188 | if ( newFile ) | 191 | if ( newFile ) |
@@ -191,6 +194,6 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : | |||
191 | //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); | 194 | //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); |
192 | fillSyncMenu(); | 195 | fillSyncMenu(); |
193 | mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins ); | 196 | mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins ); |
194 | if ( showWarning ) { | 197 | if ( showWarning ) { |
195 | KMessageBox::information( this, | 198 | KMessageBox::information( this, |
196 | "You are starting KO/Pi for the first time.\nPlease read menu: Help-What's New,\nif you did an update!\nPlease choose your timezone in the \nConfigure Dialog TAB Time Zone!\nPlease choose your language\nin the TAB Locale!\nYou get the Configure Dialog\nvia Menu: Actions - Configure....\nClick OK to show the Configure Dialog!\n", "KO/Pi information"); | 199 | "You are starting KO/Pi for the first time.\nPlease read menu: Help-What's New,\nif you did an update!\nPlease choose your timezone in the \nConfigure Dialog TAB Time Zone!\nPlease choose your language\nin the TAB Locale!\nYou get the Configure Dialog\nvia Menu: Actions - Configure....\nClick OK to show the Configure Dialog!\n", "KO/Pi information"); |
@@ -199,2 +202,5 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : | |||
199 | } | 202 | } |
203 | |||
204 | //US listen for result adressed from Ka/Pi | ||
205 | connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); | ||
200 | } | 206 | } |
@@ -203,9 +209,9 @@ MainWindow::~MainWindow() | |||
203 | //qDebug("MainWindow::~MainWindow() "); | 209 | //qDebug("MainWindow::~MainWindow() "); |
204 | //save toolbar location | 210 | //save toolbar location |
205 | 211 | ||
206 | delete mCalendar; | 212 | delete mCalendar; |
207 | delete KOPrefs::instance(); | 213 | delete KOPrefs::instance(); |
208 | delete KIncidenceFormatter::instance(); | 214 | delete KIncidenceFormatter::instance(); |
209 | 215 | ||
210 | 216 | ||
211 | } | 217 | } |
@@ -213,5 +219,5 @@ void MainWindow::closeEvent( QCloseEvent* ce ) | |||
213 | { | 219 | { |
214 | 220 | ||
215 | 221 | ||
216 | 222 | ||
217 | if ( ! KOPrefs::instance()->mAskForQuit ) { | 223 | if ( ! KOPrefs::instance()->mAskForQuit ) { |
@@ -225,3 +231,3 @@ void MainWindow::closeEvent( QCloseEvent* ce ) | |||
225 | i18n("Do you really want\nto close KO/Pi?"), | 231 | i18n("Do you really want\nto close KO/Pi?"), |
226 | i18n("Close"), i18n("No"), | 232 | i18n("Close"), i18n("No"), |
227 | 0, 0 ) ) { | 233 | 0, 0 ) ) { |
@@ -232,6 +238,6 @@ void MainWindow::closeEvent( QCloseEvent* ce ) | |||
232 | case 1: | 238 | case 1: |
233 | ce->ignore(); | 239 | ce->ignore(); |
234 | break; | 240 | break; |
235 | case 2: | 241 | case 2: |
236 | 242 | ||
237 | default: | 243 | default: |
@@ -250,5 +256,15 @@ void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) | |||
250 | qDebug("KO: QCOP message received: %s ", cmsg.data() ); | 256 | qDebug("KO: QCOP message received: %s ", cmsg.data() ); |
257 | |||
258 | if ( cmsg == "-writeFile" ) { | ||
259 | // I made from the "-writeFile" an "-writeAlarm" | ||
260 | mView->viewManager()->showWhatsNextView(); | ||
261 | mCalendar->checkAlarmForIncidence( 0, true); | ||
262 | showMaximized(); | ||
263 | raise(); | ||
264 | return; | ||
265 | } | ||
266 | |||
251 | if ( cmsg == "-writeFile" ) { | 267 | if ( cmsg == "-writeFile" ) { |
252 | // I made from the "-writeFile" an "-writeAlarm" | 268 | // I made from the "-writeFile" an "-writeAlarm" |
253 | mView->viewManager()->showWhatsNextView(); | 269 | mView->viewManager()->showWhatsNextView(); |
254 | mCalendar->checkAlarmForIncidence( 0, true); | 270 | mCalendar->checkAlarmForIncidence( 0, true); |
@@ -257,3 +273,3 @@ void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) | |||
257 | return; | 273 | return; |
258 | 274 | ||
259 | } | 275 | } |
@@ -261,3 +277,3 @@ void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) | |||
261 | // I made from the "-writeFile" an "-writeAlarm" | 277 | // I made from the "-writeFile" an "-writeAlarm" |
262 | // mView->viewManager()->showWhatsNextView(); | 278 | // mView->viewManager()->showWhatsNextView(); |
263 | mCalendar->checkAlarmForIncidence( 0, true); | 279 | mCalendar->checkAlarmForIncidence( 0, true); |
@@ -270,3 +286,3 @@ void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) | |||
270 | qDebug("newCountdown "); | 286 | qDebug("newCountdown "); |
271 | 287 | ||
272 | } | 288 | } |
@@ -289,4 +305,4 @@ void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) | |||
289 | mView->newTodo(); | 305 | mView->newTodo(); |
290 | 306 | ||
291 | } | 307 | } |
292 | if ( msg == "-showWN" ) { | 308 | if ( msg == "-showWN" ) { |
@@ -325,3 +341,3 @@ void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) | |||
325 | mView->viewManager()->showWhatsNextView(); | 341 | mView->viewManager()->showWhatsNextView(); |
326 | } | 342 | } |
327 | else if ( msg == "-showNextXView" ) { | 343 | else if ( msg == "-showNextXView" ) { |
@@ -329,3 +345,3 @@ void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) | |||
329 | } | 345 | } |
330 | 346 | ||
331 | 347 | ||
@@ -353,3 +369,3 @@ void MainWindow::initActions() | |||
353 | selectFilterMenu = new QPopupMenu( this ); | 369 | selectFilterMenu = new QPopupMenu( this ); |
354 | selectFilterMenu->setCheckable( true ); | 370 | selectFilterMenu->setCheckable( true ); |
355 | syncMenu = new QPopupMenu( this ); | 371 | syncMenu = new QPopupMenu( this ); |
@@ -365,7 +381,7 @@ void MainWindow::initActions() | |||
365 | menuBar1->insertItem( i18n("Synchronize"), syncMenu ); | 381 | menuBar1->insertItem( i18n("Synchronize"), syncMenu ); |
366 | menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu ); | 382 | menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu ); |
367 | //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu ); | 383 | //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu ); |
368 | menuBar1->insertItem( i18n("Filter"),selectFilterMenu ); | 384 | menuBar1->insertItem( i18n("Filter"),selectFilterMenu ); |
369 | menuBar1->insertItem( i18n("Help"), helpMenu ); | 385 | menuBar1->insertItem( i18n("Help"), helpMenu ); |
370 | } else { | 386 | } else { |
371 | QPEMenuBar *menuBar1; | 387 | QPEMenuBar *menuBar1; |
@@ -378,7 +394,7 @@ void MainWindow::initActions() | |||
378 | menuBar->insertItem( i18n("Synchronize"), syncMenu ); | 394 | menuBar->insertItem( i18n("Synchronize"), syncMenu ); |
379 | menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu ); | 395 | menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu ); |
380 | menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu ); | 396 | menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu ); |
381 | menuBar->insertItem( i18n("Filter"),selectFilterMenu ); | 397 | menuBar->insertItem( i18n("Filter"),selectFilterMenu ); |
382 | menuBar->insertItem( i18n("Help"), helpMenu ); | 398 | menuBar->insertItem( i18n("Help"), helpMenu ); |
383 | //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); | 399 | //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); |
384 | menuBar1->setMaximumSize( menuBar1->sizeHint( )); | 400 | menuBar1->setMaximumSize( menuBar1->sizeHint( )); |
@@ -395,5 +411,5 @@ void MainWindow::initActions() | |||
395 | 411 | ||
396 | QString pathString = ""; | 412 | QString pathString = ""; |
397 | if ( !p->mToolBarMiniIcons ) { | 413 | if ( !p->mToolBarMiniIcons ) { |
398 | if ( QApplication::desktop()->width() < 480 ) | 414 | if ( QApplication::desktop()->width() < 480 ) |
399 | pathString += "icons16/"; | 415 | pathString += "icons16/"; |
@@ -402,15 +418,15 @@ void MainWindow::initActions() | |||
402 | configureAgendaMenu->setCheckable( true ); | 418 | configureAgendaMenu->setCheckable( true ); |
403 | configureAgendaMenu->insertItem(i18n("Toggle Allday"), 1 ); | 419 | configureAgendaMenu->insertItem(i18n("Toggle Allday"), 1 ); |
404 | configureAgendaMenu->insertSeparator(); | 420 | configureAgendaMenu->insertSeparator(); |
405 | configureAgendaMenu->insertItem(i18n("Tiny"), 4 ); | 421 | configureAgendaMenu->insertItem(i18n("Tiny"), 4 ); |
406 | configureAgendaMenu->insertItem(i18n("Small"), 6 ); | 422 | configureAgendaMenu->insertItem(i18n("Small"), 6 ); |
407 | configureAgendaMenu->insertItem(i18n("Medium"), 8 ); | 423 | configureAgendaMenu->insertItem(i18n("Medium"), 8 ); |
408 | configureAgendaMenu->insertItem(i18n("Normal"), 10 ); | 424 | configureAgendaMenu->insertItem(i18n("Normal"), 10 ); |
409 | configureAgendaMenu->insertItem(i18n("Large"), 12 ); | 425 | configureAgendaMenu->insertItem(i18n("Large"), 12 ); |
410 | configureAgendaMenu->insertItem(i18n("Big"), 14 ); | 426 | configureAgendaMenu->insertItem(i18n("Big"), 14 ); |
411 | configureAgendaMenu->insertItem(i18n("Bigger"), 16 ); | 427 | configureAgendaMenu->insertItem(i18n("Bigger"), 16 ); |
412 | configureAgendaMenu->insertItem(i18n("Biggest"), 18 ); | 428 | configureAgendaMenu->insertItem(i18n("Biggest"), 18 ); |
413 | //configureMenu->insertItem( "AgendaSize",configureAgendaMenu ); | 429 | //configureMenu->insertItem( "AgendaSize",configureAgendaMenu ); |
414 | 430 | ||
415 | icon = loadPixmap( pathString + "configure" ); | 431 | icon = loadPixmap( pathString + "configure" ); |
416 | action = new QAction( i18n("Configure"),icon, i18n("Configure..."), 0, this ); | 432 | action = new QAction( i18n("Configure"),icon, i18n("Configure..."), 0, this ); |
@@ -420,5 +436,5 @@ void MainWindow::initActions() | |||
420 | actionMenu->insertSeparator(); | 436 | actionMenu->insertSeparator(); |
421 | icon = loadPixmap( pathString + "newevent" ); | 437 | icon = loadPixmap( pathString + "newevent" ); |
422 | configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 ); | 438 | configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 ); |
423 | configureToolBarMenu->insertSeparator(); | 439 | configureToolBarMenu->insertSeparator(); |
424 | configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 ); | 440 | configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 ); |
@@ -428,4 +444,4 @@ void MainWindow::initActions() | |||
428 | mView, SLOT( newEvent() ) ); | 444 | mView, SLOT( newEvent() ) ); |
429 | icon = loadPixmap( pathString + "newtodo" ); | 445 | icon = loadPixmap( pathString + "newtodo" ); |
430 | configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); | 446 | configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 ); |
431 | QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); | 447 | QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this ); |
@@ -434,3 +450,3 @@ void MainWindow::initActions() | |||
434 | mView, SLOT( newTodo() ) ); | 450 | mView, SLOT( newTodo() ) ); |
435 | icon = loadPixmap( pathString + "navi" ); | 451 | icon = loadPixmap( pathString + "navi" ); |
436 | action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); | 452 | action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this ); |
@@ -439,3 +455,3 @@ void MainWindow::initActions() | |||
439 | mView, SLOT( toggleDateNavigatorWidget() ) ); | 455 | mView, SLOT( toggleDateNavigatorWidget() ) ); |
440 | icon = loadPixmap( pathString + "filter" ); | 456 | icon = loadPixmap( pathString + "filter" ); |
441 | action = new QAction( i18n("Toggle FilterView"), icon, i18n("Toggle FilterView"), 0, this ); | 457 | action = new QAction( i18n("Toggle FilterView"), icon, i18n("Toggle FilterView"), 0, this ); |
@@ -444,3 +460,3 @@ void MainWindow::initActions() | |||
444 | mView, SLOT( toggleFilter() ) ); | 460 | mView, SLOT( toggleFilter() ) ); |
445 | 461 | ||
446 | 462 | ||
@@ -454,4 +470,4 @@ void MainWindow::initActions() | |||
454 | viewMenu->insertSeparator(); | 470 | viewMenu->insertSeparator(); |
455 | icon = loadPixmap( pathString + "list" ); | 471 | icon = loadPixmap( pathString + "list" ); |
456 | configureToolBarMenu->insertItem(icon, i18n("List View"), 30 ); | 472 | configureToolBarMenu->insertItem(icon, i18n("List View"), 30 ); |
457 | QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this ); | 473 | QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this ); |
@@ -462,4 +478,4 @@ void MainWindow::initActions() | |||
462 | 478 | ||
463 | icon = loadPixmap( pathString + "day" ); | 479 | icon = loadPixmap( pathString + "day" ); |
464 | configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 ); | 480 | configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 ); |
465 | QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this ); | 481 | QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this ); |
@@ -470,4 +486,4 @@ void MainWindow::initActions() | |||
470 | 486 | ||
471 | icon = loadPixmap( pathString + "workweek" ); | 487 | icon = loadPixmap( pathString + "workweek" ); |
472 | configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 ); | 488 | configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 ); |
473 | QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this ); | 489 | QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this ); |
@@ -478,3 +494,3 @@ void MainWindow::initActions() | |||
478 | icon = loadPixmap( pathString + "week" ); | 494 | icon = loadPixmap( pathString + "week" ); |
479 | configureToolBarMenu->insertItem(icon, i18n("Week"), 60 ); | 495 | configureToolBarMenu->insertItem(icon, i18n("Week"), 60 ); |
480 | QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); | 496 | QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this ); |
@@ -484,4 +500,4 @@ void MainWindow::initActions() | |||
484 | 500 | ||
485 | icon = loadPixmap( pathString + "month" ); | 501 | icon = loadPixmap( pathString + "month" ); |
486 | configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); | 502 | configureToolBarMenu->insertItem(icon, i18n("Month"), 70 ); |
487 | QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); | 503 | QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this ); |
@@ -491,4 +507,4 @@ void MainWindow::initActions() | |||
491 | 507 | ||
492 | icon = loadPixmap( pathString + "todo" ); | 508 | icon = loadPixmap( pathString + "todo" ); |
493 | configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); | 509 | configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 ); |
494 | QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); | 510 | QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this ); |
@@ -498,4 +514,4 @@ void MainWindow::initActions() | |||
498 | 514 | ||
499 | icon = loadPixmap( pathString + "journal" ); | 515 | icon = loadPixmap( pathString + "journal" ); |
500 | configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); | 516 | configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 ); |
501 | QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this ); | 517 | QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this ); |
@@ -505,4 +521,4 @@ void MainWindow::initActions() | |||
505 | 521 | ||
506 | icon = loadPixmap( pathString + "xdays" ); | 522 | icon = loadPixmap( pathString + "xdays" ); |
507 | configureToolBarMenu->insertItem(icon, i18n("Next days"), 100,4 ); | 523 | configureToolBarMenu->insertItem(icon, i18n("Next days"), 100,4 ); |
508 | QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this ); | 524 | QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this ); |
@@ -512,5 +528,5 @@ void MainWindow::initActions() | |||
512 | 528 | ||
513 | icon = loadPixmap( pathString + "whatsnext" ); | 529 | icon = loadPixmap( pathString + "whatsnext" ); |
514 | configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110, 4 ); | 530 | configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110, 4 ); |
515 | QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); | 531 | QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this ); |
516 | whatsnext_action->addTo( viewMenu ); | 532 | whatsnext_action->addTo( viewMenu ); |
@@ -518,3 +534,3 @@ void MainWindow::initActions() | |||
518 | mView->viewManager(), SLOT( showWhatsNextView() ) ); | 534 | mView->viewManager(), SLOT( showWhatsNextView() ) ); |
519 | 535 | ||
520 | #if 0 | 536 | #if 0 |
@@ -556,5 +572,5 @@ void MainWindow::initActions() | |||
556 | 572 | ||
557 | icon = loadPixmap( pathString + "search" ); | 573 | icon = loadPixmap( pathString + "search" ); |
558 | QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this ); | 574 | QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this ); |
559 | configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 4); | 575 | configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 4); |
560 | search_action->addTo( actionMenu ); | 576 | search_action->addTo( actionMenu ); |
@@ -563,4 +579,4 @@ void MainWindow::initActions() | |||
563 | 579 | ||
564 | icon = loadPixmap( pathString + "today" ); | 580 | icon = loadPixmap( pathString + "today" ); |
565 | configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130); | 581 | configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130); |
566 | QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); | 582 | QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); |
@@ -572,4 +588,4 @@ void MainWindow::initActions() | |||
572 | actionMenu->insertSeparator(); | 588 | actionMenu->insertSeparator(); |
573 | actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu ); | 589 | actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu ); |
574 | 590 | ||
575 | } | 591 | } |
@@ -631,3 +647,3 @@ void MainWindow::initActions() | |||
631 | connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) ); | 647 | connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) ); |
632 | 648 | ||
633 | action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, | 649 | action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, |
@@ -637,4 +653,4 @@ void MainWindow::initActions() | |||
637 | #else | 653 | #else |
638 | importMenu->insertSeparator(); | 654 | importMenu->insertSeparator(); |
639 | icon = loadPixmap( pathString + "print" ); | 655 | icon = loadPixmap( pathString + "print" ); |
640 | action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); | 656 | action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); |
@@ -643,4 +659,4 @@ void MainWindow::initActions() | |||
643 | this, SLOT( printCal() ) ); | 659 | this, SLOT( printCal() ) ); |
644 | 660 | ||
645 | icon = loadPixmap( pathString + "print" ); | 661 | icon = loadPixmap( pathString + "print" ); |
646 | action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); | 662 | action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); |
@@ -659,6 +675,6 @@ void MainWindow::initActions() | |||
659 | connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); | 675 | connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); |
660 | 676 | ||
661 | //menuBar->insertItem( "Configure",configureMenu ); | 677 | //menuBar->insertItem( "Configure",configureMenu ); |
662 | //configureMenu->insertItem( "Toolbar",configureToolBarMenu ); | 678 | //configureMenu->insertItem( "Toolbar",configureToolBarMenu ); |
663 | icon = loadPixmap( "korganizer/korganizer" ); | 679 | icon = loadPixmap( "korganizer/korganizer" ); |
664 | action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); | 680 | action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); |
@@ -666,3 +682,3 @@ void MainWindow::initActions() | |||
666 | connect( action, SIGNAL( activated() ), | 682 | connect( action, SIGNAL( activated() ), |
667 | SLOT( keyBindings() ) ); | 683 | SLOT( keyBindings() ) ); |
668 | action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this ); | 684 | action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this ); |
@@ -670,3 +686,3 @@ void MainWindow::initActions() | |||
670 | connect( action, SIGNAL( activated() ), | 686 | connect( action, SIGNAL( activated() ), |
671 | SLOT( features() ) ); | 687 | SLOT( features() ) ); |
672 | action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this ); | 688 | action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this ); |
@@ -674,3 +690,3 @@ void MainWindow::initActions() | |||
674 | connect( action, SIGNAL( activated() ), | 690 | connect( action, SIGNAL( activated() ), |
675 | SLOT( aboutAutoSaving() ) ); | 691 | SLOT( aboutAutoSaving() ) ); |
676 | action = new QAction( "Problemd", i18n("Known Problems..."), 0,this ); | 692 | action = new QAction( "Problemd", i18n("Known Problems..."), 0,this ); |
@@ -678,3 +694,3 @@ void MainWindow::initActions() | |||
678 | connect( action, SIGNAL( activated() ), | 694 | connect( action, SIGNAL( activated() ), |
679 | SLOT( aboutKnownBugs() ) ); | 695 | SLOT( aboutKnownBugs() ) ); |
680 | action = new QAction( "Translate Howto", i18n("User translation..."), 0,this ); | 696 | action = new QAction( "Translate Howto", i18n("User translation..."), 0,this ); |
@@ -682,3 +698,3 @@ void MainWindow::initActions() | |||
682 | connect( action, SIGNAL( activated() ), | 698 | connect( action, SIGNAL( activated() ), |
683 | SLOT( usertrans() ) ); | 699 | SLOT( usertrans() ) ); |
684 | action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this ); | 700 | action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this ); |
@@ -686,3 +702,3 @@ void MainWindow::initActions() | |||
686 | connect( action, SIGNAL( activated() ), | 702 | connect( action, SIGNAL( activated() ), |
687 | SLOT( synchowto() ) ); | 703 | SLOT( synchowto() ) ); |
688 | action = new QAction( "Whats New", i18n("What's new?"), 0,this ); | 704 | action = new QAction( "Whats New", i18n("What's new?"), 0,this ); |
@@ -694,4 +710,4 @@ void MainWindow::initActions() | |||
694 | connect( action, SIGNAL( activated() ), | 710 | connect( action, SIGNAL( activated() ), |
695 | SLOT( faq() ) ); | 711 | SLOT( faq() ) ); |
696 | 712 | ||
697 | 713 | ||
@@ -708,6 +724,6 @@ void MainWindow::initActions() | |||
708 | // ****************************************************** | 724 | // ****************************************************** |
709 | // menubar icons | 725 | // menubar icons |
710 | 726 | ||
711 | 727 | ||
712 | iconToolBar->setHorizontalStretchable (true ); | 728 | iconToolBar->setHorizontalStretchable (true ); |
713 | //menuBar->insertItem( iconToolBar ); | 729 | //menuBar->insertItem( iconToolBar ); |
@@ -739,3 +755,3 @@ void MainWindow::initActions() | |||
739 | icon = loadPixmap( pathString + "2leftarrowB" ); | 755 | icon = loadPixmap( pathString + "2leftarrowB" ); |
740 | configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200, 14); | 756 | configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200, 14); |
741 | if (p-> mShowIconBackFast) { | 757 | if (p-> mShowIconBackFast) { |
@@ -747,3 +763,3 @@ void MainWindow::initActions() | |||
747 | icon = loadPixmap( pathString + "1leftarrowB" ); | 763 | icon = loadPixmap( pathString + "1leftarrowB" ); |
748 | configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210,15); | 764 | configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210,15); |
749 | if (p-> mShowIconBack) { | 765 | if (p-> mShowIconBack) { |
@@ -754,6 +770,6 @@ void MainWindow::initActions() | |||
754 | } | 770 | } |
755 | if (p-> mShowIconToday) | 771 | if (p-> mShowIconToday) |
756 | today_action->addTo( iconToolBar ); | 772 | today_action->addTo( iconToolBar ); |
757 | icon = loadPixmap( pathString + "1rightarrowB" ); | 773 | icon = loadPixmap( pathString + "1rightarrowB" ); |
758 | configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220); | 774 | configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220); |
759 | if (p-> mShowIconForward) { | 775 | if (p-> mShowIconForward) { |
@@ -765,3 +781,3 @@ void MainWindow::initActions() | |||
765 | icon = loadPixmap( pathString + "2rightarrowB" ); | 781 | icon = loadPixmap( pathString + "2rightarrowB" ); |
766 | configureToolBarMenu->insertItem(icon, i18n("Next month"), 230); | 782 | configureToolBarMenu->insertItem(icon, i18n("Next month"), 230); |
767 | if (p-> mShowIconForwardFast) { | 783 | if (p-> mShowIconForwardFast) { |
@@ -772,5 +788,5 @@ void MainWindow::initActions() | |||
772 | } | 788 | } |
773 | 789 | ||
774 | 790 | ||
775 | configureToolBarMenu->insertItem(i18n("What's This?"), 300); | 791 | configureToolBarMenu->insertItem(i18n("What's This?"), 300); |
776 | 792 | ||
@@ -796,6 +812,6 @@ void MainWindow::initActions() | |||
796 | configureToolBarMenu->setItemChecked( 200, true ); | 812 | configureToolBarMenu->setItemChecked( 200, true ); |
797 | if (p-> mShowIconBack) | 813 | if (p-> mShowIconBack) |
798 | configureToolBarMenu->setItemChecked( 210, true ); | 814 | configureToolBarMenu->setItemChecked( 210, true ); |
799 | if (p-> mShowIconToday) | 815 | if (p-> mShowIconToday) |
800 | configureToolBarMenu->setItemChecked( 130, true ); | 816 | configureToolBarMenu->setItemChecked( 130, true ); |
801 | if (p-> mShowIconForward) | 817 | if (p-> mShowIconForward) |
@@ -821,3 +837,3 @@ void MainWindow::initActions() | |||
821 | QWhatsThis::whatsThisButton ( iconToolBar ); | 837 | QWhatsThis::whatsThisButton ( iconToolBar ); |
822 | connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) ); | 838 | connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) ); |
823 | configureAgenda( p->mHourSize ); | 839 | configureAgenda( p->mHourSize ); |
@@ -852,3 +868,3 @@ void MainWindow::fillSyncMenu() | |||
852 | config.sync(); | 868 | config.sync(); |
853 | delete temp; | 869 | delete temp; |
854 | } | 870 | } |
@@ -868,3 +884,3 @@ void MainWindow::fillSyncMenu() | |||
868 | mView->setupExternSyncProfiles(); | 884 | mView->setupExternSyncProfiles(); |
869 | } | 885 | } |
870 | 886 | ||
@@ -873,5 +889,5 @@ int MainWindow::ringSync() | |||
873 | int syncedProfiles = 0; | 889 | int syncedProfiles = 0; |
874 | int i; | 890 | int i; |
875 | QTime timer; | 891 | QTime timer; |
876 | KConfig config ( locateLocal( "config","syncprofilesrc" ) ); | 892 | KConfig config ( locateLocal( "config","syncprofilesrc" ) ); |
877 | QStringList syncProfileNames = KOPrefs::instance()->mSyncProfileNames; | 893 | QStringList syncProfileNames = KOPrefs::instance()->mSyncProfileNames; |
@@ -896,3 +912,3 @@ int MainWindow::ringSync() | |||
896 | if ( temp->getIsLocalFileSync() ) { | 912 | if ( temp->getIsLocalFileSync() ) { |
897 | if ( syncWithFile( temp->getRemoteFileName( ), true ) ) | 913 | if ( syncWithFile( temp->getRemoteFileName( ), true ) ) |
898 | KOPrefs::instance()->mLastSyncedLocalFile = temp->getRemoteFileName(); | 914 | KOPrefs::instance()->mLastSyncedLocalFile = temp->getRemoteFileName(); |
@@ -906,3 +922,3 @@ int MainWindow::ringSync() | |||
906 | syncRemote( temp, false ); | 922 | syncRemote( temp, false ); |
907 | 923 | ||
908 | } | 924 | } |
@@ -917,3 +933,3 @@ int MainWindow::ringSync() | |||
917 | } | 933 | } |
918 | 934 | ||
919 | } | 935 | } |
@@ -923,3 +939,3 @@ int MainWindow::ringSync() | |||
923 | return syncedProfiles; | 939 | return syncedProfiles; |
924 | } | 940 | } |
925 | 941 | ||
@@ -929,3 +945,3 @@ void MainWindow::multiSync( bool askforPrefs ) | |||
929 | return; | 945 | return; |
930 | mBlockSaveFlag = true; | 946 | mBlockSaveFlag = true; |
931 | QString question = i18n("Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!"); | 947 | QString question = i18n("Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!"); |
@@ -933,3 +949,3 @@ void MainWindow::multiSync( bool askforPrefs ) | |||
933 | question, | 949 | question, |
934 | i18n("Yes"), i18n("No"), | 950 | i18n("Yes"), i18n("No"), |
935 | 0, 0 ) != 0 ) { | 951 | 0, 0 ) != 0 ) { |
@@ -952,3 +968,3 @@ void MainWindow::multiSync( bool askforPrefs ) | |||
952 | if ( num ) | 968 | if ( num ) |
953 | save(); | 969 | save(); |
954 | if ( num ) | 970 | if ( num ) |
@@ -967,7 +983,7 @@ void MainWindow::slotSyncMenu( int action ) | |||
967 | return; | 983 | return; |
968 | } | 984 | } |
969 | if ( action == 1 ) { | 985 | if ( action == 1 ) { |
970 | multiSync( true ); | 986 | multiSync( true ); |
971 | return; | 987 | return; |
972 | } | 988 | } |
973 | 989 | ||
@@ -979,3 +995,3 @@ void MainWindow::slotSyncMenu( int action ) | |||
979 | mView->setSyncName( KOPrefs::instance()->mLocalMachineName ); | 995 | mView->setSyncName( KOPrefs::instance()->mLocalMachineName ); |
980 | KConfig config ( locateLocal( "config","syncprofilesrc" ) ); | 996 | KConfig config ( locateLocal( "config","syncprofilesrc" ) ); |
981 | KSyncProfile* temp = new KSyncProfile (); | 997 | KSyncProfile* temp = new KSyncProfile (); |
@@ -999,3 +1015,3 @@ void MainWindow::slotSyncMenu( int action ) | |||
999 | if ( temp->getIsLocalFileSync() ) { | 1015 | if ( temp->getIsLocalFileSync() ) { |
1000 | if ( syncWithFile( temp->getRemoteFileName( ), false ) ) | 1016 | if ( syncWithFile( temp->getRemoteFileName( ), false ) ) |
1001 | KOPrefs::instance()->mLastSyncedLocalFile = temp->getRemoteFileName(); | 1017 | KOPrefs::instance()->mLastSyncedLocalFile = temp->getRemoteFileName(); |
@@ -1037,3 +1053,3 @@ void MainWindow::displayText( QString text ,QString cap ) | |||
1037 | QTextBrowser tb ( &dia ); | 1053 | QTextBrowser tb ( &dia ); |
1038 | lay->addWidget( &tb ); | 1054 | lay->addWidget( &tb ); |
1039 | tb.setText( text ); | 1055 | tb.setText( text ); |
@@ -1049,3 +1065,3 @@ void MainWindow::displayFile( QString fn, QString cap ) | |||
1049 | QString fileName = resourcePath() + fn; | 1065 | QString fileName = resourcePath() + fn; |
1050 | QString text; | 1066 | QString text; |
1051 | QFile file( fileName ); | 1067 | QFile file( fileName ); |
@@ -1053,7 +1069,7 @@ void MainWindow::displayFile( QString fn, QString cap ) | |||
1053 | return ; | 1069 | return ; |
1054 | 1070 | ||
1055 | } | 1071 | } |
1056 | QTextStream ts( &file ); | 1072 | QTextStream ts( &file ); |
1057 | text = ts.read(); | 1073 | text = ts.read(); |
1058 | file.close(); | 1074 | file.close(); |
1059 | displayText( text, cap); | 1075 | displayText( text, cap); |
@@ -1080,3 +1096,3 @@ void MainWindow::synchowto() | |||
1080 | #if 0 | 1096 | #if 0 |
1081 | QPtrList<Incidence> er = mCalendar->rawIncidences(); | 1097 | QPtrList<Incidence> er = mCalendar->rawIncidences(); |
1082 | Incidence* inR = er.first(); | 1098 | Incidence* inR = er.first(); |
@@ -1094,3 +1110,3 @@ void MainWindow::synchowto() | |||
1094 | displayFile( "howtoSYNC.txt",i18n("KO/Pi Synchronization HowTo") ); | 1110 | displayFile( "howtoSYNC.txt",i18n("KO/Pi Synchronization HowTo") ); |
1095 | } | 1111 | } |
1096 | void MainWindow::faq() | 1112 | void MainWindow::faq() |
@@ -1117,3 +1133,3 @@ void MainWindow::about() | |||
1117 | "(KO/Pi) " + version + " - " + | 1133 | "(KO/Pi) " + version + " - " + |
1118 | 1134 | ||
1119 | #ifdef DESKTOP_VERSION | 1135 | #ifdef DESKTOP_VERSION |
@@ -1177,3 +1193,3 @@ void MainWindow::keyBindings() | |||
1177 | displayText( text, cap); | 1193 | displayText( text, cap); |
1178 | 1194 | ||
1179 | } | 1195 | } |
@@ -1189,4 +1205,4 @@ void MainWindow::aboutAutoSaving() | |||
1189 | delete msg; | 1205 | delete msg; |
1190 | 1206 | ||
1191 | 1207 | ||
1192 | } | 1208 | } |
@@ -1207,3 +1223,3 @@ void MainWindow::aboutKnownBugs() | |||
1207 | delete msg; | 1223 | delete msg; |
1208 | 1224 | ||
1209 | } | 1225 | } |
@@ -1219,19 +1235,19 @@ void MainWindow::processIncidenceSelection( Incidence *incidence ) | |||
1219 | enableIncidenceActions( false ); | 1235 | enableIncidenceActions( false ); |
1220 | 1236 | ||
1221 | mNewSubTodoAction->setEnabled( false ); | 1237 | mNewSubTodoAction->setEnabled( false ); |
1222 | setCaptionToDates(); | 1238 | setCaptionToDates(); |
1223 | return; | 1239 | return; |
1224 | 1240 | ||
1225 | } | 1241 | } |
1226 | 1242 | ||
1227 | //KGlobal::locale()->formatDateTime(nextA, true); | 1243 | //KGlobal::locale()->formatDateTime(nextA, true); |
1228 | QString startString = ""; | 1244 | QString startString = ""; |
1229 | if ( incidence->type() != "Todo" ) { | 1245 | if ( incidence->type() != "Todo" ) { |
1230 | if ( incidence->dtStart().date() < incidence->dtEnd().date() ) { | 1246 | if ( incidence->dtStart().date() < incidence->dtEnd().date() ) { |
1231 | if ( incidence->doesFloat() ) { | 1247 | if ( incidence->doesFloat() ) { |
1232 | startString += ": "+incidence->dtStartDateStr( true ); | 1248 | startString += ": "+incidence->dtStartDateStr( true ); |
1233 | startString += " --- "+((Event*)incidence)->dtEndDateStr( true ); | 1249 | startString += " --- "+((Event*)incidence)->dtEndDateStr( true ); |
1234 | 1250 | ||
1235 | } else { | 1251 | } else { |
1236 | startString = ": "+incidence->dtStartStr(true); | 1252 | startString = ": "+incidence->dtStartStr(true); |
1237 | startString += " --- "+((Event*)incidence)->dtEndStr(true); | 1253 | startString += " --- "+((Event*)incidence)->dtEndStr(true); |
@@ -1239,3 +1255,3 @@ void MainWindow::processIncidenceSelection( Incidence *incidence ) | |||
1239 | } | 1255 | } |
1240 | 1256 | ||
1241 | } else { | 1257 | } else { |
@@ -1244,7 +1260,7 @@ void MainWindow::processIncidenceSelection( Incidence *incidence ) | |||
1244 | "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time()); | 1260 | "-"+KGlobal::locale()->formatTime(incidence->dtEnd().time()); |
1245 | startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true); | 1261 | startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true); |
1246 | } | 1262 | } |
1247 | 1263 | ||
1248 | } | 1264 | } |
1249 | else | 1265 | else |
1250 | startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed"); | 1266 | startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed"); |
@@ -1253,5 +1269,5 @@ void MainWindow::processIncidenceSelection( Incidence *incidence ) | |||
1253 | setCaption( incidence->summary()+startString); | 1269 | setCaption( incidence->summary()+startString); |
1254 | 1270 | ||
1255 | enableIncidenceActions( true ); | 1271 | enableIncidenceActions( true ); |
1256 | 1272 | ||
1257 | if ( incidence->type() == "Event" ) { | 1273 | if ( incidence->type() == "Event" ) { |
@@ -1294,3 +1310,3 @@ void MainWindow::importOL() | |||
1294 | void MainWindow::importBday() | 1310 | void MainWindow::importBday() |
1295 | { | 1311 | { |
1296 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), | 1312 | int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"), |
@@ -1301,5 +1317,5 @@ void MainWindow::importBday() | |||
1301 | mView->importBday(); | 1317 | mView->importBday(); |
1302 | 1318 | ||
1303 | } | 1319 | } |
1304 | 1320 | ||
1305 | 1321 | ||
@@ -1325,5 +1341,5 @@ void MainWindow::importQtopia() | |||
1325 | 1341 | ||
1326 | #endif | 1342 | #endif |
1327 | } | 1343 | } |
1328 | 1344 | ||
1329 | void MainWindow::saveOnClose() | 1345 | void MainWindow::saveOnClose() |
@@ -1343,3 +1359,3 @@ void MainWindow::slotModifiedChanged( bool changed ) | |||
1343 | int msec; | 1359 | int msec; |
1344 | // we store the changes after 1 minute, | 1360 | // we store the changes after 1 minute, |
1345 | // and for safety reasons after 10 minutes again | 1361 | // and for safety reasons after 10 minutes again |
@@ -1356,3 +1372,3 @@ void MainWindow::save() | |||
1356 | { | 1372 | { |
1357 | if ( mBlockSaveFlag ) | 1373 | if ( mBlockSaveFlag ) |
1358 | return; | 1374 | return; |
@@ -1372,5 +1388,5 @@ void MainWindow::save() | |||
1372 | savemes.sprintf(i18n("KO/Pi:File Saved. Needed %d sec, %d ms"),(msNeeded/1000)%100,msNeeded%1000 ); | 1388 | savemes.sprintf(i18n("KO/Pi:File Saved. Needed %d sec, %d ms"),(msNeeded/1000)%100,msNeeded%1000 ); |
1373 | setCaption(savemes); | 1389 | setCaption(savemes); |
1374 | } else | 1390 | } else |
1375 | setCaption(i18n("Saving cancelled!")); | 1391 | setCaption(i18n("Saving cancelled!")); |
1376 | mCalendarModifiedFlag = false; | 1392 | mCalendarModifiedFlag = false; |
@@ -1379,3 +1395,3 @@ void MainWindow::save() | |||
1379 | 1395 | ||
1380 | void MainWindow::keyReleaseEvent ( QKeyEvent * e) | 1396 | void MainWindow::keyReleaseEvent ( QKeyEvent * e) |
1381 | { | 1397 | { |
@@ -1385,3 +1401,3 @@ void MainWindow::keyReleaseEvent ( QKeyEvent * e) | |||
1385 | } | 1401 | } |
1386 | void MainWindow::keyPressEvent ( QKeyEvent * e ) | 1402 | void MainWindow::keyPressEvent ( QKeyEvent * e ) |
1387 | { | 1403 | { |
@@ -1420,3 +1436,3 @@ void MainWindow::keyPressEvent ( QKeyEvent * e ) | |||
1420 | mView->viewManager()->agendaView()->scrollOneHourUp(); | 1436 | mView->viewManager()->agendaView()->scrollOneHourUp(); |
1421 | break; | 1437 | break; |
1422 | case Qt::Key_I: | 1438 | case Qt::Key_I: |
@@ -1442,3 +1458,3 @@ void MainWindow::keyPressEvent ( QKeyEvent * e ) | |||
1442 | case Qt::Key_6: | 1458 | case Qt::Key_6: |
1443 | case Qt::Key_7: | 1459 | case Qt::Key_7: |
1444 | case Qt::Key_8: | 1460 | case Qt::Key_8: |
@@ -1461,3 +1477,3 @@ void MainWindow::keyPressEvent ( QKeyEvent * e ) | |||
1461 | mView->newSubTodo(); | 1477 | mView->newSubTodo(); |
1462 | else | 1478 | else |
1463 | mView->dialogManager()->showSearchDialog(); | 1479 | mView->dialogManager()->showSearchDialog(); |
@@ -1478,6 +1494,6 @@ void MainWindow::keyPressEvent ( QKeyEvent * e ) | |||
1478 | mView->viewManager()->showWhatsNextView(); | 1494 | mView->viewManager()->showWhatsNextView(); |
1479 | break; | 1495 | break; |
1480 | case Qt::Key_L: | 1496 | case Qt::Key_L: |
1481 | mView->viewManager()->showListView(); | 1497 | mView->viewManager()->showListView(); |
1482 | break; | 1498 | break; |
1483 | case Qt::Key_N: | 1499 | case Qt::Key_N: |
@@ -1485,13 +1501,13 @@ void MainWindow::keyPressEvent ( QKeyEvent * e ) | |||
1485 | showSelectedDates = true; | 1501 | showSelectedDates = true; |
1486 | break; | 1502 | break; |
1487 | case Qt::Key_V: | 1503 | case Qt::Key_V: |
1488 | mView->viewManager()->showTodoView(); | 1504 | mView->viewManager()->showTodoView(); |
1489 | break; | 1505 | break; |
1490 | case Qt::Key_C: | 1506 | case Qt::Key_C: |
1491 | mView->viewManager()->agendaView()->setStartHour( QTime::currentTime ().hour() ); | 1507 | mView->viewManager()->agendaView()->setStartHour( QTime::currentTime ().hour() ); |
1492 | break; | 1508 | break; |
1493 | case Qt::Key_P: | 1509 | case Qt::Key_P: |
1494 | mView->showDatePicker( ); | 1510 | mView->showDatePicker( ); |
1495 | break; | 1511 | break; |
1496 | case Qt::Key_F: | 1512 | case Qt::Key_F: |
1497 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) | 1513 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) |
@@ -1500,12 +1516,12 @@ void MainWindow::keyPressEvent ( QKeyEvent * e ) | |||
1500 | mView->toggleFilter(); | 1516 | mView->toggleFilter(); |
1501 | break; | 1517 | break; |
1502 | case Qt::Key_X: | 1518 | case Qt::Key_X: |
1503 | mView->toggleDateNavigatorWidget(); | 1519 | mView->toggleDateNavigatorWidget(); |
1504 | break; | 1520 | break; |
1505 | case Qt::Key_Space: | 1521 | case Qt::Key_Space: |
1506 | mView->toggleExpand(); | 1522 | mView->toggleExpand(); |
1507 | break; | 1523 | break; |
1508 | case Qt::Key_A: | 1524 | case Qt::Key_A: |
1509 | mView->toggleAllDaySize(); | 1525 | mView->toggleAllDaySize(); |
1510 | break; | 1526 | break; |
1511 | case Qt::Key_T: | 1527 | case Qt::Key_T: |
@@ -1524,4 +1540,4 @@ void MainWindow::keyPressEvent ( QKeyEvent * e ) | |||
1524 | break; | 1540 | break; |
1525 | // case Qt::Key_Return: | 1541 | // case Qt::Key_Return: |
1526 | case Qt::Key_E: | 1542 | case Qt::Key_E: |
1527 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) | 1543 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) |
@@ -1541,3 +1557,3 @@ void MainWindow::keyPressEvent ( QKeyEvent * e ) | |||
1541 | break; | 1557 | break; |
1542 | 1558 | ||
1543 | 1559 | ||
@@ -1566,3 +1582,3 @@ void MainWindow::fillFilterMenu() | |||
1566 | } | 1582 | } |
1567 | selectFilterMenu->insertSeparator(); | 1583 | selectFilterMenu->insertSeparator(); |
1568 | QPtrList<CalFilter> fili = mView->filters(); | 1584 | QPtrList<CalFilter> fili = mView->filters(); |
@@ -1606,3 +1622,3 @@ void MainWindow::configureToolBar( int item ) | |||
1606 | p-> mShowIconBack = configureToolBarMenu->isItemChecked( 210 ); | 1622 | p-> mShowIconBack = configureToolBarMenu->isItemChecked( 210 ); |
1607 | p-> mShowIconToday= configureToolBarMenu->isItemChecked( 130 ); | 1623 | p-> mShowIconToday= configureToolBarMenu->isItemChecked( 130 ); |
1608 | p-> mShowIconForward= configureToolBarMenu->isItemChecked( 220 ); | 1624 | p-> mShowIconForward= configureToolBarMenu->isItemChecked( 220 ); |
@@ -1612,3 +1628,3 @@ void MainWindow::configureToolBar( int item ) | |||
1612 | p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 ); | 1628 | p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 ); |
1613 | p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 ); | 1629 | p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 ); |
1614 | // initActions(); | 1630 | // initActions(); |
@@ -1623,3 +1639,3 @@ void MainWindow::setCaptionToDates() | |||
1623 | setCaption( i18n("Dates: ") + selDates ); | 1639 | setCaption( i18n("Dates: ") + selDates ); |
1624 | 1640 | ||
1625 | } | 1641 | } |
@@ -1627,3 +1643,3 @@ void MainWindow::setCaptionToDates() | |||
1627 | void MainWindow::configureAgenda( int item ) | 1643 | void MainWindow::configureAgenda( int item ) |
1628 | { | 1644 | { |
1629 | 1645 | ||
@@ -1651,3 +1667,3 @@ void MainWindow::configureAgenda( int item ) | |||
1651 | void MainWindow::saveCalendar() | 1667 | void MainWindow::saveCalendar() |
1652 | { | 1668 | { |
1653 | QString fn = KOPrefs::instance()->mLastSaveFile; | 1669 | QString fn = KOPrefs::instance()->mLastSaveFile; |
@@ -1661,3 +1677,3 @@ void MainWindow::saveCalendar() | |||
1661 | bool createbup = true; | 1677 | bool createbup = true; |
1662 | if ( info. exists() ) { | 1678 | if ( info. exists() ) { |
1663 | mes = i18n("Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n").arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )) ; | 1679 | mes = i18n("Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n").arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )) ; |
@@ -1671,3 +1687,3 @@ void MainWindow::saveCalendar() | |||
1671 | if ( createbup ) { | 1687 | if ( createbup ) { |
1672 | mView->saveCalendar( fn ); | 1688 | mView->saveCalendar( fn ); |
1673 | mes = i18n("KO/Pi:Saved %1").arg(fn); | 1689 | mes = i18n("KO/Pi:Saved %1").arg(fn); |
@@ -1679,6 +1695,6 @@ void MainWindow::loadCalendar() | |||
1679 | { | 1695 | { |
1680 | 1696 | ||
1681 | QString fn = KOPrefs::instance()->mLastLoadFile; | 1697 | QString fn = KOPrefs::instance()->mLastLoadFile; |
1682 | fn = KFileDialog::getOpenFileName( fn, i18n("Load backup filename"), this ); | 1698 | fn = KFileDialog::getOpenFileName( fn, i18n("Load backup filename"), this ); |
1683 | 1699 | ||
1684 | if ( fn == "" ) | 1700 | if ( fn == "" ) |
@@ -1728,5 +1744,5 @@ void MainWindow::importFile( QString fn, bool quick ) | |||
1728 | return; | 1744 | return; |
1729 | } | 1745 | } |
1730 | int result = 0; | 1746 | int result = 0; |
1731 | if ( !quick ) { | 1747 | if ( !quick ) { |
1732 | mess = i18n( "Import file \n...%1\nfrom:\n%2\nDuplicated entries\nwill not be imported!\n").arg(fn.right( 25)).arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )); | 1748 | mess = i18n( "Import file \n...%1\nfrom:\n%2\nDuplicated entries\nwill not be imported!\n").arg(fn.right( 25)).arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )); |
@@ -1749,3 +1765,3 @@ void MainWindow::importIcal() | |||
1749 | { | 1765 | { |
1750 | 1766 | ||
1751 | QString fn =KOPrefs::instance()->mLastImportFile; | 1767 | QString fn =KOPrefs::instance()->mLastImportFile; |
@@ -1756,3 +1772,3 @@ void MainWindow::importIcal() | |||
1756 | importFile( fn, true ); | 1772 | importFile( fn, true ); |
1757 | 1773 | ||
1758 | } | 1774 | } |
@@ -1769,3 +1785,3 @@ void MainWindow::exportVCalendar() | |||
1769 | bool createbup = true; | 1785 | bool createbup = true; |
1770 | if ( info. exists() ) { | 1786 | if ( info. exists() ) { |
1771 | mes = i18n("Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) ); | 1787 | mes = i18n("Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) ); |
@@ -1779,4 +1795,4 @@ void MainWindow::exportVCalendar() | |||
1779 | if ( createbup ) { | 1795 | if ( createbup ) { |
1780 | if ( mView->exportVCalendar( fn ) ) { | 1796 | if ( mView->exportVCalendar( fn ) ) { |
1781 | KOPrefs::instance()->mLastVcalFile = fn; | 1797 | KOPrefs::instance()->mLastVcalFile = fn; |
1782 | if ( fn.length() > 20 ) | 1798 | if ( fn.length() > 20 ) |
@@ -1790,12 +1806,12 @@ void MainWindow::exportVCalendar() | |||
1790 | } | 1806 | } |
1791 | #include <qpushbutton.h> | 1807 | #include <qpushbutton.h> |
1792 | QString MainWindow::getPassword( ) | 1808 | QString MainWindow::getPassword( ) |
1793 | { | 1809 | { |
1794 | QString retfile = ""; | 1810 | QString retfile = ""; |
1795 | QDialog dia ( this, "input-dialog", true ); | 1811 | QDialog dia ( this, "input-dialog", true ); |
1796 | QLineEdit lab ( &dia ); | 1812 | QLineEdit lab ( &dia ); |
1797 | lab.setEchoMode( QLineEdit::Password ); | 1813 | lab.setEchoMode( QLineEdit::Password ); |
1798 | QVBoxLayout lay( &dia ); | 1814 | QVBoxLayout lay( &dia ); |
1799 | lay.setMargin(7); | 1815 | lay.setMargin(7); |
1800 | lay.setSpacing(7); | 1816 | lay.setSpacing(7); |
1801 | lay.addWidget( &lab); | 1817 | lay.addWidget( &lab); |
@@ -1803,3 +1819,3 @@ QString MainWindow::getPassword( ) | |||
1803 | dia.setCaption( i18n("Enter password") ); | 1819 | dia.setCaption( i18n("Enter password") ); |
1804 | QPushButton pb ( "OK", &dia); | 1820 | QPushButton pb ( "OK", &dia); |
1805 | lay.addWidget( &pb ); | 1821 | lay.addWidget( &pb ); |
@@ -1846,5 +1862,5 @@ bool MainWindow::syncWithFile( QString fn , bool quick ) | |||
1846 | return ret; | 1862 | return ret; |
1847 | } | 1863 | } |
1848 | int result = 0; | 1864 | int result = 0; |
1849 | if ( !quick ) { | 1865 | if ( !quick ) { |
1850 | mess = i18n("Sync with file \n...%1\nfrom:\n%2\n").arg(fn.right( 25)).arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )); | 1866 | mess = i18n("Sync with file \n...%1\nfrom:\n%2\n").arg(fn.right( 25)).arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )); |
@@ -1854,3 +1870,3 @@ bool MainWindow::syncWithFile( QString fn , bool quick ) | |||
1854 | 0, 1 ); | 1870 | 0, 1 ); |
1855 | if ( result ) | 1871 | if ( result ) |
1856 | return false; | 1872 | return false; |
@@ -1858,3 +1874,3 @@ bool MainWindow::syncWithFile( QString fn , bool quick ) | |||
1858 | if ( KOPrefs::instance()->mAskForPreferences ) | 1874 | if ( KOPrefs::instance()->mAskForPreferences ) |
1859 | mView->edit_sync_options(); | 1875 | mView->edit_sync_options(); |
1860 | if ( result == 0 ) { | 1876 | if ( result == 0 ) { |
@@ -1889,3 +1905,3 @@ void MainWindow::confSync() | |||
1889 | //mView->writeSettings(); | 1905 | //mView->writeSettings(); |
1890 | 1906 | ||
1891 | 1907 | ||
@@ -1899,3 +1915,3 @@ void MainWindow::syncRemote( KSyncProfile* prof, bool ask) | |||
1899 | question, | 1915 | question, |
1900 | i18n("Yes"), i18n("No"), | 1916 | i18n("Yes"), i18n("No"), |
1901 | 0, 0 ) != 0 ) | 1917 | 0, 0 ) != 0 ) |
@@ -1909,5 +1925,5 @@ void MainWindow::syncRemote( KSyncProfile* prof, bool ask) | |||
1909 | 1925 | ||
1910 | } | 1926 | } |
1911 | int maxlen = 30; | 1927 | int maxlen = 30; |
1912 | if ( QApplication::desktop()->width() > 320 ) | 1928 | if ( QApplication::desktop()->width() > 320 ) |
1913 | maxlen += 25; | 1929 | maxlen += 25; |
@@ -1930,3 +1946,3 @@ void MainWindow::syncRemote( KSyncProfile* prof, bool ask) | |||
1930 | i18n("Okay!")) ; | 1946 | i18n("Okay!")) ; |
1931 | setCaption ("KO/Pi"); | 1947 | setCaption ("KO/Pi"); |
1932 | return; | 1948 | return; |
@@ -1941,3 +1957,3 @@ void MainWindow::syncRemote( KSyncProfile* prof, bool ask) | |||
1941 | if ( KOPrefs::instance()->mWriteBackFile ) { | 1957 | if ( KOPrefs::instance()->mWriteBackFile ) { |
1942 | command = prof->getPostSyncCommand(); | 1958 | command = prof->getPostSyncCommand(); |
1943 | setCaption ( i18n( "Writing back file ..." ) ); | 1959 | setCaption ( i18n( "Writing back file ..." ) ); |
@@ -1956,5 +1972,5 @@ void MainWindow::syncRemote( KSyncProfile* prof, bool ask) | |||
1956 | void MainWindow::syncSSH() | 1972 | void MainWindow::syncSSH() |
1957 | { | 1973 | { |
1958 | // not used anymore | 1974 | // not used anymore |
1959 | QTime timer; | 1975 | QTime timer; |
1960 | timer.start(); | 1976 | timer.start(); |
@@ -1973,3 +1989,3 @@ void MainWindow::syncSSH() | |||
1973 | int maxlen = 30; | 1989 | int maxlen = 30; |
1974 | if ( QApplication::desktop()->width() > 320 ) | 1990 | if ( QApplication::desktop()->width() > 320 ) |
1975 | maxlen += 25; | 1991 | maxlen += 25; |
@@ -1983,6 +1999,6 @@ void MainWindow::syncSSH() | |||
1983 | question += i18n("Local temp file:\n " ) + localFile +"\n"; | 1999 | question += i18n("Local temp file:\n " ) + localFile +"\n"; |
1984 | 2000 | ||
1985 | if ( QMessageBox::information( this, i18n("KO/Pi Sync"), | 2001 | if ( QMessageBox::information( this, i18n("KO/Pi Sync"), |
1986 | question, | 2002 | question, |
1987 | i18n("Yes"), i18n("No"), | 2003 | i18n("Yes"), i18n("No"), |
1988 | 0, 0 ) != 0 ) | 2004 | 0, 0 ) != 0 ) |
@@ -2012,3 +2028,3 @@ void MainWindow::syncSSH() | |||
2012 | i18n("Okay!")) ; | 2028 | i18n("Okay!")) ; |
2013 | setCaption ("KO/Pi"); | 2029 | setCaption ("KO/Pi"); |
2014 | return; | 2030 | return; |
@@ -2025,3 +2041,3 @@ void MainWindow::syncSSH() | |||
2025 | if ( KOPrefs::instance()->mWriteBackFile ) { | 2041 | if ( KOPrefs::instance()->mWriteBackFile ) { |
2026 | command = "scp " + localFile +" " +remoteUser + "@" + remoteIP +":" + remoteFile ; | 2042 | command = "scp " + localFile +" " +remoteUser + "@" + remoteIP +":" + remoteFile ; |
2027 | setCaption ( i18n( "Writing back file ..." ) ); | 2043 | setCaption ( i18n( "Writing back file ..." ) ); |
@@ -2038,3 +2054,3 @@ void MainWindow::syncSSH() | |||
2038 | i18n("Okay!")) ; | 2054 | i18n("Okay!")) ; |
2039 | setCaption ("KO/Pi"); | 2055 | setCaption ("KO/Pi"); |
2040 | return; | 2056 | return; |
@@ -2053,3 +2069,3 @@ void MainWindow::syncSSH() | |||
2053 | mView->syncCalendar( "/home/polo/Applications/korganizer/z_sync.ics", 0 ); | 2069 | mView->syncCalendar( "/home/polo/Applications/korganizer/z_sync.ics", 0 ); |
2054 | while ( mBlockSaveFlag ) | 2070 | while ( mBlockSaveFlag ) |
2055 | qApp->processEvents(); | 2071 | qApp->processEvents(); |
@@ -2068,3 +2084,3 @@ void MainWindow::syncSharp() | |||
2068 | slotModifiedChanged( true ); | 2084 | slotModifiedChanged( true ); |
2069 | 2085 | ||
2070 | } | 2086 | } |
@@ -2076,3 +2092,3 @@ void MainWindow::syncPhone() | |||
2076 | slotModifiedChanged( true ); | 2092 | slotModifiedChanged( true ); |
2077 | 2093 | ||
2078 | } | 2094 | } |