summaryrefslogtreecommitdiff
authoreilers <eilers>2003-09-25 10:58:26 (UTC)
committer eilers <eilers>2003-09-25 10:58:26 (UTC)
commit990e3c5834b33227b327e1fec0d7f7f429e75952 (patch) (unidiff)
treefe00f78ea8003bb31e4e2c42611473796d63a874
parentfe97b1386099f519826392a5734d2bbe567fb786 (diff)
downloadopie-990e3c5834b33227b327e1fec0d7f7f429e75952.zip
opie-990e3c5834b33227b327e1fec0d7f7f429e75952.tar.gz
opie-990e3c5834b33227b327e1fec0d7f7f429e75952.tar.bz2
Fixed inconsistencies between Description and Notes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/todo/tableview.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/pim/todo/tableview.cpp b/core/pim/todo/tableview.cpp
index def0efb..3daf370 100644
--- a/core/pim/todo/tableview.cpp
+++ b/core/pim/todo/tableview.cpp
@@ -44,129 +44,129 @@
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
53TableView::EditorWidget::EditorWidget() : m_wid(0l), m_row(-1), m_col(-1) { 53TableView::EditorWidget::EditorWidget() : m_wid(0l), m_row(-1), m_col(-1) {
54} 54}
55void TableView::EditorWidget::setCellWidget(QWidget* wid, int row, int col ) { 55void TableView::EditorWidget::setCellWidget(QWidget* wid, int row, int col ) {
56 m_wid = wid; 56 m_wid = wid;
57 m_row = row; 57 m_row = row;
58 m_col = col; 58 m_col = col;
59} 59}
60void TableView::EditorWidget::releaseCellWidget() { 60void TableView::EditorWidget::releaseCellWidget() {
61 m_wid = 0; 61 m_wid = 0;
62 m_row = m_col = -1; 62 m_row = m_col = -1;
63} 63}
64QWidget* TableView::EditorWidget::cellWidget()const { 64QWidget* TableView::EditorWidget::cellWidget()const {
65 return m_wid; 65 return m_wid;
66} 66}
67int TableView::EditorWidget::cellRow()const { 67int TableView::EditorWidget::cellRow()const {
68 return m_row; 68 return m_row;
69} 69}
70int TableView::EditorWidget::cellCol()const { 70int TableView::EditorWidget::cellCol()const {
71 return m_col; 71 return m_col;
72} 72}
73 73
74 74
75void TableView::initConfig() { 75void TableView::initConfig() {
76 Config config( "todo" ); 76 Config config( "todo" );
77 config.setGroup( "Options" ); 77 config.setGroup( "Options" );
78 m_completeStrokeWidth = config.readNumEntry( "CompleteStrokeWidth", 8 ); 78 m_completeStrokeWidth = config.readNumEntry( "CompleteStrokeWidth", 8 );
79 for (int i = 0; i < numCols(); i++ ) { 79 for (int i = 0; i < numCols(); i++ ) {
80 int width = config.readNumEntry("Width"+QString::number(i), -1 ); 80 int width = config.readNumEntry("Width"+QString::number(i), -1 );
81 setColumnWidth(i, width == -1 ? columnWidth(i) : width ); 81 setColumnWidth(i, width == -1 ? columnWidth(i) : width );
82 } 82 }
83} 83}
84 84
85TableView::TableView( MainWindow* window, QWidget* wid ) 85TableView::TableView( MainWindow* window, QWidget* wid )
86 : QTable( wid ), TodoView( window ) { 86 : QTable( wid ), TodoView( window ) {
87 87
88 setName("TableView"); 88 setName("TableView");
89 // Load icons 89 // Load icons
90 // TODO - probably should be done globally somewhere else, 90 // TODO - probably should be done globally somewhere else,
91 // see also quickeditimpl.cpp/h, taskeditoroverview.cpp/h 91 // see also quickeditimpl.cpp/h, taskeditoroverview.cpp/h
92 m_pic_completed = Resource::loadPixmap( "todo/completed" ); 92 m_pic_completed = Resource::loadPixmap( "todo/completed" );
93 QString namestr; 93 QString namestr;
94 for ( unsigned int i = 1; i < 6; i++ ) { 94 for ( unsigned int i = 1; i < 6; i++ ) {
95 namestr = "todo/priority"; 95 namestr = "todo/priority";
96 namestr.append( QString::number( i ) ); 96 namestr.append( QString::number( i ) );
97 m_pic_priority[ i - 1 ] = Resource::loadPixmap( namestr ); 97 m_pic_priority[ i - 1 ] = Resource::loadPixmap( namestr );
98 } 98 }
99 99
100 setUpdatesEnabled( false ); 100 setUpdatesEnabled( false );
101 viewport()->setUpdatesEnabled( false ); 101 viewport()->setUpdatesEnabled( false );
102 m_enablePaint = false; 102 m_enablePaint = false;
103 setNumRows(0); 103 setNumRows(0);
104 setNumCols(4); 104 setNumCols(4);
105 105
106 horizontalHeader()->setLabel( 0, QWidget::tr("C.") ); 106 horizontalHeader()->setLabel( 0, QWidget::tr("C.") );
107 horizontalHeader()->setLabel( 1, QWidget::tr("Priority") ); 107 horizontalHeader()->setLabel( 1, QWidget::tr("Priority") );
108 horizontalHeader()->setLabel( 2, QWidget::tr("Description" ) ); 108 horizontalHeader()->setLabel( 2, QWidget::tr("Summary" ) );
109 horizontalHeader()->setLabel( 3, QWidget::tr("Deadline") ); 109 horizontalHeader()->setLabel( 3, QWidget::tr("Deadline") );
110 110
111 setShowDeadline( todoWindow()->showDeadline() ); 111 setShowDeadline( todoWindow()->showDeadline() );
112 112
113 setSorting( TRUE ); 113 setSorting( TRUE );
114 setSelectionMode( NoSelection ); 114 setSelectionMode( NoSelection );
115 115
116 setLeftMargin( 0 ); 116 setLeftMargin( 0 );
117 verticalHeader()->hide(); 117 verticalHeader()->hide();
118 118
119 connect((QTable*)this, SIGNAL( clicked( int, int, int, const QPoint& ) ), 119 connect((QTable*)this, SIGNAL( clicked( int, int, int, const QPoint& ) ),
120 this, SLOT( slotClicked(int, int, int, const QPoint& ) ) ); 120 this, SLOT( slotClicked(int, int, int, const QPoint& ) ) );
121 connect((QTable*)this, SIGNAL( pressed( int, int, int, const QPoint& ) ), 121 connect((QTable*)this, SIGNAL( pressed( int, int, int, const QPoint& ) ),
122 this, SLOT( slotPressed(int, int, int, const QPoint& ) ) ); 122 this, SLOT( slotPressed(int, int, int, const QPoint& ) ) );
123 connect((QTable*)this, SIGNAL(valueChanged(int, int) ), 123 connect((QTable*)this, SIGNAL(valueChanged(int, int) ),
124 this, SLOT( slotValueChanged(int, int) ) ); 124 this, SLOT( slotValueChanged(int, int) ) );
125 connect((QTable*)this, SIGNAL(currentChanged(int, int) ), 125 connect((QTable*)this, SIGNAL(currentChanged(int, int) ),
126 this, SLOT( slotCurrentChanged(int, int) ) ); 126 this, SLOT( slotCurrentChanged(int, int) ) );
127 127
128 m_menuTimer = new QTimer( this ); 128 m_menuTimer = new QTimer( this );
129 connect( m_menuTimer, SIGNAL(timeout()), 129 connect( m_menuTimer, SIGNAL(timeout()),
130 this, SLOT(slotShowMenu()) ); 130 this, SLOT(slotShowMenu()) );
131 131
132 /* now let's init the config */ 132 /* now let's init the config */
133 initConfig(); 133 initConfig();
134 134
135 135
136 m_enablePaint = true; 136 m_enablePaint = true;
137 setUpdatesEnabled( true ); 137 setUpdatesEnabled( true );
138 viewport()->setUpdatesEnabled( true ); 138 viewport()->setUpdatesEnabled( true );
139 viewport()->update(); 139 viewport()->update();
140 setSortOrder( 0 ); 140 setSortOrder( 0 );
141 setAscending( TRUE ); 141 setAscending( TRUE );
142 m_first = true; 142 m_first = true;
143 143
144 144
145} 145}
146/* a new day has started 146/* a new day has started
147 * update the day 147 * update the day
148 */ 148 */
149void TableView::newDay() { 149void TableView::newDay() {
150 clear(); 150 clear();
151 updateView(); 151 updateView();
152} 152}
153TableView::~TableView() { 153TableView::~TableView() {
154 Config config( "todo" ); 154 Config config( "todo" );
155 config.setGroup( "Options" ); 155 config.setGroup( "Options" );
156 for (int i = 0; i < numCols(); i++ ) 156 for (int i = 0; i < numCols(); i++ )
157 config.writeEntry("Width"+QString::number(i), columnWidth(i) ); 157 config.writeEntry("Width"+QString::number(i), columnWidth(i) );
158} 158}
159void TableView::slotShowMenu() { 159void TableView::slotShowMenu() {
160 QPopupMenu *menu = todoWindow()->contextMenu( current(), sorted()[currentRow()].recurrence().doesRecur() ); 160 QPopupMenu *menu = todoWindow()->contextMenu( current(), sorted()[currentRow()].recurrence().doesRecur() );
161 menu->exec(QCursor::pos() ); 161 menu->exec(QCursor::pos() );
162 delete menu; 162 delete menu;
163} 163}
164QString TableView::type() const { 164QString TableView::type() const {
165 return QString::fromLatin1( tr("Table View") ); 165 return QString::fromLatin1( tr("Table View") );
166} 166}
167int TableView::current() { 167int TableView::current() {
168 if (numRows() == 0 ) return 0; 168 if (numRows() == 0 ) return 0;
169 int uid = sorted().uidAt(currentRow() ); 169 int uid = sorted().uidAt(currentRow() );
170 170
171 return uid; 171 return uid;
172} 172}