summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-03-22 22:55:32 (UTC)
committer zautrix <zautrix>2005-03-22 22:55:32 (UTC)
commitaa6d19015bc91ae3af021d766d37a473e125278f (patch) (side-by-side diff)
treef7b1d6b45a3997013318107ca02fa63b4b76913e
parent53ac6d1f931c50d89a44d9d46daceb7ed9d4ddc6 (diff)
downloadkdepimpi-aa6d19015bc91ae3af021d766d37a473e125278f.zip
kdepimpi-aa6d19015bc91ae3af021d766d37a473e125278f.tar.gz
kdepimpi-aa6d19015bc91ae3af021d766d37a473e125278f.tar.bz2
fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/opiemail.cpp1
-rw-r--r--kmicromail/viewmailbase.cpp9
-rw-r--r--kmicromail/viewmailbase.h5
-rw-r--r--korganizer/kodaymatrix.cpp34
-rw-r--r--korganizer/kodaymatrix.h4
5 files changed, 38 insertions, 15 deletions
diff --git a/kmicromail/opiemail.cpp b/kmicromail/opiemail.cpp
index b701446..4436ad6 100644
--- a/kmicromail/opiemail.cpp
+++ b/kmicromail/opiemail.cpp
@@ -53,6 +53,7 @@ OpieMail::OpieMail( QWidget *parent, const char *name )
folderView->populate( settings->getAccounts() );
connect(ExternalAppHandler::instance(), SIGNAL(receivedNameEmailUidListEvent(const QString&, const QStringList&, const QStringList&, const QStringList&)),
this, SLOT(insertAttendees(const QString&, const QStringList&, const QStringList&, const QStringList&)));
+ folderView->setFocus();
}
OpieMail::~OpieMail()
diff --git a/kmicromail/viewmailbase.cpp b/kmicromail/viewmailbase.cpp
index 3a41ba0..3bb964e 100644
--- a/kmicromail/viewmailbase.cpp
+++ b/kmicromail/viewmailbase.cpp
@@ -4,6 +4,7 @@
#include <qaction.h>
#include <qlabel.h>
#include <qvbox.h>
+#include <qapplication.h>
#include <qtoolbar.h>
#include <qmenubar.h>
@@ -72,10 +73,12 @@ ViewMailBase::ViewMailBase(QWidget *parent, const char *name, WFlags fl)
setCentralWidget(view);
attachments = new QListView(view);
- attachments->setMinimumHeight(90);
- attachments->setMaximumHeight(90);
+ int fixh = 100;
+ if ( QApplication::desktop()->width() > 320 )
+ fixh = 200;
+ attachments->setFixedHeight(fixh);
attachments->setAllColumnsShowFocus(true);
- attachments->addColumn("Mime Type", 60);
+ attachments->addColumn("Mime Type", fixh-30);
attachments->addColumn(i18n("Description"), 100);
attachments->addColumn(i18n("Filename"), 80);
attachments->addColumn(i18n("Size"), 80);
diff --git a/kmicromail/viewmailbase.h b/kmicromail/viewmailbase.h
index 7ad1eec..7c075eb 100644
--- a/kmicromail/viewmailbase.h
+++ b/kmicromail/viewmailbase.h
@@ -4,6 +4,11 @@
#include <qmainwindow.h>
+#ifndef DESKTOP_VERSION
+#include <qpe/qpemenubar.h>
+#define QMenuBar QPEMenuBar
+#endif
+
class QAction;
class OpenDiag;
class QListView;
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp
index 59618bf..d543aaf 100644
--- a/korganizer/kodaymatrix.cpp
+++ b/korganizer/kodaymatrix.cpp
@@ -115,9 +115,11 @@ KODayMatrix::KODayMatrix(QWidget *parent, Calendar* calendar, QDate date, const
mouseDown = false;
// initialize dynamic arrays
bDays.resize ( NUMDAYS );
+ hDays.resize ( NUMDAYS );;
+ eDays.resize ( NUMDAYS );;
days = new QDate[NUMDAYS];
daylbls = new QString[NUMDAYS];
- events = new int[NUMDAYS];
+ //events = new int[NUMDAYS];
mToolTip = new DynamicTip(this);
// set default values used for drawing the matrix
@@ -240,7 +242,7 @@ KODayMatrix::~KODayMatrix()
// delete mKODaymatrixWhatsThis;
delete [] days;
delete [] daylbls;
- delete [] events;
+ //delete [] events;
delete mToolTip;
}
@@ -311,7 +313,7 @@ void KODayMatrix::recalculateToday()
{
today = -1;
for (int i=0; i<NUMDAYS; i++) {
- events[i] = 0;
+ //events[i] = 0;
days[i] = startdate.addDays(i);
daylbls[i] = QString::number( KOGlobals::self()->calendarSystem()->day( days[i] ));
@@ -349,6 +351,8 @@ void KODayMatrix::updateViewTimed()
int numEvents = eventlist.count();
QString holiStr = "";
bDays.clearBit(i);
+ hDays.clearBit(i);
+ eDays.clearBit(i);
for(event=eventlist.first();event != 0;event=eventlist.next()) {
ushort recurType = event->recurrence()->doesRecur();
if ((recurType == Recurrence::rDaily && !KOPrefs::instance()->mDailyRecur) ||
@@ -356,6 +360,7 @@ void KODayMatrix::updateViewTimed()
numEvents--;
}
if ( event->isHoliday()) {
+ hDays.setBit(i);
if ( !holiStr.isEmpty() )
holiStr += "\n";
holiStr += event->summary();
@@ -371,7 +376,8 @@ void KODayMatrix::updateViewTimed()
bDays.setBit(i);
}
}
- events[i] = numEvents;
+ if ( numEvents )
+ eDays.setBit(i);
//if it is a holy day then draw it red. Sundays are consider holidays, too
if ( (KOGlobals::self()->calendarSystem()->dayOfWeek(days[i]) == KOGlobals::self()->calendarSystem()->weekDayOfPray()) ||
!holiStr.isEmpty()) {
@@ -447,8 +453,11 @@ void KODayMatrix::updateEvents()
!KOPrefs::instance()->mWeeklyRecur ) ) {
numEvents--;
}
- }
- events[ i ] = numEvents;
+ }
+ if ( numEvents )
+ eDays.setBit(i);
+ else
+ eDays.clearBit(i);
}
}
@@ -862,18 +871,21 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent)
}
// if any events are on that day then draw it using a bold font
- if (events[i] > 0) {
+ if ( eDays.testBit(i) ) {
QFont myFont = font();
myFont.setBold(true);
p.setFont(myFont);
}
// if it is a holiday then use the default holiday color
- if (!mHolidays[i].isNull()) {
+ if ( !mHolidays[i].isNull()) {
if ( bDays.testBit(i) ) {
- p.setPen(Qt::green);
+ if ( hDays.testBit(i) )
+ p.setPen(QColor(Qt::green));
+ else
+ p.setPen(QColor(Qt::green).dark());
} else {
- if (actcol == mDefaultTextColor) {
+ if (actcol == mDefaultTextColor ) {
p.setPen(KOPrefs::instance()->mHolidayColor);
} else {
p.setPen(mHolidayColorShaded);
@@ -909,7 +921,7 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent)
p.setPen(actcol);
}
// reset bold font to plain font
- if (events[i] > 0) {
+ if ( eDays.testBit(i)) {
QFont myFont = font();
myFont.setBold(false);
p.setFont(myFont);
diff --git a/korganizer/kodaymatrix.h b/korganizer/kodaymatrix.h
index 2a1959c..38a7f92 100644
--- a/korganizer/kodaymatrix.h
+++ b/korganizer/kodaymatrix.h
@@ -230,6 +230,8 @@ private:
KODaymatrixWhatsThis* mKODaymatrixWhatsThis;
bool mouseDown;
QBitArray bDays;
+ QBitArray hDays;
+ QBitArray eDays;
QPixmap myPix;
QTimer* mUpdateTimer;
QTimer* mRepaintTimer;
@@ -270,7 +272,7 @@ private:
/** array of storing the number of events on a given day.
* used for drawing a bold font if there is at least one event on that day.
*/
- int *events;
+ //int *events;
/** stores holiday names of the days shown in the matrix. */
QMap<int,QString> mHolidays;