author | zautrix <zautrix> | 2005-06-29 20:48:31 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-29 20:48:31 (UTC) |
commit | f55b992a98cc081207b23283aadcf2ecffc90a87 (patch) (unidiff) | |
tree | b0b54ac4f2a164ac7e7ca49bea78f62e4f58fa62 | |
parent | 8954bae7bb5afc9706e37e808e9c1e237399f214 (diff) | |
download | kdepimpi-f55b992a98cc081207b23283aadcf2ecffc90a87.zip kdepimpi-f55b992a98cc081207b23283aadcf2ecffc90a87.tar.gz kdepimpi-f55b992a98cc081207b23283aadcf2ecffc90a87.tar.bz2 |
fixxxx
-rw-r--r-- | korganizer/calendarview.cpp | 14 | ||||
-rw-r--r-- | korganizer/calendarview.h | 2 |
2 files changed, 14 insertions, 2 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 776cdd3..623cf9d 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -444,9 +444,12 @@ void CalendarView::init() | |||
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 | mDateScrollBar = new QScrollBar ( 0, 364, 1,30, 200,QScrollBar::Horizontal, this ); | ||
448 | topLayout->addWidget( mMainFrame ); | 447 | topLayout->addWidget( mMainFrame ); |
448 | #ifdef DESKTOP_VERSION | ||
449 | mDateScrollBar = new QScrollBar ( 0, 364, 1,30, 200,QScrollBar::Horizontal, this ); | ||
449 | topLayout->addWidget( mDateScrollBar ); | 450 | topLayout->addWidget( mDateScrollBar ); |
451 | connect( mDateScrollBar, SIGNAL( valueChanged ( int ) ),this, SLOT( scrollBarValue( int )) ); | ||
452 | #endif | ||
450 | //mainBoxLayout->addWidget (mLeftFrame); | 453 | //mainBoxLayout->addWidget (mLeftFrame); |
451 | mDateNavigator = new DateNavigatorContainer( mLeftFrame, | 454 | mDateNavigator = new DateNavigatorContainer( mLeftFrame, |
452 | "CalendarView::DateNavigator" ); | 455 | "CalendarView::DateNavigator" ); |
@@ -469,7 +472,7 @@ void CalendarView::init() | |||
469 | connect( mCalEditView, SIGNAL( calendarAdded(int) ),this, SLOT( addCalendarId(int)) ); | 472 | connect( mCalEditView, SIGNAL( calendarAdded(int) ),this, SLOT( addCalendarId(int)) ); |
470 | connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateView()) ); | 473 | connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateView()) ); |
471 | connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateUnmanagedViews()) ); | 474 | connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateUnmanagedViews()) ); |
472 | connect( mDateScrollBar, SIGNAL( valueChanged ( int ) ),this, SLOT( scrollBarValue( int )) ); | 475 | |
473 | mTodoList->setNavigator( mNavigator ); | 476 | mTodoList->setNavigator( mNavigator ); |
474 | #if 0 | 477 | #if 0 |
475 | if ( QApplication::desktop()->width() < 480 ) { | 478 | if ( QApplication::desktop()->width() < 480 ) { |
@@ -649,10 +652,14 @@ CalendarView::~CalendarView() | |||
649 | } | 652 | } |
650 | void CalendarView::setScrollBarStep(int val ) | 653 | void CalendarView::setScrollBarStep(int val ) |
651 | { | 654 | { |
655 | #ifdef DESKTOP_VERSION | ||
652 | mDateScrollBar->setLineStep ( val ); | 656 | mDateScrollBar->setLineStep ( val ); |
657 | #endif | ||
653 | } | 658 | } |
654 | void CalendarView::scrollBarValue(int val ) | 659 | void CalendarView::scrollBarValue(int val ) |
655 | { | 660 | { |
661 | #ifdef DESKTOP_VERSION | ||
662 | if ( QApplication::desktop()->width() < 800 ) return; | ||
656 | static bool block = false; | 663 | static bool block = false; |
657 | if ( block ) return; | 664 | if ( block ) return; |
658 | block = true; | 665 | block = true; |
@@ -668,6 +675,7 @@ void CalendarView::scrollBarValue(int val ) | |||
668 | QDate d ( year,1,1 ); | 675 | QDate d ( year,1,1 ); |
669 | mNavigator->selectDates( d.addDays( val ), count ); | 676 | mNavigator->selectDates( d.addDays( val ), count ); |
670 | block = false; | 677 | block = false; |
678 | #endif | ||
671 | 679 | ||
672 | } | 680 | } |
673 | 681 | ||
@@ -2584,7 +2592,9 @@ void CalendarView::updateTodoViews() | |||
2584 | 2592 | ||
2585 | void CalendarView::updateView(const QDate &start, const QDate &end) | 2593 | void CalendarView::updateView(const QDate &start, const QDate &end) |
2586 | { | 2594 | { |
2595 | #ifdef DESKTOP_VERSION | ||
2587 | mDateScrollBar->setValue( start.dayOfYear()-1); | 2596 | mDateScrollBar->setValue( start.dayOfYear()-1); |
2597 | #endif | ||
2588 | mTodoList->updateView(); | 2598 | mTodoList->updateView(); |
2589 | mViewManager->updateView(start, end); | 2599 | mViewManager->updateView(start, end); |
2590 | //mDateNavigator->updateView(); | 2600 | //mDateNavigator->updateView(); |
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index c89bbf7..f7e5366 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h | |||
@@ -535,7 +535,9 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser | |||
535 | void showTodoEditor(); | 535 | void showTodoEditor(); |
536 | Todo *selectedTodo(); | 536 | Todo *selectedTodo(); |
537 | private: | 537 | private: |
538 | #ifdef DESKTOP_VERSION | ||
538 | QScrollBar * mDateScrollBar; | 539 | QScrollBar * mDateScrollBar; |
540 | #endif | ||
539 | QDateTime mNextAlarmDateTime; | 541 | QDateTime mNextAlarmDateTime; |
540 | bool mViewerCallerIsSearchDialog; | 542 | bool mViewerCallerIsSearchDialog; |
541 | bool mBlockShowDates; | 543 | bool mBlockShowDates; |