summaryrefslogtreecommitdiffstats
path: root/quanta/plugins
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
commitdc6b8e72fed2586239e3514819238c520636c9d9 (patch)
tree88b200df0a0b7fab9d6f147596173556f1ed9a13 /quanta/plugins
parent6927d4436e54551917f600b706a8d6109e49de1c (diff)
downloadtdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.tar.gz
tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1157656 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'quanta/plugins')
-rw-r--r--quanta/plugins/quantaplugin.cpp76
-rw-r--r--quanta/plugins/quantaplugin.h54
-rw-r--r--quanta/plugins/quantapluginconfig.cpp28
-rw-r--r--quanta/plugins/quantapluginconfig.h4
-rw-r--r--quanta/plugins/quantaplugineditor.cpp76
-rw-r--r--quanta/plugins/quantaplugineditor.h22
-rw-r--r--quanta/plugins/quantaplugininterface.cpp58
-rw-r--r--quanta/plugins/quantaplugininterface.h36
8 files changed, 177 insertions, 177 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);
}
diff --git a/quanta/plugins/quantaplugin.h b/quanta/plugins/quantaplugin.h
index 08b4dbdc..fb01477c 100644
--- a/quanta/plugins/quantaplugin.h
+++ b/quanta/plugins/quantaplugin.h
@@ -22,8 +22,8 @@
#include <kparts/part.h>
/* QT INCLUDES */
-#include <qguardedptr.h>
-#include <qobject.h>
+#include <tqguardedptr.h>
+#include <tqobject.h>
class QString;
@@ -44,26 +44,26 @@ public:
~QuantaPlugin();
virtual bool isRunning() const;
/** Gets the superficial plugin name */
- virtual QString pluginName() const;
+ virtual TQString pluginName() const;
/** Gets the location of the plugin */
- virtual QString location() const;
+ virtual TQString location() const;
/** Gets the plugin's standard attribute */
virtual bool isStandard() const;
/** Gets the output window */
- virtual QString outputWindow() const;
+ virtual TQString outputWindow() const;
/** Returns true if the plugin specified by a_plugin is valid, false otherwise */
static bool validatePlugin(QuantaPlugin *);
/** Returns true if the options of a plugin are valid, otherwise false */
- static bool validatePluginInfo(const QString &, const QString &,
- const QString &, const QString &);
+ static bool validatePluginInfo(const TQString &, const TQString &,
+ const TQString &, const TQString &);
virtual void addWidget();
virtual void removeWidget();
- QWidget *widget();
+ TQWidget *widget();
KParts::ReadOnlyPart *part() {return m_part;}
- QString name() {return m_name;}
+ TQString name() {return m_name;}
/** plugs action into menu */
- void plugAction(QPopupMenu *menu);
+ void plugAction(TQPopupMenu *menu);
public slots:
/** Sets whether the plugin is running or not */
virtual void setRunning(bool);
@@ -76,29 +76,29 @@ public slots:
/** Runs the plugin if it's not running yet, unloads otherwise.*/
virtual bool toggle();
/** Sets the superficial name of the plugin */
- virtual void setPluginName(const QString &);
+ virtual void setPluginName(const TQString &);
/** Sets the output window */
- virtual void setOutputWindow(const QString &);
+ virtual void setOutputWindow(const TQString &);
/** Sets the plugin's standard attribute */
virtual void setStandard(bool isStandard);
/** Sets the location of the plugin */
- virtual void setLocation(const QString &);
+ virtual void setLocation(const TQString &);
/** Sets the file name of the plugin */
- virtual void setFileName(const QString &);
+ virtual void setFileName(const TQString &);
/** Returns the file name of the plugin */
- virtual QString fileName() const;
+ virtual TQString fileName() const;
virtual int input() {return m_input;}
virtual void setInput(int a_input) { m_input = a_input;}
/** Returns whether the plugin is loaded or not */
virtual bool isLoaded();
/** No descriptions */
- void setIcon(const QString& a_icon);
+ void setIcon(const TQString& a_icon);
/** No descriptions */
- QString icon();
+ TQString icon();
/** No descriptions */
- void setStandardName(const QString& a_stdName);
+ void setStandardName(const TQString& a_stdName);
/** No descriptions */
- QString standardName();
+ TQString standardName();
void setReadOnlyPart(bool a_readOnlyPart) {m_readOnlyPart = a_readOnlyPart;}
bool readOnlyPart() {return m_readOnlyPart;}
signals:
@@ -106,23 +106,23 @@ signals:
void pluginStopped();
protected:
/** Superficial name of plugin */
- QString m_fileName;
- QString m_name;
- QString m_location;
- QString m_icon;
- QString m_outputWindow;
+ TQString m_fileName;
+ TQString m_name;
+ TQString m_location;
+ TQString m_icon;
+ TQString m_outputWindow;
int m_input;
/** True, if it is not a user added plugin. Special handling code may be necessary for standard plugins. */
bool m_standard;
bool m_isRunning;
- QGuardedPtr<KParts::ReadOnlyPart> m_part;
+ TQGuardedPtr<KParts::ReadOnlyPart> m_part;
bool m_readOnlyPart;
QuantaView *m_view;
KToggleAction *m_action;
private: // Private attributes
- QString m_standardName;
+ TQString m_standardName;
KMdiToolViewAccessor* m_pluginToolView;
- QWidget *m_targetWidget; //this will be the parent, used only to make the plugin widget hidden until addWidget is called
+ TQWidget *m_targetWidget; //this will be the parent, used only to make the plugin widget hidden until addWidget is called
};
#endif
diff --git a/quanta/plugins/quantapluginconfig.cpp b/quanta/plugins/quantapluginconfig.cpp
index a03ffc2c..30fd6ee2 100644
--- a/quanta/plugins/quantapluginconfig.cpp
+++ b/quanta/plugins/quantapluginconfig.cpp
@@ -23,32 +23,32 @@
#include <kicondialog.h>
/* QT INCLUDES */
-#include <qpushbutton.h>
-#include <qcheckbox.h>
-#include <qlineedit.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qcombobox.h>
-#include <qwidgetstack.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
+#include <tqlineedit.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqcombobox.h>
+#include <tqwidgetstack.h>
/* OTHER INCLUDES */
#include "quantapluginconfig.h"
#include "quantaplugin.h"
#include "pluginconfig.h"
-QuantaPluginConfig::QuantaPluginConfig(QWidget *a_parent, const char *a_name)
+QuantaPluginConfig::QuantaPluginConfig(TQWidget *a_parent, const char *a_name)
: KDialogBase(a_parent, a_name, true, i18n("Configure Plugin"), KDialogBase::Ok | KDialogBase::Cancel)
{
m_pluginConfigWidget = new PluginConfig(this);
- QStringList windows;
+ TQStringList windows;
i18n("Message Area Tab");
windows << i18n("Editor Tab") << i18n("Separate Toolview");
m_pluginConfigWidget->outputWindow->insertStringList(windows);
m_pluginConfigWidget->iconButton->setStrictIconSize(false);
- connect(m_pluginConfigWidget->pluginName, SIGNAL(textChanged(const QString &)), this, SLOT(nameChanged(const QString &)));
- connect(m_pluginConfigWidget->locationButton, SIGNAL(clicked()), this, SLOT(selectLocation()));
+ connect(m_pluginConfigWidget->pluginName, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(nameChanged(const TQString &)));
+ connect(m_pluginConfigWidget->locationButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(selectLocation()));
setMainWidget(m_pluginConfigWidget);
}
@@ -77,16 +77,16 @@ void QuantaPluginConfig::accept()
/** Gets the plugin location */
void QuantaPluginConfig::selectLocation()
{
- QString pluginLocation = KFileDialog::getExistingDirectory(QString::null, this, i18n("Select Plugin Folder"));
+ TQString pluginLocation = KFileDialog::getExistingDirectory(TQString::null, this, i18n("Select Plugin Folder"));
if(!pluginLocation.isNull())
{
m_pluginConfigWidget->location->setText(pluginLocation);
}
}
-void QuantaPluginConfig::nameChanged(const QString &a_text)
+void QuantaPluginConfig::nameChanged(const TQString &a_text)
{
- QString text = a_text;
+ TQString text = a_text;
text = "lib" + text + ".la";
m_pluginConfigWidget->pluginFileName->setText(text.lower());
}
diff --git a/quanta/plugins/quantapluginconfig.h b/quanta/plugins/quantapluginconfig.h
index f56142e9..7fa81750 100644
--- a/quanta/plugins/quantapluginconfig.h
+++ b/quanta/plugins/quantapluginconfig.h
@@ -31,7 +31,7 @@ class QuantaPluginConfig : public KDialogBase
{
Q_OBJECT
public:
- QuantaPluginConfig(QWidget *, const char *);
+ QuantaPluginConfig(TQWidget *, const char *);
~QuantaPluginConfig();
public slots:
/** Validates the dialog before accepting */
@@ -39,7 +39,7 @@ public slots:
/** Gets the plugin location */
void selectLocation();
/** Updates other widgets based on the name */
- void nameChanged(const QString &);
+ void nameChanged(const TQString &);
protected:
PluginConfig *m_pluginConfigWidget;
diff --git a/quanta/plugins/quantaplugineditor.cpp b/quanta/plugins/quantaplugineditor.cpp
index e7c32ec0..42f6a237 100644
--- a/quanta/plugins/quantaplugineditor.cpp
+++ b/quanta/plugins/quantaplugineditor.cpp
@@ -24,14 +24,14 @@
#include <kdialogbase.h>
/* QT INCLUDES */
-#include <qwidget.h>
-#include <qobject.h>
-#include <qdict.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qlineedit.h>
-#include <qcombobox.h>
-#include <qlistview.h>
+#include <tqwidget.h>
+#include <tqobject.h>
+#include <tqdict.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqlistview.h>
/* OTHER INCLUDES */
#include "quantaplugineditor.h"
@@ -41,32 +41,32 @@
#include "plugineditor.h"
#include "resource.h"
-QuantaPluginEditor::QuantaPluginEditor(QWidget *a_parent, const char *a_name)
+QuantaPluginEditor::QuantaPluginEditor(TQWidget *a_parent, const char *a_name)
: KDialogBase(a_parent, a_name, true, i18n("Edit Plugins"), KDialogBase::Ok | KDialogBase::Cancel)
{
// m_plugins.setAutoDelete(true);
m_pluginEditorWidget = new PluginEditor(this);
setMainWidget(m_pluginEditorWidget);
- m_pluginEditorWidget->pluginList->setSelectionMode(QListView::Single);
+ m_pluginEditorWidget->pluginList->setSelectionMode(TQListView::Single);
m_pluginEditorWidget->pluginList->setAllColumnsShowFocus(true);
m_pluginEditorWidget->pluginList->setColumnAlignment(2, Qt::AlignHCenter);
- connect(this, SIGNAL(pluginsChanged()), SLOT(refreshPlugins()));
- connect(m_pluginEditorWidget->refreshButton, SIGNAL(clicked()), SLOT(refreshPlugins()));
- connect(m_pluginEditorWidget->addButton, SIGNAL(clicked()), SLOT(addPlugin()));
- connect(m_pluginEditorWidget->removeButton, SIGNAL(clicked()), SLOT(removePlugin()));
- connect(m_pluginEditorWidget->addSearchPathButton, SIGNAL(clicked()), SLOT(addSearchPath()));
- connect(m_pluginEditorWidget->configureButton, SIGNAL(clicked()), SLOT(configurePlugin()));
- connect(m_pluginEditorWidget->pluginList, SIGNAL(doubleClicked(QListViewItem*, const QPoint&, int)),
- SLOT(configurePlugin(QListViewItem*, const QPoint&, int)));
+ connect(this, TQT_SIGNAL(pluginsChanged()), TQT_SLOT(refreshPlugins()));
+ connect(m_pluginEditorWidget->refreshButton, TQT_SIGNAL(clicked()), TQT_SLOT(refreshPlugins()));
+ connect(m_pluginEditorWidget->addButton, TQT_SIGNAL(clicked()), TQT_SLOT(addPlugin()));
+ connect(m_pluginEditorWidget->removeButton, TQT_SIGNAL(clicked()), TQT_SLOT(removePlugin()));
+ connect(m_pluginEditorWidget->addSearchPathButton, TQT_SIGNAL(clicked()), TQT_SLOT(addSearchPath()));
+ connect(m_pluginEditorWidget->configureButton, TQT_SIGNAL(clicked()), TQT_SLOT(configurePlugin()));
+ connect(m_pluginEditorWidget->pluginList, TQT_SIGNAL(doubleClicked(TQListViewItem*, const TQPoint&, int)),
+ TQT_SLOT(configurePlugin(TQListViewItem*, const TQPoint&, int)));
}
QuantaPluginEditor::~QuantaPluginEditor()
{
}
-QDict<QuantaPlugin> QuantaPluginEditor::plugins()
+TQDict<QuantaPlugin> QuantaPluginEditor::plugins()
{
return m_plugins;
}
@@ -90,7 +90,7 @@ void QuantaPluginEditor::addPlugin()
newPlugin->setOutputWindow(configWidget->outputWindow->currentText());
newPlugin->setStandard(false);
newPlugin->setIcon(configWidget->iconButton->icon());
- QString pluginName = newPlugin->pluginName();
+ TQString pluginName = newPlugin->pluginName();
m_plugins.insert(pluginName, newPlugin);
emit pluginsChanged();
}
@@ -100,7 +100,7 @@ void QuantaPluginEditor::addPlugin()
void QuantaPluginEditor::addSearchPath()
{
// Get a dir and append it to the line edit
- QString appendDir = KFileDialog::getExistingDirectory(QString::null, 0, i18n("Select Folder"));
+ TQString appendDir = KFileDialog::getExistingDirectory(TQString::null, 0, i18n("Select Folder"));
if(!appendDir.isNull())
{
m_pluginEditorWidget->searchPaths->setText(m_pluginEditorWidget->searchPaths->text()+appendDir+":");
@@ -110,8 +110,8 @@ void QuantaPluginEditor::addSearchPath()
void QuantaPluginEditor::configurePlugin()
{
// create a new config dialog. populate with plugin data
- QString key;
- QListViewItem *item = m_pluginEditorWidget->pluginList->currentItem();
+ TQString key;
+ TQListViewItem *item = m_pluginEditorWidget->pluginList->currentItem();
if(item)
key = item->text(0);
@@ -146,7 +146,7 @@ void QuantaPluginEditor::configurePlugin()
}
}
-void QuantaPluginEditor::configurePlugin(QListViewItem* item, const QPoint&, int)
+void QuantaPluginEditor::configurePlugin(TQListViewItem* item, const TQPoint&, int)
{
if (item)
configurePlugin();
@@ -157,15 +157,15 @@ void QuantaPluginEditor::refreshPlugins()
// call validate on all plugins to refresh their status
m_pluginEditorWidget->pluginList->clear();
- QDictIterator<QuantaPlugin> it(m_plugins);
+ TQDictIterator<QuantaPlugin> it(m_plugins);
for(;it.current();++it)
{
- QListViewItem *newItem = new PluginEditorItem(m_pluginEditorWidget->pluginList);
+ TQListViewItem *newItem = new PluginEditorItem(m_pluginEditorWidget->pluginList);
QuantaPlugin *curPlugin = it.current();
newItem->setText(0, curPlugin->pluginName());
- QPixmap statusIcon;
+ TQPixmap statusIcon;
bool isValid = QuantaPlugin::validatePlugin(curPlugin);
if(isValid)
statusIcon = SmallIcon("ok", KGlobal::instance());
@@ -183,7 +183,7 @@ void QuantaPluginEditor::refreshPlugins()
void QuantaPluginEditor::removePlugin()
{
- QListViewItem *currentItem = m_pluginEditorWidget->pluginList->currentItem();
+ TQListViewItem *currentItem = m_pluginEditorWidget->pluginList->currentItem();
if (currentItem)
{
QuantaPlugin *plugin = m_plugins.find(currentItem->text(0));
@@ -196,32 +196,32 @@ void QuantaPluginEditor::removePlugin()
}
}
-void QuantaPluginEditor::setPlugins(QDict<QuantaPlugin> a_plugins)
+void QuantaPluginEditor::setPlugins(TQDict<QuantaPlugin> a_plugins)
{
m_plugins = a_plugins;
emit pluginsChanged();
}
-PluginEditorItem::PluginEditorItem(QListView *a_parent)
- : QListViewItem(a_parent)
+PluginEditorItem::PluginEditorItem(TQListView *a_parent)
+ : TQListViewItem(a_parent)
{
}
-void PluginEditorItem::paintCell(QPainter *a_painter, const QColorGroup &a_cg, int a_column, int a_width, int a_align)
+void PluginEditorItem::paintCell(TQPainter *a_painter, const TQColorGroup &a_cg, int a_column, int a_width, int a_align)
{
/*
if(a_column == 2)
a_align = Qt::AlignCenter;
FIXME : Why won't QT let us align cell contents?
*/
- QListViewItem::paintCell(a_painter, a_cg, a_column, a_width, a_align);
+ TQListViewItem::paintCell(a_painter, a_cg, a_column, a_width, a_align);
}
/** No descriptions */
-void QuantaPluginEditor::setSearchPaths(const QStringList& paths)
+void QuantaPluginEditor::setSearchPaths(const TQStringList& paths)
{
- QString str;
+ TQString str;
for (uint i =0; i < paths.count(); i++)
{
str += paths[i] +":";
@@ -229,10 +229,10 @@ void QuantaPluginEditor::setSearchPaths(const QStringList& paths)
m_pluginEditorWidget->searchPaths->setText(str);
}
/** No descriptions */
-QStringList QuantaPluginEditor::searchPathList()
+TQStringList QuantaPluginEditor::searchPathList()
{
- QString str = m_pluginEditorWidget->searchPaths->text();
- QStringList paths = QStringList::split(":",str);
+ TQString str = m_pluginEditorWidget->searchPaths->text();
+ TQStringList paths = TQStringList::split(":",str);
return paths;
}
diff --git a/quanta/plugins/quantaplugineditor.h b/quanta/plugins/quantaplugineditor.h
index fc028056..88da3cfc 100644
--- a/quanta/plugins/quantaplugineditor.h
+++ b/quanta/plugins/quantaplugineditor.h
@@ -22,8 +22,8 @@
#include <kdialogbase.h>
/* QT INCLUDES */
-#include <qdict.h>
-#include <qlistview.h>
+#include <tqdict.h>
+#include <tqlistview.h>
/* OTHER INCLUDES */
#include "quantaplugin.h"
@@ -44,36 +44,36 @@ class QuantaPluginEditor : public KDialogBase
Q_OBJECT
public:
- QuantaPluginEditor(QWidget *, const char *);
+ QuantaPluginEditor(TQWidget *, const char *);
~QuantaPluginEditor();
- QDict<QuantaPlugin> plugins();
+ TQDict<QuantaPlugin> plugins();
/** No descriptions */
- QStringList searchPathList();
+ TQStringList searchPathList();
/** No descriptions */
- void setSearchPaths(const QStringList& paths);
+ void setSearchPaths(const TQStringList& paths);
signals:
void pluginsChanged();
public slots:
- void setPlugins(QDict<QuantaPlugin>);
+ void setPlugins(TQDict<QuantaPlugin>);
void addSearchPath();
void addPlugin();
void removePlugin();
void configurePlugin();
- void configurePlugin(QListViewItem*, const QPoint&, int);
+ void configurePlugin(TQListViewItem*, const TQPoint&, int);
void refreshPlugins();
protected:
- QDict<QuantaPlugin> m_plugins;
+ TQDict<QuantaPlugin> m_plugins;
PluginEditor *m_pluginEditorWidget;
};
class PluginEditorItem : public QListViewItem
{
public:
- PluginEditorItem(QListView *);
- virtual void paintCell(QPainter *, const QColorGroup &, int, int, int);
+ PluginEditorItem(TQListView *);
+ virtual void paintCell(TQPainter *, const TQColorGroup &, int, int, int);
};
#endif
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 <kmessagebox.h>
/* QT INCLUDES */
-#include <qdict.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qfileinfo.h>
+#include <tqdict.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqfileinfo.h>
/* 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<QuantaPlugin> it(m_plugins);
+ TQStringList names;
+ TQDictIterator<QuantaPlugin> 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<QuantaPlugin> it(m_plugins);
+ TQDictIterator<QuantaPlugin> it(m_plugins);
for(;it.current() != 0;++it)
{
QuantaPlugin *curPlugin = it.current();
@@ -240,8 +240,8 @@ void QuantaPluginInterface::slotPluginsEdit()
void QuantaPluginInterface::slotPluginsValidate()
{
- QValueList<QuantaPlugin*> invalidPlugins;
- QDictIterator<QuantaPlugin> it(m_plugins);
+ TQValueList<QuantaPlugin*> invalidPlugins;
+ TQDictIterator<QuantaPlugin> 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 += "<br>" + invalidPlugins[i]->name();
diff --git a/quanta/plugins/quantaplugininterface.h b/quanta/plugins/quantaplugininterface.h
index a3e85030..2749fbd0 100644
--- a/quanta/plugins/quantaplugininterface.h
+++ b/quanta/plugins/quantaplugininterface.h
@@ -23,10 +23,10 @@
#include <kstandarddirs.h>
/* QT INCLUDES */
-#include <qobject.h>
-#include <qdict.h>
-#include <qstringlist.h>
-#include <qpopupmenu.h>
+#include <tqobject.h>
+#include <tqdict.h>
+#include <tqstringlist.h>
+#include <tqpopupmenu.h>
/* OTHER INCLUDES */
@@ -45,7 +45,7 @@ public:
* the parameters are only used at the first call to create the class
*
*/
- static QuantaPluginInterface* const ref(QWidget *parent = 0L)
+ static QuantaPluginInterface* const ref(TQWidget *parent = 0L)
{
static QuantaPluginInterface *m_ref;
if (!m_ref) m_ref = new QuantaPluginInterface (parent);
@@ -58,16 +58,16 @@ public:
/** Write the rc file */
virtual void writeConfig();
/* Returns TRUE if the plugin specified by a_name is available for us*/
- bool pluginAvailable(const QString &);
+ bool pluginAvailable(const TQString &);
/** Gets the plugins */
- QDict<QuantaPlugin> plugins() {return m_plugins;};
+ TQDict<QuantaPlugin> plugins() {return m_plugins;};
/** Sets the plugins */
- void setPlugins(QDict<QuantaPlugin> plugins) {m_plugins = plugins;};
+ void setPlugins(TQDict<QuantaPlugin> plugins) {m_plugins = plugins;};
/** Gets the plugin specified by a_name */
- virtual QuantaPlugin *plugin(const QString &);
+ virtual QuantaPlugin *plugin(const TQString &);
/** Gets the plugin menu */
- virtual QPopupMenu *pluginMenu() {return m_pluginMenu;};
- void setPluginMenu(QPopupMenu *pluginMenu) {m_pluginMenu = pluginMenu;}
+ virtual TQPopupMenu *pluginMenu() {return m_pluginMenu;};
+ void setPluginMenu(TQPopupMenu *pluginMenu) {m_pluginMenu = pluginMenu;}
/** Builds the plugins menu dynamically */
void buildPluginMenu();
@@ -76,7 +76,7 @@ private:
* If you need the class use QuantaPluginInterface::ref() for
* construction and reference
*/
- QuantaPluginInterface(QWidget *parent);
+ QuantaPluginInterface(TQWidget *parent);
protected slots:
/** slot for the menu: validate */
@@ -86,18 +86,18 @@ protected slots:
protected:
/** Gets the plugin names */
- virtual QStringList pluginNames() const;
- void readConfigFile(const QString& configFile);
+ virtual TQStringList pluginNames() const;
+ void readConfigFile(const TQString& configFile);
- QDict<QuantaPlugin> m_plugins;
+ TQDict<QuantaPlugin> m_plugins;
- QWidget *m_parent;
+ TQWidget *m_parent;
- QPopupMenu *m_pluginMenu;
+ TQPopupMenu *m_pluginMenu;
signals:
void hideSplash();
- void statusMsg(const QString &);
+ void statusMsg(const TQString &);
};
#endif