author | zecke <zecke> | 2002-10-25 22:12:35 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-10-25 22:12:35 (UTC) |
commit | b682e9d2276c10a5c26773c6797ba1ac176ea4cf (patch) (side-by-side diff) | |
tree | 9780ad571f14943e3ad6c3ec34a4e787f8a85217 /core/pim/todo/todoeditor.cpp | |
parent | 595407074ac5724eb33aeb151ce27e38fbca21d5 (diff) | |
download | opie-b682e9d2276c10a5c26773c6797ba1ac176ea4cf.zip opie-b682e9d2276c10a5c26773c6797ba1ac176ea4cf.tar.gz opie-b682e9d2276c10a5c26773c6797ba1ac176ea4cf.tar.bz2 |
MainWindow i18n change 'Show only over due' to avoid misunderstanding
then 'share' and 'preload' the taskeditor
on first request it'll be created but on destroyed until Destruction
the interface. This will happen when the apps quits.
This should speed up editing and entering quite a lot
-rw-r--r-- | core/pim/todo/todoeditor.cpp | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/core/pim/todo/todoeditor.cpp b/core/pim/todo/todoeditor.cpp index e19ab8d..9b8c5cb 100644 --- a/core/pim/todo/todoeditor.cpp +++ b/core/pim/todo/todoeditor.cpp @@ -8,9 +8,14 @@ Editor::Editor() { m_accepted = false; + m_self = 0l; } Editor::~Editor() { + delete m_self; + m_self = 0; } OTodo Editor::newTodo( int cur, - QWidget* par) { + QWidget*) { - OTaskEditor e( cur); + OTaskEditor *e = self(); + e->setCaption( QObject::tr("Enter Task") ); + e->init( cur ); @@ -18,6 +23,6 @@ OTodo Editor::newTodo( int cur, #if defined(Q_WS_QWS) || defined(_WS_QWS_) - e.showMaximized(); + e->showMaximized(); #endif - int ret = e.exec(); + int ret = e->exec(); if ( QDialog::Accepted == ret ) { @@ -27,3 +32,3 @@ OTodo Editor::newTodo( int cur, - OTodo ev = e.todo(); + OTodo ev = e->todo(); qWarning("Todo uid"); @@ -36,11 +41,12 @@ OTodo Editor::edit( QWidget *wid, const OTodo& todo ) { - OTaskEditor e( todo ); - e.setCaption( QObject::tr( "Edit Task" ) ); + OTaskEditor *e = self(); + e->init( todo ); + e->setCaption( QObject::tr( "Edit Task" ) ); #if defined(Q_WS_QWS) || defined(_WS_QWS_) - e.showMaximized(); + e->showMaximized(); #endif - int ret = e.exec(); + int ret = e->exec(); - OTodo ev = e.todo(); + OTodo ev = e->todo(); if ( ret == QDialog::Accepted ) @@ -55 +61,7 @@ bool Editor::accepted()const { } +OTaskEditor* Editor::self() { + if (!m_self ) + m_self = new OTaskEditor(0); + + return m_self; +} |