summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/datenavigator.cpp8
-rw-r--r--korganizer/datenavigator.h1
-rw-r--r--korganizer/koviewmanager.cpp4
-rw-r--r--korganizer/mainwindow.cpp4
-rw-r--r--korganizer/navigatorbar.h1
5 files changed, 12 insertions, 6 deletions
diff --git a/korganizer/datenavigator.cpp b/korganizer/datenavigator.cpp
index d2824de..8b7c993 100644
--- a/korganizer/datenavigator.cpp
+++ b/korganizer/datenavigator.cpp
@@ -152,12 +152,20 @@ void DateNavigator::selectWeek()
152 QDate d = mSelectedDates.first(); 152 QDate d = mSelectedDates.first();
153 selectWeek( d ); 153 selectWeek( d );
154} 154}
155void DateNavigator::selectWeek( int num ) 155void DateNavigator::selectWeek( int num )
156{ 156{
157 int year = mSelectedDates.first().year(); 157 int year = mSelectedDates.first().year();
158 QDate d = QDate ( year, 1,1);
159 while ( d.dayOfWeek() != 4 )
160 d = d.addDays( 1 );
161 selectWeek( d.addDays ( (num-1) *7 ) );
162}
163void DateNavigator::selectWeekFromMonthView( int num )
164{
165 int year = mSelectedDates.first().year();
158 if ( mSelectedDates.first().dayOfYear() > 300 && num < 10 ) 166 if ( mSelectedDates.first().dayOfYear() > 300 && num < 10 )
159 ++year; 167 ++year;
160 if ( mSelectedDates.first().dayOfYear() < 70 && num > 40 ) 168 if ( mSelectedDates.first().dayOfYear() < 70 && num > 40 )
161 --year; 169 --year;
162 QDate d = QDate ( year, 1,1); 170 QDate d = QDate ( year, 1,1);
163 while ( d.dayOfWeek() != 4 ) 171 while ( d.dayOfWeek() != 4 )
diff --git a/korganizer/datenavigator.h b/korganizer/datenavigator.h
index 4a19e17..4265e84 100644
--- a/korganizer/datenavigator.h
+++ b/korganizer/datenavigator.h
@@ -50,12 +50,13 @@ class DateNavigator : public QObject
50 50
51 void selectDates( int count ); 51 void selectDates( int count );
52 void selectDates( const QDate &, int count ); 52 void selectDates( const QDate &, int count );
53 53
54 void selectWeek(); 54 void selectWeek();
55 void selectWeek( int weeknum ); 55 void selectWeek( int weeknum );
56 void selectWeekFromMonthView( int weeknum );
56 void selectWeek( const QDate & ); 57 void selectWeek( const QDate & );
57 58
58 void selectWorkWeek(); 59 void selectWorkWeek();
59 void selectWorkWeek( const QDate & ); 60 void selectWorkWeek( const QDate & );
60 61
61 void selectWeekByDay( int weekDay, const QDate & ); 62 void selectWeekByDay( int weekDay, const QDate & );
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index b551e2a..90be237 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -504,13 +504,13 @@ void KOViewManager::showMonthView()
504 504
505 connect( mMonthView, SIGNAL( moveIncidenceSignal( Incidence * ) ), 505 connect( mMonthView, SIGNAL( moveIncidenceSignal( Incidence * ) ),
506 mMainView, SLOT ( moveIncidence( Incidence * ) ) ); 506 mMainView, SLOT ( moveIncidence( Incidence * ) ) );
507 connect( mMonthView, SIGNAL( beamIncidenceSignal( Incidence * ) ), 507 connect( mMonthView, SIGNAL( beamIncidenceSignal( Incidence * ) ),
508 mMainView, SLOT ( beamIncidence( Incidence * ) ) ); 508 mMainView, SLOT ( beamIncidence( Incidence * ) ) );
509 connect( mMonthView, SIGNAL( selectWeekNum( int ) ), 509 connect( mMonthView, SIGNAL( selectWeekNum( int ) ),
510 mMainView->dateNavigator(), SLOT ( selectWeek( int ) ) ); 510 mMainView->dateNavigator(), SLOT ( selectWeekFromMonthView( int ) ) );
511 connect( mMonthView, SIGNAL( showDaySignal( QDate ) ), 511 connect( mMonthView, SIGNAL( showDaySignal( QDate ) ),
512 mMainView, SLOT ( showDay( QDate ) ) ); 512 mMainView, SLOT ( showDay( QDate ) ) );
513 connect(mMainView, SIGNAL(configChanged()), mMonthView, SLOT(updateConfig())); 513 connect(mMainView, SIGNAL(configChanged()), mMonthView, SLOT(updateConfig()));
514 connect( mMonthView, SIGNAL(nextMonth() ), 514 connect( mMonthView, SIGNAL(nextMonth() ),
515 mMonthView->navigatorBar(), SIGNAL(goNextMonth() ) ); 515 mMonthView->navigatorBar(), SIGNAL(goNextMonth() ) );
516 connect( mMonthView, SIGNAL(prevMonth() ), 516 connect( mMonthView, SIGNAL(prevMonth() ),
@@ -520,14 +520,12 @@ void KOViewManager::showMonthView()
520 connect( mMonthView->navigatorBar(), SIGNAL( goNextYear() ), 520 connect( mMonthView->navigatorBar(), SIGNAL( goNextYear() ),
521 mMainView->dateNavigator(), SLOT( selectNextYear() ) ); 521 mMainView->dateNavigator(), SLOT( selectNextYear() ) );
522 connect( mMonthView->navigatorBar(), SIGNAL( goPrevMonth() ), 522 connect( mMonthView->navigatorBar(), SIGNAL( goPrevMonth() ),
523 mMainView->dateNavigator(), SLOT( selectPreviousMonth() ) ); 523 mMainView->dateNavigator(), SLOT( selectPreviousMonth() ) );
524 connect( mMonthView->navigatorBar(), SIGNAL( goNextMonth() ), 524 connect( mMonthView->navigatorBar(), SIGNAL( goNextMonth() ),
525 mMainView->dateNavigator(), SLOT( selectNextMonth() ) ); 525 mMainView->dateNavigator(), SLOT( selectNextMonth() ) );
526 connect( mMonthView->navigatorBar(), SIGNAL( selectWeek( int ) ),
527 mMainView->dateNavigator(), SLOT( selectWeek( int ) ) );
528 526
529 connect( mMainView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ), 527 connect( mMainView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ),
530 mMonthView->navigatorBar(), SLOT( selectDates( const KCal::DateList & ) ) ); 528 mMonthView->navigatorBar(), SLOT( selectDates( const KCal::DateList & ) ) );
531 529
532 530
533 connect( mMonthView->navigatorBar(), SIGNAL( monthSelected ( int ) ), 531 connect( mMonthView->navigatorBar(), SIGNAL( monthSelected ( int ) ),
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 119e28a..7810bf9 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -1250,15 +1250,15 @@ void MainWindow::about()
1250 i18n("KOrganizer/Platform-independent\n") + 1250 i18n("KOrganizer/Platform-independent\n") +
1251 "(KO/Pi) " + version + " - " + 1251 "(KO/Pi) " + version + " - " +
1252 1252
1253#ifdef DESKTOP_VERSION 1253#ifdef DESKTOP_VERSION
1254 i18n("Desktop Edition\n") + 1254 i18n("Desktop Edition\n") +
1255#else 1255#else
1256 i18n("PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n") + 1256 i18n("PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n") +
1257#endif 1257#endif
1258 i18n("(c) 2004 Lutz Rogowski\nEmail:lutz@pi-sync.net\nKO/Pi is based on KOrganizer\n(c) 2002,2003 Cornelius Schumacher\nEmail: schumacher@kde.org\nKOrganizer/Pi is licensed\nunder the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.korganizer.org\nwww.pi-sync.net\n") ); 1258 i18n("(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.net --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!") );
1259} 1259}
1260void MainWindow::keyBindings() 1260void MainWindow::keyBindings()
1261{ 1261{
1262 QString cap = i18n("KO/Pi Keys + Colors"); 1262 QString cap = i18n("KO/Pi Keys + Colors");
1263 QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") + 1263 QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") +
1264 i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+ 1264 i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+
diff --git a/korganizer/navigatorbar.h b/korganizer/navigatorbar.h
index ee4c06d..93240a6 100644
--- a/korganizer/navigatorbar.h
+++ b/korganizer/navigatorbar.h
@@ -46,13 +46,12 @@ class NavigatorBar: public QWidget
46 signals: 46 signals:
47 void goNextMonth(); 47 void goNextMonth();
48 void goPrevMonth(); 48 void goPrevMonth();
49 void goNextYear(); 49 void goNextYear();
50 void goPrevYear(); 50 void goPrevYear();
51 void monthSelected( int ); 51 void monthSelected( int );
52 void selectWeek( int );
53 52
54 private: 53 private:
55 QFrame *mCtrlFrame; 54 QFrame *mCtrlFrame;
56 55
57 QPushButton *mPrevYear; 56 QPushButton *mPrevYear;
58 QPushButton *mPrevMonth; 57 QPushButton *mPrevMonth;