summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp4
-rw-r--r--korganizer/komonthview.cpp26
-rw-r--r--korganizer/komonthview.h1
-rw-r--r--korganizer/koviewmanager.cpp3
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
@@ -492,26 +492,26 @@ CalendarView::~CalendarView()
delete mViewManager;
delete mStorage;
delete mDateFrame ;
delete beamDialog;
//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()
{
//qDebug(" CalendarView::suspendAlarm() ");
computeAlarm(mSuspendAlarmNotification );
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 842f6eb..b819eec 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -65,25 +65,25 @@ public:
protected:
virtual QString text( const QPoint& p)
{
return _wid->getWhatsThisText(p) ;
};
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()
{
delete mWT;
}
QString KNoScrollListBox::getWhatsThisText(QPoint p)
{
@@ -373,42 +373,50 @@ void MonthViewCell::setHoliday( const QString &holiday )
mHolidayString = holiday;
if ( !holiday.isEmpty() ) {
setHoliday( true );
}
}
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() ) {
MonthViewItem *item = new MonthViewItem( 0, mDate, mHolidayString );
item->setPalette( mHolidayPalette );
mItemList->insertItem( item );
tipText += mHolidayString+"\n";
}
//mLabel->setMaximumWidth( width() - mItemList->lineWidth()*2);
@@ -557,28 +565,29 @@ void MonthViewCell::updateCell()
//setMyPalette();
setMyPalette();
QString text;
bool smallDisplay = QApplication::desktop()->width() < 320 && KOPrefs::instance()->mMonthViewSatSunTog;
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() );
mLabelSize = fm.size( 0, "30" ) + QSize( 4, 2 );
mLabelBigSize = fm.size( 0, "Mag 30" ) + QSize( 2, 2 );
mHolidayPalette = mStandardPalette;
mPrimaryPalette = mStandardPalette;
@@ -927,34 +936,35 @@ void KOMonthView::showEvents(QPtrList<Event>)
qDebug("KOMonthView::selectEvents is not implemented yet. ");
}
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()
{
// select the appropriate heading string size. E.g. "Wednesday" or "Wed".
// note this only changes the text if the requested size crosses the
// threshold between big enough to support the full name and not big
// enough.
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h
index 727f511..a965bf3 100644
--- a/korganizer/komonthview.h
+++ b/korganizer/komonthview.h
@@ -138,24 +138,25 @@ class MonthViewCell : public QWidget
void updateCell();
void updateConfig();
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 );
protected:
void resizeEvent( QResizeEvent * );
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index 00a5842..f6b7718 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -144,27 +144,28 @@ void KOViewManager::showView(KOrg::BaseView *view, bool fullScreen )
full = mMainView->leftFrame()->isVisible();
} else {
mCurrentView = view;
// 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() ;
int hei = mMainView->height();
if ( mCurrentView == mMonthView ) {
mMainView->navigatorBar()->show();
hei -= mMainView->navigatorBar()->sizeHint().height();