-rw-r--r-- | core/pim/todo/tableview.cpp | 14 |
1 files changed, 13 insertions, 1 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 @@ -27,4 +27,5 @@ */ #include <stdlib.h> +#include <cmath> #include <qlineedit.h> @@ -33,4 +34,6 @@ #include <qpopupmenu.h> +#include <qpe/config.h> + #include "mainwindow.h" //#include "tableitems.h" @@ -45,4 +48,10 @@ namespace { +void TableView::initConfig() { + Config config( "todo" ); + config.setGroup( "Options" ); + m_completeStrokeWidth = config.readNumEntry( "CompleteStrokeWidth", 8 ); +} + TableView::TableView( MainWindow* window, QWidget* wid ) : QTable( wid ), TodoView( window ) { @@ -97,4 +106,7 @@ TableView::TableView( MainWindow* window, QWidget* wid ) setAscending( TRUE ); m_first = true; + + /* now let's init the config */ + initConfig(); } /* a new day has started @@ -489,5 +501,5 @@ void TableView::contentsMouseReleaseEvent( QMouseEvent* e) { int row = rowAt(m_prevP.y()); if ( row == rowAt( e->y() ) && row != -1 ) { - if ( abs( m_prevP.x() - e->x() ) >= 8 ) { + if ( ::abs( m_prevP.x() - e->x() ) >= m_completeStrokeWidth ) { qWarning("current row %d", row ); OTodo todo = sorted()[row]; |