-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 @@ -445,7 +445,10 @@ void CalendarView::init() mMainFrame->setSizePolicy( QSizePolicy (QSizePolicy::Expanding,QSizePolicy::Expanding) ); //QBoxLayout * leftFrameLayout; - mDateScrollBar = new QScrollBar ( 0, 364, 1,30, 200,QScrollBar::Horizontal, this ); topLayout->addWidget( mMainFrame ); +#ifdef DESKTOP_VERSION + mDateScrollBar = new QScrollBar ( 0, 364, 1,30, 200,QScrollBar::Horizontal, this ); topLayout->addWidget( mDateScrollBar ); + connect( mDateScrollBar, SIGNAL( valueChanged ( int ) ),this, SLOT( scrollBarValue( int )) ); +#endif //mainBoxLayout->addWidget (mLeftFrame); mDateNavigator = new DateNavigatorContainer( mLeftFrame, @@ -470,5 +473,5 @@ void CalendarView::init() connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateView()) ); connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateUnmanagedViews()) ); - connect( mDateScrollBar, SIGNAL( valueChanged ( int ) ),this, SLOT( scrollBarValue( int )) ); + mTodoList->setNavigator( mNavigator ); #if 0 @@ -650,8 +653,12 @@ CalendarView::~CalendarView() void CalendarView::setScrollBarStep(int val ) { +#ifdef DESKTOP_VERSION mDateScrollBar->setLineStep ( val ); +#endif } void CalendarView::scrollBarValue(int val ) { +#ifdef DESKTOP_VERSION + if ( QApplication::desktop()->width() < 800 ) return; static bool block = false; if ( block ) return; @@ -669,4 +676,5 @@ void CalendarView::scrollBarValue(int val ) mNavigator->selectDates( d.addDays( val ), count ); block = false; +#endif } @@ -2585,5 +2593,7 @@ void CalendarView::updateTodoViews() void CalendarView::updateView(const QDate &start, const QDate &end) { +#ifdef DESKTOP_VERSION mDateScrollBar->setValue( start.dayOfYear()-1); +#endif mTodoList->updateView(); mViewManager->updateView(start, end); diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index c89bbf7..f7e5366 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h @@ -536,5 +536,7 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser Todo *selectedTodo(); private: +#ifdef DESKTOP_VERSION QScrollBar * mDateScrollBar; +#endif QDateTime mNextAlarmDateTime; bool mViewerCallerIsSearchDialog; |