author | zautrix <zautrix> | 2005-03-24 12:34:27 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-24 12:34:27 (UTC) |
commit | 685d04bc8f696697202f2fc0de18e61905cbb2fa (patch) (side-by-side diff) | |
tree | 927d070c135d0025b236f6bd76143e0341ef2566 | |
parent | a9e8535fd6960f454ab7009cfa996973291502a2 (diff) | |
download | kdepimpi-685d04bc8f696697202f2fc0de18e61905cbb2fa.zip kdepimpi-685d04bc8f696697202f2fc0de18e61905cbb2fa.tar.gz kdepimpi-685d04bc8f696697202f2fc0de18e61905cbb2fa.tar.bz2 |
layout fix
-rw-r--r-- | korganizer/datenavigatorcontainer.cpp | 64 | ||||
-rw-r--r-- | korganizer/datenavigatorcontainer.h | 6 | ||||
-rw-r--r-- | korganizer/kdatenavigator.cpp | 2 | ||||
-rw-r--r-- | korganizer/koagendaitem.cpp | 4 | ||||
-rw-r--r-- | korganizer/koprefsdialog.cpp | 16 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 4 |
6 files changed, 58 insertions, 38 deletions
diff --git a/korganizer/datenavigatorcontainer.cpp b/korganizer/datenavigatorcontainer.cpp index d1caff3..2290c53 100644 --- a/korganizer/datenavigatorcontainer.cpp +++ b/korganizer/datenavigatorcontainer.cpp @@ -75,14 +75,46 @@ void DateNavigatorContainer::connectNavigatorView( KDateNavigator *v ) connect( v, SIGNAL( goNext() ), SIGNAL( goNext() ) ); - connect( v, SIGNAL( goNextMonth() ), SIGNAL( goNextMonth() ) ); - connect( v, SIGNAL( goPrevMonth() ), SIGNAL( goPrevMonth() ) ); - connect( v, SIGNAL( goNextYear() ), SIGNAL( goNextYear() ) ); - connect( v, SIGNAL( goPrevYear() ), SIGNAL( goPrevYear() ) ); + connect( v, SIGNAL( goNextMonth() ), SLOT( slotgoNextMonth() ) ); + connect( v, SIGNAL( goPrevMonth() ), SLOT( slotgoPrevMonth() ) ); + connect( v, SIGNAL( goNextYear() ), SLOT( slotgoNextYear() ) ); + connect( v, SIGNAL( goPrevYear() ), SLOT( slotgoPrevYear() ) ); connect( v, SIGNAL( monthSelected( int ) ), SLOT( slotMonthSelected( int ) ) ); } +void DateNavigatorContainer::slotgoNextYear() +{ + jumpMonth( 12 ); + emit goNextYear(); +} +void DateNavigatorContainer::slotgoPrevYear() +{ + jumpMonth( -12 ); + emit goPrevYear(); + +} +void DateNavigatorContainer::slotgoPrevMonth() +{ + jumpMonth( -1 ); + emit goPrevMonth(); + +} +void DateNavigatorContainer::slotgoNextMonth() +{ + jumpMonth( 1 ); + emit goNextMonth(); +} +void DateNavigatorContainer::jumpMonth( int month ) +{ + + QDate baseDate = mNavigatorView->baseDate(); + computeMonthSelected( baseDate.month() + month, false ); +} void DateNavigatorContainer::slotMonthSelected( int month ) { + computeMonthSelected( month, true ); +} +void DateNavigatorContainer::computeMonthSelected( int month , bool forceEmit ) +{ //qDebug("slotMonthSelected %d ", month); QDate baseDate = mNavigatorView->baseDate(); @@ -94,25 +126,4 @@ void DateNavigatorContainer::slotMonthSelected( int month ) QDate newBase = QDate ( date.year(), date.month() , baseDate.day() ); -#if 0 - mFirstSelectedDate = dateList.first() ; - mSelectedDateCount = dateList.count() ; - - KDateNavigator *view = mExtraViews.at( 0 ); - QDate date = view->baseDate(); - - QDate curEnd = date.addDays( (mLastDisplayedDN)*30 +7); - //qDebug("End %s %s ",lDate.toString().latin1(),curEnd.toString().latin1() ); - if ( lDate < curEnd && date.addDays( -30 ) < fDate) { - mNavigatorView->dayMatrix()->setSelectedDaysFrom( fDate , lDate ); - mNavigatorView->dayMatrix()->repaint( false ); - for( uint i = 0; i < mLastDisplayedDN; ++i ) { - KDateNavigator *n = mExtraViews.at( i ); - if ( n->dayMatrix()->setSelectedDaysFrom( fDate , lDate ) ) { - n->dayMatrix()->repaint( false ); - } - } - return; - } -#endif //qDebug("NEW BASE %s", newBase.toString().latin1()); mNavigatorView->setBaseDate( newBase ); @@ -124,9 +135,12 @@ void DateNavigatorContainer::slotMonthSelected( int month ) if ( selFirst >= first && selLast <= last ) { setBaseDates(); + if ( forceEmit ) updateDayMatrixDates(); } else { setBaseDates(); + if ( forceEmit ) updateDayMatrixDates(); + if ( forceEmit ) emit monthSelected( month ); } diff --git a/korganizer/datenavigatorcontainer.h b/korganizer/datenavigatorcontainer.h index 9a64720..d2f397d 100644 --- a/korganizer/datenavigatorcontainer.h +++ b/korganizer/datenavigatorcontainer.h @@ -60,4 +60,8 @@ class DateNavigatorContainer: public QWidget void updateToday(); void slotMonthSelected( int month ); + void slotgoNextMonth(); + void slotgoPrevMonth(); + void slotgoNextYear(); + void slotgoPrevYear(); signals: @@ -78,4 +82,6 @@ class DateNavigatorContainer: public QWidget protected: + void computeMonthSelected( int month , bool forceEmit ); + void jumpMonth( int month ); void resizeEvent( QResizeEvent * ); diff --git a/korganizer/kdatenavigator.cpp b/korganizer/kdatenavigator.cpp index d62402f..6438c9a 100644 --- a/korganizer/kdatenavigator.cpp +++ b/korganizer/kdatenavigator.cpp @@ -120,5 +120,5 @@ KDateNavigator::KDateNavigator( QWidget *parent, const char *name ) myFullSizeHint = sizeHintTwoButtons( 4 ); mFontChanged = false; - resize ( mySizeHint ); + resize ( 0,0 ); } void KDateNavigator::changeFont ( QFont fo ) diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp index 82d1eab..b30ad75 100644 --- a/korganizer/koagendaitem.cpp +++ b/korganizer/koagendaitem.cpp @@ -506,5 +506,5 @@ void KOAgendaItem::paintEvent ( QPaintEvent *e ) xx = 0; if ( rw <= 1 ) { - qDebug("KOAgendaItem::Width1 <= 1 (%d). Returning. %s",rw,mDisplayedText.latin1()); + //qDebug("KOAgendaItem::Width1 <= 1 (%d). Returning. %s",rw,mDisplayedText.latin1()); return; } @@ -513,5 +513,5 @@ void KOAgendaItem::paintEvent ( QPaintEvent *e ) rw = paintFrom->width() - xx; if ( rw <= 1 ) { - qDebug("KOAgendaItem::Width2 <= 1 (%d). Returning.%s ",rw,mDisplayedText.latin1() ); + //qDebug("KOAgendaItem::Width2 <= 1 (%d). Returning.%s ",rw,mDisplayedText.latin1() ); return; } diff --git a/korganizer/koprefsdialog.cpp b/korganizer/koprefsdialog.cpp index 40e8a99..74037e6 100644 --- a/korganizer/koprefsdialog.cpp +++ b/korganizer/koprefsdialog.cpp @@ -591,12 +591,4 @@ void KOPrefsDialog::setupViewsTab() - if ( QApplication::desktop()->width() > 640 ) { - - KPrefsDialogWidBool *enableToolTips = - addWidBool(i18n("Enable tooltips displaying summary of ev."), - &(KOPrefs::instance()->mEnableToolTips),topFrame); - topLayout->addWidget(enableToolTips->checkBox(),ii++,0); - - } @@ -662,4 +654,12 @@ void KOPrefsDialog::setupViewsTab() topLayout->addWidget(weeklyRecur->checkBox(),ii++,0); + + KPrefsDialogWidBool *enableToolTips = + addWidBool(i18n("Enable tooltips displaying summary of ev."), + &(KOPrefs::instance()->mEnableToolTips),topFrame); + topLayout->addWidget(enableToolTips->checkBox(),ii++,0); + + // ********************************************************* + topFrame = addPage(i18n("Agenda View"),0,0); // DesktopIcon("viewmag",KIcon::SizeMedium)); diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index bd9efc8..7faf675 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -1001,4 +1001,6 @@ void MainWindow::initActions() if (p-> mShowIconSearch) search_action->addTo( iconToolBar ); + if (p-> mShowIconWhatsThis) + QWhatsThis::whatsThisButton ( iconToolBar ); if (p-> mShowIconNext) whatsnext_action->addTo( iconToolBar ); @@ -1107,6 +1109,4 @@ void MainWindow::initActions() else configureToolBarMenu->setItemChecked( 5, true ); - if (p-> mShowIconWhatsThis) - QWhatsThis::whatsThisButton ( iconToolBar ); connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) ); configureAgenda( p->mHourSize ); |