summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/calendarview.cpp4
-rw-r--r--korganizer/komonthview.cpp24
-rw-r--r--korganizer/komonthview.h1
-rw-r--r--korganizer/koviewmanager.cpp3
4 files changed, 22 insertions, 10 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index f9af769..8f05276 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -496,18 +496,18 @@ CalendarView::~CalendarView()
//kdDebug() << "~CalendarView() done" << endl;
}
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 );
}
void CalendarView::suspendAlarm()
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 842f6eb..b819eec 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -69,17 +69,17 @@ protected:
};
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);
}
KNoScrollListBox::~KNoScrollListBox()
{
@@ -377,34 +377,42 @@ 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() ){
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() ) {
MonthViewItem *item = new MonthViewItem( 0, mDate, mHolidayString );
item->setPalette( mHolidayPalette );
@@ -561,20 +569,21 @@ void MonthViewCell::updateCell()
if ( KOGlobals::self()->calendarSystem()->day( mDate ) == 1 || (mDate.dayOfWeek() == 7 && !smallDisplay ) || KOPrefs::instance()->mMonthShowShort) {
text = KOGlobals::self()->calendarSystem()->monthName( mDate, true ) + " ";
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 );
QFontMetrics fm( font() );
@@ -931,26 +940,27 @@ void KOMonthView::changeEventDisplay(Event *, int)
{
// this should be re-written to be much more efficient, but this
// 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();
}
void KOMonthView::computeLayout()
{
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h
index 727f511..a965bf3 100644
--- a/korganizer/komonthview.h
+++ b/korganizer/komonthview.h
@@ -142,16 +142,17 @@ class MonthViewCell : public QWidget
void enableScrollBars( bool );
Incidence *selectedIncidence();
QDate selectedIncidenceDate();
void deselect();
void select();
+ void clear();
#ifdef DESKTOP_VERSION
static QToolTipGroup *toolTipGroup();
#endif
signals:
void defaultAction( Incidence * );
void newEventSignal( QDateTime );
void showDaySignal( QDate );
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index 00a5842..f6b7718 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -148,19 +148,20 @@ void KOViewManager::showView(KOrg::BaseView *view, bool fullScreen )
// bool full = fullScreen;
bool isFull = !mMainView->leftFrame()->isVisible();
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 ");
mCurrentAgendaView = 0;
int wid = mMainView->width() ;