summaryrefslogtreecommitdiff
path: root/core/pim/todo/tableview.cpp
Side-by-side diff
Diffstat (limited to 'core/pim/todo/tableview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/todo/tableview.cpp32
1 files changed, 18 insertions, 14 deletions
diff --git a/core/pim/todo/tableview.cpp b/core/pim/todo/tableview.cpp
index b7458d8..221faca 100644
--- a/core/pim/todo/tableview.cpp
+++ b/core/pim/todo/tableview.cpp
@@ -140,3 +140,3 @@ TableView::TableView( MainWindow* window, QWidget* wid )
viewport()->update();
- setSortOrder( 0 );
+ setSortOrder( Opie::OPimTodoAccess::Completed );
setAscending( TRUE );
@@ -197,3 +197,2 @@ void TableView::showOverDue( bool ) {
void TableView::updateView( ) {
- owarn << "update view" << oendl;
m_row = false;
@@ -211,3 +210,2 @@ void TableView::updateView( ) {
- owarn << "setTodos" << oendl;
QTime time;
@@ -256,4 +254,3 @@ void TableView::removeEvent( int ) {
}
-void TableView::setShowCompleted( bool b) {
- owarn << "Show Completed " << b << oendl;
+void TableView::setShowCompleted( bool ) {
updateView();
@@ -261,3 +258,2 @@ void TableView::setShowCompleted( bool b) {
void TableView::setShowDeadline( bool b ) {
- owarn << "Show Deadline " << b << oendl;
if ( b )
@@ -284,3 +280,2 @@ void TableView::setShowDeadline( bool b ) {
void TableView::setShowCategory( const QString& str) {
- owarn << "setShowCategory" << oendl;
if ( str != m_oleCat || m_first )
@@ -349,4 +344,2 @@ void TableView::slotPressed(int row, int col, int,
- owarn << "pressed row " << row << " col " << col << " x:" << point.x()
- << "+y:" << point.y() << oendl;
m_prevP = point;
@@ -357,3 +350,2 @@ void TableView::slotPressed(int row, int col, int,
void TableView::slotValueChanged( int, int ) {
- owarn << "Value Changed" << oendl;
}
@@ -373,3 +365,18 @@ QWidget* TableView::widget() {
void TableView::sortColumn( int col, bool asc, bool ) {
- owarn << "bool " << asc << oendl;
+ switch(col) {
+ case 1:
+ col = Opie::OPimTodoAccess::Priority;
+ break;
+ case 2:
+ col = Opie::OPimTodoAccess::SortSummary;
+ break;
+ case 3:
+ col = Opie::OPimTodoAccess::Deadline;
+ break;
+ case 0:
+ default:
+ col = Opie::OPimTodoAccess::Completed;
+ break;
+ }
+
setSortOrder( col );
@@ -496,3 +503,2 @@ QWidget* TableView::createEditor(int row, int col, bool )const {
void TableView::setCellContentFromEditor(int row, int col ) {
- owarn << "set cell content from editor" << oendl;
if ( col == 1 ) {
@@ -532,3 +538,2 @@ void TableView::slotPriority() {
void TableView::timerEvent( QTimerEvent* ) {
-// Opie::Core::owarn << "sorted " << sorted().count() << oendl;
if (sorted().count() == 0 )
@@ -580,3 +585,2 @@ void TableView::contentsMouseReleaseEvent( QMouseEvent* e) {
int colNew = columnAt(e->x() );
- owarn << "colNew: " << colNew << " colOld: " << colOld << oendl;
if ( row == rowAt( e->y() ) && row != -1 &&