From dbb59deb5c0949f83b2d6fd79ec599e7b9e8ebf1 Mon Sep 17 00:00:00 2001 From: zautrix Date: Thu, 20 Jan 2005 01:24:07 +0000 Subject: more view fixes --- (limited to 'korganizer') diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index f9af769..8f05276 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -501,8 +501,8 @@ 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() { diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 842f6eb..b819eec 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp @@ -74,7 +74,7 @@ private: KNoScrollListBox::KNoScrollListBox(QWidget *parent,const char *name) - : QListBox(parent, name) + : QListBox(parent, name, WRepaintNoErase) { #ifndef DESKTOP_VERSION QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold ); @@ -382,13 +382,23 @@ 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() ) { @@ -398,8 +408,6 @@ void MonthViewCell::updateCell() } mItemList->clear(); - - #ifdef DESKTOP_VERSION QToolTip::remove(this); #endif @@ -566,10 +574,11 @@ void MonthViewCell::updateCell() 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() @@ -936,16 +945,17 @@ void KOMonthView::changeEventDisplay(Event *, int) 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) diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h index 727f511..a965bf3 100644 --- a/korganizer/komonthview.h +++ b/korganizer/komonthview.h @@ -147,6 +147,7 @@ class MonthViewCell : public QWidget void deselect(); void select(); + void clear(); #ifdef DESKTOP_VERSION static QToolTipGroup *toolTipGroup(); diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index 00a5842..f6b7718 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp @@ -153,9 +153,10 @@ void KOViewManager::showView(KOrg::BaseView *view, bool fullScreen ) full = false; } if ( mAgendaView ) mAgendaView->deleteSelectedDateTime(); - raiseCurrentView( full ); + //raiseCurrentView( full ); mMainView->processIncidenceSelection( 0 ); mMainView->updateView(); + raiseCurrentView( full ); mMainView->adaptNavigationUnits(); } -- cgit v0.9.0.2