-rw-r--r-- | bin/kdepim/WhatsNew.txt | 7 | ||||
-rw-r--r-- | bin/kdepim/korganizer/featuresKOPI.txt | 27 | ||||
-rw-r--r-- | korganizer/komonthview.cpp | 33 | ||||
-rw-r--r-- | korganizer/komonthview.h | 2 | ||||
-rw-r--r-- | korganizer/koviewmanager.cpp | 4 |
5 files changed, 43 insertions, 30 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 4f8fcc7..ac70a55 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt @@ -9,7 +9,8 @@ of the agenda view introduced in version 2.0.1. Added WhatsThis support for the todo view and the list view. -Added a quite useful and quite hidden feature (to KO/Pi). -Who does find it first? -Hint: You have to click somewhere in the views ... +Added a quite useful feature to the montview. +Just click on the week numbers on the left. +And on top of the week numbers there is now a "week view quick selector". +(Click on the black triangle). diff --git a/bin/kdepim/korganizer/featuresKOPI.txt b/bin/kdepim/korganizer/featuresKOPI.txt index 052680e..c056dca 100644 --- a/bin/kdepim/korganizer/featuresKOPI.txt +++ b/bin/kdepim/korganizer/featuresKOPI.txt @@ -141,9 +141,8 @@ B) Useful features, that are not straighforward to see 2) Moving of items in the agenda view 3) Creating exceptions for recurring events -4) Accessing the week in agenda view from the Month view -5) Navigation in month view -6) Navigation in agenda view -7) Monthview as week view -8) Switching display mode in date edit +4) Navigation in month view +5) Navigation in agenda view +6) Monthview as week view +7) Switching display mode in date edit 1) @@ -177,9 +176,4 @@ and then move it back and cancel it. 4) -Accessing the week in agenda view from the month view: -In the month view there are on the left week numbers displayed. -Click on a week number to see this week in the agenda view. - -5) Navigation in month view: If you select the month view with the icon in the toolbar, @@ -195,5 +189,5 @@ then the (month-)navigation keys will select automatically the complete next month as date range. -6) +5) Navigation in agenda view: If you select (as an example) 4 days in the date navigator @@ -219,12 +213,13 @@ Left of the day labels is the month name displayed. If you click this button, the month view is shown. -7) +6) Monthview as week view: On the left side of the monthview are the week number labels displayed. -On top of these labels is a "W" displayed. -If you click on this button the month view mode will switch to week view mode. -To switch back, please click the button, which now displays a "M". +If you click on these labels, the month view will show this week zoomed. +To go back to monthly view click the left label again. +You can quickly select a week number by clicking the black triangle +on top of the week number labels. -8) +7) Switching display mode in date edit: On several places is a date edit used. diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 00b1e92..f2cfb75 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp @@ -799,7 +799,7 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) KOWeekButton *label = new KOWeekButton( this ); label->setFont(bfont); - connect( label, SIGNAL( selectWeekNum ( int )),this, SIGNAL( selectWeekNum ( int )) ); + connect( label, SIGNAL( selectWeekNum ( int )),this, SLOT( selectInternalWeekNum ( int )) ); label->setFlat(true); - QWhatsThis::add(label,i18n("Click on the week number to\nshow week in agenda view")); + QWhatsThis::add(label,i18n("Click on the week number to\nshow week zoomed")); //label->setFrameStyle(QFrame::Panel|QFrame::Raised); //label->setLineWidth(1); @@ -807,7 +807,12 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) mWeekLabels.insert( i, label ); } - mWeekLabels[mNumWeeks]->setText( i18n("W")); - QWhatsThis::add(mWeekLabels[mNumWeeks],i18n("Click on this to\nswitch to week mode view")); + mWeekLabels[mNumWeeks]->setText( i18n("")); + QWhatsThis::add(mWeekLabels[mNumWeeks],i18n("Click on this to\nselect week number")); int row, col; + QPopupMenu * wpo = new QPopupMenu (this); + wpo->insertItem( i18n("W#"), 0 ); + for ( i = 1; i < 54; i++ ) + wpo->insertItem( i18n("%1").arg(i), i ); + mWeekLabels[mNumWeeks]->setPopup( wpo ); mCells.resize( mNumCells ); for( row = 0; row < mNumWeeks; ++row ) { @@ -825,6 +830,6 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) } - connect( mWeekLabels[mNumWeeks], SIGNAL( clicked() ), - SLOT( switchView() ) ); + //connect( mWeekLabels[mNumWeeks], SIGNAL( clicked() ), SLOT( switchView() ) ); + connect( wpo, SIGNAL( activated(int) ), SIGNAL( selectWeekNum ( int ) ) ); mContextMenu = eventPopup(); // updateConfig(); //useless here @@ -837,4 +842,14 @@ KOMonthView::~KOMonthView() delete mContextMenu; } +void KOMonthView::selectDateWeekNum ( int ) +{ + +} +void KOMonthView::selectInternalWeekNum ( int n ) +{ + emit selectWeekNum ( n ); + switchView(); +} + void KOMonthView::switchView() { @@ -843,5 +858,5 @@ void KOMonthView::switchView() mShowWeekView = !mShowWeekView; KOPrefs::instance()->mMonthViewWeek = mShowWeekView; - emit showNavigator( !mShowWeekView ); + //emit showNavigator( !mShowWeekView ); computeLayout(); updateConfig(); @@ -1223,5 +1238,5 @@ void KOMonthView::computeLayoutWeek() bool forceUpdate = !updatePossible; updatePossible = true; - mWeekLabels[mNumWeeks]->setText( i18n("M")); + //mWeekLabels[mNumWeeks]->setText( i18n("M")); if ( forceUpdate ) updateView(); @@ -1332,5 +1347,5 @@ void KOMonthView::computeLayout() bool forceUpdate = !updatePossible; updatePossible = true; - mWeekLabels[mNumWeeks]->setText( i18n("W")); + //mWeekLabels[mNumWeeks]->setText( i18n("W")); if ( forceUpdate ) updateView(); diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h index 0bc3743..1ed200b 100644 --- a/korganizer/komonthview.h +++ b/korganizer/komonthview.h @@ -241,4 +241,6 @@ class KOMonthView: public KOEventView protected slots: + void selectDateWeekNum ( int ); + void selectInternalWeekNum ( int ); void switchView(); void processSelectionChange(); diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index 8aa0697..ca3de59 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp @@ -223,5 +223,5 @@ void KOViewManager::raiseCurrentView( bool fullScreen, bool callUpdateView ) int hei = mMainView->height(); if ( mCurrentView == mMonthView ) { - if ( !KOPrefs::instance()->mMonthViewWeek ) { + if ( true /* !KOPrefs::instance()->mMonthViewWeek*/ ) { mMainView->navigatorBar()->show(); hei -= mMainView->navigatorBar()->sizeHint().height(); @@ -519,5 +519,5 @@ void KOViewManager::showMonthView() mMainView, SLOT ( beamIncidence( Incidence * ) ) ); connect( mMonthView, SIGNAL( selectWeekNum( int ) ), - mMainView, SLOT ( selectWeekNum( int ) ) ); + mMainView->dateNavigator(), SLOT ( selectWeek( int ) ) ); connect( mMonthView, SIGNAL( showDaySignal( QDate ) ), mMainView, SLOT ( showDay( QDate ) ) ); |