summaryrefslogtreecommitdiff
path: root/core/pim/todo/mainwindow.cpp
authorzecke <zecke>2003-08-27 13:12:10 (UTC)
committer zecke <zecke>2003-08-27 13:12:10 (UTC)
commite2cbbacc147897a7db1dfe7335397ce980b295cc (patch) (unidiff)
tree6afbc52fdf2ca5912d20a47eed08141668824782 /core/pim/todo/mainwindow.cpp
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/pim/todo/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/todo/mainwindow.cpp10
1 files changed, 7 insertions, 3 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
@@ -53,8 +53,10 @@
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 56
57#include <opie/oapplicationfactory.h>
58
57#include "quickeditimpl.h" 59#include "quickeditimpl.h"
58#include "todotemplatemanager.h" 60#include "todotemplatemanager.h"
59#include "templateeditor.h" 61#include "templateeditor.h"
60#include "tableview.h" 62#include "tableview.h"
@@ -62,13 +64,14 @@
62#include "textviewshow.h" 64#include "textviewshow.h"
63#include "todoeditor.h" 65#include "todoeditor.h"
64#include "mainwindow.h" 66#include "mainwindow.h"
65 67
68OPIE_EXPORT_APP( OApplicationFactory<Todo::MainWindow> )
66 69
67using namespace Todo; 70using namespace Todo;
68 71
69MainWindow::MainWindow( QWidget* parent, 72MainWindow::MainWindow( QWidget* parent,
70 const char* name ) 73 const char* name, WFlags )
71 : OPimMainWindow( "Todolist", parent, name, WType_TopLevel | WStyle_ContextHelp ) 74 : OPimMainWindow( "Todolist", parent, name, WType_TopLevel | WStyle_ContextHelp )
72{ 75{
73 m_syncing = false; 76 m_syncing = false;
74 m_showing = false; 77 m_showing = false;
@@ -349,8 +352,9 @@ Editor* MainWindow::currentEditor() {
349TodoShow* MainWindow::currentShow() { 352TodoShow* MainWindow::currentShow() {
350 return m_curShow; 353 return m_curShow;
351} 354}
352void MainWindow::slotReload() { 355void MainWindow::slotReload() {
356 m_syncing = FALSE;
353 m_todoMgr.reload(); 357 m_todoMgr.reload();
354 currentView()->updateView( ); 358 currentView()->updateView( );
355 raiseCurrentView(); 359 raiseCurrentView();
356} 360}
@@ -603,16 +607,16 @@ void MainWindow::receiveFile( const QString& filename ) {
603 QMessageBox::Cancel ) == QMessageBox::Ok ) { 607 QMessageBox::Cancel ) == QMessageBox::Ok ) {
604 OTodoAccess::List::Iterator it; 608 OTodoAccess::List::Iterator it;
605 for ( it = list.begin(); it != list.end(); ++it ) 609 for ( it = list.begin(); it != list.end(); ++it )
606 m_todoMgr.add( (*it) ); 610 m_todoMgr.add( (*it) );
607 611
608 currentView()->updateView(); 612 currentView()->updateView();
609 } 613 }
610 } 614 }
611} 615}
612 616
613void MainWindow::slotFlush() { 617void MainWindow::slotFlush() {
614 m_syncing = FALSE; 618 m_syncing = TRUE;
615 m_todoMgr.save(); 619 m_todoMgr.save();
616} 620}
617void MainWindow::slotShowDetails() { 621void MainWindow::slotShowDetails() {
618 slotShow( currentView()->current() ); 622 slotShow( currentView()->current() );