summaryrefslogtreecommitdiff
Side-by-side diff
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
@@ -48,16 +48,17 @@
#include <qpe/qpemessagebox.h>
#include <qpe/alarmserver.h>
#include <qpe/timestring.h>
#include <qpe/qpeapplication.h>
#include <opie/orecur.h>
#include <opie/opimnotifymanager.h>
#include <opie/otodoaccessvcal.h>
+#include <opie/owidgetstack.h>
#include <opie/oapplicationfactory.h>
#include "quickeditimpl.h"
#include "todotemplatemanager.h"
#include "templateeditor.h"
#include "tableview.h"
@@ -68,16 +69,19 @@
OPIE_EXPORT_APP( OApplicationFactory<Todo::MainWindow> )
using namespace Todo;
MainWindow::MainWindow( QWidget* parent,
const char* name, WFlags )
: OPimMainWindow( "Todolist", parent, name, WType_TopLevel | WStyle_ContextHelp )
{
+ if (!name)
+ setName("todo window");
+
m_syncing = false;
m_showing = false;
m_counter = 0;
m_tempManager = new TemplateManager();
m_tempManager->load();
initUI();
initConfig();
@@ -219,17 +223,17 @@ void MainWindow::initConfig() {
m_completed = config.readBoolEntry( "ShowComplete", TRUE );
m_curCat = config.readEntry( "Category", QString::null );
m_deadline = config.readBoolEntry( "ShowDeadLine", TRUE);
m_overdue = config.readBoolEntry("ShowOverDue", FALSE );
m_quicktask = config.readBoolEntry("ShowQuickTask", TRUE);
}
void MainWindow::initUI() {
- m_stack = new QWidgetStack(this, "main stack");
+ m_stack = new OWidgetStack(this, "main stack");
setCentralWidget( m_stack );
setToolBarsMovable( FALSE );
QToolBar *menubarholder = new QToolBar( this );
menubarholder->setHorizontalStretchable( TRUE );
m_bar = new QMenuBar( menubarholder );
@@ -400,16 +404,17 @@ void MainWindow::closeEvent( QCloseEvent* e ) {
config.writeEntry( "ShowComplete", showCompleted() );
config.writeEntry( "Category", currentCategory() );
config.writeEntry( "ShowDeadLine", showDeadline());
config.writeEntry( "ShowOverDue", showOverDue() );
config.writeEntry( "ShowQuickTask", showQuickTask() );
/* save templates */
templateManager()->save();
e->accept();
+ qApp->quit();
}
}
void MainWindow::populateTemplates() {
m_template->clear();
QStringList list = templateManager()->templates();
QStringList::Iterator it;
for ( it = list.begin(); it != list.end(); ++it ) {
m_template->insertItem( (*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
@@ -39,17 +39,17 @@
#include "todoview.h"
#include "quickedit.h"
#include "todomanager.h"
class QPopupMenu;
class QMenuBar;
class QToolBar;
class QAction;
-class QWidgetStack;
+class OWidgetStack;
class Ir;
class QVBox;
class QLineEdit;
namespace Todo {
typedef TodoView View;
class TemplateManager;
class Editor;
@@ -137,17 +137,17 @@ private slots:
*m_completedAction,
*m_showDeadLineAction,
*m_deleteAllAction,
*m_deleteCompleteAction,
*m_duplicateAction,
*m_showOverDueAction,
*m_showQuickTaskAction,
*m_effectiveAction;
- QWidgetStack *m_stack;
+ OWidgetStack *m_stack;
QPopupMenu* m_catMenu,
*m_edit,
*m_options,
*m_template;
bool m_syncing:1;
bool m_deadline:1;
bool m_completed: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
@@ -80,16 +80,17 @@ void TableView::initConfig() {
int width = config.readNumEntry("Width"+QString::number(i), -1 );
setColumnWidth(i, width == -1 ? columnWidth(i) : width );
}
}
TableView::TableView( MainWindow* window, QWidget* wid )
: QTable( wid ), TodoView( window ) {
+ setName("TableView");
// Load icons
// TODO - probably should be done globally somewhere else,
// see also quickeditimpl.cpp/h, taskeditoroverview.cpp/h
m_pic_completed = Resource::loadPixmap( "todo/completed" );
QString namestr;
for ( unsigned int i = 1; i < 6; i++ ) {
namestr = "todo/priority";
namestr.append( QString::number( i ) );