author | zautrix <zautrix> | 2005-01-20 01:24:07 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-20 01:24:07 (UTC) |
commit | dbb59deb5c0949f83b2d6fd79ec599e7b9e8ebf1 (patch) (unidiff) | |
tree | 3fac729225892ee1a4570a5852ee287f35e74ce7 | |
parent | ade7e8fcdcf45d5bc73ea73da6f9a1b06964a64e (diff) | |
download | kdepimpi-dbb59deb5c0949f83b2d6fd79ec599e7b9e8ebf1.zip kdepimpi-dbb59deb5c0949f83b2d6fd79ec599e7b9e8ebf1.tar.gz kdepimpi-dbb59deb5c0949f83b2d6fd79ec599e7b9e8ebf1.tar.bz2 |
more view fixes
-rw-r--r-- | korganizer/calendarview.cpp | 4 | ||||
-rw-r--r-- | korganizer/komonthview.cpp | 26 | ||||
-rw-r--r-- | korganizer/komonthview.h | 1 | ||||
-rw-r--r-- | korganizer/koviewmanager.cpp | 3 |
4 files changed, 23 insertions, 11 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index f9af769..8f05276 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -498,14 +498,14 @@ CalendarView::~CalendarView() | |||
498 | 498 | ||
499 | void CalendarView::showDay( QDate d ) | 499 | void CalendarView::showDay( QDate d ) |
500 | { | 500 | { |
501 | dateNavigator()->blockSignals( true ); | 501 | dateNavigator()->blockSignals( true ); |
502 | dateNavigator()->selectDate( d ); | 502 | dateNavigator()->selectDate( d ); |
503 | dateNavigator()->blockSignals( false ); | 503 | dateNavigator()->blockSignals( false ); |
504 | mViewManager->showWeekView(); | 504 | mViewManager->showDayView(); |
505 | dateNavigator()->selectDate( d ); | 505 | //dateNavigator()->selectDate( d ); |
506 | } | 506 | } |
507 | void CalendarView::timerAlarm() | 507 | void CalendarView::timerAlarm() |
508 | { | 508 | { |
509 | //qDebug("CalendarView::timerAlarm() "); | 509 | //qDebug("CalendarView::timerAlarm() "); |
510 | computeAlarm(mAlarmNotification ); | 510 | computeAlarm(mAlarmNotification ); |
511 | } | 511 | } |
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 842f6eb..b819eec 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp | |||
@@ -71,13 +71,13 @@ private: | |||
71 | KNoScrollListBox* _wid; | 71 | KNoScrollListBox* _wid; |
72 | 72 | ||
73 | }; | 73 | }; |
74 | 74 | ||
75 | 75 | ||
76 | KNoScrollListBox::KNoScrollListBox(QWidget *parent,const char *name) | 76 | KNoScrollListBox::KNoScrollListBox(QWidget *parent,const char *name) |
77 | : QListBox(parent, name) | 77 | : QListBox(parent, name, WRepaintNoErase) |
78 | { | 78 | { |
79 | #ifndef DESKTOP_VERSION | 79 | #ifndef DESKTOP_VERSION |
80 | QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold ); | 80 | QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold ); |
81 | #endif | 81 | #endif |
82 | mWT = new KNOWhatsThis(this); | 82 | mWT = new KNOWhatsThis(this); |
83 | } | 83 | } |
@@ -379,30 +379,38 @@ void MonthViewCell::setHoliday( const QString &holiday ) | |||
379 | void MonthViewCell::keyPressEvent ( QKeyEvent * e ) | 379 | void MonthViewCell::keyPressEvent ( QKeyEvent * e ) |
380 | { | 380 | { |
381 | 381 | ||
382 | e->ignore(); | 382 | e->ignore(); |
383 | 383 | ||
384 | } | 384 | } |
385 | void MonthViewCell::clear() | ||
386 | { | ||
387 | mItemList->clear(); | ||
388 | QApplication::removePostedEvents ( mItemList ); | ||
389 | QApplication::removePostedEvents ( mLabel ); | ||
390 | QApplication::removePostedEvents ( this ); | ||
391 | } | ||
385 | void MonthViewCell::updateCell() | 392 | void MonthViewCell::updateCell() |
386 | { | 393 | { |
387 | if ( !mMonthView->isUpdatePossible() ) | 394 | if ( !mMonthView->isUpdatePossible() ) |
388 | return; | 395 | return; |
389 | if ( !isVisible() ){ | 396 | /* |
397 | if ( !isVisible() ){ | ||
390 | return; | 398 | return; |
391 | } | 399 | } |
400 | */ | ||
401 | // qDebug("MonthViewCell::updateCell() "); | ||
392 | setPrimary( mDate.month()%2 ); | 402 | setPrimary( mDate.month()%2 ); |
393 | setHoliday( KOGlobals::self()->calendarSystem()->dayOfWeek(mDate) == KOGlobals::self()->calendarSystem()->weekDayOfPray() || ( mDate.dayOfWeek() == 6 ) && KOPrefs::instance()-> mExcludeSaturdays); | 403 | setHoliday( KOGlobals::self()->calendarSystem()->dayOfWeek(mDate) == KOGlobals::self()->calendarSystem()->weekDayOfPray() || ( mDate.dayOfWeek() == 6 ) && KOPrefs::instance()-> mExcludeSaturdays); |
394 | if ( mDate == QDate::currentDate() ) { | 404 | if ( mDate == QDate::currentDate() ) { |
395 | mItemList->setLineWidth( 3 ); | 405 | mItemList->setLineWidth( 3 ); |
396 | } else { | 406 | } else { |
397 | mItemList->setLineWidth( 1 ); | 407 | mItemList->setLineWidth( 1 ); |
398 | } | 408 | } |
399 | mItemList->clear(); | 409 | mItemList->clear(); |
400 | 410 | ||
401 | |||
402 | |||
403 | #ifdef DESKTOP_VERSION | 411 | #ifdef DESKTOP_VERSION |
404 | QToolTip::remove(this); | 412 | QToolTip::remove(this); |
405 | #endif | 413 | #endif |
406 | QString tipText(""); | 414 | QString tipText(""); |
407 | //qApp->processEvents(); | 415 | //qApp->processEvents(); |
408 | if ( !mHolidayString.isEmpty() ) { | 416 | if ( !mHolidayString.isEmpty() ) { |
@@ -563,16 +571,17 @@ void MonthViewCell::updateCell() | |||
563 | mLabel->resize( mLabelBigSize ); | 571 | mLabel->resize( mLabelBigSize ); |
564 | text += QString::number( KOGlobals::self()->calendarSystem()->day(mDate) ); | 572 | text += QString::number( KOGlobals::self()->calendarSystem()->day(mDate) ); |
565 | } else { | 573 | } else { |
566 | mLabel->resize( mLabelSize ); | 574 | mLabel->resize( mLabelSize ); |
567 | text += QString::number( KOGlobals::self()->calendarSystem()->day(mDate) ); | 575 | text += QString::number( KOGlobals::self()->calendarSystem()->day(mDate) ); |
568 | } | 576 | } |
577 | |||
569 | mLabel->setText( text ); | 578 | mLabel->setText( text ); |
570 | resizeEvent( 0 ); | 579 | resizeEvent( 0 ); |
571 | // if ( isVisible()) | 580 | // if ( isVisible()) |
572 | qApp->processEvents(); | 581 | //qApp->processEvents(); |
573 | } | 582 | } |
574 | 583 | ||
575 | void MonthViewCell::updateConfig() | 584 | void MonthViewCell::updateConfig() |
576 | { | 585 | { |
577 | 586 | ||
578 | setFont( KOPrefs::instance()->mMonthViewFont ); | 587 | setFont( KOPrefs::instance()->mMonthViewFont ); |
@@ -933,22 +942,23 @@ void KOMonthView::changeEventDisplay(Event *, int) | |||
933 | // quick-and-dirty-hack gets the job done for right now. | 942 | // quick-and-dirty-hack gets the job done for right now. |
934 | updateView(); | 943 | updateView(); |
935 | } | 944 | } |
936 | 945 | ||
937 | void KOMonthView::updateView() | 946 | void KOMonthView::updateView() |
938 | { | 947 | { |
939 | static int iii = 0; | ||
940 | ++iii; | ||
941 | if ( !updatePossible ) | 948 | if ( !updatePossible ) |
942 | return; | 949 | return; |
943 | uint i; | 950 | //qDebug("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "); |
951 | int i; | ||
944 | for( i = 0; i < mCells.count(); ++i ) { | 952 | for( i = 0; i < mCells.count(); ++i ) { |
945 | mCells[i]->updateCell(); | 953 | mCells[i]->updateCell(); |
946 | } | 954 | } |
955 | |||
947 | //qDebug("KOMonthView::updateView() "); | 956 | //qDebug("KOMonthView::updateView() "); |
948 | processSelectionChange(); | 957 | processSelectionChange(); |
958 | // qDebug("---------------------------------------------------------------------+ "); | ||
949 | } | 959 | } |
950 | 960 | ||
951 | void KOMonthView::resizeEvent(QResizeEvent * e) | 961 | void KOMonthView::resizeEvent(QResizeEvent * e) |
952 | { | 962 | { |
953 | computeLayout(); | 963 | computeLayout(); |
954 | } | 964 | } |
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h index 727f511..a965bf3 100644 --- a/korganizer/komonthview.h +++ b/korganizer/komonthview.h | |||
@@ -144,12 +144,13 @@ class MonthViewCell : public QWidget | |||
144 | 144 | ||
145 | Incidence *selectedIncidence(); | 145 | Incidence *selectedIncidence(); |
146 | QDate selectedIncidenceDate(); | 146 | QDate selectedIncidenceDate(); |
147 | 147 | ||
148 | void deselect(); | 148 | void deselect(); |
149 | void select(); | 149 | void select(); |
150 | void clear(); | ||
150 | 151 | ||
151 | #ifdef DESKTOP_VERSION | 152 | #ifdef DESKTOP_VERSION |
152 | static QToolTipGroup *toolTipGroup(); | 153 | static QToolTipGroup *toolTipGroup(); |
153 | #endif | 154 | #endif |
154 | signals: | 155 | signals: |
155 | void defaultAction( Incidence * ); | 156 | void defaultAction( Incidence * ); |
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index 00a5842..f6b7718 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp | |||
@@ -150,15 +150,16 @@ void KOViewManager::showView(KOrg::BaseView *view, bool fullScreen ) | |||
150 | if ( isFull && KOPrefs::instance()->mViewChangeHoldFullscreen ) | 150 | if ( isFull && KOPrefs::instance()->mViewChangeHoldFullscreen ) |
151 | full = true; | 151 | full = true; |
152 | if ( !isFull && KOPrefs::instance()->mViewChangeHoldNonFullscreen ) | 152 | if ( !isFull && KOPrefs::instance()->mViewChangeHoldNonFullscreen ) |
153 | full = false; | 153 | full = false; |
154 | } | 154 | } |
155 | if ( mAgendaView ) mAgendaView->deleteSelectedDateTime(); | 155 | if ( mAgendaView ) mAgendaView->deleteSelectedDateTime(); |
156 | raiseCurrentView( full ); | 156 | //raiseCurrentView( full ); |
157 | mMainView->processIncidenceSelection( 0 ); | 157 | mMainView->processIncidenceSelection( 0 ); |
158 | mMainView->updateView(); | 158 | mMainView->updateView(); |
159 | raiseCurrentView( full ); | ||
159 | mMainView->adaptNavigationUnits(); | 160 | mMainView->adaptNavigationUnits(); |
160 | } | 161 | } |
161 | 162 | ||
162 | void KOViewManager::raiseCurrentView( bool fullScreen ) | 163 | void KOViewManager::raiseCurrentView( bool fullScreen ) |
163 | { | 164 | { |
164 | //qDebug("raiseCurrentView "); | 165 | //qDebug("raiseCurrentView "); |