From dc6b8e72fed2586239e3514819238c520636c9d9 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:54:04 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1157656 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- quanta/plugins/quantaplugininterface.cpp | 58 ++++++++++++++++---------------- 1 file changed, 29 insertions(+), 29 deletions(-) (limited to 'quanta/plugins/quantaplugininterface.cpp') diff --git a/quanta/plugins/quantaplugininterface.cpp b/quanta/plugins/quantaplugininterface.cpp index 45fb8caa..098c7828 100644 --- a/quanta/plugins/quantaplugininterface.cpp +++ b/quanta/plugins/quantaplugininterface.cpp @@ -25,10 +25,10 @@ #include /* QT INCLUDES */ -#include -#include -#include -#include +#include +#include +#include +#include /* OTHER INCLUDES */ #include "quantaplugininterface.h" @@ -38,11 +38,11 @@ #include "resource.h" #include "quantacommon.h" -QuantaPluginInterface::QuantaPluginInterface(QWidget *parent) +QuantaPluginInterface::QuantaPluginInterface(TQWidget *parent) { m_parent = parent; (void) new KAction( i18n( "Configure &Plugins..." ), 0, 0, - this, SLOT( slotPluginsEdit() ), + this, TQT_SLOT( slotPluginsEdit() ), ((KMainWindow*)parent)->actionCollection(), "configure_plugins" ); m_pluginMenu = 0L; // m_plugins.setAutoDelete(true); @@ -54,33 +54,33 @@ QuantaPluginInterface::~QuantaPluginInterface() // TODO : free plugins } -void QuantaPluginInterface::readConfigFile(const QString& configFile) +void QuantaPluginInterface::readConfigFile(const TQString& configFile) { KConfig *config = new KConfig(configFile); config->setGroup("General"); - QStringList pList = config->readListEntry("Plugins"); - for(QStringList::Iterator it = pList.begin();it != pList.end(); ++it) + TQStringList pList = config->readListEntry("Plugins"); + for(TQStringList::Iterator it = pList.begin();it != pList.end(); ++it) (*it) = (*it).stripWhiteSpace(); //setPluginNames(pList); - QStringList paths = QuantaCommon::readPathListEntry(config, "SearchPaths"); - for(QStringList::Iterator it = paths.begin();it != paths.end(); ++it) + TQStringList paths = QuantaCommon::readPathListEntry(config, "SearchPaths"); + for(TQStringList::Iterator it = paths.begin();it != paths.end(); ++it) (*it) = (*it).stripWhiteSpace(); qConfig.pluginSearchPaths = paths; // now that we have a list of the plugins, go through and get the details of them - for(QStringList::Iterator it = pList.begin();it != pList.end();++it) + for(TQStringList::Iterator it = pList.begin();it != pList.end();++it) { if (m_plugins.find(*it)) continue; config->setGroup(*it); QuantaPlugin *newPlugin = 0; - QString pluginType = config->readEntry("Type", "KPart"); + TQString pluginType = config->readEntry("Type", "KPart"); bool isStandard = config->readBoolEntry("Standard",false); /* if (isStandard) { - QString stdName = config->readEntry("Standard Name"); + TQString stdName = config->readEntry("Standard Name"); if (newPlugin) { newPlugin->setStandardName(stdName); @@ -101,7 +101,7 @@ void QuantaPluginInterface::readConfigFile(const QString& configFile) newPlugin->setFileName(config->readEntry("FileName")); newPlugin->setLocation(config->readEntry("Location")); newPlugin->setIcon(config->readEntry("Icon")); - QString type = config->readEntry("OutputWindow"); + TQString type = config->readEntry("OutputWindow"); if (type == "Message Frame" || type == "Separate Toolview") type = i18n("Separate Toolview"); else @@ -121,8 +121,8 @@ void QuantaPluginInterface::readConfig() m_plugins.clear(); // read the local plugins.rc - QString configFile = locateLocal("appdata", "plugins.rc"); - if (QFileInfo(configFile).exists()) + TQString configFile = locateLocal("appdata", "plugins.rc"); + if (TQFileInfo(configFile).exists()) readConfigFile(configFile); // read the global plugins.rc configFile = qConfig.globalDataDir + resourceDir + "plugins.rc"; @@ -135,13 +135,13 @@ void QuantaPluginInterface::writeConfig() // write the plugin settings to the rc file KConfig *config = new KConfig(locateLocal("appdata", "plugins.rc")); - QStringList names = pluginNames(); + TQStringList names = pluginNames(); config->setGroup("General"); config->writeEntry("Plugins", names); config->writePathEntry("SearchPaths", qConfig.pluginSearchPaths); - for(QStringList::Iterator it = names.begin();it != names.end(); ++it) + for(TQStringList::Iterator it = names.begin();it != names.end(); ++it) { config->setGroup(*it); @@ -152,7 +152,7 @@ void QuantaPluginInterface::writeConfig() config->writeEntry("Type", "KPart"); //not used, but just to be compatible config->writeEntry("Location", curPlugin->location()); config->writeEntry("Icon", curPlugin->icon()); - QString type = curPlugin->outputWindow(); + TQString type = curPlugin->outputWindow(); if (type == i18n("Editor Tab")) type = "Editor Tab"; if (type == i18n("Separate Toolview")) type = "Separate Toolview"; config->writeEntry("OutputWindow", type); @@ -172,7 +172,7 @@ void QuantaPluginInterface::writeConfig() /** Returns true if the plugin is available */ -bool QuantaPluginInterface::pluginAvailable(const QString &a_name) +bool QuantaPluginInterface::pluginAvailable(const TQString &a_name) { if (a_name.isEmpty()) return false; @@ -184,10 +184,10 @@ bool QuantaPluginInterface::pluginAvailable(const QString &a_name) } /** Gets the plugin names */ -QStringList QuantaPluginInterface::pluginNames() const +TQStringList QuantaPluginInterface::pluginNames() const { - QStringList names; - QDictIterator it(m_plugins); + TQStringList names; + TQDictIterator it(m_plugins); for(;it.current();++it) { names << (*it)->pluginName(); @@ -197,7 +197,7 @@ QStringList QuantaPluginInterface::pluginNames() const /** Gets the plugin specified by a_name */ -QuantaPlugin *QuantaPluginInterface::plugin(const QString &a_name) +QuantaPlugin *QuantaPluginInterface::plugin(const TQString &a_name) { if (a_name.isEmpty()) return 0L; @@ -210,7 +210,7 @@ void QuantaPluginInterface::buildPluginMenu() m_pluginMenu->clear(); // m_pluginMenu->setCheckable(true); - QDictIterator it(m_plugins); + TQDictIterator it(m_plugins); for(;it.current() != 0;++it) { QuantaPlugin *curPlugin = it.current(); @@ -240,8 +240,8 @@ void QuantaPluginInterface::slotPluginsEdit() void QuantaPluginInterface::slotPluginsValidate() { - QValueList invalidPlugins; - QDictIterator it(m_plugins); + TQValueList invalidPlugins; + TQDictIterator it(m_plugins); for(;it.current();++it) { if(!QuantaPlugin::validatePlugin(it.current())) @@ -252,7 +252,7 @@ void QuantaPluginInterface::slotPluginsValidate() uint invalidCount = invalidPlugins.count(); if (invalidCount > 0) { - QString invalidNames; + TQString invalidNames; for (uint i=0; i < invalidCount; i++) { invalidNames += "
" + invalidPlugins[i]->name(); -- cgit v1.2.1