summaryrefslogtreecommitdiff
path: root/core/pim/datebook2/mainwindow.cpp
Unidiff
Diffstat (limited to 'core/pim/datebook2/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/pim/datebook2/mainwindow.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/pim/datebook2/mainwindow.cpp b/core/pim/datebook2/mainwindow.cpp
index 7ff2204..3937796 100644
--- a/core/pim/datebook2/mainwindow.cpp
+++ b/core/pim/datebook2/mainwindow.cpp
@@ -13,54 +13,54 @@
13#include <qpe/qpemessagebox.h> 13#include <qpe/qpemessagebox.h>
14#include <qpe/resource.h> 14#include <qpe/resource.h>
15 15
16#include "editor.h" 16#include "editor.h"
17#include "show.h" 17#include "show.h"
18#include "templatemanager.h" 18#include "templatemanager.h"
19#include "bookmanager.h" 19#include "bookmanager.h"
20#include "mainwindow.h" 20#include "mainwindow.h"
21 21
22 22
23using namespace Datebook; 23using namespace Datebook;
24 24
25MainWindow::MainWindow() 25MainWindow::MainWindow()
26 : OPimMainWindow( "Datebook", 0, 0 ), m_descMan( "Descriptions" ), m_locMan( "Locations" ) 26 : OPimMainWindow( "Datebook", 0, 0 ), m_descMan( "Descriptions" ), m_locMan( "Locations" )
27{ 27{
28 setIcon( Resource::loadPixmap( "datebook_icon" ) ); 28 setIcon( Resource::loadPixmap( "datebook_icon" ) );
29 initUI(); 29 initUI();
30 initManagers(); 30 initManagers();
31 initView(); 31 initView();
32 initConfig(); 32 initConfig();
33 33
34 QTimer::singleShot(0, this, SLOT(populate() ) ); 34 QTimer::singleShot(0, this, SLOT(populate() ) );
35 35
36 QCopChannel* chan = new QCopChannel( "QPE/System", this ); 36 QCopChannel* chan = new QCopChannel( "QPE/System", this );
37 connect( chan, SIGNAL( received(const QCString&, const QByteArray& ) ), 37 connect( chan, SIGNAL( received(const QCString&,const QByteArray&) ),
38 this, SLOT( slotReceive( const QCString&, const QByteArray& ) ) ); 38 this, SLOT( slotReceive(const QCString&,const QByteArray&) ) );
39 39
40 chan = new QCopChannel( "QPE/Datebook", this ); 40 chan = new QCopChannel( "QPE/Datebook", this );
41 connect( chan, SIGNAL( received(const QCString&, const QByteArray& ) ), 41 connect( chan, SIGNAL( received(const QCString&,const QByteArray&) ),
42 this, SLOT( slotReceive( const QCString&, const QByteArray& ) ) ); 42 this, SLOT( slotReceive(const QCString&,const QByteArray&) ) );
43} 43}
44MainWindow::~MainWindow() { 44MainWindow::~MainWindow() {
45 m_tempMan.save(); 45 m_tempMan.save();
46 m_locMan.save(); 46 m_locMan.save();
47 m_descMan.save(); 47 m_descMan.save();
48 48
49 manager()->save(); 49 manager()->save();
50 delete m_manager; 50 delete m_manager;
51} 51}
52void MainWindow::doSetDocument( const QString& str ) { 52void MainWindow::doSetDocument( const QString& str ) {
53 53
54} 54}
55void MainWindow::flush() { 55void MainWindow::flush() {
56 manager()->save(); 56 manager()->save();
57} 57}
58void MainWindow::reload() { 58void MainWindow::reload() {
59 manager()->reload(); 59 manager()->reload();
60} 60}
61int MainWindow::create() { 61int MainWindow::create() {
62 return 0; 62 return 0;
63} 63}
64bool MainWindow::remove( int uid ) { 64bool MainWindow::remove( int uid ) {
65 manager()->remove( uid ); 65 manager()->remove( uid );
66 return true; 66 return true;
@@ -129,50 +129,50 @@ void MainWindow::initUI() {
129 a->addTo( m_toolBar ); 129 a->addTo( m_toolBar );
130 connect(a, SIGNAL( activated() ), this, SLOT( slotFind() ) ); 130 connect(a, SIGNAL( activated() ), this, SLOT( slotFind() ) );
131 131
132 a = new QAction( tr("Configure"), QString::null, 0, 0 ); 132 a = new QAction( tr("Configure"), QString::null, 0, 0 );
133 a->addTo( m_popSetting ); 133 a->addTo( m_popSetting );
134 connect(a, SIGNAL( activated() ), this, SLOT( slotConfigure() ) ); 134 connect(a, SIGNAL( activated() ), this, SLOT( slotConfigure() ) );
135 135
136 a = new QAction( tr("Configure Locations"), QString::null, 0, 0 ); 136 a = new QAction( tr("Configure Locations"), QString::null, 0, 0 );
137 a->addTo( m_popSetting ); 137 a->addTo( m_popSetting );
138 connect(a, SIGNAL( activated() ), this, SLOT( slotConfigureLocs() ) ); 138 connect(a, SIGNAL( activated() ), this, SLOT( slotConfigureLocs() ) );
139 139
140 a = new QAction( tr("Configure Descriptions"), QString::null, 0, 0 ); 140 a = new QAction( tr("Configure Descriptions"), QString::null, 0, 0 );
141 a->addTo( m_popSetting ); 141 a->addTo( m_popSetting );
142 connect(a, SIGNAL( activated() ), this, SLOT(slotConfigureDesc() ) ); 142 connect(a, SIGNAL( activated() ), this, SLOT(slotConfigureDesc() ) );
143 143
144 a = new QAction( tr("Configure Templates"), QString::null, 0, 0 ); 144 a = new QAction( tr("Configure Templates"), QString::null, 0, 0 );
145 a->addTo( m_popSetting ); 145 a->addTo( m_popSetting );
146 connect(a, SIGNAL( activated() ), this, SLOT(slotConfigureTemp() ) ); 146 connect(a, SIGNAL( activated() ), this, SLOT(slotConfigureTemp() ) );
147 147
148 connect( qApp, SIGNAL(clockChanged(bool) ), 148 connect( qApp, SIGNAL(clockChanged(bool) ),
149 this, SLOT(slotClockChanged(bool) ) ); 149 this, SLOT(slotClockChanged(bool) ) );
150 connect( qApp, SIGNAL(weekChanged(bool) ), 150 connect( qApp, SIGNAL(weekChanged(bool) ),
151 this, SLOT(slotWeekChanged(bool) ) ); 151 this, SLOT(slotWeekChanged(bool) ) );
152 152
153 connect( qApp, SIGNAL(appMessage(const QCString&, const QByteArray& ) ), 153 connect( qApp, SIGNAL(appMessage(const QCString&,const QByteArray&) ),
154 this, SLOT(slotAppMessage( const QCString&, const QByteArray& ) ) ); 154 this, SLOT(slotAppMessage(const QCString&,const QByteArray&) ) );
155} 155}
156void MainWindow::initConfig() { 156void MainWindow::initConfig() {
157 157
158} 158}
159void MainWindow::initView() { 159void MainWindow::initView() {
160 160
161} 161}
162void MainWindow::initManagers() { 162void MainWindow::initManagers() {
163 m_manager = new BookManager; 163 m_manager = new BookManager;
164 164
165 m_tempMan.load(); 165 m_tempMan.load();
166 m_locMan.load(); 166 m_locMan.load();
167 m_descMan.load(); 167 m_descMan.load();
168 168
169 setTemplateMenu(); 169 setTemplateMenu();
170} 170}
171void MainWindow::raiseCurrentView() { 171void MainWindow::raiseCurrentView() {
172 172
173} 173}
174/* 174/*
175 * populate the view 175 * populate the view
176 */ 176 */
177void MainWindow::populate() { 177void MainWindow::populate() {
178 if (!manager()->isLoaded() ) 178 if (!manager()->isLoaded() )