From 6cc5f72b33f1d281de3e1bf809b1b5e77d5c96cf Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 1 Feb 2013 17:25:43 -0600 Subject: Fix FTBFS --- kaddressbook/kaddressbookmain.cpp | 192 ------------------------------------ kaddressbook/kaddressbookmain.h | 104 ------------------- kaddressbook/kaddressbootdemain.cpp | 192 ++++++++++++++++++++++++++++++++++++ kaddressbook/kaddressbootdemain.h | 104 +++++++++++++++++++ 4 files changed, 296 insertions(+), 296 deletions(-) delete mode 100644 kaddressbook/kaddressbookmain.cpp delete mode 100644 kaddressbook/kaddressbookmain.h create mode 100644 kaddressbook/kaddressbootdemain.cpp create mode 100644 kaddressbook/kaddressbootdemain.h (limited to 'kaddressbook') diff --git a/kaddressbook/kaddressbookmain.cpp b/kaddressbook/kaddressbookmain.cpp deleted file mode 100644 index 4e5cf8ff..00000000 --- a/kaddressbook/kaddressbookmain.cpp +++ /dev/null @@ -1,192 +0,0 @@ -/* - This file is part of KAddressbook. - Copyright (c) 1999 Don Sanders - - 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - As a special exception, permission is given to link this program - with any edition of TQt, and distribute the resulting executable, - without including the source code for TQt in the source distribution. -*/ - -#include -#include -#include -#include -#include - -#include -#include - -#include "kabcore.h" - -#include "kaddressbookmain.h" - -KAddressBookMain::KAddressBookMain( const TQString &file ) - : DCOPObject( "KAddressBookIface" ), TDEMainWindow( 0 ) -{ - // Set this to be the group leader for all subdialogs - this means - // modal subdialogs will only affect this dialog, not the other windows - setWFlags( getWFlags() | WGroupLeader ); - - setCaption( i18n( "Address Book Browser" ) ); - - mCore = new KABCore( this, true, this, file ); - mCore->restoreSettings(); - - initActions(); - - setCentralWidget( mCore->widget() ); - - statusBar()->show(); - statusBar()->insertItem( "", 1 ); - - KPIM::ProgressDialog *progressDialog = new KPIM::ProgressDialog( statusBar(), - this ); - progressDialog->hide(); - - KPIM::StatusbarProgressWidget *progressWidget; - progressWidget = new KPIM::StatusbarProgressWidget( progressDialog, - statusBar() ); - progressWidget->show(); - - statusBar()->addWidget( progressWidget, 0, true ); - - mCore->setStatusBar( statusBar() ); - - setStandardToolBarMenuEnabled( true ); - - createGUI( "kaddressbookui.rc", false ); - - resize( 400, 300 ); // initial size - setAutoSaveSettings(); -} - -KAddressBookMain::~KAddressBookMain() -{ - mCore->saveSettings(); -} - -void KAddressBookMain::addEmail( TQString addr ) -{ - mCore->addEmail( addr ); -} - -void KAddressBookMain::importVCard( const KURL& url ) -{ - mCore->importVCard( url ); -} - -void KAddressBookMain::importVCardFromData( const TQString& vCard ) -{ - mCore->importVCardFromData( vCard ); -} - -ASYNC KAddressBookMain::showContactEditor( TQString uid ) -{ - mCore->editContact( uid ); -} - -void KAddressBookMain::newDistributionList() -{ - mCore->newDistributionList(); -} - -void KAddressBookMain::newContact() -{ - mCore->newContact(); -} - -TQString KAddressBookMain::getNameByPhone( TQString phone ) -{ - return mCore->getNameByPhone( phone ); -} - -void KAddressBookMain::save() -{ - mCore->save(); -} - -void KAddressBookMain::exit() -{ - close(); -} - -bool KAddressBookMain::handleCommandLine() -{ - return mCore->handleCommandLine( this ); -} - -void KAddressBookMain::syncAllResources() -{ - mCore->save(); - mCore->load(); -} - -void KAddressBookMain::saveProperties( TDEConfig* ) -{ -} - -void KAddressBookMain::readProperties( TDEConfig* ) -{ -} - -bool KAddressBookMain::queryClose() -{ - return mCore->queryClose(); -} - -void KAddressBookMain::initActions() -{ - KStdAction::quit( TQT_TQOBJECT(this), TQT_SLOT( close() ), actionCollection() ); - - TDEAction *action; - action = KStdAction::keyBindings( TQT_TQOBJECT(this), TQT_SLOT( configureKeyBindings() ), actionCollection() ); - action->setWhatsThis( i18n( "You will be presented with a dialog, where you can configure the application wide shortcuts." ) ); - - KStdAction::configureToolbars( TQT_TQOBJECT(this), TQT_SLOT( configureToolbars() ), actionCollection() ); -} - -void KAddressBookMain::configureKeyBindings() -{ - KKeyDialog::configure( actionCollection(), this ); -} - -void KAddressBookMain::loadProfile( const TQString& ) -{ -} - -void KAddressBookMain::saveToProfile( const TQString& ) const -{ -} - -void KAddressBookMain::configureToolbars() -{ - saveMainWindowSettings( TDEGlobal::config(), "MainWindow" ); - - KEditToolbar edit( factory() ); - connect( &edit, TQT_SIGNAL( newToolbarConfig() ), - this, TQT_SLOT( newToolbarConfig() ) ); - - edit.exec(); -} - -void KAddressBookMain::newToolbarConfig() -{ - createGUI( "kaddressbookui.rc", false ); - applyMainWindowSettings( TDEGlobal::config(), "MainWindow" ); -} - -#include "kaddressbookmain.moc" diff --git a/kaddressbook/kaddressbookmain.h b/kaddressbook/kaddressbookmain.h deleted file mode 100644 index a8ac77e2..00000000 --- a/kaddressbook/kaddressbookmain.h +++ /dev/null @@ -1,104 +0,0 @@ -/* - This file is part of KAddressbook. - Copyright (c) 1999 Don Sanders - - 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - As a special exception, permission is given to link this program - with any edition of TQt, and distribute the resulting executable, - without including the source code for TQt in the source distribution. -*/ - -#ifndef KADDRESSBOOKMAIN_H -#define KADDRESSBOOKMAIN_H - -#include - -#include -#include -#include - -#include "kaddressbookiface.h" - -class KABCore; - -/** - This class serves as the main window for KAddressBook. It handles the - menus, toolbars, and status bars. - - @short Main window class - @author Don Sanders - @version 0.1 - */ -class KAddressBookMain : public TDEMainWindow, virtual public KAddressBookIface -{ - Q_OBJECT - - - public: - KAddressBookMain( const TQString &file = TQString() ); - virtual ~KAddressBookMain(); - - public slots: - virtual void addEmail( TQString addr ); - virtual void importVCard( const KURL& url ); - virtual void importVCardFromData( const TQString& vCard ); -#ifndef Q_MOC_RUN - virtual ASYNC showContactEditor( TQString uid ); -#else // QT_MOC_RUN - virtual void showContactEditor( TQString uid ); -#endif // QT_MOC_RUN - virtual void newContact(); - virtual void newDistributionList(); - virtual TQString getNameByPhone( TQString phone ); - virtual void save(); - virtual void exit(); - virtual bool handleCommandLine(); - virtual void syncAllResources(); - - protected: - void initActions(); - - /** - This function is called when it is time for the app to save its - properties for session management purposes. - */ - void saveProperties( TDEConfig* ); - - /** - This function is called when this app is restored. The TDEConfig - object points to the session management config file that was saved - with @ref saveProperties - */ - void readProperties( TDEConfig* ); - - virtual bool queryClose(); - - //override - void loadProfile( const TQString& path ); - - //override - void saveToProfile( const TQString& path ) const; - - private slots: - void configureKeyBindings(); - void configureToolbars(); - void newToolbarConfig(); - - private: - KABCore *mCore; -}; - -#endif diff --git a/kaddressbook/kaddressbootdemain.cpp b/kaddressbook/kaddressbootdemain.cpp new file mode 100644 index 00000000..4e5cf8ff --- /dev/null +++ b/kaddressbook/kaddressbootdemain.cpp @@ -0,0 +1,192 @@ +/* + This file is part of KAddressbook. + Copyright (c) 1999 Don Sanders + + 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + As a special exception, permission is given to link this program + with any edition of TQt, and distribute the resulting executable, + without including the source code for TQt in the source distribution. +*/ + +#include +#include +#include +#include +#include + +#include +#include + +#include "kabcore.h" + +#include "kaddressbookmain.h" + +KAddressBookMain::KAddressBookMain( const TQString &file ) + : DCOPObject( "KAddressBookIface" ), TDEMainWindow( 0 ) +{ + // Set this to be the group leader for all subdialogs - this means + // modal subdialogs will only affect this dialog, not the other windows + setWFlags( getWFlags() | WGroupLeader ); + + setCaption( i18n( "Address Book Browser" ) ); + + mCore = new KABCore( this, true, this, file ); + mCore->restoreSettings(); + + initActions(); + + setCentralWidget( mCore->widget() ); + + statusBar()->show(); + statusBar()->insertItem( "", 1 ); + + KPIM::ProgressDialog *progressDialog = new KPIM::ProgressDialog( statusBar(), + this ); + progressDialog->hide(); + + KPIM::StatusbarProgressWidget *progressWidget; + progressWidget = new KPIM::StatusbarProgressWidget( progressDialog, + statusBar() ); + progressWidget->show(); + + statusBar()->addWidget( progressWidget, 0, true ); + + mCore->setStatusBar( statusBar() ); + + setStandardToolBarMenuEnabled( true ); + + createGUI( "kaddressbookui.rc", false ); + + resize( 400, 300 ); // initial size + setAutoSaveSettings(); +} + +KAddressBookMain::~KAddressBookMain() +{ + mCore->saveSettings(); +} + +void KAddressBookMain::addEmail( TQString addr ) +{ + mCore->addEmail( addr ); +} + +void KAddressBookMain::importVCard( const KURL& url ) +{ + mCore->importVCard( url ); +} + +void KAddressBookMain::importVCardFromData( const TQString& vCard ) +{ + mCore->importVCardFromData( vCard ); +} + +ASYNC KAddressBookMain::showContactEditor( TQString uid ) +{ + mCore->editContact( uid ); +} + +void KAddressBookMain::newDistributionList() +{ + mCore->newDistributionList(); +} + +void KAddressBookMain::newContact() +{ + mCore->newContact(); +} + +TQString KAddressBookMain::getNameByPhone( TQString phone ) +{ + return mCore->getNameByPhone( phone ); +} + +void KAddressBookMain::save() +{ + mCore->save(); +} + +void KAddressBookMain::exit() +{ + close(); +} + +bool KAddressBookMain::handleCommandLine() +{ + return mCore->handleCommandLine( this ); +} + +void KAddressBookMain::syncAllResources() +{ + mCore->save(); + mCore->load(); +} + +void KAddressBookMain::saveProperties( TDEConfig* ) +{ +} + +void KAddressBookMain::readProperties( TDEConfig* ) +{ +} + +bool KAddressBookMain::queryClose() +{ + return mCore->queryClose(); +} + +void KAddressBookMain::initActions() +{ + KStdAction::quit( TQT_TQOBJECT(this), TQT_SLOT( close() ), actionCollection() ); + + TDEAction *action; + action = KStdAction::keyBindings( TQT_TQOBJECT(this), TQT_SLOT( configureKeyBindings() ), actionCollection() ); + action->setWhatsThis( i18n( "You will be presented with a dialog, where you can configure the application wide shortcuts." ) ); + + KStdAction::configureToolbars( TQT_TQOBJECT(this), TQT_SLOT( configureToolbars() ), actionCollection() ); +} + +void KAddressBookMain::configureKeyBindings() +{ + KKeyDialog::configure( actionCollection(), this ); +} + +void KAddressBookMain::loadProfile( const TQString& ) +{ +} + +void KAddressBookMain::saveToProfile( const TQString& ) const +{ +} + +void KAddressBookMain::configureToolbars() +{ + saveMainWindowSettings( TDEGlobal::config(), "MainWindow" ); + + KEditToolbar edit( factory() ); + connect( &edit, TQT_SIGNAL( newToolbarConfig() ), + this, TQT_SLOT( newToolbarConfig() ) ); + + edit.exec(); +} + +void KAddressBookMain::newToolbarConfig() +{ + createGUI( "kaddressbookui.rc", false ); + applyMainWindowSettings( TDEGlobal::config(), "MainWindow" ); +} + +#include "kaddressbookmain.moc" diff --git a/kaddressbook/kaddressbootdemain.h b/kaddressbook/kaddressbootdemain.h new file mode 100644 index 00000000..a8ac77e2 --- /dev/null +++ b/kaddressbook/kaddressbootdemain.h @@ -0,0 +1,104 @@ +/* + This file is part of KAddressbook. + Copyright (c) 1999 Don Sanders + + 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + As a special exception, permission is given to link this program + with any edition of TQt, and distribute the resulting executable, + without including the source code for TQt in the source distribution. +*/ + +#ifndef KADDRESSBOOKMAIN_H +#define KADDRESSBOOKMAIN_H + +#include + +#include +#include +#include + +#include "kaddressbookiface.h" + +class KABCore; + +/** + This class serves as the main window for KAddressBook. It handles the + menus, toolbars, and status bars. + + @short Main window class + @author Don Sanders + @version 0.1 + */ +class KAddressBookMain : public TDEMainWindow, virtual public KAddressBookIface +{ + Q_OBJECT + + + public: + KAddressBookMain( const TQString &file = TQString() ); + virtual ~KAddressBookMain(); + + public slots: + virtual void addEmail( TQString addr ); + virtual void importVCard( const KURL& url ); + virtual void importVCardFromData( const TQString& vCard ); +#ifndef Q_MOC_RUN + virtual ASYNC showContactEditor( TQString uid ); +#else // QT_MOC_RUN + virtual void showContactEditor( TQString uid ); +#endif // QT_MOC_RUN + virtual void newContact(); + virtual void newDistributionList(); + virtual TQString getNameByPhone( TQString phone ); + virtual void save(); + virtual void exit(); + virtual bool handleCommandLine(); + virtual void syncAllResources(); + + protected: + void initActions(); + + /** + This function is called when it is time for the app to save its + properties for session management purposes. + */ + void saveProperties( TDEConfig* ); + + /** + This function is called when this app is restored. The TDEConfig + object points to the session management config file that was saved + with @ref saveProperties + */ + void readProperties( TDEConfig* ); + + virtual bool queryClose(); + + //override + void loadProfile( const TQString& path ); + + //override + void saveToProfile( const TQString& path ) const; + + private slots: + void configureKeyBindings(); + void configureToolbars(); + void newToolbarConfig(); + + private: + KABCore *mCore; +}; + +#endif -- cgit v1.2.3