-rw-r--r-- | core/pim/todo/mainwindow.cpp | 7 | ||||
-rw-r--r-- | core/pim/todo/mainwindow.h | 4 | ||||
-rw-r--r-- | core/pim/todo/tableview.cpp | 1 |
3 files changed, 9 insertions, 3 deletions
diff --git a/core/pim/todo/mainwindow.cpp b/core/pim/todo/mainwindow.cpp index ecb4e40..ad7899f 100644 --- a/core/pim/todo/mainwindow.cpp +++ b/core/pim/todo/mainwindow.cpp | |||
@@ -50,12 +50,13 @@ | |||
50 | #include <qpe/timestring.h> | 50 | #include <qpe/timestring.h> |
51 | #include <qpe/qpeapplication.h> | 51 | #include <qpe/qpeapplication.h> |
52 | 52 | ||
53 | #include <opie/orecur.h> | 53 | #include <opie/orecur.h> |
54 | #include <opie/opimnotifymanager.h> | 54 | #include <opie/opimnotifymanager.h> |
55 | #include <opie/otodoaccessvcal.h> | 55 | #include <opie/otodoaccessvcal.h> |
56 | #include <opie/owidgetstack.h> | ||
56 | 57 | ||
57 | #include <opie/oapplicationfactory.h> | 58 | #include <opie/oapplicationfactory.h> |
58 | 59 | ||
59 | #include "quickeditimpl.h" | 60 | #include "quickeditimpl.h" |
60 | #include "todotemplatemanager.h" | 61 | #include "todotemplatemanager.h" |
61 | #include "templateeditor.h" | 62 | #include "templateeditor.h" |
@@ -70,12 +71,15 @@ OPIE_EXPORT_APP( OApplicationFactory<Todo::MainWindow> ) | |||
70 | using namespace Todo; | 71 | using namespace Todo; |
71 | 72 | ||
72 | MainWindow::MainWindow( QWidget* parent, | 73 | MainWindow::MainWindow( QWidget* parent, |
73 | const char* name, WFlags ) | 74 | const char* name, WFlags ) |
74 | : OPimMainWindow( "Todolist", parent, name, WType_TopLevel | WStyle_ContextHelp ) | 75 | : OPimMainWindow( "Todolist", parent, name, WType_TopLevel | WStyle_ContextHelp ) |
75 | { | 76 | { |
77 | if (!name) | ||
78 | setName("todo window"); | ||
79 | |||
76 | m_syncing = false; | 80 | m_syncing = false; |
77 | m_showing = false; | 81 | m_showing = false; |
78 | m_counter = 0; | 82 | m_counter = 0; |
79 | m_tempManager = new TemplateManager(); | 83 | m_tempManager = new TemplateManager(); |
80 | m_tempManager->load(); | 84 | m_tempManager->load(); |
81 | 85 | ||
@@ -221,13 +225,13 @@ void MainWindow::initConfig() { | |||
221 | m_deadline = config.readBoolEntry( "ShowDeadLine", TRUE); | 225 | m_deadline = config.readBoolEntry( "ShowDeadLine", TRUE); |
222 | m_overdue = config.readBoolEntry("ShowOverDue", FALSE ); | 226 | m_overdue = config.readBoolEntry("ShowOverDue", FALSE ); |
223 | m_quicktask = config.readBoolEntry("ShowQuickTask", TRUE); | 227 | m_quicktask = config.readBoolEntry("ShowQuickTask", TRUE); |
224 | } | 228 | } |
225 | void MainWindow::initUI() { | 229 | void MainWindow::initUI() { |
226 | 230 | ||
227 | m_stack = new QWidgetStack(this, "main stack"); | 231 | m_stack = new OWidgetStack(this, "main stack"); |
228 | 232 | ||
229 | setCentralWidget( m_stack ); | 233 | setCentralWidget( m_stack ); |
230 | 234 | ||
231 | setToolBarsMovable( FALSE ); | 235 | setToolBarsMovable( FALSE ); |
232 | 236 | ||
233 | QToolBar *menubarholder = new QToolBar( this ); | 237 | QToolBar *menubarholder = new QToolBar( this ); |
@@ -402,12 +406,13 @@ void MainWindow::closeEvent( QCloseEvent* e ) { | |||
402 | config.writeEntry( "ShowDeadLine", showDeadline()); | 406 | config.writeEntry( "ShowDeadLine", showDeadline()); |
403 | config.writeEntry( "ShowOverDue", showOverDue() ); | 407 | config.writeEntry( "ShowOverDue", showOverDue() ); |
404 | config.writeEntry( "ShowQuickTask", showQuickTask() ); | 408 | config.writeEntry( "ShowQuickTask", showQuickTask() ); |
405 | /* save templates */ | 409 | /* save templates */ |
406 | templateManager()->save(); | 410 | templateManager()->save(); |
407 | e->accept(); | 411 | e->accept(); |
412 | qApp->quit(); | ||
408 | } | 413 | } |
409 | } | 414 | } |
410 | void MainWindow::populateTemplates() { | 415 | void MainWindow::populateTemplates() { |
411 | m_template->clear(); | 416 | m_template->clear(); |
412 | QStringList list = templateManager()->templates(); | 417 | QStringList list = templateManager()->templates(); |
413 | QStringList::Iterator it; | 418 | QStringList::Iterator it; |
diff --git a/core/pim/todo/mainwindow.h b/core/pim/todo/mainwindow.h index bd341c2..fd0e1bd 100644 --- a/core/pim/todo/mainwindow.h +++ b/core/pim/todo/mainwindow.h | |||
@@ -41,13 +41,13 @@ | |||
41 | #include "todomanager.h" | 41 | #include "todomanager.h" |
42 | 42 | ||
43 | class QPopupMenu; | 43 | class QPopupMenu; |
44 | class QMenuBar; | 44 | class QMenuBar; |
45 | class QToolBar; | 45 | class QToolBar; |
46 | class QAction; | 46 | class QAction; |
47 | class QWidgetStack; | 47 | class OWidgetStack; |
48 | class Ir; | 48 | class Ir; |
49 | class QVBox; | 49 | class QVBox; |
50 | class QLineEdit; | 50 | class QLineEdit; |
51 | 51 | ||
52 | namespace Todo { | 52 | namespace Todo { |
53 | typedef TodoView View; | 53 | typedef TodoView View; |
@@ -139,13 +139,13 @@ private slots: | |||
139 | *m_deleteAllAction, | 139 | *m_deleteAllAction, |
140 | *m_deleteCompleteAction, | 140 | *m_deleteCompleteAction, |
141 | *m_duplicateAction, | 141 | *m_duplicateAction, |
142 | *m_showOverDueAction, | 142 | *m_showOverDueAction, |
143 | *m_showQuickTaskAction, | 143 | *m_showQuickTaskAction, |
144 | *m_effectiveAction; | 144 | *m_effectiveAction; |
145 | QWidgetStack *m_stack; | 145 | OWidgetStack *m_stack; |
146 | QPopupMenu* m_catMenu, | 146 | QPopupMenu* m_catMenu, |
147 | *m_edit, | 147 | *m_edit, |
148 | *m_options, | 148 | *m_options, |
149 | *m_template; | 149 | *m_template; |
150 | 150 | ||
151 | bool m_syncing:1; | 151 | bool m_syncing:1; |
diff --git a/core/pim/todo/tableview.cpp b/core/pim/todo/tableview.cpp index 2e252d5..def0efb 100644 --- a/core/pim/todo/tableview.cpp +++ b/core/pim/todo/tableview.cpp | |||
@@ -82,12 +82,13 @@ void TableView::initConfig() { | |||
82 | } | 82 | } |
83 | } | 83 | } |
84 | 84 | ||
85 | TableView::TableView( MainWindow* window, QWidget* wid ) | 85 | TableView::TableView( MainWindow* window, QWidget* wid ) |
86 | : QTable( wid ), TodoView( window ) { | 86 | : QTable( wid ), TodoView( window ) { |
87 | 87 | ||
88 | setName("TableView"); | ||
88 | // Load icons | 89 | // Load icons |
89 | // TODO - probably should be done globally somewhere else, | 90 | // TODO - probably should be done globally somewhere else, |
90 | // see also quickeditimpl.cpp/h, taskeditoroverview.cpp/h | 91 | // see also quickeditimpl.cpp/h, taskeditoroverview.cpp/h |
91 | m_pic_completed = Resource::loadPixmap( "todo/completed" ); | 92 | m_pic_completed = Resource::loadPixmap( "todo/completed" ); |
92 | QString namestr; | 93 | QString namestr; |
93 | for ( unsigned int i = 1; i < 6; i++ ) { | 94 | for ( unsigned int i = 1; i < 6; i++ ) { |