-rw-r--r-- | korganizer/koagendaview.cpp | 18 | ||||
-rw-r--r-- | korganizer/koagendaview.h | 1 | ||||
-rw-r--r-- | korganizer/komonthview.cpp | 11 | ||||
-rw-r--r-- | korganizer/koviewmanager.cpp | 2 |
4 files changed, 27 insertions, 5 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index d4ff77a..aed9bae 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp @@ -427,3 +427,19 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : mAllDayAgenda->setFocusPolicy(NoFocus); - QWidget *dummyAllDayRight = new QWidget(mAllDayFrame); + QVBox *dummyAllDayRight = new QVBox(mAllDayFrame); + + QPushButton *dummyAllDayRightB = new QPushButton(dummyAllDayRight); + QLabel * dummyAllDayRightL = new QLabel ( dummyAllDayRight ); + + dummyAllDayRightB->setFlat( true ); + dummyAllDayRightB->setFocusPolicy(NoFocus); + // dummyAllDayRightB->setSizePolicy(QSizePolicy( QSizePolicy::Expanding ,QSizePolicy::Expanding )); + //dummyAllDayRightB->setFixedHeight( dummyAllDayRightB->sizeHint().height()/2 ); + QPopupMenu * wpo = new QPopupMenu (this); + wpo->insertItem( i18n("W#"), 0 ); + int i; + for ( i = 1; i < 54; i++ ) + wpo->insertItem( QString::number( i ),i ); + dummyAllDayRightB->setPopup( wpo ); + + connect( wpo, SIGNAL( activated(int) ), SIGNAL( selectWeekNum ( int ) ) ); diff --git a/korganizer/koagendaview.h b/korganizer/koagendaview.h index e9e85cc..4a058ce 100644 --- a/korganizer/koagendaview.h +++ b/korganizer/koagendaview.h @@ -212,2 +212,3 @@ class KOAgendaView : public KOEventView { void toggleExpand(); + void selectWeekNum( int ); void todoMoved( Todo *, int ); diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index f2cfb75..ab96786 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp @@ -911,4 +911,5 @@ void KOMonthView::updateConfig() - if ( mShowWeekView ) + if ( mShowWeekView ) { mWeekStartsMonday = true; + } QFontMetrics fontmetric(mDayLabels[0]->font()); @@ -922,7 +923,9 @@ void KOMonthView::updateConfig() mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ; - if ( temp != KOPrefs::instance()->mMonthViewSatSunTog ) - computeLayout(); + if ( ! mShowWeekView ) { + if ( temp != KOPrefs::instance()->mMonthViewSatSunTog ) + computeLayout(); + } updateDayLabels(); //qDebug("KOMonthView::updateConfig() %d %d %d ",height(), mDayLabels[0]->sizeHint().height() ,mNumWeeks); - int cellHeight = (height() - mDayLabels[0]->sizeHint().height()) /mNumWeeks; + //int cellHeight = (height() - mDayLabels[0]->sizeHint().height()) /mNumWeeks; //resizeEvent( 0 ); diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index ca3de59..a74c5fe 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp @@ -409,2 +409,4 @@ void KOViewManager::showAgendaView( bool fullScreen ) mMainView, SLOT ( beamIncidence( Incidence * ) ) ); + connect( mAgendaView, SIGNAL( selectWeekNum( int ) ), + mMainView->dateNavigator(), SLOT ( selectWeek( int ) ) ); mAgendaView->readSettings(); |