summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-02-02 12:48:28 (UTC)
committer zautrix <zautrix>2005-02-02 12:48:28 (UTC)
commit66c1429e6d29331dac4182d2c42aaf1630916c7d (patch) (unidiff)
tree27280cf745c2828cfa22ec52049cfd8e96d28f4f /korganizer
parente770226d68f5fdb8484003bbb9898848cec901a8 (diff)
downloadkdepimpi-66c1429e6d29331dac4182d2c42aaf1630916c7d.zip
kdepimpi-66c1429e6d29331dac4182d2c42aaf1630916c7d.tar.gz
kdepimpi-66c1429e6d29331dac4182d2c42aaf1630916c7d.tar.bz2
fifi
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaview.cpp18
-rw-r--r--korganizer/koagendaview.h1
-rw-r--r--korganizer/komonthview.cpp11
-rw-r--r--korganizer/koviewmanager.cpp2
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
@@ -422,13 +422,29 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
422 // QSizePolicy::Fixed ) ); 422 // QSizePolicy::Fixed ) );
423 mExpandButton->setFixedSize( widebut, widebut); 423 mExpandButton->setFixedSize( widebut, widebut);
424 connect( mExpandButton, SIGNAL( clicked() ), SIGNAL( toggleExpand() ) ); 424 connect( mExpandButton, SIGNAL( clicked() ), SIGNAL( toggleExpand() ) );
425 mExpandButton->setFocusPolicy(NoFocus); 425 mExpandButton->setFocusPolicy(NoFocus);
426 mAllDayAgenda = new KOAgenda(1,mAllDayFrame); 426 mAllDayAgenda = new KOAgenda(1,mAllDayFrame);
427 mAllDayAgenda->setFocusPolicy(NoFocus); 427 mAllDayAgenda->setFocusPolicy(NoFocus);
428 QWidget *dummyAllDayRight = new QWidget(mAllDayFrame); 428 QVBox *dummyAllDayRight = new QVBox(mAllDayFrame);
429
430 QPushButton *dummyAllDayRightB = new QPushButton(dummyAllDayRight);
431 QLabel * dummyAllDayRightL = new QLabel ( dummyAllDayRight );
432
433 dummyAllDayRightB->setFlat( true );
434 dummyAllDayRightB->setFocusPolicy(NoFocus);
435 // dummyAllDayRightB->setSizePolicy(QSizePolicy( QSizePolicy::Expanding ,QSizePolicy::Expanding ));
436 //dummyAllDayRightB->setFixedHeight( dummyAllDayRightB->sizeHint().height()/2 );
437 QPopupMenu * wpo = new QPopupMenu (this);
438 wpo->insertItem( i18n("W#"), 0 );
439 int i;
440 for ( i = 1; i < 54; i++ )
441 wpo->insertItem( QString::number( i ),i );
442 dummyAllDayRightB->setPopup( wpo );
443
444 connect( wpo, SIGNAL( activated(int) ), SIGNAL( selectWeekNum ( int ) ) );
429 445
430 // Create event context menu for all day agenda 446 // Create event context menu for all day agenda
431 mAllDayAgendaPopup = eventPopup(); 447 mAllDayAgendaPopup = eventPopup();
432 connect(mAllDayAgenda,SIGNAL(showIncidencePopupSignal(Incidence *)), 448 connect(mAllDayAgenda,SIGNAL(showIncidencePopupSignal(Incidence *)),
433 mAllDayAgendaPopup,SLOT(showIncidencePopup(Incidence *))); 449 mAllDayAgendaPopup,SLOT(showIncidencePopup(Incidence *)));
434 450
diff --git a/korganizer/koagendaview.h b/korganizer/koagendaview.h
index e9e85cc..4a058ce 100644
--- a/korganizer/koagendaview.h
+++ b/korganizer/koagendaview.h
@@ -207,12 +207,13 @@ class KOAgendaView : public KOEventView {
207 void addToCalSlot(Incidence *, Incidence *); 207 void addToCalSlot(Incidence *, Incidence *);
208 208
209 signals: 209 signals:
210 void showDateView( int, QDate ); 210 void showDateView( int, QDate );
211 void newTodoSignal( QDateTime ,bool ); 211 void newTodoSignal( QDateTime ,bool );
212 void toggleExpand(); 212 void toggleExpand();
213 void selectWeekNum( int );
213 void todoMoved( Todo *, int ); 214 void todoMoved( Todo *, int );
214 void incidenceChanged(Incidence * , int ); 215 void incidenceChanged(Incidence * , int );
215 // void cloneIncidenceSignal(Incidence *); 216 // void cloneIncidenceSignal(Incidence *);
216 217
217 protected: 218 protected:
218 KOAgendaButton* getNewDaylabel(); 219 KOAgendaButton* getNewDaylabel();
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index f2cfb75..ab96786 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -906,28 +906,31 @@ void KOMonthView::printPreview(CalPrinter *calPrinter, const QDate &fd,
906 906
907void KOMonthView::updateConfig() 907void KOMonthView::updateConfig()
908{ 908{
909 909
910 mWeekStartsMonday = KGlobal::locale()->weekStartsMonday(); 910 mWeekStartsMonday = KGlobal::locale()->weekStartsMonday();
911 911
912 if ( mShowWeekView ) 912 if ( mShowWeekView ) {
913 mWeekStartsMonday = true; 913 mWeekStartsMonday = true;
914 }
914 QFontMetrics fontmetric(mDayLabels[0]->font()); 915 QFontMetrics fontmetric(mDayLabels[0]->font());
915 mWidthLongDayLabel = 0; 916 mWidthLongDayLabel = 0;
916 917
917 for (int i = 0; i < 7; i++) { 918 for (int i = 0; i < 7; i++) {
918 int width = fontmetric.width(KOGlobals::self()->calendarSystem()->weekDayName(i+1)); 919 int width = fontmetric.width(KOGlobals::self()->calendarSystem()->weekDayName(i+1));
919 if ( width > mWidthLongDayLabel ) mWidthLongDayLabel = width; 920 if ( width > mWidthLongDayLabel ) mWidthLongDayLabel = width;
920 } 921 }
921 bool temp = mShowSatSunComp ; 922 bool temp = mShowSatSunComp ;
922 mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ; 923 mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ;
923 if ( temp != KOPrefs::instance()->mMonthViewSatSunTog ) 924 if ( ! mShowWeekView ) {
924 computeLayout(); 925 if ( temp != KOPrefs::instance()->mMonthViewSatSunTog )
926 computeLayout();
927 }
925 updateDayLabels(); 928 updateDayLabels();
926 //qDebug("KOMonthView::updateConfig() %d %d %d ",height(), mDayLabels[0]->sizeHint().height() ,mNumWeeks); 929 //qDebug("KOMonthView::updateConfig() %d %d %d ",height(), mDayLabels[0]->sizeHint().height() ,mNumWeeks);
927 int cellHeight = (height() - mDayLabels[0]->sizeHint().height()) /mNumWeeks; 930 //int cellHeight = (height() - mDayLabels[0]->sizeHint().height()) /mNumWeeks;
928 //resizeEvent( 0 ); 931 //resizeEvent( 0 );
929 for (uint i = 0; i < mCells.count(); ++i) { 932 for (uint i = 0; i < mCells.count(); ++i) {
930 mCells[i]->updateConfig(); 933 mCells[i]->updateConfig();
931 } 934 }
932#ifdef DESKTOP_VERSION 935#ifdef DESKTOP_VERSION
933 MonthViewCell::toolTipGroup()->setEnabled(KOPrefs::instance()->mEnableToolTips); 936 MonthViewCell::toolTipGroup()->setEnabled(KOPrefs::instance()->mEnableToolTips);
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index ca3de59..a74c5fe 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -404,12 +404,14 @@ void KOViewManager::showAgendaView( bool fullScreen )
404 connect( mAgendaView,SIGNAL( todoMoved( Todo *, int )), 404 connect( mAgendaView,SIGNAL( todoMoved( Todo *, int )),
405 mMainView, SIGNAL( todoModified( Todo *, int ))); 405 mMainView, SIGNAL( todoModified( Todo *, int )));
406 connect( mAgendaView, SIGNAL( moveIncidenceSignal( Incidence * ) ), 406 connect( mAgendaView, SIGNAL( moveIncidenceSignal( Incidence * ) ),
407 mMainView, SLOT ( moveIncidence( Incidence * ) ) ); 407 mMainView, SLOT ( moveIncidence( Incidence * ) ) );
408 connect( mAgendaView, SIGNAL( beamIncidenceSignal( Incidence * ) ), 408 connect( mAgendaView, SIGNAL( beamIncidenceSignal( Incidence * ) ),
409 mMainView, SLOT ( beamIncidence( Incidence * ) ) ); 409 mMainView, SLOT ( beamIncidence( Incidence * ) ) );
410 connect( mAgendaView, SIGNAL( selectWeekNum( int ) ),
411 mMainView->dateNavigator(), SLOT ( selectWeek( int ) ) );
410 mAgendaView->readSettings(); 412 mAgendaView->readSettings();
411 mAgendaView->updateConfig(); 413 mAgendaView->updateConfig();
412 } 414 }
413 415
414 showView( mAgendaView, full); 416 showView( mAgendaView, full);
415 417