Diffstat (limited to 'kaddressbook/kaddressbookmain.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kaddressbook/kaddressbookmain.cpp | 22 |
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 @@ -1,120 +1,123 @@ /* This file is part of KAddressbook. Copyright (c) 1999 Don Sanders <dsanders@kde.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #ifdef KAB_EMBEDDED #include "kabprefs.h" #include <kglobal.h> #include <qmessagebox.h> -#include <qtoolbar.h> +#include <q3toolbar.h> #include <qapplication.h> +//Added by qt3to4: +#include <Q3CString> +#include <QCloseEvent> #else //KAB_EMBEDDED #include <kedittoolbar.h> #include <kkeydialog.h> #include <kmessagebox.h> #include <kstatusbar.h> #endif //KAB_EMBEDDED #include <klocale.h> #include "kabcore.h" #include "kaddressbookmain.h" #include "kactioncollection.h" #ifdef KAB_EMBEDDED KAddressBookMain::KAddressBookMain() : KMainWindow( 0, "abmain" ) #else //KAB_EMBEDDED -//MOC_SKIP_BEGIN +#ifndef Q_MOC_RUN KAddressBookMain::KAddressBookMain() : DCOPObject( "KAddressBookIface" ), KMainWindow( 0 ) -//MOC_SKIP_END +#endif #endif //KAB_EMBEDDED { setIcon(SmallIcon( "ka24" ) ); #if 0 //US for embedded systems, create the toolbar before we initiate KABCore. // KABCore will fill the toolbar with menues and icons - QMainWindow::ToolBarDock tbd; - tbd = Top; - iconToolBar = new QToolBar( this ); + Qt::ToolBarDock tbd; + tbd = Qt::DockTop; + iconToolBar = new Q3ToolBar( this ); addToolBar (iconToolBar , tbd ); iconToolBar->setHorizontalStretchable(true); //US iconToolBar->setWidth(300); #endif // 0 mCore = new KABCore( this, true, this ); #ifdef KAB_EMBEDDED setCaption( i18n( "KAddressbook/Pi" ) ); #else //KAB_EMBEDDED setCaption( i18n( "Address Book Browser" ) ); #endif //KAB_EMBEDDED //mCore->restoreSettings(); initActions(); setCentralWidget( mCore ); //US statusBar()->show(); #ifndef KAB_EMBEDDED setStandardToolBarMenuEnabled(true); createGUI( "kaddressbookui.rc", false ); #endif //KAB_EMBEDDED setAutoSaveSettings(); mCore->restoreSettings(); #ifndef DESKTOP_VERSION - QObject::connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), mCore, SLOT (receiveStart ( const QCString &, const QByteArray & ))); + QObject::connect(qApp, SIGNAL (appMessage ( const Q3CString &, const QByteArray & )), mCore, SLOT (receiveStart ( const Q3CString &, const QByteArray & ))); #endif } KAddressBookMain::~KAddressBookMain() { // mCore->saveSettings(); } void KAddressBookMain::showMinimized () { QWidget::showMinimized () ; } void KAddressBookMain::addEmail( QString addr ) { mCore->addEmail( addr ); } #ifndef KAB_EMBEDDED ASYNC KAddressBookMain::showContactEditor( QString uid ) { mCore->editContact( uid ); } #endif //KAB_EMBEDDED void KAddressBookMain::newContact() { mCore->newContact(); } QString KAddressBookMain::getNameByPhone( QString phone ) { return mCore->getNameByPhone( phone ); } @@ -206,36 +209,35 @@ void KAddressBookMain::closeEvent( QCloseEvent* ce ) QString mess = i18n( "Close KA/Pi?"); if ( mModified == true ) mess += i18n( "\nChanges will be saved!"); else mess += i18n( "\nNo unsaved changes detected!\nNothing will be saved!"); bool mQuit = true; if (mAskForQuit) { int res = QMessageBox::information( this, "KA/Pi", mess , i18n("Yes!"), i18n("No"), 0, 0 ); if (res == 0) mQuit = true; else mQuit = false; } if (mQuit == false) return; if (mModified == true) { save(); mCore->saveSettings(); //KABPrefs::instance()->writeConfig(); } ce->accept(); } -#ifndef KAB_EMBEDDED -#include "kaddressbookmain.moc" +#ifndef KAB_EMBEDDED_ +#include "moc_kaddressbookmain.cpp" #endif //KAB_EMBEDDED - |