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.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/core/pim/todo/mainwindow.cpp b/core/pim/todo/mainwindow.cpp
index 0613f2c..b68aad2 100644
--- a/core/pim/todo/mainwindow.cpp
+++ b/core/pim/todo/mainwindow.cpp
@@ -1,103 +1,97 @@
1/* 1/*
2               =. This file is part of the OPIE Project 2               =. This file is part of the OPIE Project
3             .=l. Copyright (c) 2002 <> 3             .=l. Copyright (c) 2002 <>
4           .>+-= 4           .>+-=
5 _;:,     .>    :=|. This program is free software; you can 5 _;:,     .>    :=|. This program is free software; you can
6.> <`_,   >  .   <= redistribute it and/or modify it under 6.> <`_,   >  .   <= redistribute it and/or modify it under
7:`=1 )Y*s>-.--   : the terms of the GNU General Public 7:`=1 )Y*s>-.--   : the terms of the GNU General Public
8.="- .-=="i,     .._ License as published by the Free Software 8.="- .-=="i,     .._ License as published by the Free Software
9 - .   .-<_>     .<> Foundation; either version 2 of the License, 9 - .   .-<_>     .<> Foundation; either version 2 of the License,
10     ._= =}       : or (at your option) any later version. 10     ._= =}       : or (at your option) any later version.
11    .%`+i>       _;_. 11    .%`+i>       _;_.
12    .i_,=:_.      -<s. This program is distributed in the hope that 12    .i_,=:_.      -<s. This program is distributed in the hope that
13     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 13     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
14    : ..    .:,     . . . without even the implied warranty of 14    : ..    .:,     . . . without even the implied warranty of
15    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 15    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
16  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU 16  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
17..}^=.=       =       ; Library General Public License for more 17..}^=.=       =       ; Library General Public License for more
18++=   -.     .`     .: details. 18++=   -.     .`     .: details.
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/timestring.h>
43#include <qpe/qpeapplication.h> 42#include <qpe/qpeapplication.h>
44 43
45#include <qmenubar.h> 44#include <qmenubar.h>
46#include <qmessagebox.h> 45#include <qmessagebox.h>
47#include <qtoolbar.h>
48#include <qpopupmenu.h>
49#include <qpushbutton.h> 46#include <qpushbutton.h>
50#include <qwidgetstack.h>
51#include <qaction.h> 47#include <qaction.h>
52#include <qtimer.h> 48#include <qtimer.h>
53#include <qvbox.h>
54#include <qlayout.h> 49#include <qlayout.h>
55#include <qlineedit.h>
56#include <qwhatsthis.h> 50#include <qwhatsthis.h>
57 51
58#include "quickeditimpl.h" 52#include "quickeditimpl.h"
59#include "todotemplatemanager.h" 53#include "todotemplatemanager.h"
60#include "templateeditor.h" 54#include "templateeditor.h"
61#include "tableview.h" 55#include "tableview.h"
62 56
63#include "textviewshow.h" 57#include "textviewshow.h"
64#include "todoeditor.h" 58#include "todoeditor.h"
65#include "mainwindow.h" 59#include "mainwindow.h"
66 60
67OPIE_EXPORT_APP( OApplicationFactory<Todo::MainWindow> ) 61OPIE_EXPORT_APP( OApplicationFactory<Todo::MainWindow> )
68 62
69using namespace Todo; 63using namespace Todo;
70 64
71MainWindow::MainWindow( QWidget* parent, 65MainWindow::MainWindow( QWidget* parent,
72 const char* name, WFlags ) 66 const char* name, WFlags )
73 : OPimMainWindow( "Todolist", parent, name, WType_TopLevel | WStyle_ContextHelp ) 67 : OPimMainWindow( "Todolist", parent, name, WType_TopLevel | WStyle_ContextHelp )
74{ 68{
75 if (!name) 69 if (!name)
76 setName("todo window"); 70 setName("todo window");
77 71
78 m_syncing = false; 72 m_syncing = false;
79 m_showing = false; 73 m_showing = false;
80 m_counter = 0; 74 m_counter = 0;
81 m_tempManager = new TemplateManager(); 75 m_tempManager = new TemplateManager();
82 m_tempManager->load(); 76 m_tempManager->load();
83 77
84 initUI(); 78 initUI();
85 initConfig(); 79 initConfig();
86 initViews(); 80 initViews();
87 initActions(); 81 initActions();
88 initEditor(); 82 initEditor();
89 initShow(); 83 initShow();
90 initTemplate(); 84 initTemplate();
91 85
92 populateTemplates(); 86 populateTemplates();
93 raiseCurrentView(); 87 raiseCurrentView();
94 QTimer::singleShot(0, this, SLOT(populateCategories() ) ); 88 QTimer::singleShot(0, this, SLOT(populateCategories() ) );
95} 89}
96void MainWindow::initTemplate() { 90void MainWindow::initTemplate() {
97 m_curTempEd = new TemplateEditor( this, templateManager() ); 91 m_curTempEd = new TemplateEditor( this, templateManager() );
98} 92}
99void MainWindow::initActions() { 93void MainWindow::initActions() {
100 94
101 // Data menu 95 // Data menu
102 m_edit->insertItem(QWidget::tr("New from template"), m_template, 96 m_edit->insertItem(QWidget::tr("New from template"), m_template,
103 -1, 0 ); 97 -1, 0 );