summaryrefslogtreecommitdiff
path: root/core
authorzecke <zecke>2003-08-27 13:12:10 (UTC)
committer zecke <zecke>2003-08-27 13:12:10 (UTC)
commite2cbbacc147897a7db1dfe7335397ce980b295cc (patch) (side-by-side diff)
tree6afbc52fdf2ca5912d20a47eed08141668824782 /core
parent2635bf400cb58c11f48477150d6fc4337de12fb0 (diff)
downloadopie-e2cbbacc147897a7db1dfe7335397ce980b295cc.zip
opie-e2cbbacc147897a7db1dfe7335397ce980b295cc.tar.gz
opie-e2cbbacc147897a7db1dfe7335397ce980b295cc.tar.bz2
-Convert to quick launch as an example
-Fix a bug. If flush() is called m_syncing = true and on reload m_syncing = false
Diffstat (limited to 'core') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/todo/mainwindow.cpp10
-rw-r--r--core/pim/todo/mainwindow.h5
-rw-r--r--core/pim/todo/todo.pro28
3 files changed, 15 insertions, 28 deletions
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
@@ -55,4 +55,6 @@
#include <opie/otodoaccessvcal.h>
+#include <opie/oapplicationfactory.h>
+
#include "quickeditimpl.h"
#include "todotemplatemanager.h"
@@ -64,9 +66,10 @@
#include "mainwindow.h"
+OPIE_EXPORT_APP( OApplicationFactory<Todo::MainWindow> )
using namespace Todo;
MainWindow::MainWindow( QWidget* parent,
- const char* name )
+ const char* name, WFlags )
: OPimMainWindow( "Todolist", parent, name, WType_TopLevel | WStyle_ContextHelp )
{
@@ -351,4 +354,5 @@ TodoShow* MainWindow::currentShow() {
}
void MainWindow::slotReload() {
+ m_syncing = FALSE;
m_todoMgr.reload();
currentView()->updateView( );
@@ -605,5 +609,5 @@ void MainWindow::receiveFile( const QString& filename ) {
for ( it = list.begin(); it != list.end(); ++it )
m_todoMgr.add( (*it) );
-
+
currentView()->updateView();
}
@@ -612,5 +616,5 @@ void MainWindow::receiveFile( const QString& filename ) {
void MainWindow::slotFlush() {
- m_syncing = FALSE;
+ m_syncing = TRUE;
m_todoMgr.save();
}
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
@@ -63,6 +63,9 @@ namespace Todo {
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();
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,5 +1,5 @@
-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 \
@@ -25,5 +25,5 @@ SOURCES = smalltodo.cpp \
todomanager.cpp \
mainwindow.cpp \
- main.cpp \
+# main.cpp \
tableview.cpp \
todoview.cpp \
@@ -47,23 +47,3 @@ 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 )