summaryrefslogtreecommitdiff
path: root/core/pim/todo/tableview.cpp
Unidiff
Diffstat (limited to 'core/pim/todo/tableview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/todo/tableview.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/pim/todo/tableview.cpp b/core/pim/todo/tableview.cpp
index cd6740a..48b4dcc 100644
--- a/core/pim/todo/tableview.cpp
+++ b/core/pim/todo/tableview.cpp
@@ -40,49 +40,50 @@
40#include <opie/orecur.h> 40#include <opie/orecur.h>
41 41
42#include "mainwindow.h" 42#include "mainwindow.h"
43//#include "tableitems.h" 43//#include "tableitems.h"
44#include "tableview.h" 44#include "tableview.h"
45 45
46using namespace Todo; 46using namespace Todo;
47 47
48namespace { 48namespace {
49 static const int BoxSize = 14; 49 static const int BoxSize = 14;
50 static const int RowHeight = 20; 50 static const int RowHeight = 20;
51} 51}
52 52
53 53
54void TableView::initConfig() { 54void TableView::initConfig() {
55 Config config( "todo" ); 55 Config config( "todo" );
56 config.setGroup( "Options" ); 56 config.setGroup( "Options" );
57 m_completeStrokeWidth = config.readNumEntry( "CompleteStrokeWidth", 8 ); 57 m_completeStrokeWidth = config.readNumEntry( "CompleteStrokeWidth", 8 );
58} 58}
59 59
60TableView::TableView( MainWindow* window, QWidget* wid ) 60TableView::TableView( MainWindow* window, QWidget* wid )
61 : QTable( wid ), TodoView( window ) { 61 : QTable( wid ), TodoView( window ) {
62 62
63 // Load icons 63 // Load icons
64 // TODO - probably should be done globally somewhere else, see also quickeditimpl.cpp/h 64 // TODO - probably should be done globally somewhere else,
65 // see also quickeditimpl.cpp/h, taskeditoroverview.cpp/h
65 m_pic_completed = Resource::loadPixmap( "todo/completed" ); 66 m_pic_completed = Resource::loadPixmap( "todo/completed" );
66 QString namestr; 67 QString namestr;
67 for ( unsigned int i = 1; i < 6; i++ ) { 68 for ( unsigned int i = 1; i < 6; i++ ) {
68 namestr = "todo/priority"; 69 namestr = "todo/priority";
69 namestr.append( QString::number( i ) ); 70 namestr.append( QString::number( i ) );
70 m_pic_priority[ i - 1 ] = Resource::loadPixmap( namestr ); 71 m_pic_priority[ i - 1 ] = Resource::loadPixmap( namestr );
71 } 72 }
72 73
73 setUpdatesEnabled( false ); 74 setUpdatesEnabled( false );
74 viewport()->setUpdatesEnabled( false ); 75 viewport()->setUpdatesEnabled( false );
75 m_enablePaint = false; 76 m_enablePaint = false;
76 setNumRows(0); 77 setNumRows(0);
77 setNumCols(4); 78 setNumCols(4);
78 79
79 horizontalHeader()->setLabel( 0, tr("C.") ); 80 horizontalHeader()->setLabel( 0, tr("C.") );
80 horizontalHeader()->setLabel( 1, tr("Priority") ); 81 horizontalHeader()->setLabel( 1, tr("Priority") );
81 horizontalHeader()->setLabel( 2, tr("Description" ) ); 82 horizontalHeader()->setLabel( 2, tr("Description" ) );
82 horizontalHeader()->setLabel( 3, tr("Deadline") ); 83 horizontalHeader()->setLabel( 3, tr("Deadline") );
83 84
84 setShowDeadline( todoWindow()->showDeadline() ); 85 setShowDeadline( todoWindow()->showDeadline() );
85 86
86 setSorting( TRUE ); 87 setSorting( TRUE );
87 setSelectionMode( NoSelection ); 88 setSelectionMode( NoSelection );
88 89