summaryrefslogtreecommitdiff
authorzecke <zecke>2002-11-02 13:47:01 (UTC)
committer zecke <zecke>2002-11-02 13:47:01 (UTC)
commitd21d693d91af8ee8fb54478a6db67f5a0590a767 (patch) (unidiff)
treeb38c34f39d70d056fb99cdd35515e2308b06c74a
parentf655415f77b200f9edfbe5732cd5f8da2b4dec47 (diff)
downloadopie-d21d693d91af8ee8fb54478a6db67f5a0590a767.zip
opie-d21d693d91af8ee8fb54478a6db67f5a0590a767.tar.gz
opie-d21d693d91af8ee8fb54478a6db67f5a0590a767.tar.bz2
Cut some warning
and applied trekres customStrokeWidth patch
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/todo/tableview.cpp14
-rw-r--r--core/pim/todo/tableview.h2
-rw-r--r--core/pim/todo/todoview.cpp4
3 files changed, 17 insertions, 3 deletions
diff --git a/core/pim/todo/tableview.cpp b/core/pim/todo/tableview.cpp
index 6299113..743deb7 100644
--- a/core/pim/todo/tableview.cpp
+++ b/core/pim/todo/tableview.cpp
@@ -25,14 +25,17 @@
25 Boston, MA 02111-1307, USA. 25 Boston, MA 02111-1307, USA.
26 26
27*/ 27*/
28#include <stdlib.h> 28#include <stdlib.h>
29#include <cmath>
29 30
30#include <qlineedit.h> 31#include <qlineedit.h>
31#include <qtimer.h> 32#include <qtimer.h>
32#include <qpoint.h> 33#include <qpoint.h>
33#include <qpopupmenu.h> 34#include <qpopupmenu.h>
34 35
36#include <qpe/config.h>
37
35#include "mainwindow.h" 38#include "mainwindow.h"
36//#include "tableitems.h" 39//#include "tableitems.h"
37#include "tableview.h" 40#include "tableview.h"
38 41
@@ -43,8 +46,14 @@ namespace {
43 static const int RowHeight = 20; 46 static const int RowHeight = 20;
44} 47}
45 48
46 49
50void TableView::initConfig() {
51 Config config( "todo" );
52 config.setGroup( "Options" );
53 m_completeStrokeWidth = config.readNumEntry( "CompleteStrokeWidth", 8 );
54}
55
47TableView::TableView( MainWindow* window, QWidget* wid ) 56TableView::TableView( MainWindow* window, QWidget* wid )
48 : QTable( wid ), TodoView( window ) { 57 : QTable( wid ), TodoView( window ) {
49 setUpdatesEnabled( false ); 58 setUpdatesEnabled( false );
50 viewport()->setUpdatesEnabled( false ); 59 viewport()->setUpdatesEnabled( false );
@@ -95,8 +104,11 @@ TableView::TableView( MainWindow* window, QWidget* wid )
95 viewport()->update(); 104 viewport()->update();
96 setSortOrder( 0 ); 105 setSortOrder( 0 );
97 setAscending( TRUE ); 106 setAscending( TRUE );
98 m_first = true; 107 m_first = true;
108
109 /* now let's init the config */
110 initConfig();
99} 111}
100/* a new day has started 112/* a new day has started
101 * update the day 113 * update the day
102 */ 114 */
@@ -487,9 +499,9 @@ void TableView::timerEvent( QTimerEvent* ev ) {
487 */ 499 */
488void TableView::contentsMouseReleaseEvent( QMouseEvent* e) { 500void TableView::contentsMouseReleaseEvent( QMouseEvent* e) {
489 int row = rowAt(m_prevP.y()); 501 int row = rowAt(m_prevP.y());
490 if ( row == rowAt( e->y() ) && row != -1 ) { 502 if ( row == rowAt( e->y() ) && row != -1 ) {
491 if ( abs( m_prevP.x() - e->x() ) >= 8 ) { 503 if ( ::abs( m_prevP.x() - e->x() ) >= m_completeStrokeWidth ) {
492 qWarning("current row %d", row ); 504 qWarning("current row %d", row );
493 OTodo todo = sorted()[row]; 505 OTodo todo = sorted()[row];
494 todo.setCompleted( !todo.isCompleted() ); 506 todo.setCompleted( !todo.isCompleted() );
495 TodoView::update( todo.uid(), todo ); 507 TodoView::update( todo.uid(), todo );
diff --git a/core/pim/todo/tableview.h b/core/pim/todo/tableview.h
index 0c3e865..e47b38f 100644
--- a/core/pim/todo/tableview.h
+++ b/core/pim/todo/tableview.h
@@ -97,8 +97,10 @@ private slots:
97 void slotValueChanged(int, int); 97 void slotValueChanged(int, int);
98 void slotCurrentChanged(int, int ); 98 void slotCurrentChanged(int, int );
99 void slotPriority(); 99 void slotPriority();
100 private: 100 private:
101 void initConfig();
102 int m_completeStrokeWidth;
101 bool m_row : 1; 103 bool m_row : 1;
102 QPoint m_prevP; 104 QPoint m_prevP;
103 }; 105 };
104}; 106};
diff --git a/core/pim/todo/todoview.cpp b/core/pim/todo/todoview.cpp
index 639fa66..4cf7d30 100644
--- a/core/pim/todo/todoview.cpp
+++ b/core/pim/todo/todoview.cpp
@@ -70,10 +70,10 @@ void TodoView::setSortOrder( int order ) {
70void TodoView::setAscending( bool b ) { 70void TodoView::setAscending( bool b ) {
71 qWarning("setAscending %d", b ); 71 qWarning("setAscending %d", b );
72 m_asc = b; 72 m_asc = b;
73} 73}
74void TodoView::update(int uid, const SmallTodo& to ) { 74void TodoView::update(int, const SmallTodo& ) {
75 //m_main->slotUpate1( uid, to ); 75 //m_main->slotUpate1( uid, to );
76} 76}
77void TodoView::update(int uid, const OTodo& ev ) { 77void TodoView::update(int , const OTodo& ev ) {
78 m_main->updateTodo( ev ); 78 m_main->updateTodo( ev );
79} 79}