summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 623cf9d..214b829 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -260,384 +260,386 @@ void MissedAlarmTextBrowser::setSource(const QString & n)
260 } else if (n.startsWith("todo:")) { 260 } else if (n.startsWith("todo:")) {
261#ifdef DESKTOP_VERSION 261#ifdef DESKTOP_VERSION
262 emit showIncidence(n.mid(7)); 262 emit showIncidence(n.mid(7));
263#else 263#else
264 emit showIncidence(n.mid(5)); 264 emit showIncidence(n.mid(5));
265#endif 265#endif
266 return; 266 return;
267 } 267 }
268} 268}
269 269
270 270
271class KOBeamPrefs : public QDialog 271class KOBeamPrefs : public QDialog
272{ 272{
273 public: 273 public:
274 KOBeamPrefs( QWidget *parent=0, const char *name=0 ) : 274 KOBeamPrefs( QWidget *parent=0, const char *name=0 ) :
275 QDialog( parent, name, true ) 275 QDialog( parent, name, true )
276 { 276 {
277 setCaption( i18n("Beam Options") ); 277 setCaption( i18n("Beam Options") );
278 QVBoxLayout* lay = new QVBoxLayout( this ); 278 QVBoxLayout* lay = new QVBoxLayout( this );
279 lay->setSpacing( 3 ); 279 lay->setSpacing( 3 );
280 lay->setMargin( 3 ); 280 lay->setMargin( 3 );
281 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("File format"), this ); 281 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("File format"), this );
282 lay->addWidget( format ); 282 lay->addWidget( format );
283 format->setExclusive ( true ) ; 283 format->setExclusive ( true ) ;
284 QButtonGroup* time = new QButtonGroup(1, Horizontal, i18n("Time format"), this ); 284 QButtonGroup* time = new QButtonGroup(1, Horizontal, i18n("Time format"), this );
285 lay->addWidget( time ); time->setExclusive ( true ) ; 285 lay->addWidget( time ); time->setExclusive ( true ) ;
286 vcal = new QRadioButton(" vCalendar ", format ); 286 vcal = new QRadioButton(" vCalendar ", format );
287 ical = new QRadioButton(" iCalendar ", format ); 287 ical = new QRadioButton(" iCalendar ", format );
288 vcal->setChecked( true ); 288 vcal->setChecked( true );
289 tz = new QRadioButton(i18n(" With timezone "), time ); 289 tz = new QRadioButton(i18n(" With timezone "), time );
290 local = new QRadioButton(i18n(" Local time "), time ); 290 local = new QRadioButton(i18n(" Local time "), time );
291 tz->setChecked( true ); 291 tz->setChecked( true );
292 QPushButton * ok = new QPushButton( i18n("Beam via IR!"), this ); 292 QPushButton * ok = new QPushButton( i18n("Beam via IR!"), this );
293 lay->addWidget( ok ); 293 lay->addWidget( ok );
294 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 294 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
295 lay->addWidget( cancel ); 295 lay->addWidget( cancel );
296 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); 296 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
297 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); 297 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
298 resize( 200, 200 ); 298 resize( 200, 200 );
299 } 299 }
300 300
301 bool beamVcal() { return vcal->isChecked(); } 301 bool beamVcal() { return vcal->isChecked(); }
302 bool beamLocal() { return local->isChecked(); } 302 bool beamLocal() { return local->isChecked(); }
303private: 303private:
304 QRadioButton* vcal, *ical, *local, *tz; 304 QRadioButton* vcal, *ical, *local, *tz;
305}; 305};
306class KOCatPrefs : public QDialog 306class KOCatPrefs : public QDialog
307{ 307{
308 public: 308 public:
309 KOCatPrefs( QWidget *parent=0, const char *name=0 ) : 309 KOCatPrefs( QWidget *parent=0, const char *name=0 ) :
310 QDialog( parent, name, true ) 310 QDialog( parent, name, true )
311 { 311 {
312 setCaption( i18n("Manage new Categories") ); 312 setCaption( i18n("Manage new Categories") );
313 QVBoxLayout* lay = new QVBoxLayout( this ); 313 QVBoxLayout* lay = new QVBoxLayout( this );
314 lay->setSpacing( 3 ); 314 lay->setSpacing( 3 );
315 lay->setMargin( 3 ); 315 lay->setMargin( 3 );
316 QLabel * lab = new QLabel( i18n("After importing/loading/syncing\nthere may be new categories in\nevents or todos\nwhich are not in the category list.\nPlease choose what to do:\n "), this ); 316 QLabel * lab = new QLabel( i18n("After importing/loading/syncing\nthere may be new categories in\nevents or todos\nwhich are not in the category list.\nPlease choose what to do:\n "), this );
317 lay->addWidget( lab ); 317 lay->addWidget( lab );
318 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("New categories not in list:"), this ); 318 QButtonGroup* format = new QButtonGroup( 1, Horizontal, i18n("New categories not in list:"), this );
319 lay->addWidget( format ); 319 lay->addWidget( format );
320 format->setExclusive ( true ) ; 320 format->setExclusive ( true ) ;
321 addCatBut = new QRadioButton(i18n("Add to category list"), format ); 321 addCatBut = new QRadioButton(i18n("Add to category list"), format );
322 new QRadioButton(i18n("Remove from Events/Todos"), format ); 322 new QRadioButton(i18n("Remove from Events/Todos"), format );
323 addCatBut->setChecked( true ); 323 addCatBut->setChecked( true );
324 QPushButton * ok = new QPushButton( i18n("OK"), this ); 324 QPushButton * ok = new QPushButton( i18n("OK"), this );
325 lay->addWidget( ok ); 325 lay->addWidget( ok );
326 QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); 326 QPushButton * cancel = new QPushButton( i18n("Cancel"), this );
327 lay->addWidget( cancel ); 327 lay->addWidget( cancel );
328 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); 328 connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) );
329 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); 329 connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) );
330 resize( 200, 200 ); 330 resize( 200, 200 );
331 } 331 }
332 332
333 bool addCat() { return addCatBut->isChecked(); } 333 bool addCat() { return addCatBut->isChecked(); }
334private: 334private:
335 QRadioButton* addCatBut; 335 QRadioButton* addCatBut;
336}; 336};
337 337
338 338
339 339
340CalendarView::CalendarView( CalendarResources *calendar, 340CalendarView::CalendarView( CalendarResources *calendar,
341 QWidget *parent, const char *name ) 341 QWidget *parent, const char *name )
342 : CalendarViewBase( parent, name ), 342 : CalendarViewBase( parent, name ),
343 mCalendar( calendar ), 343 mCalendar( calendar ),
344 mResourceManager( calendar->resourceManager() ) 344 mResourceManager( calendar->resourceManager() )
345{ 345{
346 346
347 mEventEditor = 0; 347 mEventEditor = 0;
348 mTodoEditor = 0; 348 mTodoEditor = 0;
349 349
350 init(); 350 init();
351} 351}
352 352
353CalendarView::CalendarView( Calendar *calendar, 353CalendarView::CalendarView( Calendar *calendar,
354 QWidget *parent, const char *name ) 354 QWidget *parent, const char *name )
355 : CalendarViewBase( parent, name ), 355 : CalendarViewBase( parent, name ),
356 mCalendar( calendar ), 356 mCalendar( calendar ),
357 mResourceManager( 0 ) 357 mResourceManager( 0 )
358{ 358{
359 359
360 mEventEditor = 0; 360 mEventEditor = 0;
361 mTodoEditor = 0; 361 mTodoEditor = 0;
362 init(); 362 init();
363} 363}
364 364
365void CalendarView::init() 365void CalendarView::init()
366{ 366{
367 mNextAlarmDateTime = QDateTime::currentDateTime(); 367 mNextAlarmDateTime = QDateTime::currentDateTime();
368 setFocusPolicy ( NoFocus ); 368 setFocusPolicy ( NoFocus );
369 mViewerCallerIsSearchDialog = false; 369 mViewerCallerIsSearchDialog = false;
370 mBlockShowDates = false; 370 mBlockShowDates = false;
371 371
372 mDatePickerMode = 0; 372 mDatePickerMode = 0;
373 mCurrentSyncDevice = ""; 373 mCurrentSyncDevice = "";
374 mViewManager = new KOViewManager( this ); 374 mViewManager = new KOViewManager( this );
375 mDialogManager = new KODialogManager( this ); 375 mDialogManager = new KODialogManager( this );
376 mEventViewerDialog = 0; 376 mEventViewerDialog = 0;
377 mModified = false; 377 mModified = false;
378 mReadOnly = false; 378 mReadOnly = false;
379 mSelectedIncidence = 0; 379 mSelectedIncidence = 0;
380 mCalPrinter = 0; 380 mCalPrinter = 0;
381 mFilters.setAutoDelete(true); 381 mFilters.setAutoDelete(true);
382 382
383 mCalendar->registerObserver( this ); 383 mCalendar->registerObserver( this );
384 // TODO: Make sure that view is updated, when calendar is changed. 384 // TODO: Make sure that view is updated, when calendar is changed.
385 385
386 mStorage = new FileStorage( mCalendar ); 386 mStorage = new FileStorage( mCalendar );
387 mNavigator = new DateNavigator( this, "datevav", mViewManager ); 387 mNavigator = new DateNavigator( this, "datevav", mViewManager );
388 388
389 QBoxLayout *topLayout = (QBoxLayout*)layout(); 389 QBoxLayout *topLayout = (QBoxLayout*)layout();
390#ifndef KORG_NOSPLITTER 390#ifndef KORG_NOSPLITTER
391 // create the main layout frames. 391 // create the main layout frames.
392 mPanner = new QSplitter(QSplitter::Horizontal,this,"CalendarView::Panner"); 392 mPanner = new QSplitter(QSplitter::Horizontal,this,"CalendarView::Panner");
393 topLayout->addWidget(mPanner); 393 topLayout->addWidget(mPanner);
394 394
395 mLeftSplitter = new QSplitter(QSplitter::Vertical,mPanner, 395 mLeftSplitter = new QSplitter(QSplitter::Vertical,mPanner,
396 "CalendarView::LeftFrame"); 396 "CalendarView::LeftFrame");
397 mPanner->setResizeMode(mLeftSplitter,QSplitter::KeepSize); 397 mPanner->setResizeMode(mLeftSplitter,QSplitter::KeepSize);
398 398
399 mDateNavigator = new DateNavigatorContainer( mLeftSplitter, 399 mDateNavigator = new DateNavigatorContainer( mLeftSplitter,
400 "CalendarView::DateNavigator" ); 400 "CalendarView::DateNavigator" );
401 401
402 mLeftSplitter->setResizeMode(mDateNavigator,QSplitter::KeepSize); 402 mLeftSplitter->setResizeMode(mDateNavigator,QSplitter::KeepSize);
403 mTodoList = new KOTodoView(mCalendar, mLeftSplitter, "todolist_small2"); 403 mTodoList = new KOTodoView(mCalendar, mLeftSplitter, "todolist_small2");
404 mTodoList->setNavigator( mNavigator ); 404 mTodoList->setNavigator( mNavigator );
405 mFilterView = new KOFilterView(&mFilters,mLeftSplitter,"CalendarView::FilterView"); 405 mFilterView = new KOFilterView(&mFilters,mLeftSplitter,"CalendarView::FilterView");
406 406
407#ifdef KORG_NORESOURCEVIEW 407#ifdef KORG_NORESOURCEVIEW
408 mResourceView = 0; 408 mResourceView = 0;
409#else 409#else
410 if ( mResourceManager ) { 410 if ( mResourceManager ) {
411 mResourceView = new ResourceView( mResourceManager, mLeftSplitter ); 411 mResourceView = new ResourceView( mResourceManager, mLeftSplitter );
412 mResourceView->updateView(); 412 mResourceView->updateView();
413 connect( mResourceView, SIGNAL( resourcesChanged() ), 413 connect( mResourceView, SIGNAL( resourcesChanged() ),
414 SLOT( updateView() ) ); 414 SLOT( updateView() ) );
415 } else { 415 } else {
416 mResourceView = 0; 416 mResourceView = 0;
417 } 417 }
418#endif 418#endif
419 QWidget *rightBox = new QWidget( mPanner ); 419 QWidget *rightBox = new QWidget( mPanner );
420 QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); 420 QBoxLayout *rightLayout = new QVBoxLayout( rightBox );
421 421
422 mRightFrame = new QWidgetStack( rightBox ); 422 mRightFrame = new QWidgetStack( rightBox );
423 rightLayout->addWidget( mRightFrame, 1 ); 423 rightLayout->addWidget( mRightFrame, 1 );
424 424
425 mLeftFrame = mLeftSplitter; 425 mLeftFrame = mLeftSplitter;
426#else 426#else
427 //QWidget *mainBox = new QWidget( this ); 427 //QWidget *mainBox = new QWidget( this );
428 //QWidget *leftFrame = new QWidget( mainBox ); 428 //QWidget *leftFrame = new QWidget( mainBox );
429 //QBoxLayout * mainBoxLayout; 429 //QBoxLayout * mainBoxLayout;
430 if ( KOPrefs::instance()->mVerticalScreen ) { 430 if ( KOPrefs::instance()->mVerticalScreen ) {
431 //mainBoxLayout = new QVBoxLayout(mainBox); 431 //mainBoxLayout = new QVBoxLayout(mainBox);
432 //leftFrameLayout = new QHBoxLayout(leftFrame ); 432 //leftFrameLayout = new QHBoxLayout(leftFrame );
433 mMainFrame = new KDGanttMinimizeSplitter( Qt::Vertical, this ); 433 mMainFrame = new KDGanttMinimizeSplitter( Qt::Vertical, this );
434 mMainFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Up ); 434 mMainFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Up );
435 mLeftFrame = new KDGanttMinimizeSplitter( Qt::Horizontal, mMainFrame);; 435 mLeftFrame = new KDGanttMinimizeSplitter( Qt::Horizontal, mMainFrame);;
436 mLeftFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); 436 mLeftFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Right );
437 } else { 437 } else {
438 //mainBoxLayout = new QHBoxLayout(mainBox); 438 //mainBoxLayout = new QHBoxLayout(mainBox);
439 //leftFrameLayout = new QVBoxLayout(leftFrame ); 439 //leftFrameLayout = new QVBoxLayout(leftFrame );
440 mMainFrame = new KDGanttMinimizeSplitter( Qt::Horizontal, this); 440 mMainFrame = new KDGanttMinimizeSplitter( Qt::Horizontal, this);
441 mMainFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Left); 441 mMainFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Left);
442 mLeftFrame = new KDGanttMinimizeSplitter( Qt::Vertical, mMainFrame); 442 mLeftFrame = new KDGanttMinimizeSplitter( Qt::Vertical, mMainFrame);
443 mLeftFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Up ); 443 mLeftFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Up );
444 } 444 }
445 mMainFrame->setSizePolicy( QSizePolicy (QSizePolicy::Expanding,QSizePolicy::Expanding) ); 445 mMainFrame->setSizePolicy( QSizePolicy (QSizePolicy::Expanding,QSizePolicy::Expanding) );
446 //QBoxLayout * leftFrameLayout; 446 //QBoxLayout * leftFrameLayout;
447 topLayout->addWidget( mMainFrame ); 447 topLayout->addWidget( mMainFrame );
448#ifdef DESKTOP_VERSION 448#ifdef DESKTOP_VERSION
449 mDateScrollBar = new QScrollBar ( 0, 364, 1,30, 200,QScrollBar::Horizontal, this ); 449 mDateScrollBar = new QScrollBar ( 0, 364, 1,30, 200,QScrollBar::Horizontal, this );
450 topLayout->addWidget( mDateScrollBar ); 450 topLayout->addWidget( mDateScrollBar );
451 connect( mDateScrollBar, SIGNAL( valueChanged ( int ) ),this, SLOT( scrollBarValue( int )) ); 451 connect( mDateScrollBar, SIGNAL( valueChanged ( int ) ),this, SLOT( scrollBarValue( int )) );
452 if ( QApplication::desktop()->width() < 800 )
453 mDateScrollBar->hide();
452#endif 454#endif
453 //mainBoxLayout->addWidget (mLeftFrame); 455 //mainBoxLayout->addWidget (mLeftFrame);
454 mDateNavigator = new DateNavigatorContainer( mLeftFrame, 456 mDateNavigator = new DateNavigatorContainer( mLeftFrame,
455 "CalendarView::DateNavigator" ); 457 "CalendarView::DateNavigator" );
456#if 0 458#if 0
457 // FIXME 459 // FIXME
458 mDateNavigator = new KDateNavigator(mLeftFrame, mCalendar, TRUE, 460 mDateNavigator = new KDateNavigator(mLeftFrame, mCalendar, TRUE,
459 "CalendarView::DateNavigator", QDate::currentDate()); 461 "CalendarView::DateNavigator", QDate::currentDate());
460#endif 462#endif
461 // mDateNavigator->blockSignals( true ); 463 // mDateNavigator->blockSignals( true );
462 //leftFrameLayout->addWidget( mDateNavigator ); 464 //leftFrameLayout->addWidget( mDateNavigator );
463 mTodoList = new KOTodoView(mCalendar, mLeftFrame, "todolistsmall"); 465 mTodoList = new KOTodoView(mCalendar, mLeftFrame, "todolistsmall");
464 mFilterView = new KOFilterView(&mFilters,mLeftFrame,"CalendarView::FilterView"); 466 mFilterView = new KOFilterView(&mFilters,mLeftFrame,"CalendarView::FilterView");
465 mCalEditView = new KOCalEditView(mLeftFrame,"CalendarView::CaleditView"); 467 mCalEditView = new KOCalEditView(mLeftFrame,"CalendarView::CaleditView");
466 connect( mCalEditView, SIGNAL( calendarEnabled (int,bool) ),mCalendar, SLOT( setCalendarEnabled(int,bool)) ); 468 connect( mCalEditView, SIGNAL( calendarEnabled (int,bool) ),mCalendar, SLOT( setCalendarEnabled(int,bool)) );
467 connect( mCalEditView, SIGNAL( alarmEnabled(int,bool) ),mCalendar, SLOT( setAlarmEnabled(int,bool)) ); 469 connect( mCalEditView, SIGNAL( alarmEnabled(int,bool) ),mCalendar, SLOT( setAlarmEnabled(int,bool)) );
468 connect( mCalEditView, SIGNAL( calendarReadonly(int,bool) ),mCalendar, SLOT( setReadOnly(int,bool)) ); 470 connect( mCalEditView, SIGNAL( calendarReadonly(int,bool) ),mCalendar, SLOT( setReadOnly(int,bool)) );
469 connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mCalendar, SLOT( setDefaultCalendar(int)) ); 471 connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mCalendar, SLOT( setDefaultCalendar(int)) );
470 connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mViewManager, SLOT( setDefaultCalendar(int)) ); 472 connect( mCalEditView, SIGNAL( setCalendarDefault(int) ),mViewManager, SLOT( setDefaultCalendar(int)) );
471 connect( mCalEditView, SIGNAL( removeCalendar(int) ),mCalendar, SLOT( setCalendarRemove(int)) ); 473 connect( mCalEditView, SIGNAL( removeCalendar(int) ),mCalendar, SLOT( setCalendarRemove(int)) );
472 connect( mCalEditView, SIGNAL( calendarAdded(int) ),this, SLOT( addCalendarId(int)) ); 474 connect( mCalEditView, SIGNAL( calendarAdded(int) ),this, SLOT( addCalendarId(int)) );
473 connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateView()) ); 475 connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateView()) );
474 connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateUnmanagedViews()) ); 476 connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateUnmanagedViews()) );
475 477
476 mTodoList->setNavigator( mNavigator ); 478 mTodoList->setNavigator( mNavigator );
477#if 0 479#if 0
478 if ( QApplication::desktop()->width() < 480 ) { 480 if ( QApplication::desktop()->width() < 480 ) {
479 leftFrameLayout->addWidget(mFilterView); 481 leftFrameLayout->addWidget(mFilterView);
480 leftFrameLayout->addWidget(mTodoList, 2 ); 482 leftFrameLayout->addWidget(mTodoList, 2 );
481 483
482 } else { 484 } else {
483 leftFrameLayout->addWidget(mTodoList,2 ); 485 leftFrameLayout->addWidget(mTodoList,2 );
484 leftFrameLayout->addWidget(mFilterView ); 486 leftFrameLayout->addWidget(mFilterView );
485 } 487 }
486#endif 488#endif
487 mFilterView->hide(); 489 mFilterView->hide();
488 mCalEditView->hide(); 490 mCalEditView->hide();
489 QWidget *rightBox = new QWidget( mMainFrame ); 491 QWidget *rightBox = new QWidget( mMainFrame );
490 //mainBoxLayout->addWidget ( rightBox, 10 ); 492 //mainBoxLayout->addWidget ( rightBox, 10 );
491 QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); 493 QBoxLayout *rightLayout = new QVBoxLayout( rightBox );
492 mRightFrame = new QWidgetStack( rightBox ); 494 mRightFrame = new QWidgetStack( rightBox );
493 rightLayout->addWidget( mRightFrame, 10 ); 495 rightLayout->addWidget( mRightFrame, 10 );
494 496
495 //mLeftFrame = (QWidget *)leftFrame; 497 //mLeftFrame = (QWidget *)leftFrame;
496 if ( KOPrefs::instance()->mVerticalScreen ) { 498 if ( KOPrefs::instance()->mVerticalScreen ) {
497 //mDateNavigator->setFixedHeight( mDateNavigator->sizeHint().height() ); 499 //mDateNavigator->setFixedHeight( mDateNavigator->sizeHint().height() );
498 //mDateNavigator->setMinimumWidth( mDateNavigator->sizeHint().width() ); 500 //mDateNavigator->setMinimumWidth( mDateNavigator->sizeHint().width() );
499 //mTodoList->setFixedHeight( mDateNavigator->sizeHint().height() ); 501 //mTodoList->setFixedHeight( mDateNavigator->sizeHint().height() );
500 //leftFrame->setFixedHeight( mDateNavigator->sizeHint().height() ); 502 //leftFrame->setFixedHeight( mDateNavigator->sizeHint().height() );
501 } else { 503 } else {
502 //mDateNavigator->setFixedWidth( mDateNavigator->sizeHint().width() ); 504 //mDateNavigator->setFixedWidth( mDateNavigator->sizeHint().width() );
503 //mTodoList->setFixedWidth( mDateNavigator->sizeHint().width() ); 505 //mTodoList->setFixedWidth( mDateNavigator->sizeHint().width() );
504 //leftFrame->setFixedWidth( mDateNavigator->sizeHint().width() ); 506 //leftFrame->setFixedWidth( mDateNavigator->sizeHint().width() );
505 } 507 }
506 if ( !KOPrefs::instance()->mShowDateNavigator) 508 if ( !KOPrefs::instance()->mShowDateNavigator)
507 mDateNavigator->hide(); 509 mDateNavigator->hide();
508 //qDebug("Calendarview Size %d %d ", width(), height()); 510 //qDebug("Calendarview Size %d %d ", width(), height());
509#endif 511#endif
510 512
511 connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), 513 connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ),
512 SLOT( showDates( const KCal::DateList & ) ) ); 514 SLOT( showDates( const KCal::DateList & ) ) );
513 515
514 connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), 516 connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ),
515 mDateNavigator, SLOT( selectDates( const KCal::DateList & ) ) ); 517 mDateNavigator, SLOT( selectDates( const KCal::DateList & ) ) );
516 518
517 519
518 520
519 connect( mDateNavigator, SIGNAL( showMonth( const QDate & ) ), 521 connect( mDateNavigator, SIGNAL( showMonth( const QDate & ) ),
520 mViewManager, SLOT( showMonth( const QDate & ) ) ); 522 mViewManager, SLOT( showMonth( const QDate & ) ) );
521 523
522 connect( mDateNavigator, SIGNAL( weekClicked( const QDate & ) ), 524 connect( mDateNavigator, SIGNAL( weekClicked( const QDate & ) ),
523 mNavigator, SLOT( selectWeek( const QDate & ) ) ); 525 mNavigator, SLOT( selectWeek( const QDate & ) ) );
524 526
525 connect( mDateNavigator, SIGNAL( goPrevYear() ), 527 connect( mDateNavigator, SIGNAL( goPrevYear() ),
526 mNavigator, SLOT( selectPreviousYear() ) ); 528 mNavigator, SLOT( selectPreviousYear() ) );
527 connect( mDateNavigator, SIGNAL( goNextYear() ), 529 connect( mDateNavigator, SIGNAL( goNextYear() ),
528 mNavigator, SLOT( selectNextYear() ) ); 530 mNavigator, SLOT( selectNextYear() ) );
529 connect( mDateNavigator, SIGNAL( goPrevMonth() ), 531 connect( mDateNavigator, SIGNAL( goPrevMonth() ),
530 mNavigator, SLOT( selectPreviousMonth() ) ); 532 mNavigator, SLOT( selectPreviousMonth() ) );
531 connect( mDateNavigator, SIGNAL( goNextMonth() ), 533 connect( mDateNavigator, SIGNAL( goNextMonth() ),
532 mNavigator, SLOT( selectNextMonth() ) ); 534 mNavigator, SLOT( selectNextMonth() ) );
533 535
534 connect( mDateNavigator, SIGNAL( goPrevious() ), 536 connect( mDateNavigator, SIGNAL( goPrevious() ),
535 mNavigator, SLOT( selectPrevious() ) ); 537 mNavigator, SLOT( selectPrevious() ) );
536 connect( mDateNavigator, SIGNAL( goNext() ), 538 connect( mDateNavigator, SIGNAL( goNext() ),
537 mNavigator, SLOT( selectNext() ) ); 539 mNavigator, SLOT( selectNext() ) );
538 connect( mDateNavigator, SIGNAL( monthSelected ( int ) ), 540 connect( mDateNavigator, SIGNAL( monthSelected ( int ) ),
539 mNavigator, SLOT( slotMonthSelect( int ) ) ); 541 mNavigator, SLOT( slotMonthSelect( int ) ) );
540 542
541 connect( mDateNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), 543 connect( mDateNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ),
542 mNavigator, SLOT( selectDates( const KCal::DateList & ) ) ); 544 mNavigator, SLOT( selectDates( const KCal::DateList & ) ) );
543#if 0 545#if 0
544 connect( mDateNavigator, SIGNAL( incidenceDropped( Incidence * ) ), 546 connect( mDateNavigator, SIGNAL( incidenceDropped( Incidence * ) ),
545 SLOT( incidenceAdded( Incidence *) ) ); 547 SLOT( incidenceAdded( Incidence *) ) );
546#endif 548#endif
547 // connect(mDateNavigator,SIGNAL(dayPassed(QDate)),SLOT(updateView())); 549 // connect(mDateNavigator,SIGNAL(dayPassed(QDate)),SLOT(updateView()));
548 550
549 connect( this, SIGNAL( configChanged() ), 551 connect( this, SIGNAL( configChanged() ),
550 mDateNavigator, SLOT( updateConfig() ) ); 552 mDateNavigator, SLOT( updateConfig() ) );
551 553
552 connect( mTodoList, SIGNAL( newTodoSignal() ), 554 connect( mTodoList, SIGNAL( newTodoSignal() ),
553 SLOT( newTodo() ) ); 555 SLOT( newTodo() ) );
554 connect( mTodoList, SIGNAL( newSubTodoSignal( Todo *) ), 556 connect( mTodoList, SIGNAL( newSubTodoSignal( Todo *) ),
555 SLOT( newSubTodo( Todo * ) ) ); 557 SLOT( newSubTodo( Todo * ) ) );
556 connect( mTodoList, SIGNAL( editTodoSignal( Todo * ) ), 558 connect( mTodoList, SIGNAL( editTodoSignal( Todo * ) ),
557 SLOT( editTodo( Todo * ) ) ); 559 SLOT( editTodo( Todo * ) ) );
558 connect( mTodoList, SIGNAL( showTodoSignal( Todo * ) ), 560 connect( mTodoList, SIGNAL( showTodoSignal( Todo * ) ),
559 SLOT( showTodo( Todo *) ) ); 561 SLOT( showTodo( Todo *) ) );
560 connect( mTodoList, SIGNAL( deleteTodoSignal( Todo *) ), 562 connect( mTodoList, SIGNAL( deleteTodoSignal( Todo *) ),
561 SLOT( deleteTodo( Todo *) ) ); 563 SLOT( deleteTodo( Todo *) ) );
562 connect( this, SIGNAL( configChanged()), mTodoList, SLOT( updateConfig() ) ); 564 connect( this, SIGNAL( configChanged()), mTodoList, SLOT( updateConfig() ) );
563 connect( mTodoList, SIGNAL( purgeCompletedSignal() ), 565 connect( mTodoList, SIGNAL( purgeCompletedSignal() ),
564 SLOT( purgeCompleted() ) ); 566 SLOT( purgeCompleted() ) );
565 connect( mTodoList, SIGNAL( todoModifiedSignal( Todo *, int ) ), 567 connect( mTodoList, SIGNAL( todoModifiedSignal( Todo *, int ) ),
566 SIGNAL( todoModified( Todo *, int ) ) ); 568 SIGNAL( todoModified( Todo *, int ) ) );
567 569
568 connect( mTodoList, SIGNAL( cloneTodoSignal( Incidence * ) ), 570 connect( mTodoList, SIGNAL( cloneTodoSignal( Incidence * ) ),
569 this, SLOT ( cloneIncidence( Incidence * ) ) ); 571 this, SLOT ( cloneIncidence( Incidence * ) ) );
570 connect( mTodoList, SIGNAL( cancelTodoSignal( Incidence * ) ), 572 connect( mTodoList, SIGNAL( cancelTodoSignal( Incidence * ) ),
571 this, SLOT (cancelIncidence( Incidence * ) ) ); 573 this, SLOT (cancelIncidence( Incidence * ) ) );
572 574
573 connect( mTodoList, SIGNAL( moveTodoSignal( Incidence * ) ), 575 connect( mTodoList, SIGNAL( moveTodoSignal( Incidence * ) ),
574 this, SLOT ( moveIncidence( Incidence * ) ) ); 576 this, SLOT ( moveIncidence( Incidence * ) ) );
575 connect( mTodoList, SIGNAL( beamTodoSignal( Incidence * ) ), 577 connect( mTodoList, SIGNAL( beamTodoSignal( Incidence * ) ),
576 this, SLOT ( beamIncidence( Incidence * ) ) ); 578 this, SLOT ( beamIncidence( Incidence * ) ) );
577 579
578 connect( mTodoList, SIGNAL( unparentTodoSignal( Todo * ) ), 580 connect( mTodoList, SIGNAL( unparentTodoSignal( Todo * ) ),
579 this, SLOT ( todo_unsub( Todo * ) ) ); 581 this, SLOT ( todo_unsub( Todo * ) ) );
580 582
581 connect( mTodoList, SIGNAL( reparentTodoSignal( Todo *,Todo * ) ), 583 connect( mTodoList, SIGNAL( reparentTodoSignal( Todo *,Todo * ) ),
582 this, SLOT ( todo_resub( Todo *,Todo * ) ) ); 584 this, SLOT ( todo_resub( Todo *,Todo * ) ) );
583 connect( this, SIGNAL( todoModified( Todo *, int )), mTodoList, 585 connect( this, SIGNAL( todoModified( Todo *, int )), mTodoList,
584 SLOT( updateTodo( Todo *, int ) ) ); 586 SLOT( updateTodo( Todo *, int ) ) );
585 connect( this, SIGNAL( todoModified( Todo *, int )), this, 587 connect( this, SIGNAL( todoModified( Todo *, int )), this,
586 SLOT( changeTodoDisplay( Todo *, int ) ) ); 588 SLOT( changeTodoDisplay( Todo *, int ) ) );
587 589
588 590
589 connect( mFilterView, SIGNAL( filterChanged() ), SLOT( updateFilter() ) ); 591 connect( mFilterView, SIGNAL( filterChanged() ), SLOT( updateFilter() ) );
590 connect( mFilterView, SIGNAL( editFilters() ), SLOT( editFilters() ) ); 592 connect( mFilterView, SIGNAL( editFilters() ), SLOT( editFilters() ) );
591 connect( mCalendar, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addAlarm(const QDateTime &, const QString & ) ) ); 593 connect( mCalendar, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addAlarm(const QDateTime &, const QString & ) ) );
592 connect( mCalendar, SIGNAL( removeAlarm(const QDateTime &, const QString & ) ), SLOT( removeAlarm(const QDateTime &, const QString & ) ) ); 594 connect( mCalendar, SIGNAL( removeAlarm(const QDateTime &, const QString & ) ), SLOT( removeAlarm(const QDateTime &, const QString & ) ) );
593 595
594 596
595 597
596 598
597 599
598 connect(QApplication::clipboard(),SIGNAL(dataChanged()), 600 connect(QApplication::clipboard(),SIGNAL(dataChanged()),
599 SLOT(checkClipboard())); 601 SLOT(checkClipboard()));
600 connect( mTodoList,SIGNAL( incidenceSelected( Incidence * ) ), 602 connect( mTodoList,SIGNAL( incidenceSelected( Incidence * ) ),
601 SLOT( processTodoListSelection( Incidence * ) ) ); 603 SLOT( processTodoListSelection( Incidence * ) ) );
602 connect(mTodoList,SIGNAL(isModified(bool)),SLOT(setModified(bool))); 604 connect(mTodoList,SIGNAL(isModified(bool)),SLOT(setModified(bool)));
603 605
604 // kdDebug() << "CalendarView::CalendarView() done" << endl; 606 // kdDebug() << "CalendarView::CalendarView() done" << endl;
605 607
606 mDateFrame = new QVBox(0,0,WType_Popup); 608 mDateFrame = new QVBox(0,0,WType_Popup);
607 //mDateFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised); 609 //mDateFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised);
608 mDateFrame->setFrameStyle( QFrame::WinPanel |QFrame::Raised ); 610 mDateFrame->setFrameStyle( QFrame::WinPanel |QFrame::Raised );
609 mDateFrame->setLineWidth(3); 611 mDateFrame->setLineWidth(3);
610 mDateFrame->hide(); 612 mDateFrame->hide();
611 mDateFrame->setCaption( i18n( "Pick a date to display")); 613 mDateFrame->setCaption( i18n( "Pick a date to display"));
612 mDatePicker = new KDatePicker ( mDateFrame , QDate::currentDate() ); 614 mDatePicker = new KDatePicker ( mDateFrame , QDate::currentDate() );
613 615
614 connect(mDatePicker,SIGNAL(dateSelected(QDate)),SLOT(slotSelectPickerDate(QDate))); 616 connect(mDatePicker,SIGNAL(dateSelected(QDate)),SLOT(slotSelectPickerDate(QDate)));
615 617
616 mEventEditor = mDialogManager->getEventEditor(); 618 mEventEditor = mDialogManager->getEventEditor();
617 mTodoEditor = mDialogManager->getTodoEditor(); 619 mTodoEditor = mDialogManager->getTodoEditor();
618 620
619 mFlagEditDescription = false; 621 mFlagEditDescription = false;
620 622
621 mSuspendTimer = new QTimer( this ); 623 mSuspendTimer = new QTimer( this );
622 mAlarmTimer = new QTimer( this ); 624 mAlarmTimer = new QTimer( this );
623 mRecheckAlarmTimer = new QTimer( this ); 625 mRecheckAlarmTimer = new QTimer( this );
624 connect( mRecheckAlarmTimer, SIGNAL( timeout () ), SLOT( recheckTimerAlarm() ) ); 626 connect( mRecheckAlarmTimer, SIGNAL( timeout () ), SLOT( recheckTimerAlarm() ) );
625 connect( mSuspendTimer, SIGNAL( timeout () ), SLOT( suspendAlarm() ) ); 627 connect( mSuspendTimer, SIGNAL( timeout () ), SLOT( suspendAlarm() ) );
626 connect( mAlarmTimer, SIGNAL( timeout () ), SLOT( timerAlarm() ) ); 628 connect( mAlarmTimer, SIGNAL( timeout () ), SLOT( timerAlarm() ) );
627 mAlarmDialog = new AlarmDialog( this ); 629 mAlarmDialog = new AlarmDialog( this );
628 connect( mAlarmDialog, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addSuspendAlarm(const QDateTime &, const QString & ) ) ); 630 connect( mAlarmDialog, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addSuspendAlarm(const QDateTime &, const QString & ) ) );
629 mAlarmDialog->setServerNotification( false ); 631 mAlarmDialog->setServerNotification( false );
630 mAlarmDialog->setSuspendTime( KOPrefs::instance()->mAlarmSuspendTime ); 632 mAlarmDialog->setSuspendTime( KOPrefs::instance()->mAlarmSuspendTime );
631 633
632 634
633#ifndef DESKTOP_VERSION 635#ifndef DESKTOP_VERSION
634//US listen for arriving address resultsets 636//US listen for arriving address resultsets
635 connect(ExternalAppHandler::instance(), SIGNAL(receivedBirthdayListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)), 637 connect(ExternalAppHandler::instance(), SIGNAL(receivedBirthdayListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)),
636 this, SLOT(insertBirthdays(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&))); 638 this, SLOT(insertBirthdays(const QString&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&, const QStringList&)));
637#endif 639#endif
638 mDateNavigator->setCalendar( mCalendar ); 640 mDateNavigator->setCalendar( mCalendar );
639} 641}
640 642
641 643
642CalendarView::~CalendarView() 644CalendarView::~CalendarView()
643{ 645{