summaryrefslogtreecommitdiff
path: root/core/pim/todo/mainwindow.cpp
Side-by-side diff
Diffstat (limited to 'core/pim/todo/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/todo/mainwindow.cpp29
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
@@ -37,2 +37,4 @@
#include <qtimer.h>
+#include <qvbox.h>
+#include <qlineedit.h>
@@ -46,2 +48,3 @@
+#include "quickeditimpl.h"
#include "todotemplatemanager.h"
@@ -200,4 +203,11 @@ void MainWindow::initConfig() {
void MainWindow::initUI() {
- m_stack = new QWidgetStack(this, "main stack");
- setCentralWidget( m_stack );
+ m_mainBox = new QVBox(this, "main box ");
+ m_curQuick = new QuickEditImpl(this, m_mainBox );
+ m_curQuick->signal()->connect( this, SLOT(slotQuickEntered() ) );
+ m_quickEdit.append( m_curQuick );
+
+
+
+ m_stack = new QWidgetStack(m_mainBox, "main stack");
+ setCentralWidget( m_mainBox );
@@ -226,3 +236,3 @@ void MainWindow::initUI() {
void MainWindow::initViews() {
- TableView* tableView = new TableView( this, this );
+ TableView* tableView = new TableView( this, m_stack );
m_stack->addWidget( tableView, m_counter++ );
@@ -683 +693,14 @@ void MainWindow::setReadAhead( uint count ) {
}
+void MainWindow::slotQuickEntered() {
+ qWarning("entered");
+ OTodo todo = quickEditor()->todo();
+ if (todo.isEmpty() )
+ return;
+
+ m_todoMgr.add( todo );
+ currentView()->addEvent( todo );
+ raiseCurrentView();
+}
+QuickEditBase* MainWindow::quickEditor() {
+ return m_curQuick;
+}