summaryrefslogtreecommitdiff
path: root/core/pim/todo/mainwindow.cpp
Unidiff
Diffstat (limited to 'core/pim/todo/mainwindow.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/pim/todo/mainwindow.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/pim/todo/mainwindow.cpp b/core/pim/todo/mainwindow.cpp
index a244e58..c2f422d 100644
--- a/core/pim/todo/mainwindow.cpp
+++ b/core/pim/todo/mainwindow.cpp
@@ -19,97 +19,97 @@
19 :     =  ...= . :.=- 19 :     =  ...= . :.=-
20 -.   .:....=;==+<; You should have received a copy of the GNU 20 -.   .:....=;==+<; You should have received a copy of the GNU
21  -_. . .   )=.  = General Public License along with 21  -_. . .   )=.  = General Public License along with
22    --        :-=` this library; see the file COPYING.LIB. 22    --        :-=` this library; see the file COPYING.LIB.
23 If not, write to the Free Software Foundation, 23 If not, write to the Free Software Foundation,
24 Inc., 59 Temple Place - Suite 330, 24 Inc., 59 Temple Place - Suite 330,
25 Boston, MA 02111-1307, USA. 25 Boston, MA 02111-1307, USA.
26 26
27*/ 27*/
28 28
29#include <unistd.h> 29#include <unistd.h>
30 30
31#include <opie2/opimrecurrence.h> 31#include <opie2/opimrecurrence.h>
32#include <opie2/opimnotifymanager.h> 32#include <opie2/opimnotifymanager.h>
33#include <opie2/otodoaccessvcal.h> 33#include <opie2/otodoaccessvcal.h>
34#include <opie2/oapplicationfactory.h> 34#include <opie2/oapplicationfactory.h>
35 35
36#include <qpe/applnk.h> 36#include <qpe/applnk.h>
37#include <qpe/config.h> 37#include <qpe/config.h>
38#include <qpe/ir.h> 38#include <qpe/ir.h>
39#include <qpe/resource.h> 39#include <qpe/resource.h>
40#include <qpe/qpemessagebox.h> 40#include <qpe/qpemessagebox.h>
41#include <qpe/alarmserver.h> 41#include <qpe/alarmserver.h>
42#include <qpe/qpeapplication.h> 42#include <qpe/qpeapplication.h>
43 43
44#include <qmenubar.h> 44#include <qmenubar.h>
45#include <qmessagebox.h> 45#include <qmessagebox.h>
46#include <qpushbutton.h> 46#include <qpushbutton.h>
47#include <qaction.h> 47#include <qaction.h>
48#include <qtimer.h> 48#include <qtimer.h>
49#include <qlayout.h> 49#include <qlayout.h>
50#include <qwhatsthis.h> 50#include <qwhatsthis.h>
51 51
52#include "quickeditimpl.h" 52#include "quickeditimpl.h"
53#include "todotemplatemanager.h" 53#include "todotemplatemanager.h"
54#include "templateeditor.h" 54#include "templateeditor.h"
55#include "tableview.h" 55#include "tableview.h"
56 56
57#include "textviewshow.h" 57#include "textviewshow.h"
58#include "todoeditor.h" 58#include "todoeditor.h"
59#include "mainwindow.h" 59#include "mainwindow.h"
60 60
61OPIE_EXPORT_APP( OApplicationFactory<Todo::MainWindow> ) 61OPIE_EXPORT_APP( OApplicationFactory<Todo::MainWindow> )
62 62
63using namespace Todo; 63using namespace Todo;
64 64
65MainWindow::MainWindow( QWidget* parent, 65MainWindow::MainWindow( QWidget* parent,
66 const char* name, WFlags ) 66 const char* name, WFlags )
67 : OPimMainWindow( "Todolist", parent, name, WType_TopLevel | WStyle_ContextHelp ) 67 : Opie::OPimMainWindow( "Todolist", parent, name, WType_TopLevel | WStyle_ContextHelp )
68{ 68{
69 if (!name) 69 if (!name)
70 setName("todo window"); 70 setName("todo window");
71 71
72 m_syncing = false; 72 m_syncing = false;
73 m_showing = false; 73 m_showing = false;
74 m_counter = 0; 74 m_counter = 0;
75 m_tempManager = new TemplateManager(); 75 m_tempManager = new TemplateManager();
76 m_tempManager->load(); 76 m_tempManager->load();
77 77
78 initUI(); 78 initUI();
79 initConfig(); 79 initConfig();
80 initViews(); 80 initViews();
81 initActions(); 81 initActions();
82 initEditor(); 82 initEditor();
83 initShow(); 83 initShow();
84 initTemplate(); 84 initTemplate();
85 85
86 populateTemplates(); 86 populateTemplates();
87 raiseCurrentView(); 87 raiseCurrentView();
88 QTimer::singleShot(0, this, SLOT(populateCategories() ) ); 88 QTimer::singleShot(0, this, SLOT(populateCategories() ) );
89} 89}
90void MainWindow::initTemplate() { 90void MainWindow::initTemplate() {
91 m_curTempEd = new TemplateEditor( this, templateManager() ); 91 m_curTempEd = new TemplateEditor( this, templateManager() );
92} 92}
93void MainWindow::initActions() { 93void MainWindow::initActions() {
94 94
95 // Data menu 95 // Data menu
96 m_edit->insertItem(QWidget::tr("New from template"), m_template, 96 m_edit->insertItem(QWidget::tr("New from template"), m_template,
97 -1, 0 ); 97 -1, 0 );
98 98
99 QAction* a = new QAction( QWidget::tr("New Task" ), Resource::loadPixmap( "new" ), 99 QAction* a = new QAction( QWidget::tr("New Task" ), Resource::loadPixmap( "new" ),
100 QString::null, 0, this, 0 ); 100 QString::null, 0, this, 0 );
101 connect(a, SIGNAL( activated() ), 101 connect(a, SIGNAL( activated() ),
102 this, SLOT( slotNew() ) ); 102 this, SLOT( slotNew() ) );
103 a->setWhatsThis( QWidget::tr( "Click here to create a new task." ) ); 103 a->setWhatsThis( QWidget::tr( "Click here to create a new task." ) );
104 a->addTo(m_tool ); 104 a->addTo(m_tool );
105 a->addTo(m_edit ); 105 a->addTo(m_edit );
106 106
107 a = new QAction( QWidget::tr("Edit Task"), Resource::loadIconSet( "edit" ), 107 a = new QAction( QWidget::tr("Edit Task"), Resource::loadIconSet( "edit" ),
108 QString::null, 0, this, 0 ); 108 QString::null, 0, this, 0 );
109 connect(a, SIGNAL(activated() ), 109 connect(a, SIGNAL(activated() ),
110 this, SLOT( slotEdit() ) ); 110 this, SLOT( slotEdit() ) );
111 a->setWhatsThis( QWidget::tr( "Click here to modify the current task." ) ); 111 a->setWhatsThis( QWidget::tr( "Click here to modify the current task." ) );
112 a->addTo( m_tool ); 112 a->addTo( m_tool );
113 a->addTo( m_edit ); 113 a->addTo( m_edit );
114 m_editAction = a; 114 m_editAction = a;
115 115