-rw-r--r-- | korganizer/kolistview.cpp | 7 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 13 | ||||
-rw-r--r-- | korganizer/mainwindow.h | 2 |
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 | |||
@@ -69,4 +69,5 @@ | |||
69 | 69 | ||
70 | extern QPixmap* sgListViewCompletedPix[6]; | 70 | extern QPixmap* sgListViewCompletedPix[6]; |
71 | extern QPixmap* sgListViewJournalPix; | ||
71 | 72 | ||
72 | class KOListViewWhatsThis :public QWhatsThis | 73 | class KOListViewWhatsThis :public QWhatsThis |
@@ -164,5 +165,5 @@ bool ListItemVisitor::visit(Todo *t) | |||
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()) { |
@@ -226,4 +227,5 @@ bool ListItemVisitor::visit(Journal * j) | |||
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(); |
@@ -234,5 +236,6 @@ bool ListItemVisitor::visit(Journal * j) | |||
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,"---"); |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index e960424..9c2ac82 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -132,4 +132,5 @@ public: | |||
132 | 132 | ||
133 | QPixmap* sgListViewCompletedPix[6]; | 133 | QPixmap* sgListViewCompletedPix[6]; |
134 | QPixmap* sgListViewJournalPix; | ||
134 | 135 | ||
135 | 136 | ||
@@ -144,6 +145,6 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) : | |||
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 ); |
@@ -161,4 +162,14 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) : | |||
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; |
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h index adab95d..41d5807 100644 --- a/korganizer/mainwindow.h +++ b/korganizer/mainwindow.h | |||
@@ -167,5 +167,5 @@ class MainWindow : public QMainWindow | |||
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 | ||