summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-06-29 20:48:31 (UTC)
committer zautrix <zautrix>2005-06-29 20:48:31 (UTC)
commitf55b992a98cc081207b23283aadcf2ecffc90a87 (patch) (side-by-side diff)
treeb0b54ac4f2a164ac7e7ca49bea78f62e4f58fa62
parent8954bae7bb5afc9706e37e808e9c1e237399f214 (diff)
downloadkdepimpi-f55b992a98cc081207b23283aadcf2ecffc90a87.zip
kdepimpi-f55b992a98cc081207b23283aadcf2ecffc90a87.tar.gz
kdepimpi-f55b992a98cc081207b23283aadcf2ecffc90a87.tar.bz2
fixxxx
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp16
-rw-r--r--korganizer/calendarview.h2
2 files changed, 15 insertions, 3 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()
}
mMainFrame->setSizePolicy( QSizePolicy (QSizePolicy::Expanding,QSizePolicy::Expanding) );
//QBoxLayout * leftFrameLayout;
- mDateScrollBar = new QScrollBar ( 0, 364, 1,30, 200,QScrollBar::Horizontal, this );
topLayout->addWidget( mMainFrame );
- topLayout->addWidget( mDateScrollBar );
+#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,
"CalendarView::DateNavigator" );
@@ -469,7 +472,7 @@ void CalendarView::init()
connect( mCalEditView, SIGNAL( calendarAdded(int) ),this, SLOT( addCalendarId(int)) );
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
if ( QApplication::desktop()->width() < 480 ) {
@@ -649,10 +652,14 @@ 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;
block = true;
@@ -668,6 +675,7 @@ void CalendarView::scrollBarValue(int val )
QDate d ( year,1,1 );
mNavigator->selectDates( d.addDays( val ), count );
block = false;
+#endif
}
@@ -2584,7 +2592,9 @@ 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);
//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
void showTodoEditor();
Todo *selectedTodo();
private:
+#ifdef DESKTOP_VERSION
QScrollBar * mDateScrollBar;
+#endif
QDateTime mNextAlarmDateTime;
bool mViewerCallerIsSearchDialog;
bool mBlockShowDates;