-rw-r--r-- | korganizer/datenavigator.cpp | 8 | ||||
-rw-r--r-- | korganizer/datenavigator.h | 1 | ||||
-rw-r--r-- | korganizer/koviewmanager.cpp | 4 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 4 | ||||
-rw-r--r-- | korganizer/navigatorbar.h | 1 |
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 @@ -146,24 +146,32 @@ void DateNavigator::selectWeekByDay( int weekDay, const QDate &d ) else if ( weekStart && dateCount == 7 ) selectWeek( d ); else selectDates( d, dateCount ); } void DateNavigator::selectWeek() { QDate d = mSelectedDates.first(); selectWeek( d ); } void DateNavigator::selectWeek( int num ) { int year = mSelectedDates.first().year(); + QDate d = QDate ( year, 1,1); + while ( d.dayOfWeek() != 4 ) + d = d.addDays( 1 ); + selectWeek( d.addDays ( (num-1) *7 ) ); +} +void DateNavigator::selectWeekFromMonthView( int num ) +{ + int year = mSelectedDates.first().year(); if ( mSelectedDates.first().dayOfYear() > 300 && num < 10 ) ++year; if ( mSelectedDates.first().dayOfYear() < 70 && num > 40 ) --year; QDate d = QDate ( year, 1,1); while ( d.dayOfWeek() != 4 ) d = d.addDays( 1 ); selectWeek( d.addDays ( (num-1) *7 ) ); } void DateNavigator::selectWeek( const QDate &d ) { int dayOfWeek = KOGlobals::self()->calendarSystem()->dayOfWeek( d ); diff --git a/korganizer/datenavigator.h b/korganizer/datenavigator.h index 4a19e17..4265e84 100644 --- a/korganizer/datenavigator.h +++ b/korganizer/datenavigator.h @@ -44,24 +44,25 @@ class DateNavigator : public QObject int datesCount() const; public slots: void selectDates( const KCal::DateList & ); void selectDate( const QDate & ); void selectDates( int count ); void selectDates( const QDate &, int count ); void selectWeek(); void selectWeek( int weeknum ); + void selectWeekFromMonthView( int weeknum ); void selectWeek( const QDate & ); void selectWorkWeek(); void selectWorkWeek( const QDate & ); void selectWeekByDay( int weekDay, const QDate & ); void selectToday(); void selectTodayMonth(); void selectPreviousYear(); void selectPreviousMonth(); diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index b551e2a..90be237 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp @@ -498,42 +498,40 @@ void KOViewManager::showMonthView() connect( mMonthView, SIGNAL( incidenceSelected( Incidence * ) ), mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); connect( mMonthView, SIGNAL( cloneIncidenceSignal( Incidence * ) ), mMainView, SLOT ( cloneIncidence( Incidence * ) ) ); connect( mMonthView, SIGNAL( cancelIncidenceSignal( Incidence * ) ), mMainView, SLOT ( cancelIncidence( Incidence * ) ) ); connect( mMonthView, SIGNAL( moveIncidenceSignal( Incidence * ) ), mMainView, SLOT ( moveIncidence( Incidence * ) ) ); connect( mMonthView, SIGNAL( beamIncidenceSignal( Incidence * ) ), mMainView, SLOT ( beamIncidence( Incidence * ) ) ); connect( mMonthView, SIGNAL( selectWeekNum( int ) ), - mMainView->dateNavigator(), SLOT ( selectWeek( int ) ) ); + mMainView->dateNavigator(), SLOT ( selectWeekFromMonthView( int ) ) ); connect( mMonthView, SIGNAL( showDaySignal( QDate ) ), mMainView, SLOT ( showDay( QDate ) ) ); connect(mMainView, SIGNAL(configChanged()), mMonthView, SLOT(updateConfig())); connect( mMonthView, SIGNAL(nextMonth() ), mMonthView->navigatorBar(), SIGNAL(goNextMonth() ) ); connect( mMonthView, SIGNAL(prevMonth() ), mMonthView->navigatorBar(), SIGNAL(goPrevMonth() ) ); connect( mMonthView->navigatorBar(), SIGNAL( goPrevYear() ), mMainView->dateNavigator(), SLOT( selectPreviousYear() ) ); connect( mMonthView->navigatorBar(), SIGNAL( goNextYear() ), mMainView->dateNavigator(), SLOT( selectNextYear() ) ); connect( mMonthView->navigatorBar(), SIGNAL( goPrevMonth() ), mMainView->dateNavigator(), SLOT( selectPreviousMonth() ) ); connect( mMonthView->navigatorBar(), SIGNAL( goNextMonth() ), mMainView->dateNavigator(), SLOT( selectNextMonth() ) ); - connect( mMonthView->navigatorBar(), SIGNAL( selectWeek( int ) ), - mMainView->dateNavigator(), SLOT( selectWeek( int ) ) ); connect( mMainView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ), mMonthView->navigatorBar(), SLOT( selectDates( const KCal::DateList & ) ) ); connect( mMonthView->navigatorBar(), SIGNAL( monthSelected ( int ) ), mMainView->dateNavigator(), SLOT( slotMonthSelect( int ) ) ); } globalFlagBlockAgenda = 1; //mFlagShowNextxDays = false; diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 119e28a..7810bf9 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -1244,27 +1244,27 @@ void MainWindow::licence() } void MainWindow::about() { QString version; #include <../version> QMessageBox::about( this, i18n("About KOrganizer/Pi"), i18n("KOrganizer/Platform-independent\n") + "(KO/Pi) " + version + " - " + #ifdef DESKTOP_VERSION i18n("Desktop Edition\n") + #else - i18n("PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n") + + i18n("PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n") + #endif - 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") ); + 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!") ); } void MainWindow::keyBindings() { QString cap = i18n("KO/Pi Keys + Colors"); QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") + i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+ i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") + i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+ i18n("<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n")+ i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+ i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+ i18n("<p><b>N</b>: Next days view| <b>W</b>: What's next view\n ")+ diff --git a/korganizer/navigatorbar.h b/korganizer/navigatorbar.h index ee4c06d..93240a6 100644 --- a/korganizer/navigatorbar.h +++ b/korganizer/navigatorbar.h @@ -40,25 +40,24 @@ class NavigatorBar: public QWidget ~NavigatorBar(); public slots: void selectDates( const KCal::DateList & ); void selectMonth(); signals: void goNextMonth(); void goPrevMonth(); void goNextYear(); void goPrevYear(); void monthSelected( int ); - void selectWeek( int ); private: QFrame *mCtrlFrame; QPushButton *mPrevYear; QPushButton *mPrevMonth; QPushButton *mNextMonth; QPushButton *mNextYear; QPushButton *mSelectMonth; //QLabel *mDateLabel; }; |