summaryrefslogtreecommitdiff
authorzecke <zecke>2003-09-06 06:31:13 (UTC)
committer zecke <zecke>2003-09-06 06:31:13 (UTC)
commite06de75edc6c01d97248050030f197bd8f21fb10 (patch) (unidiff)
tree4696ac60c9cdb5fc80c28c862eb856c64b7b7c8c
parenteaf6da2bd05eac392c118c11fd5be1bab8586b6a (diff)
downloadopie-e06de75edc6c01d97248050030f197bd8f21fb10.zip
opie-e06de75edc6c01d97248050030f197bd8f21fb10.tar.gz
opie-e06de75edc6c01d97248050030f197bd8f21fb10.tar.bz2
-Switch to OWidgetStack actually only three lines touch by this
-the really quit on closeEvent and don't wait for the last window -use setName eases debugging
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/todo/mainwindow.cpp7
-rw-r--r--core/pim/todo/mainwindow.h4
-rw-r--r--core/pim/todo/tableview.cpp1
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
@@ -52,8 +52,9 @@
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"
@@ -72,8 +73,11 @@ using namespace Todo;
72MainWindow::MainWindow( QWidget* parent, 73MainWindow::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();
@@ -223,9 +227,9 @@ void MainWindow::initConfig() {
223 m_quicktask = config.readBoolEntry("ShowQuickTask", TRUE); 227 m_quicktask = config.readBoolEntry("ShowQuickTask", TRUE);
224} 228}
225void MainWindow::initUI() { 229void 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 );
@@ -404,8 +408,9 @@ void MainWindow::closeEvent( QCloseEvent* e ) {
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}
410void MainWindow::populateTemplates() { 415void MainWindow::populateTemplates() {
411 m_template->clear(); 416 m_template->clear();
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
@@ -43,9 +43,9 @@
43class QPopupMenu; 43class QPopupMenu;
44class QMenuBar; 44class QMenuBar;
45class QToolBar; 45class QToolBar;
46class QAction; 46class QAction;
47class QWidgetStack; 47class OWidgetStack;
48class Ir; 48class Ir;
49class QVBox; 49class QVBox;
50class QLineEdit; 50class QLineEdit;
51 51
@@ -141,9 +141,9 @@ private slots:
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;
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
@@ -84,8 +84,9 @@ void TableView::initConfig() {
84 84
85TableView::TableView( MainWindow* window, QWidget* wid ) 85TableView::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" );