diff options
Diffstat (limited to 'quanta/plugins/quantaplugin.cpp')
-rw-r--r-- | quanta/plugins/quantaplugin.cpp | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/quanta/plugins/quantaplugin.cpp b/quanta/plugins/quantaplugin.cpp index 89cde63f..730e41f2 100644 --- a/quanta/plugins/quantaplugin.cpp +++ b/quanta/plugins/quantaplugin.cpp @@ -28,13 +28,13 @@ #include <kmessagebox.h> /* QT INCLUDES */ -#include <qstring.h> -#include <qfile.h> -#include <qfileinfo.h> -#include <qwidget.h> -#include <qwidgetstack.h> -#include <qstringlist.h> -#include <qobject.h> +#include <tqstring.h> +#include <tqfile.h> +#include <tqfileinfo.h> +#include <tqwidget.h> +#include <tqwidgetstack.h> +#include <tqstringlist.h> +#include <tqobject.h> /* OTHER INCLUDES */ #include "quantaplugin.h" @@ -68,27 +68,27 @@ QuantaPlugin::~QuantaPlugin() } /** Sets the superficial name of the plugin */ -void QuantaPlugin::setPluginName(const QString &a_name) +void QuantaPlugin::setPluginName(const TQString &a_name) { m_name = a_name; if (!m_action) { - m_action = new KToggleAction(i18n(a_name.utf8()), 0, this, SLOT(toggle()), quantaApp->actionCollection(), a_name); + m_action = new KToggleAction(i18n(a_name.utf8()), 0, this, TQT_SLOT(toggle()), quantaApp->actionCollection(), a_name); } m_action->setText(a_name); } -QString QuantaPlugin::pluginName() const +TQString QuantaPlugin::pluginName() const { return m_name; } -void QuantaPlugin::setLocation(const QString &a_location) +void QuantaPlugin::setLocation(const TQString &a_location) { m_location = a_location; } -QString QuantaPlugin::location() const +TQString QuantaPlugin::location() const { return m_location; } @@ -98,7 +98,7 @@ bool QuantaPlugin::load() if(isLoaded()) return false; - QString loc = location(); + TQString loc = location(); if(loc.isEmpty()) { KStandardDirs *dirs = QuantaCommon::pluginDirs("lib"); @@ -107,12 +107,12 @@ bool QuantaPlugin::load() } else { - loc += QString("/") + fileName(); + loc += TQString("/") + fileName(); } - QFileInfo partInfo(loc); - QString ow = outputWindow(); - m_targetWidget = new QWidget(quantaApp); + TQFileInfo partInfo(loc); + TQString ow = outputWindow(); + m_targetWidget = new TQWidget(quantaApp); if (m_readOnlyPart) m_part = KParts::ComponentFactory::createPartInstanceFromLibrary<KParts::ReadOnlyPart>(partInfo.baseName().latin1(), m_targetWidget, 0, m_targetWidget, 0 ); else @@ -126,7 +126,7 @@ bool QuantaPlugin::load() } m_part->setName(m_name); // for better debug output m_part->widget()->setName(m_name); //needed to be able to dock the same plugin twice in separate toolviews - m_part->widget()->setFocusPolicy(QWidget::ClickFocus); + m_part->widget()->setFocusPolicy(TQWidget::ClickFocus); quantaApp->slotNewPart(m_part, false); // register the part in the partmanager return true; } @@ -184,8 +184,8 @@ bool QuantaPlugin::run() } addWidget(); setRunning(true); - connect( m_part, SIGNAL(setStatusBarText(const QString &)), - quantaApp, SLOT(slotStatusMsg( const QString & ))); + connect( m_part, TQT_SIGNAL(setStatusBarText(const TQString &)), + quantaApp, TQT_SLOT(slotStatusMsg( const TQString & ))); emit pluginStarted(); @@ -214,25 +214,25 @@ bool QuantaPlugin::toggle() } /** Returns the file name of the plugin */ -QString QuantaPlugin::fileName() const +TQString QuantaPlugin::fileName() const { return m_fileName; } /** Sets the file name of the plugin */ -void QuantaPlugin::setFileName(const QString &a_fileName) +void QuantaPlugin::setFileName(const TQString &a_fileName) { m_fileName = a_fileName; } /** Sets the output window */ -void QuantaPlugin::setOutputWindow(const QString &a_outputWindow) +void QuantaPlugin::setOutputWindow(const TQString &a_outputWindow) { m_outputWindow = a_outputWindow; } /** Gets the output window */ -QString QuantaPlugin::outputWindow() const +TQString QuantaPlugin::outputWindow() const { return m_outputWindow; } @@ -249,16 +249,16 @@ bool QuantaPlugin::validatePlugin(QuantaPlugin *a_plugin) } /** Returns true if the information of a plugin is valid, otherwise false */ -bool QuantaPlugin::validatePluginInfo(const QString & /*a_name*/, - const QString &a_location, const QString &a_fileName, const QString &/*a_outputWindow*/) +bool QuantaPlugin::validatePluginInfo(const TQString & /*a_name*/, + const TQString &a_location, const TQString &a_fileName, const TQString &/*a_outputWindow*/) { bool valid = true; // look the file up if location is null if(!a_location.isEmpty()) { - QString path = a_location + QString("/") + a_fileName; + TQString path = a_location + TQString("/") + a_fileName; - QFileInfo pluginFile(path); + TQFileInfo pluginFile(path); if(!pluginFile.exists()) valid = false; /* TODO : What other tests should we perform? Permissions etc? */ @@ -287,8 +287,8 @@ bool QuantaPlugin::unload(bool remove) if(!isLoaded()) return false; - disconnect( m_part, SIGNAL(setStatusBarText(const QString &)), - quantaApp, SLOT(slotStatusMsg( const QString & ))); + disconnect( m_part, TQT_SIGNAL(setStatusBarText(const TQString &)), + quantaApp, TQT_SLOT(slotStatusMsg( const TQString & ))); delete (KParts::ReadOnlyPart*) m_part; m_part = 0; @@ -327,22 +327,22 @@ bool QuantaPlugin::isStandard() const } /** No descriptions */ -QString QuantaPlugin::standardName() +TQString QuantaPlugin::standardName() { return m_standardName; } /** No descriptions */ -void QuantaPlugin::setStandardName(const QString& a_stdName) +void QuantaPlugin::setStandardName(const TQString& a_stdName) { m_standardName = a_stdName; } /** No descriptions */ -QString QuantaPlugin::icon() +TQString QuantaPlugin::icon() { return m_icon; } /** No descriptions */ -void QuantaPlugin::setIcon(const QString& a_icon) +void QuantaPlugin::setIcon(const TQString& a_icon) { m_icon = a_icon; if (m_action) m_action->setIcon(a_icon); @@ -350,7 +350,7 @@ void QuantaPlugin::setIcon(const QString& a_icon) void QuantaPlugin::addWidget() { - QString ow = outputWindow(); + TQString ow = outputWindow(); if(ow == i18n("Separate Toolview")) { m_part->widget()->setCaption(m_name); @@ -366,7 +366,7 @@ void QuantaPlugin::addWidget() void QuantaPlugin::removeWidget() { - QString ow = outputWindow(); + TQString ow = outputWindow(); if(ow == i18n("Separate Toolview")) { delete m_pluginToolView; @@ -378,7 +378,7 @@ void QuantaPlugin::removeWidget() } } -QWidget *QuantaPlugin::widget() +TQWidget *QuantaPlugin::widget() { if (isLoaded()) { return m_part->widget(); @@ -387,7 +387,7 @@ QWidget *QuantaPlugin::widget() } } -void QuantaPlugin::plugAction(QPopupMenu *menu) +void QuantaPlugin::plugAction(TQPopupMenu *menu) { m_action->plug(menu); } |