summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-06-29 20:50:39 (UTC)
committer zautrix <zautrix>2005-06-29 20:50:39 (UTC)
commitd1ca2fd41cb1390843c974c985cae5912d458d51 (patch) (unidiff)
tree7df650cfed3562a9e98c9f1eac9da0ee6beec6c1
parentf55b992a98cc081207b23283aadcf2ecffc90a87 (diff)
downloadkdepimpi-d1ca2fd41cb1390843c974c985cae5912d458d51.zip
kdepimpi-d1ca2fd41cb1390843c974c985cae5912d458d51.tar.gz
kdepimpi-d1ca2fd41cb1390843c974c985cae5912d458d51.tar.bz2
fhhh
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
@@ -404,96 +404,98 @@ void CalendarView::init()
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() );