author | zecke <zecke> | 2002-10-19 02:32:30 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-10-19 02:32:30 (UTC) |
commit | 47ea36b68b6c7f12ae3bb777c89d813b4e1360a3 (patch) (unidiff) | |
tree | d25ec05f1ccf0db36194d5f2879fe543a34620c2 /core/pim/todo/mainwindow.cpp | |
parent | 7871e87fbd796c57374b23ec91890962b2ef1fe9 (diff) | |
download | opie-47ea36b68b6c7f12ae3bb777c89d813b4e1360a3.zip opie-47ea36b68b6c7f12ae3bb777c89d813b4e1360a3.tar.gz opie-47ea36b68b6c7f12ae3bb777c89d813b4e1360a3.tar.bz2 |
Fix crash if todolist is empty
Fix paint update bugs.. knewly created items did not show
up. an sort() QTable::update() is and was not enough
A new feature. It's a quick entering method. It lacks icons and some
more stuff but I like it
Now redoing the Editor Dialog
-rw-r--r-- | core/pim/todo/mainwindow.cpp | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/core/pim/todo/mainwindow.cpp b/core/pim/todo/mainwindow.cpp index a6d657c..8377573 100644 --- a/core/pim/todo/mainwindow.cpp +++ b/core/pim/todo/mainwindow.cpp | |||
@@ -35,6 +35,8 @@ | |||
35 | #include <qwidgetstack.h> | 35 | #include <qwidgetstack.h> |
36 | #include <qaction.h> | 36 | #include <qaction.h> |
37 | #include <qtimer.h> | 37 | #include <qtimer.h> |
38 | #include <qvbox.h> | ||
39 | #include <qlineedit.h> | ||
38 | 40 | ||
39 | #include <qpe/applnk.h> | 41 | #include <qpe/applnk.h> |
40 | #include <qpe/config.h> | 42 | #include <qpe/config.h> |
@@ -44,6 +46,7 @@ | |||
44 | 46 | ||
45 | #include <opie/otodoaccessvcal.h> | 47 | #include <opie/otodoaccessvcal.h> |
46 | 48 | ||
49 | #include "quickeditimpl.h" | ||
47 | #include "todotemplatemanager.h" | 50 | #include "todotemplatemanager.h" |
48 | #include "templateeditor.h" | 51 | #include "templateeditor.h" |
49 | #include "todoentryimpl.h" | 52 | #include "todoentryimpl.h" |
@@ -198,8 +201,15 @@ void MainWindow::initConfig() { | |||
198 | m_overdue = config.readBoolEntry("ShowOverDue", TRUE ); | 201 | m_overdue = config.readBoolEntry("ShowOverDue", TRUE ); |
199 | } | 202 | } |
200 | void MainWindow::initUI() { | 203 | void MainWindow::initUI() { |
201 | m_stack = new QWidgetStack(this, "main stack"); | 204 | m_mainBox = new QVBox(this, "main box "); |
202 | setCentralWidget( m_stack ); | 205 | m_curQuick = new QuickEditImpl(this, m_mainBox ); |
206 | m_curQuick->signal()->connect( this, SLOT(slotQuickEntered() ) ); | ||
207 | m_quickEdit.append( m_curQuick ); | ||
208 | |||
209 | |||
210 | |||
211 | m_stack = new QWidgetStack(m_mainBox, "main stack"); | ||
212 | setCentralWidget( m_mainBox ); | ||
203 | 213 | ||
204 | setToolBarsMovable( FALSE ); | 214 | setToolBarsMovable( FALSE ); |
205 | 215 | ||
@@ -224,7 +234,7 @@ void MainWindow::initUI() { | |||
224 | this, SLOT(slotNewFromTemplate(int) ) ); | 234 | this, SLOT(slotNewFromTemplate(int) ) ); |
225 | } | 235 | } |
226 | void MainWindow::initViews() { | 236 | void MainWindow::initViews() { |
227 | TableView* tableView = new TableView( this, this ); | 237 | TableView* tableView = new TableView( this, m_stack ); |
228 | m_stack->addWidget( tableView, m_counter++ ); | 238 | m_stack->addWidget( tableView, m_counter++ ); |
229 | m_views.append( tableView ); | 239 | m_views.append( tableView ); |
230 | m_curView = tableView; | 240 | m_curView = tableView; |
@@ -681,3 +691,16 @@ void MainWindow::setReadAhead( uint count ) { | |||
681 | if (m_todoMgr.todoDB() ) | 691 | if (m_todoMgr.todoDB() ) |
682 | m_todoMgr.todoDB()->setReadAhead( count ); | 692 | m_todoMgr.todoDB()->setReadAhead( count ); |
683 | } | 693 | } |
694 | void MainWindow::slotQuickEntered() { | ||
695 | qWarning("entered"); | ||
696 | OTodo todo = quickEditor()->todo(); | ||
697 | if (todo.isEmpty() ) | ||
698 | return; | ||
699 | |||
700 | m_todoMgr.add( todo ); | ||
701 | currentView()->addEvent( todo ); | ||
702 | raiseCurrentView(); | ||
703 | } | ||
704 | QuickEditBase* MainWindow::quickEditor() { | ||
705 | return m_curQuick; | ||
706 | } | ||