summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-06-29 20:23:04 (UTC)
committer zautrix <zautrix>2005-06-29 20:23:04 (UTC)
commit8954bae7bb5afc9706e37e808e9c1e237399f214 (patch) (unidiff)
tree18932b26b38e319cc4c568f4624678fa50531c37
parent77aa480c9891a90c9b492618ebfd2b20f2d0727a (diff)
downloadkdepimpi-8954bae7bb5afc9706e37e808e9c1e237399f214.zip
kdepimpi-8954bae7bb5afc9706e37e808e9c1e237399f214.tar.gz
kdepimpi-8954bae7bb5afc9706e37e808e9c1e237399f214.tar.bz2
fixxx
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp60
-rw-r--r--korganizer/calendarview.h8
-rw-r--r--korganizer/koviewmanager.cpp10
3 files changed, 50 insertions, 28 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 697093e..776cdd3 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -370,6 +370,5 @@ void CalendarView::init()
370 mBlockShowDates = false; 370 mBlockShowDates = false;
371 beamDialog = new KOBeamPrefs(); 371
372 mDatePickerMode = 0; 372 mDatePickerMode = 0;
373 mCurrentSyncDevice = ""; 373 mCurrentSyncDevice = "";
374 writeLocale();
375 mViewManager = new KOViewManager( this ); 374 mViewManager = new KOViewManager( this );
@@ -447,3 +446,5 @@ void CalendarView::init()
447 //QBoxLayout * leftFrameLayout; 446 //QBoxLayout * leftFrameLayout;
447 mDateScrollBar = new QScrollBar ( 0, 364, 1,30, 200,QScrollBar::Horizontal, this );
448 topLayout->addWidget( mMainFrame ); 448 topLayout->addWidget( mMainFrame );
449 topLayout->addWidget( mDateScrollBar );
449 //mainBoxLayout->addWidget (mLeftFrame); 450 //mainBoxLayout->addWidget (mLeftFrame);
@@ -470,2 +471,3 @@ void CalendarView::init()
470 connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateUnmanagedViews()) ); 471 connect( mCalEditView, SIGNAL( needsUpdate() ),this, SLOT( updateUnmanagedViews()) );
472 connect( mDateScrollBar, SIGNAL( valueChanged ( int ) ),this, SLOT( scrollBarValue( int )) );
471 mTodoList->setNavigator( mNavigator ); 473 mTodoList->setNavigator( mNavigator );
@@ -644,3 +646,2 @@ CalendarView::~CalendarView()
644 delete mDateFrame ; 646 delete mDateFrame ;
645 delete beamDialog;
646 delete mEventViewerDialog; 647 delete mEventViewerDialog;
@@ -648,2 +649,26 @@ CalendarView::~CalendarView()
648} 649}
650void CalendarView::setScrollBarStep(int val )
651{
652 mDateScrollBar->setLineStep ( val );
653}
654void CalendarView::scrollBarValue(int val )
655{
656 static bool block = false;
657 if ( block ) return;
658 block = true;
659 val = val/mDateScrollBar->lineStep ()*mDateScrollBar->lineStep();
660 //qDebug("VAL %d ",val );
661 int count = mNavigator->selectedDates().count();
662 int year = mNavigator->selectedDates().first().year();
663 int day = mNavigator->selectedDates().first().dayOfYear();
664 if ( val == day -1 ) {
665 block = false;
666 return;
667 }
668 QDate d ( year,1,1 );
669 mNavigator->selectDates( d.addDays( val ), count );
670 block = false;
671
672}
673
649void CalendarView::checkAlarms() 674void CalendarView::checkAlarms()
@@ -2469,23 +2494,5 @@ void CalendarView::goPreviousMonth()
2469} 2494}
2470void CalendarView::writeLocale() 2495
2471{
2472 //KPimGlobalPrefs::instance()->setGlobalConfig();
2473#if 0
2474 KGlobal::locale()->setHore24Format( !KOPrefs::instance()->mPreferredTime );
2475 KGlobal::locale()->setWeekStartMonday( !KOPrefs::instance()->mWeekStartsOnSunday );
2476 KGlobal::locale()->setIntDateFormat( (KLocale::IntDateFormat)KOPrefs::instance()->mPreferredDate );
2477 KGlobal::locale()->setLanguage( KOPrefs::instance()->mPreferredLanguage );
2478 QString dummy = KOPrefs::instance()->mUserDateFormatLong;
2479 KGlobal::locale()->setDateFormat(dummy.replace( QRegExp("K"), QString(",") ));
2480 dummy = KOPrefs::instance()->mUserDateFormatShort;
2481 KGlobal::locale()->setDateFormatShort(dummy.replace( QRegExp("K"), QString(",") ));
2482 KGlobal::locale()->setDaylightSaving( KOPrefs::instance()->mUseDaylightsaving,
2483 KOPrefs::instance()->mDaylightsavingStart,
2484 KOPrefs::instance()->mDaylightsavingEnd );
2485 KGlobal::locale()->setTimezone( KPimGlobalPrefs::instance()->mTimeZoneId );
2486#endif
2487}
2488void CalendarView::updateConfig() 2496void CalendarView::updateConfig()
2489{ 2497{
2490 writeLocale();
2491 if ( KOPrefs::instance()->mUseAppColors ) 2498 if ( KOPrefs::instance()->mUseAppColors )
@@ -2579,2 +2586,3 @@ void CalendarView::updateView(const QDate &start, const QDate &end)
2579{ 2586{
2587 mDateScrollBar->setValue( start.dayOfYear()-1);
2580 mTodoList->updateView(); 2588 mTodoList->updateView();
@@ -2846,3 +2854,5 @@ void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel )
2846{ 2854{
2847 if ( beamDialog->exec () == QDialog::Rejected ) 2855
2856 KOBeamPrefs beamDialog;
2857 if ( beamDialog.exec () == QDialog::Rejected )
2848 return; 2858 return;
@@ -2858,3 +2868,3 @@ void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel )
2858 CalendarLocal* cal = new CalendarLocal(); 2868 CalendarLocal* cal = new CalendarLocal();
2859 if ( beamDialog->beamLocal() ) 2869 if ( beamDialog.beamLocal() )
2860 cal->setLocalTime(); 2870 cal->setLocalTime();
@@ -2882,3 +2892,3 @@ void CalendarView::beamIncidenceList(QPtrList<Incidence> delSel )
2882 } 2892 }
2883 if ( beamDialog->beamVcal() ) { 2893 if ( beamDialog.beamVcal() ) {
2884 fn += ".vcs"; 2894 fn += ".vcs";
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index be18e8f..c89bbf7 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -32,2 +32,3 @@
32#include <qmap.h> 32#include <qmap.h>
33#include <qscrollbar.h>
33#ifndef DESKTOP_VERSION 34#ifndef DESKTOP_VERSION
@@ -494,2 +495,3 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
494 void resetFocus(); 495 void resetFocus();
496 void scrollBarValue(int);
495 void slotViewerClosed(); 497 void slotViewerClosed();
@@ -524,2 +526,4 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
524 void setBlockShowDates( bool b ) { mBlockShowDates = b ;} 526 void setBlockShowDates( bool b ) { mBlockShowDates = b ;}
527 void setScrollBarStep(int val );
528
525 protected: 529 protected:
@@ -531,6 +535,5 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
531 void showTodoEditor(); 535 void showTodoEditor();
532 void writeLocale();
533 Todo *selectedTodo(); 536 Todo *selectedTodo();
534
535 private: 537 private:
538 QScrollBar * mDateScrollBar;
536 QDateTime mNextAlarmDateTime; 539 QDateTime mNextAlarmDateTime;
@@ -555,3 +558,2 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
555 QString mCurrentSyncName; 558 QString mCurrentSyncName;
556 KOBeamPrefs* beamDialog;
557 void init(); 559 void init();
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index 7b307f7..bd191d8 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -470,2 +470,3 @@ void KOViewManager::showListView()
470 KOPrefs::instance()->mCurrentDisplayedView = VIEW_L_VIEW; 470 KOPrefs::instance()->mCurrentDisplayedView = VIEW_L_VIEW;
471 mMainView->setScrollBarStep( 7 );
471} 472}
@@ -537,2 +538,3 @@ void KOViewManager::showAgendaView( bool fullScreen )
537 KOPrefs::instance()->mCurrentDisplayedView = VIEW_A_VIEW; 538 KOPrefs::instance()->mCurrentDisplayedView = VIEW_A_VIEW;
539 mMainView->setScrollBarStep( 1 );
538} 540}
@@ -553,2 +555,3 @@ void KOViewManager::showDayView()
553 mCurrentAgendaView = 1 ; 555 mCurrentAgendaView = 1 ;
556 mMainView->setScrollBarStep( 1 );
554 557
@@ -570,2 +573,3 @@ void KOViewManager::showWorkWeekView()
570 mCurrentAgendaView = 5 ; 573 mCurrentAgendaView = 5 ;
574 mMainView->setScrollBarStep( 1 );
571 575
@@ -588,2 +592,3 @@ void KOViewManager::showWeekView()
588 mCurrentAgendaView = 7 ; 592 mCurrentAgendaView = 7 ;
593 mMainView->setScrollBarStep( 1 );
589} 594}
@@ -604,2 +609,3 @@ void KOViewManager::showNextXView()
604 KOPrefs::instance()->mCurrentDisplayedView = VIEW_NX_VIEW; 609 KOPrefs::instance()->mCurrentDisplayedView = VIEW_NX_VIEW;
610 mMainView->setScrollBarStep( KOPrefs::instance()->mNextXDays );
605} 611}
@@ -697,2 +703,3 @@ void KOViewManager::showMonthViewWeek()
697 KOPrefs::instance()->mCurrentDisplayedView = VIEW_ML_VIEW ; 703 KOPrefs::instance()->mCurrentDisplayedView = VIEW_ML_VIEW ;
704 mMainView->setScrollBarStep( 7 );
698} 705}
@@ -729,2 +736,3 @@ void KOViewManager::showMonthView()
729 KOPrefs::instance()->mCurrentDisplayedView = VIEW_M_VIEW ; 736 KOPrefs::instance()->mCurrentDisplayedView = VIEW_M_VIEW ;
737 mMainView->setScrollBarStep( 7 );
730 738
@@ -786,2 +794,3 @@ void KOViewManager::showTodoView()
786 KOPrefs::instance()->mCurrentDisplayedView = VIEW_T_VIEW ; 794 KOPrefs::instance()->mCurrentDisplayedView = VIEW_T_VIEW ;
795 mMainView->setScrollBarStep( 7 );
787 796
@@ -805,2 +814,3 @@ void KOViewManager::showJournalView()
805 KOPrefs::instance()->mCurrentDisplayedView = VIEW_J_VIEW ; 814 KOPrefs::instance()->mCurrentDisplayedView = VIEW_J_VIEW ;
815 mMainView->setScrollBarStep( 1 );
806} 816}