summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-07-06 19:41:06 (UTC)
committer zautrix <zautrix>2005-07-06 19:41:06 (UTC)
commit984e2132871c79990f6d9eac5702f7f32186f235 (patch) (side-by-side diff)
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
@@ -65,12 +65,13 @@
#include "kfiledialog.h"
#include "kolistview.h"
#include "koeventviewer.h"
extern QPixmap* sgListViewCompletedPix[6];
+extern QPixmap* sgListViewJournalPix;
class KOListViewWhatsThis :public QWhatsThis
{
public:
KOListViewWhatsThis( QWidget *wid, KOListView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { };
@@ -160,13 +161,13 @@ bool ListItemVisitor::visit(Event *e)
bool ListItemVisitor::visit(Todo *t)
{
mItem->setText(0,t->summary());
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());
if (t->doesFloat()) {
mItem->setText(2,"---");
} else {
@@ -222,21 +223,23 @@ bool ListItemVisitor::visit(Todo *t)
}
bool ListItemVisitor::visit(Journal * j)
{
QString des;
+ mItem->setPixmap( 0, *sgListViewJournalPix);
if ( !j->summary().isEmpty() ) {
des = j->summary();
} else {
des = j->description().left(30);
des = des.simplifyWhiteSpace ();
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,"---");
mItem->setText(4,"---");
mItem->setText(5,"---");
mItem->setText(6,"---");
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index e960424..9c2ac82 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -128,26 +128,27 @@ public:
QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel;
QCheckBox* mWriteBackFuture;
QSpinBox* mWriteBackFutureWeeks;
};
QPixmap* sgListViewCompletedPix[6];
+QPixmap* sgListViewJournalPix;
int globalFlagBlockStartup;
MainWindow::MainWindow( QWidget *parent, const char *name ) :
QMainWindow( parent, name )
{
sgListViewCompletedPix[5] = &listviewPix;
sgListViewCompletedPix[0] = &listviewPix0;
sgListViewCompletedPix[1] = &listviewPix20;
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] );
p.drawRect( 0,0,11,11);
p.drawLine ( 2, 5, 4 , 7 ) ;
p.drawLine ( 4 , 7 , 8, 3) ;
@@ -157,12 +158,22 @@ MainWindow::MainWindow( QWidget *parent, const char *name ) :
sgListViewCompletedPix[iii]->fill( Qt::white );
QPainter p ( sgListViewCompletedPix[iii] );
p.drawRect( 0,0,11,11);
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";
QString confFile = locateLocal("config","korganizerrc");
QFileInfo finf ( confFile );
bool showWarning = !finf.exists();
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h
index adab95d..41d5807 100644
--- a/korganizer/mainwindow.h
+++ b/korganizer/mainwindow.h
@@ -163,11 +163,11 @@ class MainWindow : public QMainWindow
void closeEvent( QCloseEvent* ce );
QTimer mSaveTimer;
//bool mBlockSaveFlag;
bool mCalendarModifiedFlag;
QPixmap loadPixmap( QString );
- QPixmap listviewPix, listviewPix0, listviewPix20, listviewPix40, listviewPix60, listviewPix80;
+ QPixmap listviewPix, listviewPix0, listviewPix20, listviewPix40, listviewPix60, listviewPix80, journalPix;
};
#endif