summaryrefslogtreecommitdiffabout
path: root/korganizer/koagendaitem.cpp
authorzautrix <zautrix>2005-04-08 10:54:05 (UTC)
committer zautrix <zautrix>2005-04-08 10:54:05 (UTC)
commit59fb8a0ac35bf3b81f1c4e2e4fc6b61356d064ef (patch) (side-by-side diff)
treeab604082029c081fa8725c5535a51a23bb963ef2 /korganizer/koagendaitem.cpp
parentc82f9b40f6023dc7b39ac555cba8c4c313f15ca8 (diff)
downloadkdepimpi-59fb8a0ac35bf3b81f1c4e2e4fc6b61356d064ef.zip
kdepimpi-59fb8a0ac35bf3b81f1c4e2e4fc6b61356d064ef.tar.gz
kdepimpi-59fb8a0ac35bf3b81f1c4e2e4fc6b61356d064ef.tar.bz2
fixes
Diffstat (limited to 'korganizer/koagendaitem.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaitem.cpp28
1 files changed, 18 insertions, 10 deletions
diff --git a/korganizer/koagendaitem.cpp b/korganizer/koagendaitem.cpp
index 23afe7a..e545ca8 100644
--- a/korganizer/koagendaitem.cpp
+++ b/korganizer/koagendaitem.cpp
@@ -443,22 +443,31 @@ void KOAgendaItem::resizePixmap( int w , int h )
QPixmap * KOAgendaItem::paintPix()
{
static QPixmap* mPaintPix = 0;
- if ( ! mPaintPix )
- mPaintPix = new QPixmap(1,1);
+ if ( ! mPaintPix ) {
+ int w = QApplication::desktop()->width();
+ int h = QApplication::desktop()->height();
+ mPaintPix = new QPixmap(w,h);
+ }
return mPaintPix ;
}
QPixmap * KOAgendaItem::paintPixAllday()
{
static QPixmap* mPaintPixA = 0;
- if ( ! mPaintPixA )
- mPaintPixA = new QPixmap(1,1);
+ if ( ! mPaintPixA ) {
+ int w = QApplication::desktop()->width();
+ int h = QApplication::desktop()->height()/3;
+ mPaintPixA = new QPixmap(w,h);
+ }
return mPaintPixA ;
}
QPixmap * KOAgendaItem::paintPixSel()
{
static QPixmap* mPaintPixSel = 0;
- if ( ! mPaintPixSel )
- mPaintPixSel = new QPixmap(1,1);
+ if ( ! mPaintPixSel ) {
+ int w = QApplication::desktop()->width();
+ int h = QApplication::desktop()->height();
+ mPaintPixSel = new QPixmap(w,h);
+ }
return mPaintPixSel ;
}
void KOAgendaItem::paintEvent ( QPaintEvent *e )
@@ -525,7 +534,6 @@ void KOAgendaItem::paintEvent ( QPaintEvent *e )
}
void KOAgendaItem::computeText()
{
-
mDisplayedText = mIncidence->summary();
if ( (mIncidence->type() == "Todo") ) {
if ( static_cast<Todo*>(mIncidence)->hasDueDate() ) {
@@ -536,7 +544,7 @@ void KOAgendaItem::computeText()
}
} else {
if ( !(mIncidence->doesFloat()) && KOPrefs::instance()->mShowTimeInAgenda)
- mDisplayedText += ": " +KGlobal::locale()->formatTime((static_cast<Event*>(mIncidence))->dtStart().time()) + "-" + KGlobal::locale()->formatTime((static_cast<Event*>(mIncidence))->dtEnd().time()) ;
+ mDisplayedText += ": " +KGlobal::locale()->formatTime((static_cast<Event*>(mIncidence))->dtStart().time()) + " - " + KGlobal::locale()->formatTime((static_cast<Event*>(mIncidence))->dtEnd().time()) ;
if ( mAllDay ) {
if ( mIncidence->dtStart().date().addDays(3) < mIncidence->dtEnd().date() ) {
@@ -553,7 +561,7 @@ void KOAgendaItem::computeText()
mDisplayedText += "\n(";
mDisplayedText += mIncidence->location() +")";
}
-
+#ifdef DESKTOP_VERSION
QString tipText = mIncidence->summary();
if ( !mIncidence->doesFloat() ) {
if ( mIncidence->type() == "Event" ) {
@@ -583,7 +591,7 @@ void KOAgendaItem::computeText()
tipText += "\n"+i18n("Location: ")+mIncidence->location();
}
QToolTip::add(this,tipText,toolTipGroup(),"");
-
+#endif
}
void KOAgendaItem::updateItem()
{