author | zautrix <zautrix> | 2005-01-20 01:24:07 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-20 01:24:07 (UTC) |
commit | dbb59deb5c0949f83b2d6fd79ec599e7b9e8ebf1 (patch) (side-by-side diff) | |
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() void CalendarView::showDay( QDate d ) { dateNavigator()->blockSignals( true ); dateNavigator()->selectDate( d ); dateNavigator()->blockSignals( false ); - mViewManager->showWeekView(); - dateNavigator()->selectDate( d ); + mViewManager->showDayView(); + //dateNavigator()->selectDate( d ); } void CalendarView::timerAlarm() { //qDebug("CalendarView::timerAlarm() "); computeAlarm(mAlarmNotification ); } 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: KNoScrollListBox* _wid; }; KNoScrollListBox::KNoScrollListBox(QWidget *parent,const char *name) - : QListBox(parent, name) + : QListBox(parent, name, WRepaintNoErase) { #ifndef DESKTOP_VERSION QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold ); #endif mWT = new KNOWhatsThis(this); } @@ -379,30 +379,38 @@ void MonthViewCell::setHoliday( const QString &holiday ) void MonthViewCell::keyPressEvent ( QKeyEvent * e ) { e->ignore(); } +void MonthViewCell::clear() +{ + mItemList->clear(); + QApplication::removePostedEvents ( mItemList ); + QApplication::removePostedEvents ( mLabel ); + QApplication::removePostedEvents ( this ); +} void MonthViewCell::updateCell() { if ( !mMonthView->isUpdatePossible() ) return; - if ( !isVisible() ){ + /* + if ( !isVisible() ){ return; } + */ + // qDebug("MonthViewCell::updateCell() "); setPrimary( mDate.month()%2 ); setHoliday( KOGlobals::self()->calendarSystem()->dayOfWeek(mDate) == KOGlobals::self()->calendarSystem()->weekDayOfPray() || ( mDate.dayOfWeek() == 6 ) && KOPrefs::instance()-> mExcludeSaturdays); if ( mDate == QDate::currentDate() ) { mItemList->setLineWidth( 3 ); } else { mItemList->setLineWidth( 1 ); } mItemList->clear(); - - #ifdef DESKTOP_VERSION QToolTip::remove(this); #endif QString tipText(""); //qApp->processEvents(); if ( !mHolidayString.isEmpty() ) { @@ -563,16 +571,17 @@ void MonthViewCell::updateCell() mLabel->resize( mLabelBigSize ); text += QString::number( KOGlobals::self()->calendarSystem()->day(mDate) ); } else { mLabel->resize( mLabelSize ); text += QString::number( KOGlobals::self()->calendarSystem()->day(mDate) ); } + mLabel->setText( text ); resizeEvent( 0 ); // if ( isVisible()) - qApp->processEvents(); + //qApp->processEvents(); } void MonthViewCell::updateConfig() { setFont( KOPrefs::instance()->mMonthViewFont ); @@ -933,22 +942,23 @@ void KOMonthView::changeEventDisplay(Event *, int) // quick-and-dirty-hack gets the job done for right now. updateView(); } void KOMonthView::updateView() { - static int iii = 0; - ++iii; if ( !updatePossible ) return; - uint i; + //qDebug("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "); + int i; for( i = 0; i < mCells.count(); ++i ) { mCells[i]->updateCell(); } + //qDebug("KOMonthView::updateView() "); processSelectionChange(); + // qDebug("---------------------------------------------------------------------+ "); } void KOMonthView::resizeEvent(QResizeEvent * e) { computeLayout(); } 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 Incidence *selectedIncidence(); QDate selectedIncidenceDate(); void deselect(); void select(); + void clear(); #ifdef DESKTOP_VERSION static QToolTipGroup *toolTipGroup(); #endif signals: 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 ) if ( isFull && KOPrefs::instance()->mViewChangeHoldFullscreen ) full = true; if ( !isFull && KOPrefs::instance()->mViewChangeHoldNonFullscreen ) full = false; } if ( mAgendaView ) mAgendaView->deleteSelectedDateTime(); - raiseCurrentView( full ); + //raiseCurrentView( full ); mMainView->processIncidenceSelection( 0 ); mMainView->updateView(); + raiseCurrentView( full ); mMainView->adaptNavigationUnits(); } void KOViewManager::raiseCurrentView( bool fullScreen ) { //qDebug("raiseCurrentView "); |