summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-07-06 19:41:06 (UTC)
committer zautrix <zautrix>2005-07-06 19:41:06 (UTC)
commit984e2132871c79990f6d9eac5702f7f32186f235 (patch) (unidiff)
tree2bc4b50ee8b8284e74fd53bdfb78d6d3107806a0
parentc79a8a4950c098fa6f5a7ae8396feb4dd3a91577 (diff)
downloadkdepimpi-984e2132871c79990f6d9eac5702f7f32186f235.zip
kdepimpi-984e2132871c79990f6d9eac5702f7f32186f235.tar.gz
kdepimpi-984e2132871c79990f6d9eac5702f7f32186f235.tar.bz2
fixxx
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kolistview.cpp7
-rw-r--r--korganizer/mainwindow.cpp13
-rw-r--r--korganizer/mainwindow.h2
3 files changed, 18 insertions, 4 deletions
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index 5690bdb..5f90dc6 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -68,6 +68,7 @@
68#include "koeventviewer.h" 68#include "koeventviewer.h"
69 69
70extern QPixmap* sgListViewCompletedPix[6]; 70extern QPixmap* sgListViewCompletedPix[6];
71extern QPixmap* sgListViewJournalPix;
71 72
72class KOListViewWhatsThis :public QWhatsThis 73class KOListViewWhatsThis :public QWhatsThis
73{ 74{
@@ -163,7 +164,7 @@ bool ListItemVisitor::visit(Todo *t)
163 if ( t->isCompleted() ) { 164 if ( t->isCompleted() ) {
164 mItem->setSortKey(0,"99"+ t->summary().left(10)); 165 mItem->setSortKey(0,"99"+ t->summary().left(10));
165 } else 166 } else
166 mItem->setSortKey(0,QString::number( t->percentComplete() )+ t->summary().left(10)); 167 mItem->setSortKey(0,QString::number( t->percentComplete()+1 )+ t->summary().left(10));
167 mItem->setPixmap( 0, *(sgListViewCompletedPix[t->percentComplete()/20])); 168 mItem->setPixmap( 0, *(sgListViewCompletedPix[t->percentComplete()/20]));
168 if (t->hasStartDate()) { 169 if (t->hasStartDate()) {
169 mItem->setText(1,t->dtStartDateStr()); 170 mItem->setText(1,t->dtStartDateStr());
@@ -225,6 +226,7 @@ bool ListItemVisitor::visit(Journal * j)
225{ 226{
226 227
227 QString des; 228 QString des;
229 mItem->setPixmap( 0, *sgListViewJournalPix);
228 if ( !j->summary().isEmpty() ) { 230 if ( !j->summary().isEmpty() ) {
229 des = j->summary(); 231 des = j->summary();
230 } else { 232 } else {
@@ -233,7 +235,8 @@ bool ListItemVisitor::visit(Journal * j)
233 des.replace (QRegExp ("\\n"),"" ); 235 des.replace (QRegExp ("\\n"),"" );
234 des.replace (QRegExp ("\\r"),"" ); 236 des.replace (QRegExp ("\\r"),"" );
235 } 237 }
236 mItem->setText(0,i18n("Journal: ")+des.left(25)); 238 mItem->setText(0,des.left(25));
239 mItem->setSortKey(0,"0"+ des.left(25));
237 mItem->setText(1,j->dtStartDateStr()); 240 mItem->setText(1,j->dtStartDateStr());
238 mItem->setText(2,"---"); 241 mItem->setText(2,"---");
239 mItem->setText(3,"---"); 242 mItem->setText(3,"---");
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index e960424..9c2ac82 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -131,6 +131,7 @@ public:
131}; 131};
132 132
133QPixmap* sgListViewCompletedPix[6]; 133QPixmap* sgListViewCompletedPix[6];
134QPixmap* sgListViewJournalPix;
134 135
135 136
136int globalFlagBlockStartup; 137int globalFlagBlockStartup;
@@ -143,8 +144,8 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) :
143 sgListViewCompletedPix[2] = &listviewPix40; 144 sgListViewCompletedPix[2] = &listviewPix40;
144 sgListViewCompletedPix[3] = &listviewPix60; 145 sgListViewCompletedPix[3] = &listviewPix60;
145 sgListViewCompletedPix[4] = &listviewPix80; 146 sgListViewCompletedPix[4] = &listviewPix80;
146 if ( sgListViewCompletedPix[5]->height() < 5 ) {
147 //int size = 12; 147 //int size = 12;
148 {
148 sgListViewCompletedPix[5]->resize( 11, 11 ); 149 sgListViewCompletedPix[5]->resize( 11, 11 );
149 sgListViewCompletedPix[5]->fill( Qt::white ); 150 sgListViewCompletedPix[5]->fill( Qt::white );
150 QPainter p ( sgListViewCompletedPix[5] ); 151 QPainter p ( sgListViewCompletedPix[5] );
@@ -160,6 +161,16 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) :
160 if ( iii ) 161 if ( iii )
161 p.fillRect( 1,1,iii*2,9,Qt::gray ); 162 p.fillRect( 1,1,iii*2,9,Qt::gray );
162 } 163 }
164 sgListViewJournalPix = &journalPix;
165 sgListViewJournalPix->resize( 11, 11 );
166 sgListViewJournalPix->fill( Qt::white );
167 {
168 QPainter p ( sgListViewJournalPix );
169 p.drawRect( 0,0,11,11);
170 p.drawLine( 2,3,5,3);
171 p.drawLine( 2,5,8,5);
172 p.drawLine( 2,7,6,7);
173 }
163 } 174 }
164 mClosed = false; 175 mClosed = false;
165 //QString confFile = KStandardDirs::appDir() + "config/korganizerrc"; 176 //QString confFile = KStandardDirs::appDir() + "config/korganizerrc";
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h
index adab95d..41d5807 100644
--- a/korganizer/mainwindow.h
+++ b/korganizer/mainwindow.h
@@ -166,7 +166,7 @@ class MainWindow : public QMainWindow
166 //bool mBlockSaveFlag; 166 //bool mBlockSaveFlag;
167 bool mCalendarModifiedFlag; 167 bool mCalendarModifiedFlag;
168 QPixmap loadPixmap( QString ); 168 QPixmap loadPixmap( QString );
169 QPixmap listviewPix, listviewPix0, listviewPix20, listviewPix40, listviewPix60, listviewPix80; 169 QPixmap listviewPix, listviewPix0, listviewPix20, listviewPix40, listviewPix60, listviewPix80, journalPix;
170}; 170};
171 171
172 172