summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-02-02 11:55:36 (UTC)
committer zautrix <zautrix>2005-02-02 11:55:36 (UTC)
commite770226d68f5fdb8484003bbb9898848cec901a8 (patch) (side-by-side diff)
treeecf8f795d6f8673405c22010c82fb167a41a7aa3 /korganizer
parent2a184b0d9095c6175e7bdf2f5d5561470b8d6307 (diff)
downloadkdepimpi-e770226d68f5fdb8484003bbb9898848cec901a8.zip
kdepimpi-e770226d68f5fdb8484003bbb9898848cec901a8.tar.gz
kdepimpi-e770226d68f5fdb8484003bbb9898848cec901a8.tar.bz2
jepp
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/komonthview.cpp33
-rw-r--r--korganizer/komonthview.h2
-rw-r--r--korganizer/koviewmanager.cpp4
3 files changed, 28 insertions, 11 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)
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);
@@ -808,5 +808,10 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
}
- 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 );
@@ -826,4 +831,4 @@ 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();
@@ -838,2 +843,12 @@ KOMonthView::~KOMonthView()
}
+void KOMonthView::selectDateWeekNum ( int )
+{
+
+}
+void KOMonthView::selectInternalWeekNum ( int n )
+{
+ emit selectWeekNum ( n );
+ switchView();
+}
+
void KOMonthView::switchView()
@@ -844,3 +859,3 @@ void KOMonthView::switchView()
KOPrefs::instance()->mMonthViewWeek = mShowWeekView;
- emit showNavigator( !mShowWeekView );
+ //emit showNavigator( !mShowWeekView );
computeLayout();
@@ -1224,3 +1239,3 @@ void KOMonthView::computeLayoutWeek()
updatePossible = true;
- mWeekLabels[mNumWeeks]->setText( i18n("M"));
+ //mWeekLabels[mNumWeeks]->setText( i18n("M"));
if ( forceUpdate )
@@ -1333,3 +1348,3 @@ void KOMonthView::computeLayout()
updatePossible = true;
- mWeekLabels[mNumWeeks]->setText( i18n("W"));
+ //mWeekLabels[mNumWeeks]->setText( i18n("W"));
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
protected slots:
+ void selectDateWeekNum ( int );
+ void selectInternalWeekNum ( int );
void switchView();
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 )
if ( mCurrentView == mMonthView ) {
- if ( !KOPrefs::instance()->mMonthViewWeek ) {
+ if ( true /* !KOPrefs::instance()->mMonthViewWeek*/ ) {
mMainView->navigatorBar()->show();
@@ -520,3 +520,3 @@ void KOViewManager::showMonthView()
connect( mMonthView, SIGNAL( selectWeekNum( int ) ),
- mMainView, SLOT ( selectWeekNum( int ) ) );
+ mMainView->dateNavigator(), SLOT ( selectWeek( int ) ) );
connect( mMonthView, SIGNAL( showDaySignal( QDate ) ),