summaryrefslogtreecommitdiffabout
path: root/kaddressbook/kaddressbookmain.cpp
authorMichael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
committer Michael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
commita08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff)
tree8ee90d686081c52e7c69b5ce946e9b1a7d690001 /kaddressbook/kaddressbookmain.cpp
parent11edc920afe4f274c0964436633aa632c8288a40 (diff)
downloadkdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2
initial public commit of qt4 portp1
Diffstat (limited to 'kaddressbook/kaddressbookmain.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kaddressbookmain.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/kaddressbook/kaddressbookmain.cpp b/kaddressbook/kaddressbookmain.cpp
index c417226..b317974 100644
--- a/kaddressbook/kaddressbookmain.cpp
+++ b/kaddressbook/kaddressbookmain.cpp
@@ -20,45 +20,48 @@
20 with any edition of Qt, and distribute the resulting executable, 20 with any edition of Qt, and distribute the resulting executable,
21 without including the source code for Qt in the source distribution. 21 without including the source code for Qt in the source distribution.
22*/ 22*/
23 23
24#ifdef KAB_EMBEDDED 24#ifdef KAB_EMBEDDED
25#include "kabprefs.h" 25#include "kabprefs.h"
26#include <kglobal.h> 26#include <kglobal.h>
27#include <qmessagebox.h> 27#include <qmessagebox.h>
28#include <qtoolbar.h> 28#include <q3toolbar.h>
29#include <qapplication.h> 29#include <qapplication.h>
30//Added by qt3to4:
31#include <Q3CString>
32#include <QCloseEvent>
30#else //KAB_EMBEDDED 33#else //KAB_EMBEDDED
31#include <kedittoolbar.h> 34#include <kedittoolbar.h>
32#include <kkeydialog.h> 35#include <kkeydialog.h>
33#include <kmessagebox.h> 36#include <kmessagebox.h>
34#include <kstatusbar.h> 37#include <kstatusbar.h>
35#endif //KAB_EMBEDDED 38#endif //KAB_EMBEDDED
36#include <klocale.h> 39#include <klocale.h>
37 40
38#include "kabcore.h" 41#include "kabcore.h"
39#include "kaddressbookmain.h" 42#include "kaddressbookmain.h"
40#include "kactioncollection.h" 43#include "kactioncollection.h"
41 44
42#ifdef KAB_EMBEDDED 45#ifdef KAB_EMBEDDED
43KAddressBookMain::KAddressBookMain() : KMainWindow( 0, "abmain" ) 46KAddressBookMain::KAddressBookMain() : KMainWindow( 0, "abmain" )
44#else //KAB_EMBEDDED 47#else //KAB_EMBEDDED
45//MOC_SKIP_BEGIN 48#ifndef Q_MOC_RUN
46KAddressBookMain::KAddressBookMain() : DCOPObject( "KAddressBookIface" ), KMainWindow( 0 ) 49KAddressBookMain::KAddressBookMain() : DCOPObject( "KAddressBookIface" ), KMainWindow( 0 )
47//MOC_SKIP_END 50#endif
48#endif //KAB_EMBEDDED 51#endif //KAB_EMBEDDED
49{ 52{
50 setIcon(SmallIcon( "ka24" ) ); 53 setIcon(SmallIcon( "ka24" ) );
51#if 0 54#if 0
52 //US for embedded systems, create the toolbar before we initiate KABCore. 55 //US for embedded systems, create the toolbar before we initiate KABCore.
53 // KABCore will fill the toolbar with menues and icons 56 // KABCore will fill the toolbar with menues and icons
54 QMainWindow::ToolBarDock tbd; 57 Qt::ToolBarDock tbd;
55 tbd = Top; 58 tbd = Qt::DockTop;
56 iconToolBar = new QToolBar( this ); 59 iconToolBar = new Q3ToolBar( this );
57 addToolBar (iconToolBar , tbd ); 60 addToolBar (iconToolBar , tbd );
58 iconToolBar->setHorizontalStretchable(true); 61 iconToolBar->setHorizontalStretchable(true);
59//US iconToolBar->setWidth(300); 62//US iconToolBar->setWidth(300);
60#endif // 0 63#endif // 0
61 64
62 mCore = new KABCore( this, true, this ); 65 mCore = new KABCore( this, true, this );
63 66
64#ifdef KAB_EMBEDDED 67#ifdef KAB_EMBEDDED
@@ -80,17 +83,17 @@ KAddressBookMain::KAddressBookMain() : DCOPObject( "KAddressBookIface" ), KMainW
80 83
81 createGUI( "kaddressbookui.rc", false ); 84 createGUI( "kaddressbookui.rc", false );
82 85
83 86
84#endif //KAB_EMBEDDED 87#endif //KAB_EMBEDDED
85 setAutoSaveSettings(); 88 setAutoSaveSettings();
86 mCore->restoreSettings(); 89 mCore->restoreSettings();
87#ifndef DESKTOP_VERSION 90#ifndef DESKTOP_VERSION
88 QObject::connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), mCore, SLOT (receiveStart ( const QCString &, const QByteArray & ))); 91 QObject::connect(qApp, SIGNAL (appMessage ( const Q3CString &, const QByteArray & )), mCore, SLOT (receiveStart ( const Q3CString &, const QByteArray & )));
89#endif 92#endif
90} 93}
91 94
92KAddressBookMain::~KAddressBookMain() 95KAddressBookMain::~KAddressBookMain()
93{ 96{
94 // mCore->saveSettings(); 97 // mCore->saveSettings();
95} 98}
96 99
@@ -230,12 +233,11 @@ void KAddressBookMain::closeEvent( QCloseEvent* ce )
230 save(); 233 save();
231 mCore->saveSettings(); 234 mCore->saveSettings();
232 //KABPrefs::instance()->writeConfig(); 235 //KABPrefs::instance()->writeConfig();
233 } 236 }
234 237
235 ce->accept(); 238 ce->accept();
236} 239}
237 240
238#ifndef KAB_EMBEDDED 241#ifndef KAB_EMBEDDED_
239#include "kaddressbookmain.moc" 242#include "moc_kaddressbookmain.cpp"
240#endif //KAB_EMBEDDED 243#endif //KAB_EMBEDDED
241