From e2cbbacc147897a7db1dfe7335397ce980b295cc Mon Sep 17 00:00:00 2001 From: zecke Date: Wed, 27 Aug 2003 13:12:10 +0000 Subject: -Convert to quick launch as an example -Fix a bug. If flush() is called m_syncing = true and on reload m_syncing = false --- (limited to 'core') diff --git a/core/pim/todo/mainwindow.cpp b/core/pim/todo/mainwindow.cpp index 6725951..ecb4e40 100644 --- a/core/pim/todo/mainwindow.cpp +++ b/core/pim/todo/mainwindow.cpp @@ -54,6 +54,8 @@ #include #include +#include + #include "quickeditimpl.h" #include "todotemplatemanager.h" #include "templateeditor.h" @@ -63,11 +65,12 @@ #include "todoeditor.h" #include "mainwindow.h" +OPIE_EXPORT_APP( OApplicationFactory ) using namespace Todo; MainWindow::MainWindow( QWidget* parent, - const char* name ) + const char* name, WFlags ) : OPimMainWindow( "Todolist", parent, name, WType_TopLevel | WStyle_ContextHelp ) { m_syncing = false; @@ -350,6 +353,7 @@ TodoShow* MainWindow::currentShow() { return m_curShow; } void MainWindow::slotReload() { + m_syncing = FALSE; m_todoMgr.reload(); currentView()->updateView( ); raiseCurrentView(); @@ -604,14 +608,14 @@ void MainWindow::receiveFile( const QString& filename ) { OTodoAccess::List::Iterator it; for ( it = list.begin(); it != list.end(); ++it ) m_todoMgr.add( (*it) ); - + currentView()->updateView(); } } } void MainWindow::slotFlush() { - m_syncing = FALSE; + m_syncing = TRUE; m_todoMgr.save(); } void MainWindow::slotShowDetails() { diff --git a/core/pim/todo/mainwindow.h b/core/pim/todo/mainwindow.h index b04a958..bd341c2 100644 --- a/core/pim/todo/mainwindow.h +++ b/core/pim/todo/mainwindow.h @@ -62,8 +62,11 @@ namespace Todo { friend class TodoView; // avoid QObject here.... friend class TodoShow; // avoid QObject public: + /* OApplicationFactory application Name */ + static QString appName() { return QString::fromLatin1("todolist"); } + MainWindow( QWidget *parent = 0, - const char* name = 0 ); + const char* name = 0, WFlags fl = 0 ); ~MainWindow(); /** return a context menu for an OTodo */ diff --git a/core/pim/todo/todo.pro b/core/pim/todo/todo.pro index 4a63770..51cfde7 100644 --- a/core/pim/todo/todo.pro +++ b/core/pim/todo/todo.pro @@ -1,6 +1,6 @@ -TEMPLATE = app -CONFIG = qt warn_on release -DESTDIR = $(OPIEDIR)/bin +#TEMPLATE = app +CONFIG = qt warn_on release quick-app +#DESTDIR = $(OPIEDIR)/bin HEADERS = smalltodo.h \ todomanager.h \ @@ -24,7 +24,7 @@ HEADERS = smalltodo.h \ SOURCES = smalltodo.cpp \ todomanager.cpp \ mainwindow.cpp \ - main.cpp \ +# main.cpp \ tableview.cpp \ todoview.cpp \ todotemplatemanager.cpp \ @@ -46,24 +46,4 @@ INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe -lopie -TRANSLATIONS = ../../../i18n/de/todolist.ts \ - ../../../i18n/nl/todolist.ts \ - ../../../i18n/da/todolist.ts \ - ../../../i18n/xx/todolist.ts \ - ../../../i18n/en/todolist.ts \ - ../../../i18n/es/todolist.ts \ - ../../../i18n/fr/todolist.ts \ - ../../../i18n/hu/todolist.ts \ - ../../../i18n/ja/todolist.ts \ - ../../../i18n/ko/todolist.ts \ - ../../../i18n/no/todolist.ts \ - ../../../i18n/pl/todolist.ts \ - ../../../i18n/pt/todolist.ts \ - ../../../i18n/pt_BR/todolist.ts \ - ../../../i18n/sl/todolist.ts \ - ../../../i18n/zh_CN/todolist.ts \ - ../../../i18n/zh_TW/todolist.ts - - - include ( $(OPIEDIR)/include.pro ) -- cgit v0.9.0.2