diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /kaddressbook/extensionmanager.cpp | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kaddressbook/extensionmanager.cpp')
-rw-r--r-- | kaddressbook/extensionmanager.cpp | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/kaddressbook/extensionmanager.cpp b/kaddressbook/extensionmanager.cpp index 121c6a1c7..93da52d0e 100644 --- a/kaddressbook/extensionmanager.cpp +++ b/kaddressbook/extensionmanager.cpp @@ -27,12 +27,12 @@ #include <klocale.h> #include <ktrader.h> -#include <qlayout.h> -#include <qobjectlist.h> -#include <qsignalmapper.h> -#include <qsplitter.h> -#include <qtimer.h> -#include <qwidgetstack.h> +#include <tqlayout.h> +#include <tqobjectlist.h> +#include <tqsignalmapper.h> +#include <tqsplitter.h> +#include <tqtimer.h> +#include <tqwidgetstack.h> #include "addresseeeditorextension.h" #include "core.h" @@ -44,15 +44,15 @@ ExtensionData::ExtensionData() : action( 0 ), widget( 0 ), weight( 0 ), isDetail { } -ExtensionManager::ExtensionManager( QWidget* extensionBar, QWidgetStack* detailsStack, KAB::Core *core, QObject *parent, +ExtensionManager::ExtensionManager( TQWidget* extensionBar, TQWidgetStack* detailsStack, KAB::Core *core, TQObject *parent, const char *name ) - : QObject( parent, name ), mExtensionBar( extensionBar ), mCore( core ), + : TQObject( parent, name ), mExtensionBar( extensionBar ), mCore( core ), mMapper( 0 ), mDetailsStack( detailsStack ), mActiveDetailsWidget( 0 ) { Q_ASSERT( mExtensionBar ); - QVBoxLayout* layout = new QVBoxLayout( mExtensionBar ); - mSplitter = new QSplitter( mExtensionBar ); - mSplitter->setOrientation( QSplitter::Vertical ); + TQVBoxLayout* layout = new TQVBoxLayout( mExtensionBar ); + mSplitter = new TQSplitter( mExtensionBar ); + mSplitter->setOrientation( TQSplitter::Vertical ); layout->addWidget( mSplitter ); createExtensionWidgets(); @@ -60,7 +60,7 @@ ExtensionManager::ExtensionManager( QWidget* extensionBar, QWidgetStack* details mActionCollection = new KActionCollection( this, "ActionCollection" ); extensionBar->setShown( false ); - QTimer::singleShot( 0, this, SLOT( createActions() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( createActions() ) ); } ExtensionManager::~ExtensionManager() @@ -70,9 +70,9 @@ ExtensionManager::~ExtensionManager() void ExtensionManager::restoreSettings() { - const QStringList activeExtensions = KABPrefs::instance()->activeExtensions(); + const TQStringList activeExtensions = KABPrefs::instance()->activeExtensions(); - typedef QMap<QString, ExtensionData>::ConstIterator ConstIterator; + typedef TQMap<TQString, ExtensionData>::ConstIterator ConstIterator; for ( ConstIterator it = mExtensionMap.begin(), end = mExtensionMap.end(); it != end; ++it ) { if ( activeExtensions.contains( it.data().identifier ) ) { KToggleAction *action = static_cast<KToggleAction*>( it.data().action ); @@ -81,7 +81,7 @@ void ExtensionManager::restoreSettings() setExtensionActive( it.data().identifier, true ); } } - const QValueList<int> sizes = KABPrefs::instance()->extensionsSplitterSizes(); + const TQValueList<int> sizes = KABPrefs::instance()->extensionsSplitterSizes(); mSplitter->setSizes( sizes ); } @@ -107,13 +107,13 @@ bool ExtensionManager::isQuickEditVisible() const void ExtensionManager::setSelectionChanged() { - for ( QStringList::ConstIterator it = mActiveExtensions.begin(), end = mActiveExtensions.end(); it != end; ++it ) { + for ( TQStringList::ConstIterator it = mActiveExtensions.begin(), end = mActiveExtensions.end(); it != end; ++it ) { if ( mExtensionMap.contains( *it ) && mExtensionMap[*it].widget ) mExtensionMap[*it].widget->contactsSelectionChanged(); } } -void ExtensionManager::activationToggled( const QString &extid ) +void ExtensionManager::activationToggled( const TQString &extid ) { if ( !mExtensionMap.contains( extid ) ) return; @@ -122,7 +122,7 @@ void ExtensionManager::activationToggled( const QString &extid ) setExtensionActive( extid, activated ); } -void ExtensionManager::setExtensionActive( const QString& extid, bool active ) +void ExtensionManager::setExtensionActive( const TQString& extid, bool active ) { if ( !mExtensionMap.contains( extid ) ) return; @@ -161,16 +161,16 @@ void ExtensionManager::createActions() mActionList.setAutoDelete( false ); delete mMapper; - mMapper = new QSignalMapper( this, "SignalMapper" ); - connect( mMapper, SIGNAL( mapped( const QString& ) ), - this, SLOT( activationToggled( const QString& ) ) ); + mMapper = new TQSignalMapper( this, "SignalMapper" ); + connect( mMapper, TQT_SIGNAL( mapped( const TQString& ) ), + this, TQT_SLOT( activationToggled( const TQString& ) ) ); ExtensionData::List::ConstIterator it; - for ( QMap<QString, ExtensionData>::Iterator it = mExtensionMap.begin(), end = mExtensionMap.end(); it != end; ++it ) { + for ( TQMap<TQString, ExtensionData>::Iterator it = mExtensionMap.begin(), end = mExtensionMap.end(); it != end; ++it ) { ExtensionData& data = it.data(); - data.action = new KToggleAction( data.title, 0, mMapper, SLOT( map() ), + data.action = new KToggleAction( data.title, 0, mMapper, TQT_SLOT( map() ), mActionCollection, - QString( data.identifier + "_extension" ).latin1() ); + TQString( data.identifier + "_extension" ).latin1() ); mMapper->setMapping( data.action, data.identifier ); mActionList.append( data.action ); @@ -182,7 +182,7 @@ void ExtensionManager::createActions() mCore->guiClient()->plugActionList( "extensions_list", mActionList ); } -QWidget* ExtensionManager::activeDetailsWidget() const +TQWidget* ExtensionManager::activeDetailsWidget() const { return mActiveDetailsWidget; } @@ -190,7 +190,7 @@ QWidget* ExtensionManager::activeDetailsWidget() const void ExtensionManager::createExtensionWidgets() { // clean up - for ( QMap<QString, ExtensionData>::ConstIterator it = mExtensionMap.begin(), end = mExtensionMap.end(); it != end; ++it ) { + for ( TQMap<TQString, ExtensionData>::ConstIterator it = mExtensionMap.begin(), end = mExtensionMap.end(); it != end; ++it ) { delete it.data().widget; } mExtensionMap.clear(); @@ -202,10 +202,10 @@ void ExtensionManager::createExtensionWidgets() wdg = new AddresseeEditorExtension( mCore, mDetailsStack ); wdg->hide(); - connect( wdg, SIGNAL( modified( const KABC::Addressee::List& ) ), - SIGNAL( modified( const KABC::Addressee::List& ) ) ); - connect( wdg, SIGNAL( deleted( const QStringList& ) ), - SIGNAL( deleted( const QStringList& ) ) ); + connect( wdg, TQT_SIGNAL( modified( const KABC::Addressee::List& ) ), + TQT_SIGNAL( modified( const KABC::Addressee::List& ) ) ); + connect( wdg, TQT_SIGNAL( deleted( const TQStringList& ) ), + TQT_SIGNAL( deleted( const TQStringList& ) ) ); ExtensionData data; data.identifier = wdg->identifier(); @@ -217,7 +217,7 @@ void ExtensionManager::createExtensionWidgets() // load the other extensions const KTrader::OfferList plugins = KTrader::self()->query( "KAddressBook/Extension", - QString( "[X-KDE-KAddressBook-ExtensionPluginVersion] == %1" ).arg( KAB_EXTENSIONWIDGET_PLUGIN_VERSION ) ); + TQString( "[X-KDE-KAddressBook-ExtensionPluginVersion] == %1" ).arg( KAB_EXTENSIONWIDGET_PLUGIN_VERSION ) ); KTrader::OfferList::ConstIterator it; for ( it = plugins.begin(); it != plugins.end(); ++it ) { @@ -239,10 +239,10 @@ void ExtensionManager::createExtensionWidgets() if ( wdg->identifier() == "distribution_list_editor_ng" ) mSplitter->moveToFirst( wdg ); wdg->hide(); - connect( wdg, SIGNAL( modified( const KABC::Addressee::List& ) ), - SIGNAL( modified( const KABC::Addressee::List& ) ) ); - connect( wdg, SIGNAL( deleted( const QStringList& ) ), - SIGNAL( deleted( const QStringList& ) ) ); + connect( wdg, TQT_SIGNAL( modified( const KABC::Addressee::List& ) ), + TQT_SIGNAL( modified( const KABC::Addressee::List& ) ) ); + connect( wdg, TQT_SIGNAL( deleted( const TQStringList& ) ), + TQT_SIGNAL( deleted( const TQStringList& ) ) ); ExtensionData data; data.identifier = wdg->identifier(); |