author | zautrix <zautrix> | 2005-02-02 11:55:36 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-02 11:55:36 (UTC) |
commit | e770226d68f5fdb8484003bbb9898848cec901a8 (patch) (unidiff) | |
tree | ecf8f795d6f8673405c22010c82fb167a41a7aa3 /korganizer | |
parent | 2a184b0d9095c6175e7bdf2f5d5561470b8d6307 (diff) | |
download | kdepimpi-e770226d68f5fdb8484003bbb9898848cec901a8.zip kdepimpi-e770226d68f5fdb8484003bbb9898848cec901a8.tar.gz kdepimpi-e770226d68f5fdb8484003bbb9898848cec901a8.tar.bz2 |
jepp
-rw-r--r-- | korganizer/komonthview.cpp | 33 | ||||
-rw-r--r-- | korganizer/komonthview.h | 6 | ||||
-rw-r--r-- | korganizer/koviewmanager.cpp | 4 |
3 files changed, 30 insertions, 13 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 00b1e92..f2cfb75 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp | |||
@@ -800,5 +800,5 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) | |||
800 | label->setFont(bfont); | 800 | label->setFont(bfont); |
801 | connect( label, SIGNAL( selectWeekNum ( int )),this, SIGNAL( selectWeekNum ( int )) ); | 801 | connect( label, SIGNAL( selectWeekNum ( int )),this, SLOT( selectInternalWeekNum ( int )) ); |
802 | label->setFlat(true); | 802 | label->setFlat(true); |
803 | QWhatsThis::add(label,i18n("Click on the week number to\nshow week in agenda view")); | 803 | QWhatsThis::add(label,i18n("Click on the week number to\nshow week zoomed")); |
804 | //label->setFrameStyle(QFrame::Panel|QFrame::Raised); | 804 | //label->setFrameStyle(QFrame::Panel|QFrame::Raised); |
@@ -808,5 +808,10 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) | |||
808 | } | 808 | } |
809 | mWeekLabels[mNumWeeks]->setText( i18n("W")); | 809 | mWeekLabels[mNumWeeks]->setText( i18n("")); |
810 | QWhatsThis::add(mWeekLabels[mNumWeeks],i18n("Click on this to\nswitch to week mode view")); | 810 | QWhatsThis::add(mWeekLabels[mNumWeeks],i18n("Click on this to\nselect week number")); |
811 | int row, col; | 811 | int row, col; |
812 | QPopupMenu * wpo = new QPopupMenu (this); | ||
813 | wpo->insertItem( i18n("W#"), 0 ); | ||
814 | for ( i = 1; i < 54; i++ ) | ||
815 | wpo->insertItem( i18n("%1").arg(i), i ); | ||
816 | mWeekLabels[mNumWeeks]->setPopup( wpo ); | ||
812 | mCells.resize( mNumCells ); | 817 | mCells.resize( mNumCells ); |
@@ -826,4 +831,4 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) | |||
826 | 831 | ||
827 | connect( mWeekLabels[mNumWeeks], SIGNAL( clicked() ), | 832 | //connect( mWeekLabels[mNumWeeks], SIGNAL( clicked() ), SLOT( switchView() ) ); |
828 | SLOT( switchView() ) ); | 833 | connect( wpo, SIGNAL( activated(int) ), SIGNAL( selectWeekNum ( int ) ) ); |
829 | mContextMenu = eventPopup(); | 834 | mContextMenu = eventPopup(); |
@@ -838,2 +843,12 @@ KOMonthView::~KOMonthView() | |||
838 | } | 843 | } |
844 | void KOMonthView::selectDateWeekNum ( int ) | ||
845 | { | ||
846 | |||
847 | } | ||
848 | void KOMonthView::selectInternalWeekNum ( int n ) | ||
849 | { | ||
850 | emit selectWeekNum ( n ); | ||
851 | switchView(); | ||
852 | } | ||
853 | |||
839 | void KOMonthView::switchView() | 854 | void KOMonthView::switchView() |
@@ -844,3 +859,3 @@ void KOMonthView::switchView() | |||
844 | KOPrefs::instance()->mMonthViewWeek = mShowWeekView; | 859 | KOPrefs::instance()->mMonthViewWeek = mShowWeekView; |
845 | emit showNavigator( !mShowWeekView ); | 860 | //emit showNavigator( !mShowWeekView ); |
846 | computeLayout(); | 861 | computeLayout(); |
@@ -1224,3 +1239,3 @@ void KOMonthView::computeLayoutWeek() | |||
1224 | updatePossible = true; | 1239 | updatePossible = true; |
1225 | mWeekLabels[mNumWeeks]->setText( i18n("M")); | 1240 | //mWeekLabels[mNumWeeks]->setText( i18n("M")); |
1226 | if ( forceUpdate ) | 1241 | if ( forceUpdate ) |
@@ -1333,3 +1348,3 @@ void KOMonthView::computeLayout() | |||
1333 | updatePossible = true; | 1348 | updatePossible = true; |
1334 | mWeekLabels[mNumWeeks]->setText( i18n("W")); | 1349 | //mWeekLabels[mNumWeeks]->setText( i18n("W")); |
1335 | if ( forceUpdate ) | 1350 | if ( forceUpdate ) |
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h index 0bc3743..1ed200b 100644 --- a/korganizer/komonthview.h +++ b/korganizer/komonthview.h | |||
@@ -242,2 +242,4 @@ class KOMonthView: public KOEventView | |||
242 | protected slots: | 242 | protected slots: |
243 | void selectDateWeekNum ( int ); | ||
244 | void selectInternalWeekNum ( int ); | ||
243 | void switchView(); | 245 | void switchView(); |
@@ -248,4 +250,4 @@ class KOMonthView: public KOEventView | |||
248 | void showNavigator( bool ); | 250 | void showNavigator( bool ); |
249 | void selectWeekNum ( int ); | 251 | void selectWeekNum ( int ); |
250 | void showDaySignal( QDate ); | 252 | void showDaySignal( QDate ); |
251 | protected: | 253 | protected: |
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index 8aa0697..ca3de59 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp | |||
@@ -224,3 +224,3 @@ void KOViewManager::raiseCurrentView( bool fullScreen, bool callUpdateView ) | |||
224 | if ( mCurrentView == mMonthView ) { | 224 | if ( mCurrentView == mMonthView ) { |
225 | if ( !KOPrefs::instance()->mMonthViewWeek ) { | 225 | if ( true /* !KOPrefs::instance()->mMonthViewWeek*/ ) { |
226 | mMainView->navigatorBar()->show(); | 226 | mMainView->navigatorBar()->show(); |
@@ -520,3 +520,3 @@ void KOViewManager::showMonthView() | |||
520 | connect( mMonthView, SIGNAL( selectWeekNum( int ) ), | 520 | connect( mMonthView, SIGNAL( selectWeekNum( int ) ), |
521 | mMainView, SLOT ( selectWeekNum( int ) ) ); | 521 | mMainView->dateNavigator(), SLOT ( selectWeek( int ) ) ); |
522 | connect( mMonthView, SIGNAL( showDaySignal( QDate ) ), | 522 | connect( mMonthView, SIGNAL( showDaySignal( QDate ) ), |