author | zautrix <zautrix> | 2005-07-10 12:06:17 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-10 12:06:17 (UTC) |
commit | a49b694c286167745886996d990f524f9141adbd (patch) (unidiff) | |
tree | fe446c465bfbba1d068024449b18642de53dc0f1 | |
parent | 58b7818a74809dc9280a3249eeb7e0195a66f93d (diff) | |
download | kdepimpi-a49b694c286167745886996d990f524f9141adbd.zip kdepimpi-a49b694c286167745886996d990f524f9141adbd.tar.gz kdepimpi-a49b694c286167745886996d990f524f9141adbd.tar.bz2 |
fixx
-rw-r--r-- | bin/kdepim/WhatsNew.txt | 2 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 7 | ||||
-rw-r--r-- | korganizer/calendarview.h | 1 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 27 | ||||
-rw-r--r-- | korganizer/mainwindow.h | 5 |
5 files changed, 31 insertions, 11 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 3da24c5..8127ef4 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt | |||
@@ -1,69 +1,69 @@ | |||
1 | Info about the changes in new versions of KDE-Pim/Pi | 1 | Info about the changes in new versions of KDE-Pim/Pi |
2 | 2 | ||
3 | ********** VERSION 2.1.16 ************ | 3 | ********** VERSION 2.1.16 ************ |
4 | 4 | ||
5 | 5 | Fixed a problem with the menu bar in KO/Pi and using the "Menu" hardware key on the Zaurus. | |
6 | 6 | ||
7 | ********** VERSION 2.1.15 ************ | 7 | ********** VERSION 2.1.15 ************ |
8 | 8 | ||
9 | Fixed two layout problems on the Z: | 9 | Fixed two layout problems on the Z: |
10 | Made the with of the newly added buttons on the Quick-Todo smaller. | 10 | Made the with of the newly added buttons on the Quick-Todo smaller. |
11 | Made listweek layout in 2 columns on the Z760 in portait screen and full menubar visible. | 11 | Made listweek layout in 2 columns on the Z760 in portait screen and full menubar visible. |
12 | 12 | ||
13 | 13 | ||
14 | ********** VERSION 2.1.14 ************ | 14 | ********** VERSION 2.1.14 ************ |
15 | 15 | ||
16 | Added some buttons to the KO/Pi Quick-todo line to make it possible to quickly access some todo view layout settings like display all flat/open/close and hide/show running/done. | 16 | Added some buttons to the KO/Pi Quick-todo line to make it possible to quickly access some todo view layout settings like display all flat/open/close and hide/show running/done. |
17 | Added a button to add a subtodo quickly. | 17 | Added a button to add a subtodo quickly. |
18 | 18 | ||
19 | Added a possibility to search for conflicting events. (In the Action menu. Keyboard shortcut "q", shift+q or ctrl +q ). | 19 | Added a possibility to search for conflicting events. (In the Action menu. Keyboard shortcut "q", shift+q or ctrl +q ). |
20 | Added an option to change the layout of the list week to column mode. | 20 | Added an option to change the layout of the list week to column mode. |
21 | 21 | ||
22 | Fixed some usability problems in pi-sync mode by adding some progress information about file transfer. | 22 | Fixed some usability problems in pi-sync mode by adding some progress information about file transfer. |
23 | 23 | ||
24 | Fixed pi-sync problems with the new multi calendar feature. | 24 | Fixed pi-sync problems with the new multi calendar feature. |
25 | Now pi-sync behaviour should be: | 25 | Now pi-sync behaviour should be: |
26 | 1) Local sends file request ( as usual ) | 26 | 1) Local sends file request ( as usual ) |
27 | 2) Remote sends file which contains data of all enabled ( the calendar where the "eye" column is checked ) calendars. | 27 | 2) Remote sends file which contains data of all enabled ( the calendar where the "eye" column is checked ) calendars. |
28 | 3) Local syncs with data, adds new entries to default calendar and sends file back ( as usual ). | 28 | 3) Local syncs with data, adds new entries to default calendar and sends file back ( as usual ). |
29 | If the data which local receives contains entries which are on disabled calendars on local this entries are updated and not added as duplicates to the default calendar. | 29 | If the data which local receives contains entries which are on disabled calendars on local this entries are updated and not added as duplicates to the default calendar. |
30 | 4) Remote updates the data and adds new entries to default calendar. Readonly entries are not changed on remote. | 30 | 4) Remote updates the data and adds new entries to default calendar. Readonly entries are not changed on remote. |
31 | If the data which remote receives contains entries which are on disabled calendars on remote this entries are updated and not added as duplicates to the default calendar. | 31 | If the data which remote receives contains entries which are on disabled calendars on remote this entries are updated and not added as duplicates to the default calendar. |
32 | 32 | ||
33 | Summary: | 33 | Summary: |
34 | No new item ( new created after the last sync ) in a disabled calendar is propagated to the sync partner. Readonly items are synced and added/changed on the sync partner if it is not readonly on the sync partner. | 34 | No new item ( new created after the last sync ) in a disabled calendar is propagated to the sync partner. Readonly items are synced and added/changed on the sync partner if it is not readonly on the sync partner. |
35 | If you have different calendars on remote and local and some of them disabled you may get some "strange" bahaviour. | 35 | If you have different calendars on remote and local and some of them disabled you may get some "strange" bahaviour. |
36 | Well, the syncing has become quite complicated ... you should have no problems if you enable all calendars. | 36 | Well, the syncing has become quite complicated ... you should have no problems if you enable all calendars. |
37 | 37 | ||
38 | ********** VERSION 2.1.13 ************ | 38 | ********** VERSION 2.1.13 ************ |
39 | 39 | ||
40 | Fixed a problem in KA/Pi search. | 40 | Fixed a problem in KA/Pi search. |
41 | Fixed some minor problems in KO/Pi. | 41 | Fixed some minor problems in KO/Pi. |
42 | Added calendar selection possibility to the todo view popup and to the event/todo/journal editor. | 42 | Added calendar selection possibility to the todo view popup and to the event/todo/journal editor. |
43 | 43 | ||
44 | Fixed memory usage problems in KA/Pi: | 44 | Fixed memory usage problems in KA/Pi: |
45 | When loading data KA/Pi did load the file data twice. | 45 | When loading data KA/Pi did load the file data twice. |
46 | Example: | 46 | Example: |
47 | A 600k file did consume 1200k memory during loading process. | 47 | A 600k file did consume 1200k memory during loading process. |
48 | This is fixed, it does now consume only 600k during loading process. | 48 | This is fixed, it does now consume only 600k during loading process. |
49 | When saving data KA/Pi did consume a lot of memory for the data parsing during the save process. | 49 | When saving data KA/Pi did consume a lot of memory for the data parsing during the save process. |
50 | This is fixed. | 50 | This is fixed. |
51 | Example: | 51 | Example: |
52 | Before saving a 600k file KA/Pi did consume 21.7 Meg of Ram. | 52 | Before saving a 600k file KA/Pi did consume 21.7 Meg of Ram. |
53 | When saving KA/Pi did consume 28.6 Meg of Ram. That causes a crash on the Zaurus because there was no memeory left in the system. | 53 | When saving KA/Pi did consume 28.6 Meg of Ram. That causes a crash on the Zaurus because there was no memeory left in the system. |
54 | Now KA/Pi is consuming on saving the same data 22.0 Meg of Ram during the save process. | 54 | Now KA/Pi is consuming on saving the same data 22.0 Meg of Ram during the save process. |
55 | Note: The memory usage of KA/Pi after the data is loaded/saved has not changed. | 55 | Note: The memory usage of KA/Pi after the data is loaded/saved has not changed. |
56 | The saving of data may be a bit slower now. | 56 | The saving of data may be a bit slower now. |
57 | 57 | ||
58 | Fixed memory usage problems in KO/Pi: | 58 | Fixed memory usage problems in KO/Pi: |
59 | When KO/Pi did save the data to file, it did not release the used buffers after saving. | 59 | When KO/Pi did save the data to file, it did not release the used buffers after saving. |
60 | The used buffer was released after saving the next time, but there was new buffer space allocated again on that save operation. | 60 | The used buffer was released after saving the next time, but there was new buffer space allocated again on that save operation. |
61 | This is fixed. | 61 | This is fixed. |
62 | Example: | 62 | Example: |
63 | When saving a 400k file KO/Pi do now use 400k less memory now. | 63 | When saving a 400k file KO/Pi do now use 400k less memory now. |
64 | 64 | ||
65 | Optimized memory usage in KO/Pi Agenda view: | 65 | Optimized memory usage in KO/Pi Agenda view: |
66 | KO/Pi is storing some paint information in extra buffers for faster repainting of the agenda view. | 66 | KO/Pi is storing some paint information in extra buffers for faster repainting of the agenda view. |
67 | These buffers were not made smaller (i.e. downsized) because of performance reasons. | 67 | These buffers were not made smaller (i.e. downsized) because of performance reasons. |
68 | The handling of these buffers are now much smarter: | 68 | The handling of these buffers are now much smarter: |
69 | Two (of six) buffers are removed completely. | 69 | Two (of six) buffers are removed completely. |
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 17f1659..a9e402e 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -306,129 +306,129 @@ private: | |||
306 | QRadioButton* vcal, *ical, *local, *tz; | 306 | QRadioButton* vcal, *ical, *local, *tz; |
307 | }; | 307 | }; |
308 | class KOCatPrefs : public QDialog | 308 | class KOCatPrefs : public QDialog |
309 | { | 309 | { |
310 | public: | 310 | public: |
311 | KOCatPrefs( QWidget *parent=0, const char *name=0 ) : | 311 | KOCatPrefs( QWidget *parent=0, const char *name=0 ) : |
312 | QDialog( parent, name, true ) | 312 | QDialog( parent, name, true ) |
313 | { | 313 | { |
314 | setCaption( i18n("Manage new Categories") ); | 314 | setCaption( i18n("Manage new Categories") ); |
315 | QVBoxLayout* lay = new QVBoxLayout( this ); | 315 | QVBoxLayout* lay = new QVBoxLayout( this ); |
316 | lay->setSpacing( 3 ); | 316 | lay->setSpacing( 3 ); |
317 | lay->setMargin( 3 ); | 317 | lay->setMargin( 3 ); |
318 | QLabel * lab = new QLabel( i18n("After importing/loading/syncing there may be new categories in events or todos which are not added automatically to the category list. Please choose what to do <b>now</b>:"), this ); | 318 | QLabel * lab = new QLabel( i18n("After importing/loading/syncing there may be new categories in events or todos which are not added automatically to the category list. Please choose what to do <b>now</b>:"), this ); |
319 | lay->addWidget( lab ); | 319 | lay->addWidget( lab ); |
320 | QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("New categories not in list:"), this ); | 320 | QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("New categories not in list:"), this ); |
321 | lay->addWidget( format ); | 321 | lay->addWidget( format ); |
322 | format->setExclusive ( true ) ; | 322 | format->setExclusive ( true ) ; |
323 | addCatBut = new QRadioButton(i18n("Add to category list"), format ); | 323 | addCatBut = new QRadioButton(i18n("Add to category list"), format ); |
324 | new QRadioButton(i18n("Remove from Events/Todos"), format ); | 324 | new QRadioButton(i18n("Remove from Events/Todos"), format ); |
325 | addCatBut->setChecked( true ); | 325 | addCatBut->setChecked( true ); |
326 | QPushButton * ok = new QPushButton( i18n("Change category list now!"), this ); | 326 | QPushButton * ok = new QPushButton( i18n("Change category list now!"), this ); |
327 | lay->addWidget( ok ); | 327 | lay->addWidget( ok ); |
328 | QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); | 328 | QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); |
329 | lay->addWidget( cancel ); | 329 | lay->addWidget( cancel ); |
330 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); | 330 | connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); |
331 | connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); | 331 | connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); |
332 | resize( 200, 200 ); | 332 | resize( 200, 200 ); |
333 | } | 333 | } |
334 | 334 | ||
335 | bool addCat() { return addCatBut->isChecked(); } | 335 | bool addCat() { return addCatBut->isChecked(); } |
336 | private: | 336 | private: |
337 | QRadioButton* addCatBut; | 337 | QRadioButton* addCatBut; |
338 | }; | 338 | }; |
339 | 339 | ||
340 | 340 | ||
341 | 341 | ||
342 | CalendarView::CalendarView( CalendarResources *calendar, | 342 | CalendarView::CalendarView( CalendarResources *calendar, |
343 | QWidget *parent, const char *name ) | 343 | QWidget *parent, const char *name ) |
344 | : CalendarViewBase( parent, name ), | 344 | : CalendarViewBase( parent, name ), |
345 | mCalendar( calendar ), | 345 | mCalendar( calendar ), |
346 | mResourceManager( calendar->resourceManager() ) | 346 | mResourceManager( calendar->resourceManager() ) |
347 | { | 347 | { |
348 | 348 | ||
349 | mEventEditor = 0; | 349 | mEventEditor = 0; |
350 | mTodoEditor = 0; | 350 | mTodoEditor = 0; |
351 | 351 | ||
352 | init(); | 352 | init(); |
353 | } | 353 | } |
354 | 354 | ||
355 | CalendarView::CalendarView( Calendar *calendar, | 355 | CalendarView::CalendarView( Calendar *calendar, |
356 | QWidget *parent, const char *name ) | 356 | QWidget *parent, const char *name ) |
357 | : CalendarViewBase( parent, name ), | 357 | : CalendarViewBase( parent, name ), |
358 | mCalendar( calendar ), | 358 | mCalendar( calendar ), |
359 | mResourceManager( 0 ) | 359 | mResourceManager( 0 ) |
360 | { | 360 | { |
361 | 361 | ||
362 | mEventEditor = 0; | 362 | mEventEditor = 0; |
363 | mTodoEditor = 0; | 363 | mTodoEditor = 0; |
364 | init(); | 364 | init(); |
365 | } | 365 | } |
366 | 366 | ||
367 | void CalendarView::init() | 367 | void CalendarView::init() |
368 | { | 368 | { |
369 | mNextAlarmDateTime = QDateTime::currentDateTime(); | 369 | mNextAlarmDateTime = QDateTime::currentDateTime(); |
370 | //setFocusPolicy ( NoFocus ); | 370 | setFocusPolicy (NoFocus ); |
371 | mViewerCallerIsSearchDialog = false; | 371 | mViewerCallerIsSearchDialog = false; |
372 | mBlockShowDates = false; | 372 | mBlockShowDates = false; |
373 | 373 | ||
374 | mDatePickerMode = 0; | 374 | mDatePickerMode = 0; |
375 | mCurrentSyncDevice = ""; | 375 | mCurrentSyncDevice = ""; |
376 | mViewManager = new KOViewManager( this ); | 376 | mViewManager = new KOViewManager( this ); |
377 | mDialogManager = new KODialogManager( this ); | 377 | mDialogManager = new KODialogManager( this ); |
378 | mEventViewerDialog = 0; | 378 | mEventViewerDialog = 0; |
379 | mModified = false; | 379 | mModified = false; |
380 | mReadOnly = false; | 380 | mReadOnly = false; |
381 | mSelectedIncidence = 0; | 381 | mSelectedIncidence = 0; |
382 | mCalPrinter = 0; | 382 | mCalPrinter = 0; |
383 | mFilters.setAutoDelete(true); | 383 | mFilters.setAutoDelete(true); |
384 | 384 | ||
385 | mCalendar->registerObserver( this ); | 385 | mCalendar->registerObserver( this ); |
386 | // TODO: Make sure that view is updated, when calendar is changed. | 386 | // TODO: Make sure that view is updated, when calendar is changed. |
387 | 387 | ||
388 | mStorage = new FileStorage( mCalendar ); | 388 | mStorage = new FileStorage( mCalendar ); |
389 | mNavigator = new DateNavigator( this, "datevav", mViewManager ); | 389 | mNavigator = new DateNavigator( this, "datevav", mViewManager ); |
390 | 390 | ||
391 | QBoxLayout *topLayout = (QBoxLayout*)layout(); | 391 | QBoxLayout *topLayout = (QBoxLayout*)layout(); |
392 | #ifndef KORG_NOSPLITTER | 392 | #ifndef KORG_NOSPLITTER |
393 | // create the main layout frames. | 393 | // create the main layout frames. |
394 | mPanner = new QSplitter(QSplitter::Horizontal,this,"CalendarView::Panner"); | 394 | mPanner = new QSplitter(QSplitter::Horizontal,this,"CalendarView::Panner"); |
395 | topLayout->addWidget(mPanner); | 395 | topLayout->addWidget(mPanner); |
396 | 396 | ||
397 | mLeftSplitter = new QSplitter(QSplitter::Vertical,mPanner, | 397 | mLeftSplitter = new QSplitter(QSplitter::Vertical,mPanner, |
398 | "CalendarView::LeftFrame"); | 398 | "CalendarView::LeftFrame"); |
399 | mPanner->setResizeMode(mLeftSplitter,QSplitter::KeepSize); | 399 | mPanner->setResizeMode(mLeftSplitter,QSplitter::KeepSize); |
400 | 400 | ||
401 | mDateNavigator = new DateNavigatorContainer( mLeftSplitter, | 401 | mDateNavigator = new DateNavigatorContainer( mLeftSplitter, |
402 | "CalendarView::DateNavigator" ); | 402 | "CalendarView::DateNavigator" ); |
403 | 403 | ||
404 | mLeftSplitter->setResizeMode(mDateNavigator,QSplitter::KeepSize); | 404 | mLeftSplitter->setResizeMode(mDateNavigator,QSplitter::KeepSize); |
405 | mTodoList = new KOTodoView(mCalendar, mLeftSplitter, "todolist_small2"); | 405 | mTodoList = new KOTodoView(mCalendar, mLeftSplitter, "todolist_small2"); |
406 | mTodoList->setNavigator( mNavigator ); | 406 | mTodoList->setNavigator( mNavigator ); |
407 | mFilterView = new KOFilterView(&mFilters,mLeftSplitter,"CalendarView::FilterView"); | 407 | mFilterView = new KOFilterView(&mFilters,mLeftSplitter,"CalendarView::FilterView"); |
408 | 408 | ||
409 | #ifdef KORG_NORESOURCEVIEW | 409 | #ifdef KORG_NORESOURCEVIEW |
410 | mResourceView = 0; | 410 | mResourceView = 0; |
411 | #else | 411 | #else |
412 | if ( mResourceManager ) { | 412 | if ( mResourceManager ) { |
413 | mResourceView = new ResourceView( mResourceManager, mLeftSplitter ); | 413 | mResourceView = new ResourceView( mResourceManager, mLeftSplitter ); |
414 | mResourceView->updateView(); | 414 | mResourceView->updateView(); |
415 | connect( mResourceView, SIGNAL( resourcesChanged() ), | 415 | connect( mResourceView, SIGNAL( resourcesChanged() ), |
416 | SLOT( updateView() ) ); | 416 | SLOT( updateView() ) ); |
417 | } else { | 417 | } else { |
418 | mResourceView = 0; | 418 | mResourceView = 0; |
419 | } | 419 | } |
420 | #endif | 420 | #endif |
421 | QWidget *rightBox = new QWidget( mPanner ); | 421 | QWidget *rightBox = new QWidget( mPanner ); |
422 | QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); | 422 | QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); |
423 | 423 | ||
424 | mRightFrame = new QWidgetStack( rightBox ); | 424 | mRightFrame = new QWidgetStack( rightBox ); |
425 | rightLayout->addWidget( mRightFrame, 1 ); | 425 | rightLayout->addWidget( mRightFrame, 1 ); |
426 | 426 | ||
427 | mLeftFrame = mLeftSplitter; | 427 | mLeftFrame = mLeftSplitter; |
428 | #else | 428 | #else |
429 | //QWidget *mainBox = new QWidget( this ); | 429 | //QWidget *mainBox = new QWidget( this ); |
430 | //QWidget *leftFrame = new QWidget( mainBox ); | 430 | //QWidget *leftFrame = new QWidget( mainBox ); |
431 | //QBoxLayout * mainBoxLayout; | 431 | //QBoxLayout * mainBoxLayout; |
432 | if ( KOPrefs::instance()->mVerticalScreen ) { | 432 | if ( KOPrefs::instance()->mVerticalScreen ) { |
433 | //mainBoxLayout = new QVBoxLayout(mainBox); | 433 | //mainBoxLayout = new QVBoxLayout(mainBox); |
434 | //leftFrameLayout = new QHBoxLayout(leftFrame ); | 434 | //leftFrameLayout = new QHBoxLayout(leftFrame ); |
@@ -595,133 +595,128 @@ void CalendarView::init() | |||
595 | connect( mFilterView, SIGNAL( editFilters() ), SLOT( editFilters() ) ); | 595 | connect( mFilterView, SIGNAL( editFilters() ), SLOT( editFilters() ) ); |
596 | connect( mCalendar, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addAlarm(const QDateTime &, const QString & ) ) ); | 596 | connect( mCalendar, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addAlarm(const QDateTime &, const QString & ) ) ); |
597 | connect( mCalendar, SIGNAL( removeAlarm(const QDateTime &, const QString & ) ), SLOT( removeAlarm(const QDateTime &, const QString & ) ) ); | 597 | connect( mCalendar, SIGNAL( removeAlarm(const QDateTime &, const QString & ) ), SLOT( removeAlarm(const QDateTime &, const QString & ) ) ); |
598 | 598 | ||
599 | 599 | ||
600 | 600 | ||
601 | 601 | ||
602 | 602 | ||
603 | connect(QApplication::clipboard(),SIGNAL(dataChanged()), | 603 | connect(QApplication::clipboard(),SIGNAL(dataChanged()), |
604 | SLOT(checkClipboard())); | 604 | SLOT(checkClipboard())); |
605 | connect( mTodoList,SIGNAL( incidenceSelected( Incidence * ) ), | 605 | connect( mTodoList,SIGNAL( incidenceSelected( Incidence * ) ), |
606 | SLOT( processTodoListSelection( Incidence * ) ) ); | 606 | SLOT( processTodoListSelection( Incidence * ) ) ); |
607 | connect(mTodoList,SIGNAL(isModified(bool)),SLOT(setModified(bool))); | 607 | connect(mTodoList,SIGNAL(isModified(bool)),SLOT(setModified(bool))); |
608 | 608 | ||
609 | // kdDebug() << "CalendarView::CalendarView() done" << endl; | 609 | // kdDebug() << "CalendarView::CalendarView() done" << endl; |
610 | 610 | ||
611 | mDateFrame = new QVBox(0,0,WType_Popup); | 611 | mDateFrame = new QVBox(0,0,WType_Popup); |
612 | //mDateFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised); | 612 | //mDateFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised); |
613 | mDateFrame->setFrameStyle( QFrame::WinPanel |QFrame::Raised ); | 613 | mDateFrame->setFrameStyle( QFrame::WinPanel |QFrame::Raised ); |
614 | mDateFrame->setLineWidth(3); | 614 | mDateFrame->setLineWidth(3); |
615 | mDateFrame->hide(); | 615 | mDateFrame->hide(); |
616 | mDateFrame->setCaption( i18n( "Pick a date to display")); | 616 | mDateFrame->setCaption( i18n( "Pick a date to display")); |
617 | mDatePicker = new KDatePicker ( mDateFrame , QDate::currentDate() ); | 617 | mDatePicker = new KDatePicker ( mDateFrame , QDate::currentDate() ); |
618 | 618 | ||
619 | connect(mDatePicker,SIGNAL(dateSelected(QDate)),SLOT(slotSelectPickerDate(QDate))); | 619 | connect(mDatePicker,SIGNAL(dateSelected(QDate)),SLOT(slotSelectPickerDate(QDate))); |
620 | 620 | ||
621 | mEventEditor = mDialogManager->getEventEditor(); | 621 | mEventEditor = mDialogManager->getEventEditor(); |
622 | mTodoEditor = mDialogManager->getTodoEditor(); | 622 | mTodoEditor = mDialogManager->getTodoEditor(); |
623 | 623 | ||
624 | mFlagEditDescription = false; | 624 | mFlagEditDescription = false; |
625 | 625 | ||
626 | mSuspendTimer = new QTimer( this ); | 626 | mSuspendTimer = new QTimer( this ); |
627 | mAlarmTimer = new QTimer( this ); | 627 | mAlarmTimer = new QTimer( this ); |
628 | mRecheckAlarmTimer = new QTimer( this ); | 628 | mRecheckAlarmTimer = new QTimer( this ); |
629 | connect( mRecheckAlarmTimer, SIGNAL( timeout () ), SLOT( recheckTimerAlarm() ) ); | 629 | connect( mRecheckAlarmTimer, SIGNAL( timeout () ), SLOT( recheckTimerAlarm() ) ); |
630 | connect( mSuspendTimer, SIGNAL( timeout () ), SLOT( suspendAlarm() ) ); | 630 | connect( mSuspendTimer, SIGNAL( timeout () ), SLOT( suspendAlarm() ) ); |
631 | connect( mAlarmTimer, SIGNAL( timeout () ), SLOT( timerAlarm() ) ); | 631 | connect( mAlarmTimer, SIGNAL( timeout () ), SLOT( timerAlarm() ) ); |
632 | mAlarmDialog = new AlarmDialog( this ); | 632 | mAlarmDialog = new AlarmDialog( this ); |
633 | connect( mAlarmDialog, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addSuspendAlarm(const QDateTime &, const QString & ) ) ); | 633 | connect( mAlarmDialog, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addSuspendAlarm(const QDateTime &, const QString & ) ) ); |
634 | mAlarmDialog->setServerNotification( false ); | 634 | mAlarmDialog->setServerNotification( false ); |
635 | mAlarmDialog->setSuspendTime( KOPrefs::instance()->mAlarmSuspendTime ); | 635 | mAlarmDialog->setSuspendTime( KOPrefs::instance()->mAlarmSuspendTime ); |
636 | 636 | ||
637 | 637 | ||
638 | #ifndef DESKTOP_VERSION | 638 | #ifndef DESKTOP_VERSION |
639 | //US listen for arriving address resultsets | 639 | //US listen for arriving address resultsets |
640 | connect(ExternalAppHandler::instance(), SIGNAL(receivedBirthdayListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)), | 640 | connect(ExternalAppHandler::instance(), SIGNAL(receivedBirthdayListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)), |
641 | this, SLOT(insertBirthdays(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&))); | 641 | this, SLOT(insertBirthdays(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&))); |
642 | #endif | 642 | #endif |
643 | mDateNavigator->setCalendar( mCalendar ); | 643 | mDateNavigator->setCalendar( mCalendar ); |
644 | } | 644 | } |
645 | 645 | ||
646 | 646 | ||
647 | CalendarView::~CalendarView() | 647 | CalendarView::~CalendarView() |
648 | { | 648 | { |
649 | // kdDebug() << "~CalendarView()" << endl; | 649 | // kdDebug() << "~CalendarView()" << endl; |
650 | //qDebug("CalendarView::~CalendarView() "); | 650 | //qDebug("CalendarView::~CalendarView() "); |
651 | delete mDialogManager; | 651 | delete mDialogManager; |
652 | delete mViewManager; | 652 | delete mViewManager; |
653 | delete mStorage; | 653 | delete mStorage; |
654 | delete mDateFrame ; | 654 | delete mDateFrame ; |
655 | delete mEventViewerDialog; | 655 | delete mEventViewerDialog; |
656 | //kdDebug() << "~CalendarView() done" << endl; | 656 | //kdDebug() << "~CalendarView() done" << endl; |
657 | } | 657 | } |
658 | 658 | ||
659 | void CalendarView::slotResetFocus() | ||
660 | { | ||
661 | qDebug(" CalendarView::slotResetFocus() %x", qApp->focusWidget()); | ||
662 | |||
663 | } | ||
664 | 659 | ||
665 | void CalendarView::nextConflict( bool all, bool allday ) | 660 | void CalendarView::nextConflict( bool all, bool allday ) |
666 | { | 661 | { |
667 | 662 | ||
668 | QPtrList<Event> testlist = mCalendar->events(); | 663 | QPtrList<Event> testlist = mCalendar->events(); |
669 | Event * test = testlist.first(); | 664 | Event * test = testlist.first(); |
670 | while ( test ) { | 665 | while ( test ) { |
671 | test->setTagged( false ); | 666 | test->setTagged( false ); |
672 | test = testlist.next(); | 667 | test = testlist.next(); |
673 | } | 668 | } |
674 | QTime st ( 0,0,0); | 669 | QTime st ( 0,0,0); |
675 | if ( mViewManager->currentView() == mViewManager->agendaView() ) | 670 | if ( mViewManager->currentView() == mViewManager->agendaView() ) |
676 | st = mViewManager->agendaView()->agenda()->getEndTime(); | 671 | st = mViewManager->agendaView()->agenda()->getEndTime(); |
677 | //qDebug("time %s ", st.toString().latin1()); | 672 | //qDebug("time %s ", st.toString().latin1()); |
678 | QDateTime startDT = QDateTime (mNavigator->selectedDates().first(),st); | 673 | QDateTime startDT = QDateTime (mNavigator->selectedDates().first(),st); |
679 | QDateTime conflict; | 674 | QDateTime conflict; |
680 | QDateTime retVal; | 675 | QDateTime retVal; |
681 | bool found = false; | 676 | bool found = false; |
682 | Event * cE = 0; | 677 | Event * cE = 0; |
683 | Event * cE2 = 0; | 678 | Event * cE2 = 0; |
684 | QPtrList<Event> testlist2 = testlist; | 679 | QPtrList<Event> testlist2 = testlist; |
685 | test = testlist.first(); | 680 | test = testlist.first(); |
686 | bool skip = false; | 681 | bool skip = false; |
687 | topLevelWidget()->setCaption( i18n("Checking conflicts ... please wait") ); | 682 | topLevelWidget()->setCaption( i18n("Checking conflicts ... please wait") ); |
688 | while ( test ) { | 683 | while ( test ) { |
689 | qApp->processEvents(); | 684 | qApp->processEvents(); |
690 | skip = false; | 685 | skip = false; |
691 | if ( !all ) skip = ( allday != test->doesFloat() ); | 686 | if ( !all ) skip = ( allday != test->doesFloat() ); |
692 | if ( !skip ) { | 687 | if ( !skip ) { |
693 | Event * test2 = testlist2.first(); | 688 | Event * test2 = testlist2.first(); |
694 | while ( test2 ) { | 689 | while ( test2 ) { |
695 | skip = false; | 690 | skip = false; |
696 | if ( !all ) skip = ( allday != test2->doesFloat() ); | 691 | if ( !all ) skip = ( allday != test2->doesFloat() ); |
697 | if ( !skip ) { | 692 | if ( !skip ) { |
698 | if ( !test2->isTagged() ) { | 693 | if ( !test2->isTagged() ) { |
699 | if ( test->isOverlapping ( test2, &retVal, &startDT ) ) { | 694 | if ( test->isOverlapping ( test2, &retVal, &startDT ) ) { |
700 | //qDebug("overlap "); | 695 | //qDebug("overlap "); |
701 | if ( ! found ) { | 696 | if ( ! found ) { |
702 | if ( retVal >= startDT ) { | 697 | if ( retVal >= startDT ) { |
703 | conflict = retVal; | 698 | conflict = retVal; |
704 | cE = test; | 699 | cE = test; |
705 | cE2 = test2; | 700 | cE2 = test2; |
706 | found = true; | 701 | found = true; |
707 | } | 702 | } |
708 | } else { | 703 | } else { |
709 | if ( retVal >= startDT && retVal < conflict ) { | 704 | if ( retVal >= startDT && retVal < conflict ) { |
710 | conflict = retVal; | 705 | conflict = retVal; |
711 | cE = test; | 706 | cE = test; |
712 | cE2 = test2; | 707 | cE2 = test2; |
713 | } | 708 | } |
714 | } | 709 | } |
715 | } | 710 | } |
716 | } | 711 | } |
717 | } | 712 | } |
718 | test2 = testlist2.next(); | 713 | test2 = testlist2.next(); |
719 | } | 714 | } |
720 | } | 715 | } |
721 | test->setTagged( true ); | 716 | test->setTagged( true ); |
722 | test = testlist.next(); | 717 | test = testlist.next(); |
723 | } | 718 | } |
724 | if ( found ) { | 719 | if ( found ) { |
725 | if ( mViewManager->currentView() != mViewManager->agendaView() || mNavigator->selectedDates().count() > 1 ) | 720 | if ( mViewManager->currentView() != mViewManager->agendaView() || mNavigator->selectedDates().count() > 1 ) |
726 | mViewManager->showDayView(); | 721 | mViewManager->showDayView(); |
727 | mNavigator->slotDaySelect( conflict.date() ); | 722 | mNavigator->slotDaySelect( conflict.date() ); |
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index 456c2d7..1debef7 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h | |||
@@ -140,129 +140,128 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser | |||
140 | void checkSuspendAlarm(); | 140 | void checkSuspendAlarm(); |
141 | void mergeFile( QString fn ); | 141 | void mergeFile( QString fn ); |
142 | 142 | ||
143 | signals: | 143 | signals: |
144 | void save (); | 144 | void save (); |
145 | void saveStopTimer (); | 145 | void saveStopTimer (); |
146 | void tempDisableBR(bool); | 146 | void tempDisableBR(bool); |
147 | /** This todo has been modified */ | 147 | /** This todo has been modified */ |
148 | void todoModified(Todo *, int); | 148 | void todoModified(Todo *, int); |
149 | 149 | ||
150 | /** when change is made to options dialog, the topwidget will catch this | 150 | /** when change is made to options dialog, the topwidget will catch this |
151 | * and emit this signal which notifies all widgets which have registered | 151 | * and emit this signal which notifies all widgets which have registered |
152 | * for notification to update their settings. */ | 152 | * for notification to update their settings. */ |
153 | void configChanged(); | 153 | void configChanged(); |
154 | /** emitted when the topwidget is closing down, so that any attached | 154 | /** emitted when the topwidget is closing down, so that any attached |
155 | child windows can also close. */ | 155 | child windows can also close. */ |
156 | void closingDown(); | 156 | void closingDown(); |
157 | /** emitted right before we die */ | 157 | /** emitted right before we die */ |
158 | void closed(QWidget *); | 158 | void closed(QWidget *); |
159 | 159 | ||
160 | /** Emitted when state of modified flag changes */ | 160 | /** Emitted when state of modified flag changes */ |
161 | void modifiedChanged(bool); | 161 | void modifiedChanged(bool); |
162 | void signalmodified(); | 162 | void signalmodified(); |
163 | 163 | ||
164 | /** Emitted when state of read-only flag changes */ | 164 | /** Emitted when state of read-only flag changes */ |
165 | void readOnlyChanged(bool); | 165 | void readOnlyChanged(bool); |
166 | 166 | ||
167 | /** Emitted when the unit of navigation changes */ | 167 | /** Emitted when the unit of navigation changes */ |
168 | void changeNavStringPrev(const QString &); | 168 | void changeNavStringPrev(const QString &); |
169 | void changeNavStringNext(const QString &); | 169 | void changeNavStringNext(const QString &); |
170 | 170 | ||
171 | /** Emitted when state of events selection has changed and user is organizer*/ | 171 | /** Emitted when state of events selection has changed and user is organizer*/ |
172 | void organizerEventsSelected(bool); | 172 | void organizerEventsSelected(bool); |
173 | /** Emitted when state of events selection has changed and user is attendee*/ | 173 | /** Emitted when state of events selection has changed and user is attendee*/ |
174 | void groupEventsSelected(bool); | 174 | void groupEventsSelected(bool); |
175 | /** | 175 | /** |
176 | Emitted when an incidence gets selected. If the selection is cleared the | 176 | Emitted when an incidence gets selected. If the selection is cleared the |
177 | signal is emitted with 0 as argument. | 177 | signal is emitted with 0 as argument. |
178 | */ | 178 | */ |
179 | void incidenceSelected( Incidence * ); | 179 | void incidenceSelected( Incidence * ); |
180 | /** Emitted, when a todoitem is selected or deselected. */ | 180 | /** Emitted, when a todoitem is selected or deselected. */ |
181 | void todoSelected( bool ); | 181 | void todoSelected( bool ); |
182 | 182 | ||
183 | /** | 183 | /** |
184 | Emitted, when clipboard content changes. Parameter indicates if paste | 184 | Emitted, when clipboard content changes. Parameter indicates if paste |
185 | is possible or not. | 185 | is possible or not. |
186 | */ | 186 | */ |
187 | void pasteEnabled(bool); | 187 | void pasteEnabled(bool); |
188 | 188 | ||
189 | /** Emitted, when the number of incoming messages has changed. */ | 189 | /** Emitted, when the number of incoming messages has changed. */ |
190 | void numIncomingChanged(int); | 190 | void numIncomingChanged(int); |
191 | 191 | ||
192 | /** Emitted, when the number of outgoing messages has changed. */ | 192 | /** Emitted, when the number of outgoing messages has changed. */ |
193 | void numOutgoingChanged(int); | 193 | void numOutgoingChanged(int); |
194 | 194 | ||
195 | /** Send status message, which can e.g. be displayed in the status bar. */ | 195 | /** Send status message, which can e.g. be displayed in the status bar. */ |
196 | void statusMessage(const QString &); | 196 | void statusMessage(const QString &); |
197 | 197 | ||
198 | void calendarViewExpanded( bool ); | 198 | void calendarViewExpanded( bool ); |
199 | void updateSearchDialog(); | 199 | void updateSearchDialog(); |
200 | void filtersUpdated(); | 200 | void filtersUpdated(); |
201 | 201 | ||
202 | 202 | ||
203 | public slots: | 203 | public slots: |
204 | void slotResetFocus(); | ||
205 | void nextConflict( bool all, bool allday ); | 204 | void nextConflict( bool all, bool allday ); |
206 | void conflictAll(); | 205 | void conflictAll(); |
207 | void conflictAllday(); | 206 | void conflictAllday(); |
208 | void conflictNotAll(); | 207 | void conflictNotAll(); |
209 | void setCalReadOnly( int id, bool readO ); | 208 | void setCalReadOnly( int id, bool readO ); |
210 | void checkAlarms(); | 209 | void checkAlarms(); |
211 | void checkFiles(); | 210 | void checkFiles(); |
212 | void slotprintSelInc(); | 211 | void slotprintSelInc(); |
213 | void showNextAlarms(); | 212 | void showNextAlarms(); |
214 | void showOpenError(); | 213 | void showOpenError(); |
215 | void watchSavedFile(); | 214 | void watchSavedFile(); |
216 | void recheckTimerAlarm(); | 215 | void recheckTimerAlarm(); |
217 | void checkNextTimerAlarm(); | 216 | void checkNextTimerAlarm(); |
218 | void addAlarm(const QDateTime &qdt, const QString ¬i ); | 217 | void addAlarm(const QDateTime &qdt, const QString ¬i ); |
219 | void addSuspendAlarm(const QDateTime &qdt, const QString ¬i ); | 218 | void addSuspendAlarm(const QDateTime &qdt, const QString ¬i ); |
220 | void removeAlarm(const QDateTime &qdt, const QString ¬i ); | 219 | void removeAlarm(const QDateTime &qdt, const QString ¬i ); |
221 | 220 | ||
222 | /** options dialog made a changed to the configuration. we catch this | 221 | /** options dialog made a changed to the configuration. we catch this |
223 | * and notify all widgets which need to update their configuration. */ | 222 | * and notify all widgets which need to update their configuration. */ |
224 | void updateConfig(); | 223 | void updateConfig(); |
225 | 224 | ||
226 | void insertBirthdays(const QString& uid, const QStringList& birthdayList, | 225 | void insertBirthdays(const QString& uid, const QStringList& birthdayList, |
227 | const QStringList& anniversaryList, const QStringList& realNameList, | 226 | const QStringList& anniversaryList, const QStringList& realNameList, |
228 | const QStringList& emailList, const QStringList& assembledNameList, | 227 | const QStringList& emailList, const QStringList& assembledNameList, |
229 | const QStringList& uidList); | 228 | const QStringList& uidList); |
230 | 229 | ||
231 | /** | 230 | /** |
232 | Load calendar from file \a filename. If \a merge is true, load | 231 | Load calendar from file \a filename. If \a merge is true, load |
233 | calendar into existing one, if it is false, clear calendar, before | 232 | calendar into existing one, if it is false, clear calendar, before |
234 | loading. Return true, if calendar could be successfully loaded. | 233 | loading. Return true, if calendar could be successfully loaded. |
235 | */ | 234 | */ |
236 | bool openCalendar(QString filename, bool merge=false); | 235 | bool openCalendar(QString filename, bool merge=false); |
237 | bool loadCalendars(); | 236 | bool loadCalendars(); |
238 | bool saveCalendars(); | 237 | bool saveCalendars(); |
239 | bool restoreCalendarSettings(); | 238 | bool restoreCalendarSettings(); |
240 | bool addCalendar( KopiCalendarFile * ); | 239 | bool addCalendar( KopiCalendarFile * ); |
241 | void addCalendarId( int id ); | 240 | void addCalendarId( int id ); |
242 | bool syncCalendar(QString filename,int mode = 0 ); | 241 | bool syncCalendar(QString filename,int mode = 0 ); |
243 | 242 | ||
244 | /** | 243 | /** |
245 | Save calendar data to file. Return true if calendar could be | 244 | Save calendar data to file. Return true if calendar could be |
246 | successfully saved. | 245 | successfully saved. |
247 | */ | 246 | */ |
248 | bool saveCalendar(QString filename); | 247 | bool saveCalendar(QString filename); |
249 | 248 | ||
250 | /** | 249 | /** |
251 | Close calendar. Clear calendar data and reset views to display an empty | 250 | Close calendar. Clear calendar data and reset views to display an empty |
252 | calendar. | 251 | calendar. |
253 | */ | 252 | */ |
254 | void closeCalendar(); | 253 | void closeCalendar(); |
255 | 254 | ||
256 | /** Archive old events of calendar */ | 255 | /** Archive old events of calendar */ |
257 | void archiveCalendar(); | 256 | void archiveCalendar(); |
258 | 257 | ||
259 | void showIncidence(); | 258 | void showIncidence(); |
260 | void editIncidence(); | 259 | void editIncidence(); |
261 | void editIncidenceDescription(); | 260 | void editIncidenceDescription(); |
262 | void deleteIncidence(); | 261 | void deleteIncidence(); |
263 | void cloneIncidence(); | 262 | void cloneIncidence(); |
264 | void moveIncidence(); | 263 | void moveIncidence(); |
265 | void beamIncidence(); | 264 | void beamIncidence(); |
266 | void toggleCancelIncidence(); | 265 | void toggleCancelIncidence(); |
267 | 266 | ||
268 | /** create an editeventwin with supplied date/time, and if bool is true, | 267 | /** create an editeventwin with supplied date/time, and if bool is true, |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 21d5a35..279955f 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -362,129 +362,146 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) : | |||
362 | SLOT( disableBR(bool) ) ); | 362 | SLOT( disableBR(bool) ) ); |
363 | connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( save() ) ); | 363 | connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( save() ) ); |
364 | mView->setModified( false ); | 364 | mView->setModified( false ); |
365 | mBlockAtStartup = false; | 365 | mBlockAtStartup = false; |
366 | mView->setModified( false ); | 366 | mView->setModified( false ); |
367 | setCentralWidget( mView ); | 367 | setCentralWidget( mView ); |
368 | globalFlagBlockStartup = 0; | 368 | globalFlagBlockStartup = 0; |
369 | mView->show(); | 369 | mView->show(); |
370 | delete splash; | 370 | delete splash; |
371 | if ( newFile ) | 371 | if ( newFile ) |
372 | mView->updateConfig(); | 372 | mView->updateConfig(); |
373 | // qApp->processEvents(); | 373 | // qApp->processEvents(); |
374 | //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); | 374 | //qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ()); |
375 | //fillSyncMenu(); | 375 | //fillSyncMenu(); |
376 | 376 | ||
377 | 377 | ||
378 | connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) ); | 378 | connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) ); |
379 | connect(mView , SIGNAL( save() ), this, SLOT( save() ) ); | 379 | connect(mView , SIGNAL( save() ), this, SLOT( save() ) ); |
380 | connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) ); | 380 | connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) ); |
381 | connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); | 381 | connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) ); |
382 | connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); | 382 | connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) ); |
383 | mSyncManager->setDefaultFileName( sentSyncFile()); | 383 | mSyncManager->setDefaultFileName( sentSyncFile()); |
384 | connect ( syncMenu, SIGNAL( activated ( int ) ), mSyncManager, SLOT (slotSyncMenu( int ) ) ); | 384 | connect ( syncMenu, SIGNAL( activated ( int ) ), mSyncManager, SLOT (slotSyncMenu( int ) ) ); |
385 | mSyncManager->fillSyncMenu(); | 385 | mSyncManager->fillSyncMenu(); |
386 | 386 | ||
387 | 387 | ||
388 | 388 | ||
389 | mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins ); | 389 | mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins ); |
390 | if ( showWarning ) { | 390 | if ( showWarning ) { |
391 | KMessageBox::information( this, | 391 | KMessageBox::information( this, |
392 | "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"); | 392 | "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"); |
393 | qApp->processEvents(); | 393 | qApp->processEvents(); |
394 | mView->dialogManager()->showSyncOptions(); | 394 | mView->dialogManager()->showSyncOptions(); |
395 | } | 395 | } |
396 | 396 | ||
397 | //US listen for result adressed from Ka/Pi | 397 | //US listen for result adressed from Ka/Pi |
398 | #ifndef DESKTOP_VERSION | 398 | #ifndef DESKTOP_VERSION |
399 | connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); | 399 | connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); |
400 | #endif | 400 | #endif |
401 | #ifndef DESKTOP_VERSION | 401 | #ifndef DESKTOP_VERSION |
402 | infrared = 0; | 402 | infrared = 0; |
403 | #endif | 403 | #endif |
404 | updateFilterToolbar(); | 404 | updateFilterToolbar(); |
405 | updateWeek( mView->startDate() ); | 405 | updateWeek( mView->startDate() ); |
406 | connect( mView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ), | 406 | connect( mView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ), |
407 | SLOT( updateWeekNum( const KCal::DateList & ) ) ); | 407 | SLOT( updateWeekNum( const KCal::DateList & ) ) ); |
408 | mBRdisabled = false; | 408 | mBRdisabled = false; |
409 | //toggleBeamReceive(); | 409 | //toggleBeamReceive(); |
410 | 410 | ||
411 | QTimer::singleShot( 1000, mView, SLOT ( checkFiles() )); | 411 | QTimer::singleShot( 1000, mView, SLOT ( checkFiles() )); |
412 | } | 412 | } |
413 | MainWindow::~MainWindow() | 413 | MainWindow::~MainWindow() |
414 | { | 414 | { |
415 | //qDebug("MainWindow::~MainWindow() "); | 415 | //qDebug("MainWindow::~MainWindow() "); |
416 | //save toolbar location | 416 | //save toolbar location |
417 | delete mCalendar; | 417 | delete mCalendar; |
418 | delete mSyncManager; | 418 | delete mSyncManager; |
419 | #ifndef DESKTOP_VERSION | 419 | #ifndef DESKTOP_VERSION |
420 | if ( infrared ) | 420 | if ( infrared ) |
421 | delete infrared; | 421 | delete infrared; |
422 | #endif | 422 | #endif |
423 | 423 | ||
424 | 424 | ||
425 | } | 425 | } |
426 | 426 | void MainWindow::slotResetFocus() | |
427 | { | ||
428 | //qDebug(" CalendarView::slotResetFocus() %x %x %x %x", qApp->focusWidget(), menuBar1, mView,iconToolBar); | ||
429 | mFocusLoop = 3; | ||
430 | QTimer::singleShot( 0, this, SLOT(slotResetFocusLoop() )); | ||
431 | } | ||
432 | void MainWindow::slotResetFocusLoop() | ||
433 | { | ||
434 | --mFocusLoop; | ||
435 | QWidget* fw = mView->viewManager()->currentView(); | ||
436 | if ( fw ) { | ||
437 | //qDebug("loop "); | ||
438 | fw->setFocus(); | ||
439 | if ( qApp->focusWidget() != fw && mFocusLoop > 0 ) | ||
440 | QTimer::singleShot( 0, this, SLOT(slotResetFocusLoop() )); | ||
441 | } | ||
442 | |||
443 | } | ||
427 | void MainWindow::disableBR(bool b) | 444 | void MainWindow::disableBR(bool b) |
428 | { | 445 | { |
429 | #ifndef DESKTOP_VERSION | 446 | #ifndef DESKTOP_VERSION |
430 | if ( b ) { | 447 | if ( b ) { |
431 | if ( infrared ) { | 448 | if ( infrared ) { |
432 | toggleBeamReceive(); | 449 | toggleBeamReceive(); |
433 | mBRdisabled = true; | 450 | mBRdisabled = true; |
434 | } | 451 | } |
435 | mBRdisabled = true; | 452 | mBRdisabled = true; |
436 | } else { | 453 | } else { |
437 | if ( mBRdisabled ) { | 454 | if ( mBRdisabled ) { |
438 | mBRdisabled = false; | 455 | mBRdisabled = false; |
439 | //makes no sense,because other cal ap is probably running | 456 | //makes no sense,because other cal ap is probably running |
440 | // toggleBeamReceive(); | 457 | // toggleBeamReceive(); |
441 | } | 458 | } |
442 | } | 459 | } |
443 | #endif | 460 | #endif |
444 | 461 | ||
445 | } | 462 | } |
446 | bool MainWindow::beamReceiveEnabled() | 463 | bool MainWindow::beamReceiveEnabled() |
447 | { | 464 | { |
448 | #ifndef DESKTOP_VERSION | 465 | #ifndef DESKTOP_VERSION |
449 | return ( infrared != 0 ); | 466 | return ( infrared != 0 ); |
450 | #endif | 467 | #endif |
451 | return false; | 468 | return false; |
452 | } | 469 | } |
453 | 470 | ||
454 | void MainWindow::toggleBeamReceive() | 471 | void MainWindow::toggleBeamReceive() |
455 | { | 472 | { |
456 | if ( mBRdisabled ) | 473 | if ( mBRdisabled ) |
457 | return; | 474 | return; |
458 | #ifndef DESKTOP_VERSION | 475 | #ifndef DESKTOP_VERSION |
459 | if ( infrared ) { | 476 | if ( infrared ) { |
460 | qDebug("KO: Disable BeamReceive "); | 477 | qDebug("KO: Disable BeamReceive "); |
461 | delete infrared; | 478 | delete infrared; |
462 | infrared = 0; | 479 | infrared = 0; |
463 | brAction->setOn(false); | 480 | brAction->setOn(false); |
464 | return; | 481 | return; |
465 | } | 482 | } |
466 | qDebug("KO: Enable BeamReceive "); | 483 | qDebug("KO: Enable BeamReceive "); |
467 | brAction->setOn(true); | 484 | brAction->setOn(true); |
468 | infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ; | 485 | infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ; |
469 | QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(recieve( const QCString&, const QByteArray& ))); | 486 | QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(recieve( const QCString&, const QByteArray& ))); |
470 | #endif | 487 | #endif |
471 | } | 488 | } |
472 | void MainWindow::showMaximized () | 489 | void MainWindow::showMaximized () |
473 | { | 490 | { |
474 | #ifndef DESKTOP_VERSION | 491 | #ifndef DESKTOP_VERSION |
475 | if ( ! globalFlagBlockStartup ) | 492 | if ( ! globalFlagBlockStartup ) |
476 | if ( mClosed ) | 493 | if ( mClosed ) |
477 | mView->goToday(); | 494 | mView->goToday(); |
478 | #endif | 495 | #endif |
479 | QWidget::showMaximized () ; | 496 | QWidget::showMaximized () ; |
480 | mClosed = false; | 497 | mClosed = false; |
481 | } | 498 | } |
482 | void MainWindow::closeEvent( QCloseEvent* ce ) | 499 | void MainWindow::closeEvent( QCloseEvent* ce ) |
483 | { | 500 | { |
484 | 501 | ||
485 | 502 | ||
486 | 503 | ||
487 | if ( ! KOPrefs::instance()->mAskForQuit ) { | 504 | if ( ! KOPrefs::instance()->mAskForQuit ) { |
488 | saveOnClose(); | 505 | saveOnClose(); |
489 | mClosed = true; | 506 | mClosed = true; |
490 | ce->accept(); | 507 | ce->accept(); |
@@ -619,164 +636,168 @@ void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) | |||
619 | } | 636 | } |
620 | 637 | ||
621 | showMaximized(); | 638 | showMaximized(); |
622 | raise(); | 639 | raise(); |
623 | } | 640 | } |
624 | void MainWindow::startMultiSync() | 641 | void MainWindow::startMultiSync() |
625 | { | 642 | { |
626 | QString question = i18n("Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!"); | 643 | QString question = i18n("Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!"); |
627 | if ( QMessageBox::information( this, i18n("KDE-Pim Sync"), | 644 | if ( QMessageBox::information( this, i18n("KDE-Pim Sync"), |
628 | question, | 645 | question, |
629 | i18n("Yes"), i18n("No"), | 646 | i18n("Yes"), i18n("No"), |
630 | 0, 0 ) != 0 ) { | 647 | 0, 0 ) != 0 ) { |
631 | setCaption(i18n("Aborted! Nothing synced!")); | 648 | setCaption(i18n("Aborted! Nothing synced!")); |
632 | return; | 649 | return; |
633 | } | 650 | } |
634 | mSyncManager->multiSync( false ); | 651 | mSyncManager->multiSync( false ); |
635 | #ifndef DESKTOP_VERSION | 652 | #ifndef DESKTOP_VERSION |
636 | QCopEnvelope e("QPE/Application/kapi", "doRingSync"); | 653 | QCopEnvelope e("QPE/Application/kapi", "doRingSync"); |
637 | #endif | 654 | #endif |
638 | } | 655 | } |
639 | QPixmap MainWindow::loadPixmap( QString name ) | 656 | QPixmap MainWindow::loadPixmap( QString name ) |
640 | { | 657 | { |
641 | return SmallIcon( name ); | 658 | return SmallIcon( name ); |
642 | 659 | ||
643 | } | 660 | } |
644 | void MainWindow::setUsesBigPixmaps ( bool b ) | 661 | void MainWindow::setUsesBigPixmaps ( bool b ) |
645 | { | 662 | { |
646 | qDebug("KO: MainWindow::setUsesBigPixmaps %d called", b); | 663 | qDebug("KO: MainWindow::setUsesBigPixmaps %d called", b); |
647 | if ( b ) | 664 | if ( b ) |
648 | qDebug("KO: BigPixmaps are not supported "); | 665 | qDebug("KO: BigPixmaps are not supported "); |
649 | } | 666 | } |
650 | void MainWindow::initActions() | 667 | void MainWindow::initActions() |
651 | { | 668 | { |
652 | //KOPrefs::instance()->mShowFullMenu | 669 | //KOPrefs::instance()->mShowFullMenu |
653 | iconToolBar->clear(); | 670 | iconToolBar->clear(); |
654 | KOPrefs *p = KOPrefs::instance(); | 671 | KOPrefs *p = KOPrefs::instance(); |
655 | //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar ); | 672 | //QPEMenuBar *menuBar1;// = new QPEMenuBar( iconToolBar ); |
656 | 673 | ||
657 | QPopupMenu *viewMenu = new QPopupMenu( this ); | 674 | QPopupMenu *viewMenu = new QPopupMenu( this ); |
658 | QPopupMenu *actionMenu = new QPopupMenu( this ); | 675 | QPopupMenu *actionMenu = new QPopupMenu( this ); |
659 | mCurrentItemMenu = new QPopupMenu ( this ); | 676 | mCurrentItemMenu = new QPopupMenu ( this ); |
660 | QPopupMenu *nextConflictMenu = new QPopupMenu ( this ); | 677 | QPopupMenu *nextConflictMenu = new QPopupMenu ( this ); |
661 | QPopupMenu *importMenu = new QPopupMenu( this ); | 678 | QPopupMenu *importMenu = new QPopupMenu( this ); |
662 | QPopupMenu *importMenu_X = new QPopupMenu( this ); | 679 | QPopupMenu *importMenu_X = new QPopupMenu( this ); |
663 | QPopupMenu *exportMenu_X = new QPopupMenu( this ); | 680 | QPopupMenu *exportMenu_X = new QPopupMenu( this ); |
664 | QPopupMenu *beamMenu_X = new QPopupMenu( this ); | 681 | QPopupMenu *beamMenu_X = new QPopupMenu( this ); |
665 | selectFilterMenu = new QPopupMenu( this ); | 682 | selectFilterMenu = new QPopupMenu( this ); |
666 | selectFilterMenu->setCheckable( true ); | 683 | selectFilterMenu->setCheckable( true ); |
667 | syncMenu = new QPopupMenu( this ); | 684 | syncMenu = new QPopupMenu( this ); |
668 | configureAgendaMenu = new QPopupMenu( this ); | 685 | configureAgendaMenu = new QPopupMenu( this ); |
669 | configureToolBarMenu = new QPopupMenu( this ); | 686 | configureToolBarMenu = new QPopupMenu( this ); |
670 | QPopupMenu *helpMenu = new QPopupMenu( this ); | 687 | QPopupMenu *helpMenu = new QPopupMenu( this ); |
671 | QIconSet icon; | 688 | QIconSet icon; |
672 | int pixWid = 22, pixHei = 22; | 689 | int pixWid = 22, pixHei = 22; |
673 | QString pathString = ""; | 690 | QString pathString = ""; |
674 | if ( !p->mToolBarMiniIcons ) { | 691 | if ( !p->mToolBarMiniIcons ) { |
675 | if ( QApplication::desktop()->width() < 480 /*|| QApplication::desktop()->height() < 320*/) { | 692 | if ( QApplication::desktop()->width() < 480 /*|| QApplication::desktop()->height() < 320*/) { |
676 | pathString += "icons16/"; | 693 | pathString += "icons16/"; |
677 | pixWid = 18; pixHei = 16; | 694 | pixWid = 18; pixHei = 16; |
678 | } | 695 | } |
679 | } else { | 696 | } else { |
680 | pathString += "iconsmini/"; | 697 | pathString += "iconsmini/"; |
681 | pixWid = 18; pixHei = 16; | 698 | pixWid = 18; pixHei = 16; |
682 | } | 699 | } |
683 | KMenuBar *menuBar1; | 700 | |
684 | if ( KOPrefs::instance()->mShowFullMenu ) { | 701 | if ( KOPrefs::instance()->mShowFullMenu ) { |
685 | menuBar1 = new KMenuBar( this );//menuBar(); | 702 | menuBar1 = new KMenuBar( this );//menuBar(); |
703 | //setMenuBar( menuBar1 ); | ||
704 | menuBar1->show(); | ||
686 | menuBar1->insertItem( i18n("File"), importMenu ); | 705 | menuBar1->insertItem( i18n("File"), importMenu ); |
687 | menuBar1->insertItem( i18n("View"), viewMenu ); | 706 | menuBar1->insertItem( i18n("View"), viewMenu ); |
688 | menuBar1->insertItem( i18n("Edit"), mCurrentItemMenu ); | 707 | menuBar1->insertItem( i18n("Edit"), mCurrentItemMenu ); |
689 | menuBar1->insertItem( i18n("Action"), actionMenu ); | 708 | menuBar1->insertItem( i18n("Action"), actionMenu ); |
690 | #ifdef DESKTOP_VERSION | 709 | #ifdef DESKTOP_VERSION |
691 | menuBar1->insertItem( i18n("Synchronize"), syncMenu ); | 710 | menuBar1->insertItem( i18n("Synchronize"), syncMenu ); |
692 | menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu ); | 711 | menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu ); |
693 | #else | 712 | #else |
694 | menuBar1->insertItem( i18n("Sync"), syncMenu ); | 713 | menuBar1->insertItem( i18n("Sync"), syncMenu ); |
695 | menuBar1->insertItem( i18n("Agenda"),configureAgendaMenu ); | 714 | menuBar1->insertItem( i18n("Agenda"),configureAgendaMenu ); |
696 | #endif | 715 | #endif |
697 | //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu ); | 716 | //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu ); |
698 | menuBar1->insertItem( i18n("Filter"),selectFilterMenu ); | 717 | menuBar1->insertItem( i18n("Filter"),selectFilterMenu ); |
699 | menuBar1->insertItem( i18n("Help"), helpMenu ); | 718 | menuBar1->insertItem( i18n("Help"), helpMenu ); |
700 | } else { | 719 | } else { |
701 | menuBar1 = new KMenuBar( iconToolBar ); | 720 | menuBar1 = new KMenuBar( iconToolBar ); |
702 | QPopupMenu *menuBar = new QPopupMenu( this ); | 721 | QPopupMenu *menuBar = new QPopupMenu( this ); |
703 | icon = loadPixmap( pathString + "z_menu" ); | 722 | icon = loadPixmap( pathString + "z_menu" ); |
704 | menuBar1->insertItem( icon.pixmap(), menuBar); | 723 | menuBar1->insertItem( icon.pixmap(), menuBar); |
705 | //menuBar1->insertItem( i18n("ME"), menuBar); | 724 | //menuBar1->insertItem( i18n("ME"), menuBar); |
706 | menuBar->insertItem( i18n("File"), importMenu ); | 725 | menuBar->insertItem( i18n("File"), importMenu ); |
707 | menuBar->insertItem( i18n("View"), viewMenu ); | 726 | menuBar->insertItem( i18n("View"), viewMenu ); |
708 | menuBar->insertItem( i18n("Edit"), mCurrentItemMenu ); | 727 | menuBar->insertItem( i18n("Edit"), mCurrentItemMenu ); |
709 | menuBar->insertItem( i18n("Action"), actionMenu ); | 728 | menuBar->insertItem( i18n("Action"), actionMenu ); |
710 | menuBar->insertItem( i18n("Synchronize"), syncMenu ); | 729 | menuBar->insertItem( i18n("Synchronize"), syncMenu ); |
711 | menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu ); | 730 | menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu ); |
712 | menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu ); | 731 | menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu ); |
713 | menuBar->insertItem( i18n("Filter"),selectFilterMenu ); | 732 | menuBar->insertItem( i18n("Filter"),selectFilterMenu ); |
714 | menuBar->insertItem( i18n("Help"), helpMenu ); | 733 | menuBar->insertItem( i18n("Help"), helpMenu ); |
715 | //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); | 734 | //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() ); |
716 | menuBar1->setMaximumSize( menuBar1->sizeHint( )); | 735 | menuBar1->setMaximumSize( menuBar1->sizeHint( )); |
736 | connect ( menuBar, SIGNAL( aboutToHide () ), this, SLOT ( slotResetFocus() ) ); | ||
717 | } | 737 | } |
718 | connect ( menuBar1, SIGNAL( lostFocus () ), mView, SLOT ( slotResetFocus() ) ); | 738 | connect ( menuBar1, SIGNAL( lostFocus () ), this, SLOT ( slotResetFocus() ) ); |
739 | //connect ( menuBar1, SIGNAL( lostFocus () ), this, SLOT ( slotResetFocus() ) ); | ||
719 | connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); | 740 | connect ( selectFilterMenu, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); |
720 | connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) ); | 741 | connect ( selectFilterMenu, SIGNAL( aboutToShow() ), this, SLOT (fillFilterMenu() ) ); |
721 | 742 | ||
722 | 743 | ||
723 | mWeekBgColor = iconToolBar->backgroundColor(); | 744 | mWeekBgColor = iconToolBar->backgroundColor(); |
724 | mWeekPixmap.resize( pixWid , pixHei ); | 745 | mWeekPixmap.resize( pixWid , pixHei ); |
725 | mWeekPixmap.fill( mWeekBgColor ); | 746 | mWeekPixmap.fill( mWeekBgColor ); |
726 | icon = mWeekPixmap; | 747 | icon = mWeekPixmap; |
727 | mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this ); | 748 | mWeekAction = new QAction( i18n("Select week number"),icon, i18n("Select week number"), 0, this ); |
728 | if ( p-> mShowIconWeekNum ) | 749 | if ( p-> mShowIconWeekNum ) |
729 | mWeekAction->addTo( iconToolBar ); | 750 | mWeekAction->addTo( iconToolBar ); |
730 | mWeekFont = font(); | 751 | mWeekFont = font(); |
731 | 752 | ||
732 | int fontPoint = mWeekFont.pointSize(); | 753 | int fontPoint = mWeekFont.pointSize(); |
733 | QFontMetrics f( mWeekFont ); | 754 | QFontMetrics f( mWeekFont ); |
734 | int fontWid = f.width( "30" ); | 755 | int fontWid = f.width( "30" ); |
735 | while ( fontWid > pixWid ) { | 756 | while ( fontWid > pixWid ) { |
736 | --fontPoint; | 757 | --fontPoint; |
737 | mWeekFont.setPointSize( fontPoint ); | 758 | mWeekFont.setPointSize( fontPoint ); |
738 | QFontMetrics f( mWeekFont ); | 759 | QFontMetrics f( mWeekFont ); |
739 | fontWid = f.width( "30" ); | 760 | fontWid = f.width( "30" ); |
740 | //qDebug("dec-- "); | 761 | //qDebug("dec-- "); |
741 | } | 762 | } |
742 | 763 | ||
743 | connect( mWeekAction, SIGNAL( activated() ), | 764 | connect( mWeekAction, SIGNAL( activated() ), |
744 | this, SLOT( weekAction() ) ); | 765 | this, SLOT( weekAction() ) ); |
745 | 766 | ||
746 | connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) ); | 767 | connect( this, SIGNAL( selectWeek ( int ) ), mView->dateNavigator(), SLOT( selectWeek ( int ) ) ); |
747 | if ( p->mShowIconFilterview ) { | 768 | if ( p->mShowIconFilterview ) { |
748 | icon = loadPixmap( pathString + "filter" ); | 769 | icon = loadPixmap( pathString + "filter" ); |
749 | actionFilterMenuTB = new QAction( i18n("Filter selector"), icon, i18n("Filter selector"), 0, this ); | 770 | actionFilterMenuTB = new QAction( i18n("Filter selector"), icon, i18n("Filter selector"), 0, this ); |
750 | connect( actionFilterMenuTB, SIGNAL( activated() ), | 771 | connect( actionFilterMenuTB, SIGNAL( activated() ), |
751 | this, SLOT( fillFilterMenuTB() ) ); | 772 | this, SLOT( fillFilterMenuTB() ) ); |
752 | actionFilterMenuTB->addTo( iconToolBar ); | 773 | actionFilterMenuTB->addTo( iconToolBar ); |
753 | selectFilterMenuTB = new QPopupMenu( this ); | 774 | selectFilterMenuTB = new QPopupMenu( this ); |
754 | selectFilterMenuTB->setCheckable( true ); | 775 | selectFilterMenuTB->setCheckable( true ); |
755 | connect ( selectFilterMenuTB, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); | 776 | connect ( selectFilterMenuTB, SIGNAL( activated ( int ) ), this, SLOT (selectFilter( int ) ) ); |
756 | } | 777 | } |
757 | 778 | ||
758 | //#endif | 779 | //#endif |
759 | // ****************** | 780 | // ****************** |
760 | QAction *action; | 781 | QAction *action; |
761 | // QPopupMenu *configureMenu= new QPopupMenu( menuBar ); | 782 | // QPopupMenu *configureMenu= new QPopupMenu( menuBar ); |
762 | configureToolBarMenu->setCheckable( true ); | 783 | configureToolBarMenu->setCheckable( true ); |
763 | 784 | ||
764 | 785 | ||
765 | configureAgendaMenu->setCheckable( true ); | 786 | configureAgendaMenu->setCheckable( true ); |
766 | int iii ; | 787 | int iii ; |
767 | for ( iii = 1;iii<= 10 ;++iii ){ | 788 | for ( iii = 1;iii<= 10 ;++iii ){ |
768 | configureAgendaMenu->insertItem(i18n("Size %1").arg(iii), (iii+1)*2 ); | 789 | configureAgendaMenu->insertItem(i18n("Size %1").arg(iii), (iii+1)*2 ); |
769 | } | 790 | } |
770 | //configureMenu->insertItem( "AgendaSize",configureAgendaMenu ); | 791 | //configureMenu->insertItem( "AgendaSize",configureAgendaMenu ); |
771 | 792 | ||
772 | connect( configureAgendaMenu, SIGNAL( aboutToShow()), | 793 | connect( configureAgendaMenu, SIGNAL( aboutToShow()), |
773 | this, SLOT( showConfigureAgenda( ) ) ); | 794 | this, SLOT( showConfigureAgenda( ) ) ); |
774 | icon = loadPixmap( pathString + "today" ); | 795 | icon = loadPixmap( pathString + "today" ); |
775 | QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); | 796 | QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this ); |
776 | today_action->addTo( actionMenu ); | 797 | today_action->addTo( actionMenu ); |
777 | connect( today_action, SIGNAL( activated() ), | 798 | connect( today_action, SIGNAL( activated() ), |
778 | mView, SLOT( goToday() ) ); | 799 | mView, SLOT( goToday() ) ); |
779 | 800 | ||
780 | icon = loadPixmap( pathString + "picker" ); | 801 | icon = loadPixmap( pathString + "picker" ); |
781 | QAction* dPickerAction = new QAction( i18n("Select Date..."), icon, i18n("Select Date..."), 0, this ); | 802 | QAction* dPickerAction = new QAction( i18n("Select Date..."), icon, i18n("Select Date..."), 0, this ); |
782 | dPickerAction->addTo( actionMenu ); | 803 | dPickerAction->addTo( actionMenu ); |
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h index e2de3ba..7d3d492 100644 --- a/korganizer/mainwindow.h +++ b/korganizer/mainwindow.h | |||
@@ -41,133 +41,138 @@ class MainWindow : public QMainWindow | |||
41 | static QString defaultFileName(); | 41 | static QString defaultFileName(); |
42 | static QString syncFileName(); | 42 | static QString syncFileName(); |
43 | static QString resourcePath(); | 43 | static QString resourcePath(); |
44 | public slots: | 44 | public slots: |
45 | void setUsesBigPixmaps ( bool ); | 45 | void setUsesBigPixmaps ( bool ); |
46 | void setCaption ( const QString & ); | 46 | void setCaption ( const QString & ); |
47 | void updateWeekNum(const KCal::DateList &); | 47 | void updateWeekNum(const KCal::DateList &); |
48 | void updateWeek(QDate); | 48 | void updateWeek(QDate); |
49 | void updateFilterToolbar(); | 49 | void updateFilterToolbar(); |
50 | virtual void showMaximized (); | 50 | virtual void showMaximized (); |
51 | void configureAgenda( int ); | 51 | void configureAgenda( int ); |
52 | void recieve( const QCString& msg, const QByteArray& data ); | 52 | void recieve( const QCString& msg, const QByteArray& data ); |
53 | protected slots: | 53 | protected slots: |
54 | void calHint(); | 54 | void calHint(); |
55 | void startMultiSync(); | 55 | void startMultiSync(); |
56 | void setCaptionToDates(); | 56 | void setCaptionToDates(); |
57 | void weekAction(); | 57 | void weekAction(); |
58 | void about(); | 58 | void about(); |
59 | void licence(); | 59 | void licence(); |
60 | void faq(); | 60 | void faq(); |
61 | void usertrans(); | 61 | void usertrans(); |
62 | void features(); | 62 | void features(); |
63 | void synchowto(); | 63 | void synchowto(); |
64 | void storagehowto(); | 64 | void storagehowto(); |
65 | void timetrackinghowto(); | 65 | void timetrackinghowto(); |
66 | void kdesynchowto(); | 66 | void kdesynchowto(); |
67 | void multisynchowto(); | 67 | void multisynchowto(); |
68 | void whatsNew(); | 68 | void whatsNew(); |
69 | void keyBindings(); | 69 | void keyBindings(); |
70 | void aboutAutoSaving();; | 70 | void aboutAutoSaving();; |
71 | void aboutKnownBugs(); | 71 | void aboutKnownBugs(); |
72 | 72 | ||
73 | void processIncidenceSelection( Incidence * ); | 73 | void processIncidenceSelection( Incidence * ); |
74 | 74 | ||
75 | void importQtopia(); | 75 | void importQtopia(); |
76 | void importBday(); | 76 | void importBday(); |
77 | void importOL(); | 77 | void importOL(); |
78 | void importIcal(); | 78 | void importIcal(); |
79 | void importFile( QString, bool ); | 79 | void importFile( QString, bool ); |
80 | void quickImportIcal(); | 80 | void quickImportIcal(); |
81 | 81 | ||
82 | void slotModifiedChanged( bool ); | 82 | void slotModifiedChanged( bool ); |
83 | 83 | ||
84 | void save(); | 84 | void save(); |
85 | void backupAllFiles(); | 85 | void backupAllFiles(); |
86 | void saveStopTimer(); | 86 | void saveStopTimer(); |
87 | void configureToolBar( int ); | 87 | void configureToolBar( int ); |
88 | void printSel(); | 88 | void printSel(); |
89 | void printCal(); | 89 | void printCal(); |
90 | void printListView(); | 90 | void printListView(); |
91 | void saveCalendar(); | 91 | void saveCalendar(); |
92 | void loadCalendar(); | 92 | void loadCalendar(); |
93 | void exportVCalendar(); | 93 | void exportVCalendar(); |
94 | void fillFilterMenu(); | 94 | void fillFilterMenu(); |
95 | void fillFilterMenuTB(); | 95 | void fillFilterMenuTB(); |
96 | void selectFilter( int ); | 96 | void selectFilter( int ); |
97 | void fillFilterMenuPopup(); | 97 | void fillFilterMenuPopup(); |
98 | void selectFilterPopup( int ); | 98 | void selectFilterPopup( int ); |
99 | void exportToPhone( int ); | 99 | void exportToPhone( int ); |
100 | void toggleBeamReceive(); | 100 | void toggleBeamReceive(); |
101 | void disableBR(bool); | 101 | void disableBR(bool); |
102 | signals: | 102 | signals: |
103 | void selectWeek ( int ); | 103 | void selectWeek ( int ); |
104 | private slots: | 104 | private slots: |
105 | void slotResetFocus(); | ||
106 | void slotResetFocusLoop(); | ||
105 | void showConfigureAgenda(); | 107 | void showConfigureAgenda(); |
106 | void getFile( bool ); | 108 | void getFile( bool ); |
107 | void syncFileRequest(); | 109 | void syncFileRequest(); |
108 | 110 | ||
109 | protected: | 111 | protected: |
112 | int mFocusLoop; | ||
110 | void hideEvent ( QHideEvent * ); | 113 | void hideEvent ( QHideEvent * ); |
111 | QString sentSyncFile(); | 114 | QString sentSyncFile(); |
112 | void displayText( QString, QString); | 115 | void displayText( QString, QString); |
113 | void enableIncidenceActions( bool ); | 116 | void enableIncidenceActions( bool ); |
114 | 117 | ||
115 | private: | 118 | private: |
119 | //void setMenuBar( QMenuBar * ); | ||
116 | bool mBRdisabled; | 120 | bool mBRdisabled; |
117 | #ifndef DESKTOP_VERSION | 121 | #ifndef DESKTOP_VERSION |
118 | QCopChannel* infrared; | 122 | QCopChannel* infrared; |
119 | #endif | 123 | #endif |
120 | QAction* brAction; | 124 | QAction* brAction; |
121 | KSyncManager* mSyncManager; | 125 | KSyncManager* mSyncManager; |
122 | bool mClosed; | 126 | bool mClosed; |
123 | void saveOnClose(); | 127 | void saveOnClose(); |
124 | bool mFlagKeyPressed; | 128 | bool mFlagKeyPressed; |
125 | bool mBlockAtStartup; | 129 | bool mBlockAtStartup; |
130 | KMenuBar *menuBar1; | ||
126 | QPEToolBar *iconToolBar; | 131 | QPEToolBar *iconToolBar; |
127 | QPEToolBar *viewToolBar; | 132 | QPEToolBar *viewToolBar; |
128 | QPEToolBar *navigatorToolBar; | 133 | QPEToolBar *navigatorToolBar; |
129 | QPEToolBar *filterToolBar; | 134 | QPEToolBar *filterToolBar; |
130 | KMenuBar *filterMenubar; | 135 | KMenuBar *filterMenubar; |
131 | QPopupMenu * filterPopupMenu; | 136 | QPopupMenu * filterPopupMenu; |
132 | QPopupMenu * mCurrentItemMenu; | 137 | QPopupMenu * mCurrentItemMenu; |
133 | void initActions(); | 138 | void initActions(); |
134 | void setDefaultPreferences(); | 139 | void setDefaultPreferences(); |
135 | void resizeEvent( QResizeEvent* e); | 140 | void resizeEvent( QResizeEvent* e); |
136 | void keyPressEvent ( QKeyEvent * ) ; | 141 | void keyPressEvent ( QKeyEvent * ) ; |
137 | void keyReleaseEvent ( QKeyEvent * ) ; | 142 | void keyReleaseEvent ( QKeyEvent * ) ; |
138 | QPopupMenu *configureToolBarMenu; | 143 | QPopupMenu *configureToolBarMenu; |
139 | QPopupMenu *selectFilterMenu; | 144 | QPopupMenu *selectFilterMenu; |
140 | QPopupMenu *selectFilterMenuTB; | 145 | QPopupMenu *selectFilterMenuTB; |
141 | QPopupMenu *configureAgendaMenu, *syncMenu; | 146 | QPopupMenu *configureAgendaMenu, *syncMenu; |
142 | CalendarLocal *mCalendar; | 147 | CalendarLocal *mCalendar; |
143 | CalendarView *mView; | 148 | CalendarView *mView; |
144 | QAction *mNewSubTodoAction; | 149 | QAction *mNewSubTodoAction; |
145 | QAction *mWeekAction; | 150 | QAction *mWeekAction; |
146 | QFont mWeekFont; | 151 | QFont mWeekFont; |
147 | QPixmap mWeekPixmap; | 152 | QPixmap mWeekPixmap; |
148 | QColor mWeekBgColor; | 153 | QColor mWeekBgColor; |
149 | 154 | ||
150 | QAction *mShowAction; | 155 | QAction *mShowAction; |
151 | QAction *mEditAction; | 156 | QAction *mEditAction; |
152 | QAction *mDeleteAction; | 157 | QAction *mDeleteAction; |
153 | QAction *mCloneAction; | 158 | QAction *mCloneAction; |
154 | QAction *mMoveAction; | 159 | QAction *mMoveAction; |
155 | QAction *mBeamAction; | 160 | QAction *mBeamAction; |
156 | QAction *mCancelAction; | 161 | QAction *mCancelAction; |
157 | QAction *mPrintSelAction; | 162 | QAction *mPrintSelAction; |
158 | 163 | ||
159 | QAction *mToggleNav; | 164 | QAction *mToggleNav; |
160 | QAction *mToggleFilter; | 165 | QAction *mToggleFilter; |
161 | QAction *mToggleAllday; | 166 | QAction *mToggleAllday; |
162 | QAction *actionFilterMenuTB; | 167 | QAction *actionFilterMenuTB; |
163 | 168 | ||
164 | void closeEvent( QCloseEvent* ce ); | 169 | void closeEvent( QCloseEvent* ce ); |
165 | QTimer mSaveTimer; | 170 | QTimer mSaveTimer; |
166 | //bool mBlockSaveFlag; | 171 | //bool mBlockSaveFlag; |
167 | bool mCalendarModifiedFlag; | 172 | bool mCalendarModifiedFlag; |
168 | QPixmap loadPixmap( QString ); | 173 | QPixmap loadPixmap( QString ); |
169 | QPixmap listviewPix, listviewPix0, listviewPix20, listviewPix40, listviewPix60, listviewPix80, journalPix; | 174 | QPixmap listviewPix, listviewPix0, listviewPix20, listviewPix40, listviewPix60, listviewPix80, journalPix; |
170 | }; | 175 | }; |
171 | 176 | ||
172 | 177 | ||
173 | #endif | 178 | #endif |