author | zautrix <zautrix> | 2005-07-06 19:41:06 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-06 19:41:06 (UTC) |
commit | 984e2132871c79990f6d9eac5702f7f32186f235 (patch) (side-by-side diff) | |
tree | 2bc4b50ee8b8284e74fd53bdfb78d6d3107806a0 | |
parent | c79a8a4950c098fa6f5a7ae8396feb4dd3a91577 (diff) | |
download | kdepimpi-984e2132871c79990f6d9eac5702f7f32186f235.zip kdepimpi-984e2132871c79990f6d9eac5702f7f32186f235.tar.gz kdepimpi-984e2132871c79990f6d9eac5702f7f32186f235.tar.bz2 |
fixxx
-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 @@ -68,6 +68,7 @@ #include "koeventviewer.h" extern QPixmap* sgListViewCompletedPix[6]; +extern QPixmap* sgListViewJournalPix; class KOListViewWhatsThis :public QWhatsThis { @@ -163,7 +164,7 @@ bool ListItemVisitor::visit(Todo *t) if ( t->isCompleted() ) { mItem->setSortKey(0,"99"+ t->summary().left(10)); } else - mItem->setSortKey(0,QString::number( t->percentComplete() )+ t->summary().left(10)); + mItem->setSortKey(0,QString::number( t->percentComplete()+1 )+ t->summary().left(10)); mItem->setPixmap( 0, *(sgListViewCompletedPix[t->percentComplete()/20])); if (t->hasStartDate()) { mItem->setText(1,t->dtStartDateStr()); @@ -225,6 +226,7 @@ bool ListItemVisitor::visit(Journal * j) { QString des; + mItem->setPixmap( 0, *sgListViewJournalPix); if ( !j->summary().isEmpty() ) { des = j->summary(); } else { @@ -233,7 +235,8 @@ bool ListItemVisitor::visit(Journal * j) des.replace (QRegExp ("\\n"),"" ); des.replace (QRegExp ("\\r"),"" ); } - mItem->setText(0,i18n("Journal: ")+des.left(25)); + mItem->setText(0,des.left(25)); + mItem->setSortKey(0,"0"+ des.left(25)); mItem->setText(1,j->dtStartDateStr()); mItem->setText(2,"---"); 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: }; QPixmap* sgListViewCompletedPix[6]; +QPixmap* sgListViewJournalPix; int globalFlagBlockStartup; @@ -143,8 +144,8 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) : sgListViewCompletedPix[2] = &listviewPix40; sgListViewCompletedPix[3] = &listviewPix60; sgListViewCompletedPix[4] = &listviewPix80; - if ( sgListViewCompletedPix[5]->height() < 5 ) { //int size = 12; + { sgListViewCompletedPix[5]->resize( 11, 11 ); sgListViewCompletedPix[5]->fill( Qt::white ); QPainter p ( sgListViewCompletedPix[5] ); @@ -160,6 +161,16 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) : if ( iii ) p.fillRect( 1,1,iii*2,9,Qt::gray ); } + sgListViewJournalPix = &journalPix; + sgListViewJournalPix->resize( 11, 11 ); + sgListViewJournalPix->fill( Qt::white ); + { + QPainter p ( sgListViewJournalPix ); + p.drawRect( 0,0,11,11); + p.drawLine( 2,3,5,3); + p.drawLine( 2,5,8,5); + p.drawLine( 2,7,6,7); + } } mClosed = false; //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 //bool mBlockSaveFlag; bool mCalendarModifiedFlag; QPixmap loadPixmap( QString ); - QPixmap listviewPix, listviewPix0, listviewPix20, listviewPix40, listviewPix60, listviewPix80; + QPixmap listviewPix, listviewPix0, listviewPix20, listviewPix40, listviewPix60, listviewPix80, journalPix; }; |