summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-01-31 23:43:35 (UTC)
committer zautrix <zautrix>2005-01-31 23:43:35 (UTC)
commitfce3fd8accec495a2deda6fe3cd55375fac46432 (patch) (side-by-side diff)
tree24231254fa729b1b546f0475759fcba24455e1f5
parent336678d691a8c3346c92a4e561ac7938ed532003 (diff)
downloadkdepimpi-fce3fd8accec495a2deda6fe3cd55375fac46432.zip
kdepimpi-fce3fd8accec495a2deda6fe3cd55375fac46432.tar.gz
kdepimpi-fce3fd8accec495a2deda6fe3cd55375fac46432.tar.bz2
mf
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt7
-rw-r--r--korganizer/kodaymatrix.cpp30
-rw-r--r--korganizer/kodaymatrix.h2
-rw-r--r--korganizer/komonthview.cpp6
-rw-r--r--korganizer/kotodoview.cpp17
-rw-r--r--korganizer/kotodoview.h4
-rw-r--r--korganizer/koviewmanager.cpp1
7 files changed, 46 insertions, 21 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 178f92d..2858d9c 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -11,2 +11,3 @@ introduced in the latest versions, where the text was not fitting on the
+KO/Pi:
Added a popup menu ( press pen and hold to get popup ) to the agenda view
@@ -30,2 +31,8 @@ Setting a child to complete does not change the parents.
+Smart updating and double buffering of the daymatrix.
+Showing holidays in the day matrix.
+Many other small performance updates.
+
+Made day labels in agenda clickable. By clicking a label, the day is displayed in single day mode.
+
Now the translation file usertranslation.txt is supposed to be in utf8 format.
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp
index ca896b5..549ef2a 100644
--- a/korganizer/kodaymatrix.cpp
+++ b/korganizer/kodaymatrix.cpp
@@ -214,3 +214,2 @@ void KODayMatrix::repaintViewTimed()
{
- qDebug("KODayMatrix::repaintViewTimed ");
mRepaintTimer->stop();
@@ -222,5 +221,3 @@ void KODayMatrix::updateViewTimed()
mUpdateTimer->stop();
- qDebug("KODayMatrix::updateView(QDate actdate)");
for(int i = 0; i < NUMDAYS; i++) {
-
// if events are set for the day then remember to draw it bold
@@ -229,6 +226,5 @@ void KODayMatrix::updateViewTimed()
int numEvents = eventlist.count();
-
+ QString holiStr = "";
for(event=eventlist.first();event != 0;event=eventlist.next()) {
ushort recurType = event->recurrence()->doesRecur();
-
if ((recurType == Recurrence::rDaily && !KOPrefs::instance()->mDailyRecur) ||
@@ -237,16 +233,13 @@ void KODayMatrix::updateViewTimed()
}
+ if ( event->categories().contains( i18n("Holiday") ) || event->categories().contains( "Holiday" )) {
+ if ( !holiStr.isEmpty() )
+ holiStr += "\n";
+ holiStr += event->summary();
+ }
}
events[i] = numEvents;
-
//if it is a holy day then draw it red. Sundays are consider holidays, too
-#ifndef KORG_NOPLUGINS
- QString holiStr = KOCore::self()->holiday(days[i]);
-#else
- QString holiStr = QString::null;
-#endif
if ( (KOGlobals::self()->calendarSystem()->dayOfWeek(days[i]) == KOGlobals::self()->calendarSystem()->weekDayOfPray()) ||
!holiStr.isEmpty()) {
- if (holiStr.isNull()) holiStr = "";
mHolidays[i] = holiStr;
-
} else {
@@ -290,3 +283,3 @@ void KODayMatrix::updateView(QDate actdate)
}
- qDebug("restart Timer %d vis: %d", mDayChanged, isVisible() );
+ //qDebug("restart Timer %d vis: %d", mDayChanged, isVisible() );
if ( !isVisible() ) {
@@ -489,3 +482,4 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent)
{
-//kdDebug() << "KODayMatrix::paintEvent() BEGIN" << endl;
+ if ( width() <= 0 || height() <= 0 )
+ return;
if ( mPendingUpdateBeforeRepaint ) {
@@ -494,3 +488,6 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent)
}
- QPainter p(this);
+ if ( myPix.width() != width() || myPix.height()!=height() ) {
+ myPix.resize(size() );
+ }
+ QPainter p(&myPix);
@@ -618,2 +615,3 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent)
}
+ bitBlt (this, 0, 0, &myPix, 0 ,0,width(), height() ,CopyROP);
}
diff --git a/korganizer/kodaymatrix.h b/korganizer/kodaymatrix.h
index ac2f59c..2dd112a 100644
--- a/korganizer/kodaymatrix.h
+++ b/korganizer/kodaymatrix.h
@@ -33,2 +33,3 @@
#include <qtooltip.h>
+#include <qpixmap.h>
@@ -223,2 +224,3 @@ protected:
private:
+ QPixmap myPix;
QTimer* mUpdateTimer;
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp
index 4cff23a..6411156 100644
--- a/korganizer/komonthview.cpp
+++ b/korganizer/komonthview.cpp
@@ -978,4 +978,4 @@ void KOMonthView::updateView()
return;
- QTime ti;
- ti.start();
+ //QTime ti;
+ //ti.start();
#if 1
@@ -1082,3 +1082,3 @@ void KOMonthView::updateView()
- qDebug("update time %d ", ti.elapsed());
+ //qDebug("update time %d ", ti.elapsed());
}
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index 82437d8..99402c4 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -211,3 +211,7 @@ void KOTodoListView::contentsMousePressEvent(QMouseEvent* e)
}
-
+void KOTodoListView::paintEvent(QPaintEvent* e)
+{
+ emit paintNeeded();
+ QListView::paintEvent( e);
+}
void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e)
@@ -503,2 +507,4 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) :
SLOT( itemStateChanged( QListViewItem * ) ) );
+ connect( mTodoListView, SIGNAL( paintNeeded() ),
+ SLOT( paintNeeded()) );
@@ -536,2 +542,9 @@ void KOTodoView::jumpToDate ()
}
+void KOTodoView::paintNeeded()
+{
+ if ( mPendingUpdateBeforeRepaint ) {
+ updateView();
+ mPendingUpdateBeforeRepaint = false;
+ }
+}
void KOTodoView::paintEvent(QPaintEvent * pevent)
@@ -544,3 +557,3 @@ void KOTodoView::paintEvent(QPaintEvent * pevent)
}
- bool mPendingUpdateBeforeRepaint;
+
void KOTodoView::updateView()
diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h
index 16bc133..2a9e737 100644
--- a/korganizer/kotodoview.h
+++ b/korganizer/kotodoview.h
@@ -62,2 +62,3 @@ class KOTodoListView : public KListView
signals:
+ void paintNeeded();
void todoDropped(Todo *, int);
@@ -79,2 +80,3 @@ class KOTodoListView : public KListView
private:
+ void paintEvent(QPaintEvent * pevent);
bool internalDrop;
@@ -200,2 +202,3 @@ class KOTodoView : public KOrg::BaseView
protected slots:
+ void paintNeeded();
void processSelectionChange();
@@ -215,2 +218,3 @@ class KOTodoView : public KOrg::BaseView
*/
+ friend class KOTodoListView;
void paintEvent(QPaintEvent * pevent);
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index 30f5fb1..188ad23 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -606,2 +606,3 @@ void KOViewManager::showJournalView()
showView(mJournalView);
+ mMainView->dateNavigator()->selectDates( 1 );
}