From d21d693d91af8ee8fb54478a6db67f5a0590a767 Mon Sep 17 00:00:00 2001 From: zecke Date: Sat, 02 Nov 2002 13:47:01 +0000 Subject: Cut some warning and applied trekres customStrokeWidth patch --- (limited to 'core/pim/todo/tableview.cpp') 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 @@ -26,12 +26,15 @@ */ #include +#include #include #include #include #include +#include + #include "mainwindow.h" //#include "tableitems.h" #include "tableview.h" @@ -44,6 +47,12 @@ 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 ) { setUpdatesEnabled( false ); @@ -96,6 +105,9 @@ TableView::TableView( MainWindow* window, QWidget* wid ) setSortOrder( 0 ); setAscending( TRUE ); m_first = true; + + /* now let's init the config */ + initConfig(); } /* a new day has started * update the day @@ -488,7 +500,7 @@ void TableView::timerEvent( QTimerEvent* ev ) { 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]; todo.setCompleted( !todo.isCompleted() ); -- cgit v0.9.0.2