summaryrefslogtreecommitdiffstats
path: root/kscreensaver/kxsconfig
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:27:15 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:27:15 +0000
commitb5d38fd2e94066885d4620b0c35c48a2faa5aa44 (patch)
tree7e7e611e0e3ef23dc2efd327a7455bcf4d7c9b7f /kscreensaver/kxsconfig
parent019ebb9a949a97c898e5d563f0699a3ff49e6588 (diff)
downloadtdeartwork-b5d38fd2e94066885d4620b0c35c48a2faa5aa44.tar.gz
tdeartwork-b5d38fd2e94066885d4620b0c35c48a2faa5aa44.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeartwork@1157637 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kscreensaver/kxsconfig')
-rw-r--r--kscreensaver/kxsconfig/kxsconfig.cpp74
-rw-r--r--kscreensaver/kxsconfig/kxsconfig.h16
-rw-r--r--kscreensaver/kxsconfig/kxscontrol.cpp204
-rw-r--r--kscreensaver/kxsconfig/kxscontrol.h58
-rw-r--r--kscreensaver/kxsconfig/kxsitem.cpp44
-rw-r--r--kscreensaver/kxsconfig/kxsitem.h58
-rw-r--r--kscreensaver/kxsconfig/kxsrun.cpp38
-rw-r--r--kscreensaver/kxsconfig/kxsxml.cpp48
-rw-r--r--kscreensaver/kxsconfig/kxsxml.h36
9 files changed, 288 insertions, 288 deletions
diff --git a/kscreensaver/kxsconfig/kxsconfig.cpp b/kscreensaver/kxsconfig/kxsconfig.cpp
index feda1ee8..ca3093de 100644
--- a/kscreensaver/kxsconfig/kxsconfig.cpp
+++ b/kscreensaver/kxsconfig/kxsconfig.cpp
@@ -37,11 +37,11 @@
#include <config.h>
#include <stdlib.h>
-#include <qlayout.h>
-#include <qtimer.h>
-#include <qvbox.h>
-#include <qlabel.h>
-#include <qfileinfo.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
+#include <tqvbox.h>
+#include <tqlabel.h>
+#include <tqfileinfo.h>
#include <kdebug.h>
#include <kapplication.h>
@@ -57,7 +57,7 @@
#include "kxscontrol.h"
#include "kxsxml.h"
-template class QPtrList<KXSConfigItem>;
+template class TQPtrList<KXSConfigItem>;
#include <X11/Xlib.h>
#include <X11/Xatom.h>
@@ -75,7 +75,7 @@ const uint widgetEventMask = // X event mask
StructureNotifyMask
);
-KXSConfigDialog::KXSConfigDialog(const QString &filename, const QString &name)
+KXSConfigDialog::KXSConfigDialog(const TQString &filename, const TQString &name)
: KDialogBase(Plain, name, Ok| Cancel, Ok, 0, 0, false),
mFilename(filename), mPreviewProc(0), mKilled(true)
{
@@ -91,33 +91,33 @@ KXSConfigDialog::KXSConfigDialog(const QString &filename, const QString &name)
bool KXSConfigDialog::create()
{
- QVBoxLayout *topLayout = new QVBoxLayout(plainPage(), spacingHint());
- QHBoxLayout *layout = new QHBoxLayout(topLayout, spacingHint());
- QVBox *controlLayout = new QVBox(plainPage());
+ TQVBoxLayout *topLayout = new TQVBoxLayout(plainPage(), spacingHint());
+ TQHBoxLayout *layout = new TQHBoxLayout(topLayout, spacingHint());
+ TQVBox *controlLayout = new TQVBox(plainPage());
controlLayout->setSpacing(spacingHint());
layout->addWidget(controlLayout);
- ((QBoxLayout*)controlLayout->layout())->addStrut(120);
+ ((TQBoxLayout*)controlLayout->layout())->addStrut(120);
KConfig config(mConfigFile);
- QString xmlFile = "/doesntexist";
+ TQString xmlFile = "/doesntexist";
#ifdef XSCREENSAVER_CONFIG_DIR
xmlFile = XSCREENSAVER_CONFIG_DIR;
#endif
xmlFile += "/" + mExeName + ".xml";
- if ( QFile::exists( xmlFile ) ) {
+ if ( TQFile::exists( xmlFile ) ) {
// We can use the xscreensaver xml config files.
KXSXml xmlParser(controlLayout);
xmlParser.parse( xmlFile );
mConfigItemList = *xmlParser.items();
- QWidget *spacer = new QWidget(controlLayout);
+ TQWidget *spacer = new TQWidget(controlLayout);
controlLayout->setStretchFactor(spacer, 1 );
- QString descr = xmlParser.description();
+ TQString descr = xmlParser.description();
if ( !descr.isEmpty() ) {
descr.replace('\n',' ');
descr = descr.simplifyWhiteSpace();
- QLabel *l = new QLabel( i18n( descr.utf8() ), plainPage() );
+ TQLabel *l = new TQLabel( i18n( descr.utf8() ), plainPage() );
l->setAlignment ( WordBreak );
topLayout->addWidget( l );
}
@@ -125,10 +125,10 @@ bool KXSConfigDialog::create()
// fall back to KDE's old config files.
int idx = 0;
while (true) {
- QString group = QString("Arg%1").arg(idx);
+ TQString group = TQString("Arg%1").arg(idx);
if (config.hasGroup(group)) {
config.setGroup(group);
- QString type = config.readEntry("Type");
+ TQString type = config.readEntry("Type");
if (type == "Range") {
KXSRangeControl *rc = new KXSRangeControl(controlLayout, group, config);
mConfigItemList.append(rc);
@@ -154,27 +154,27 @@ bool KXSConfigDialog::create()
return false;
}
- QPtrListIterator<KXSConfigItem> it( mConfigItemList );
+ TQPtrListIterator<KXSConfigItem> it( mConfigItemList );
KXSConfigItem *item;
while ( (item = it.current()) != 0 ) {
++it;
item->read( config );
- QWidget *i = dynamic_cast<QWidget*>(item);
+ TQWidget *i = dynamic_cast<TQWidget*>(item);
if (i) {
- connect( i, SIGNAL(changed()), SLOT(slotChanged()) );
+ connect( i, TQT_SIGNAL(changed()), TQT_SLOT(slotChanged()) );
}
}
mPreviewProc = new KProcess;
- connect(mPreviewProc, SIGNAL(processExited(KProcess *)),
- SLOT(slotPreviewExited(KProcess *)));
+ connect(mPreviewProc, TQT_SIGNAL(processExited(KProcess *)),
+ TQT_SLOT(slotPreviewExited(KProcess *)));
- mPreviewTimer = new QTimer(this);
- connect(mPreviewTimer, SIGNAL(timeout()), SLOT(slotNewPreview()));
+ mPreviewTimer = new TQTimer(this);
+ connect(mPreviewTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotNewPreview()));
- mPreview = new QWidget(plainPage());
+ mPreview = new TQWidget(plainPage());
mPreview->setFixedSize(250, 200);
- // mPreview->setBackgroundMode(QWidget::NoBackground);
+ // mPreview->setBackgroundMode(TQWidget::NoBackground);
mPreview->setBackgroundColor(Qt::black);
layout->add(mPreview);
@@ -199,9 +199,9 @@ KXSConfigDialog::~KXSConfigDialog()
}
//---------------------------------------------------------------------------
-QString KXSConfigDialog::command()
+TQString KXSConfigDialog::command()
{
- QString cmd;
+ TQString cmd;
KXSConfigItem *item;
for (item = mConfigItemList.first(); item != 0; item = mConfigItemList.next())
@@ -218,19 +218,19 @@ void KXSConfigDialog::slotPreviewExited(KProcess *)
if ( mKilled ) {
mKilled = false;
mPreviewProc->clearArguments();
- QString saver;
+ TQString saver;
saver.sprintf( "%s -window-id 0x%lX", mFilename.latin1(), long(mPreview->winId()) );
saver += command();
kdDebug() << "Command: " << saver << endl;
unsigned int i = 0;
- QString word;
+ TQString word;
saver = saver.stripWhiteSpace();
while ( !saver[i].isSpace() ) word += saver[i++];
//work around a KStandarDirs::findExe() "feature" where it looks in $KDEDIR/bin first no matter what and sometimes finds the wrong executable
- QFileInfo checkExe;
- QString saverdir = QString("%1/%2").arg(XSCREENSAVER_HACKS_DIR).arg(word);
- QString path;
+ TQFileInfo checkExe;
+ TQString saverdir = TQString("%1/%2").arg(XSCREENSAVER_HACKS_DIR).arg(word);
+ TQString path;
checkExe.setFile(saverdir);
if (checkExe.exists() && checkExe.isExecutable() && checkExe.isFile())
{
@@ -260,8 +260,8 @@ void KXSConfigDialog::slotPreviewExited(KProcess *)
}
} else {
// stops us from spawning the hack really fast, but still not the best
- QString path = KStandardDirs::findExe(mFilename, XSCREENSAVER_HACKS_DIR);
- if ( QFile::exists(path) ) {
+ TQString path = KStandardDirs::findExe(mFilename, XSCREENSAVER_HACKS_DIR);
+ if ( TQFile::exists(path) ) {
mKilled = true;
slotChanged();
}
@@ -370,7 +370,7 @@ int main(int argc, char *argv[])
XtGetApplicationNameAndClass (dpy, const_cast<char**>(&progname),
const_cast<char**>(&progclass));
- QString name = QString::fromLocal8Bit(args->arg(args->count() - 1));
+ TQString name = TQString::fromLocal8Bit(args->arg(args->count() - 1));
KXSConfigDialog *dialog=new KXSConfigDialog(args->arg(0), name);
if ( dialog->create() ) {
dialog->show();
diff --git a/kscreensaver/kxsconfig/kxsconfig.h b/kscreensaver/kxsconfig/kxsconfig.h
index f17bcd85..1d17b78e 100644
--- a/kscreensaver/kxsconfig/kxsconfig.h
+++ b/kscreensaver/kxsconfig/kxsconfig.h
@@ -32,11 +32,11 @@ class KXSConfigDialog : public KDialogBase
{
Q_OBJECT
public:
- KXSConfigDialog(const QString &file, const QString &name);
+ KXSConfigDialog(const TQString &file, const TQString &name);
~KXSConfigDialog();
bool create();
- QString command();
+ TQString command();
protected slots:
void slotPreviewExited(KProcess *);
@@ -46,13 +46,13 @@ protected slots:
virtual void slotCancel();
protected:
- QString mFilename;
- QString mExeName;
- QString mConfigFile;
+ TQString mFilename;
+ TQString mExeName;
+ TQString mConfigFile;
KProcess *mPreviewProc;
- QWidget *mPreview;
- QTimer *mPreviewTimer;
- QPtrList<KXSConfigItem> mConfigItemList;
+ TQWidget *mPreview;
+ TQTimer *mPreviewTimer;
+ TQPtrList<KXSConfigItem> mConfigItemList;
bool mKilled;
};
diff --git a/kscreensaver/kxsconfig/kxscontrol.cpp b/kscreensaver/kxsconfig/kxscontrol.cpp
index b8a2b666..aca1993c 100644
--- a/kscreensaver/kxsconfig/kxscontrol.cpp
+++ b/kscreensaver/kxsconfig/kxscontrol.cpp
@@ -19,63 +19,63 @@
// the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
// Boston, MA 02110-1301, USA.
-#include <qlabel.h>
-#include <qslider.h>
-#include <qlayout.h>
-#include <qcombobox.h>
-#include <qlineedit.h>
-#include <qspinbox.h>
-#include <qpushbutton.h>
-#include <qxml.h>
+#include <tqlabel.h>
+#include <tqslider.h>
+#include <tqlayout.h>
+#include <tqcombobox.h>
+#include <tqlineedit.h>
+#include <tqspinbox.h>
+#include <tqpushbutton.h>
+#include <tqxml.h>
#include <klocale.h>
#include <kfiledialog.h>
#include "kxscontrol.h"
//===========================================================================
-KXSRangeControl::KXSRangeControl(QWidget *parent, const QString &name,
+KXSRangeControl::KXSRangeControl(TQWidget *parent, const TQString &name,
KConfig &config)
- : QWidget(parent), KXSRangeItem(name, config), mSlider(0), mSpinBox(0)
+ : TQWidget(parent), KXSRangeItem(name, config), mSlider(0), mSpinBox(0)
{
- QVBoxLayout *l = new QVBoxLayout(this);
- QLabel *label = new QLabel(mLabel, this);
+ TQVBoxLayout *l = new TQVBoxLayout(this);
+ TQLabel *label = new TQLabel(mLabel, this);
l->add(label);
- mSlider = new QSlider(mMinimum, mMaximum, 10, mValue, Qt::Horizontal, this);
- connect(mSlider, SIGNAL(valueChanged(int)), SLOT(slotValueChanged(int)));
+ mSlider = new TQSlider(mMinimum, mMaximum, 10, mValue, Qt::Horizontal, this);
+ connect(mSlider, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotValueChanged(int)));
l->add(mSlider);
}
-KXSRangeControl::KXSRangeControl(QWidget *parent, const QString &name,
- const QXmlAttributes &attr )
- : QWidget(parent), KXSRangeItem(name, attr), mSlider(0), mSpinBox(0)
+KXSRangeControl::KXSRangeControl(TQWidget *parent, const TQString &name,
+ const TQXmlAttributes &attr )
+ : TQWidget(parent), KXSRangeItem(name, attr), mSlider(0), mSpinBox(0)
{
if (attr.value("type") == "spinbutton" ) {
- QHBoxLayout *hb = new QHBoxLayout(this);
+ TQHBoxLayout *hb = new TQHBoxLayout(this);
if (!mLabel.isEmpty()) {
- QLabel *l = new QLabel(i18n(mLabel.utf8()), this);
+ TQLabel *l = new TQLabel(i18n(mLabel.utf8()), this);
hb->add(l);
}
- mSpinBox = new QSpinBox(mMinimum, mMaximum, 1, this);
+ mSpinBox = new TQSpinBox(mMinimum, mMaximum, 1, this);
mSpinBox->setValue(mValue);
- connect(mSpinBox, SIGNAL(valueChanged(int)), SLOT(slotValueChanged(int)));
+ connect(mSpinBox, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotValueChanged(int)));
hb->add(mSpinBox);
} else {
- QString lowLabel = attr.value("_low-label");
- QString highLabel = attr.value("_high-label");
- QVBoxLayout *vb = new QVBoxLayout(this);
+ TQString lowLabel = attr.value("_low-label");
+ TQString highLabel = attr.value("_high-label");
+ TQVBoxLayout *vb = new TQVBoxLayout(this);
if (!mLabel.isEmpty()) {
- QLabel *l = new QLabel(i18n(mLabel.utf8()), this);
+ TQLabel *l = new TQLabel(i18n(mLabel.utf8()), this);
vb->add(l);
}
- QHBoxLayout *hb = new QHBoxLayout(vb);
+ TQHBoxLayout *hb = new TQHBoxLayout(vb);
if (!lowLabel.isEmpty()) {
- QLabel *l = new QLabel(i18n(lowLabel.utf8()), this);
+ TQLabel *l = new TQLabel(i18n(lowLabel.utf8()), this);
hb->addWidget(l);
}
- mSlider = new QSlider(mMinimum, mMaximum, 10, mValue, Qt::Horizontal, this);
- connect(mSlider, SIGNAL(valueChanged(int)), SLOT(slotValueChanged(int)));
+ mSlider = new TQSlider(mMinimum, mMaximum, 10, mValue, Qt::Horizontal, this);
+ connect(mSlider, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotValueChanged(int)));
hb->add(mSlider);
if (!highLabel.isEmpty()){
- QLabel *l = new QLabel(i18n(highLabel.utf8()), this);
+ TQLabel *l = new TQLabel(i18n(highLabel.utf8()), this);
hb->addWidget(l);
}
}
@@ -97,43 +97,43 @@ void KXSRangeControl::read(KConfig &config)
}
//===========================================================================
-KXSDoubleRangeControl::KXSDoubleRangeControl(QWidget *parent,
- const QString &name, KConfig &config)
- : QWidget(parent), KXSDoubleRangeItem(name, config)
+KXSDoubleRangeControl::KXSDoubleRangeControl(TQWidget *parent,
+ const TQString &name, KConfig &config)
+ : TQWidget(parent), KXSDoubleRangeItem(name, config)
{
- QVBoxLayout *l = new QVBoxLayout(this);
- QLabel *label = new QLabel(mLabel, this);
+ TQVBoxLayout *l = new TQVBoxLayout(this);
+ TQLabel *label = new TQLabel(mLabel, this);
l->add(label);
int value = int((mValue - mMinimum) * 100 / (mMaximum - mMinimum));
- mSlider = new QSlider(0, 100, 10, value, Qt::Horizontal, this);
- connect(mSlider, SIGNAL(valueChanged(int)), SLOT(slotValueChanged(int)));
+ mSlider = new TQSlider(0, 100, 10, value, Qt::Horizontal, this);
+ connect(mSlider, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotValueChanged(int)));
l->add(mSlider);
}
-KXSDoubleRangeControl::KXSDoubleRangeControl(QWidget *parent,
- const QString &name, const QXmlAttributes &attr)
- : QWidget(parent), KXSDoubleRangeItem(name, attr)
+KXSDoubleRangeControl::KXSDoubleRangeControl(TQWidget *parent,
+ const TQString &name, const TQXmlAttributes &attr)
+ : TQWidget(parent), KXSDoubleRangeItem(name, attr)
{
- QString lowLabel = attr.value("_low-label");
- QString highLabel = attr.value("_high-label");
- QVBoxLayout *vb = new QVBoxLayout(this);
+ TQString lowLabel = attr.value("_low-label");
+ TQString highLabel = attr.value("_high-label");
+ TQVBoxLayout *vb = new TQVBoxLayout(this);
if (!mLabel.isEmpty()) {
- QLabel *l = new QLabel(i18n(mLabel.utf8()), this);
+ TQLabel *l = new TQLabel(i18n(mLabel.utf8()), this);
vb->add(l);
}
- QHBoxLayout *hb = new QHBoxLayout(vb);
+ TQHBoxLayout *hb = new TQHBoxLayout(vb);
if (!lowLabel.isEmpty()) {
- QLabel *l = new QLabel(i18n(lowLabel.utf8()), this);
+ TQLabel *l = new TQLabel(i18n(lowLabel.utf8()), this);
hb->addWidget(l);
}
int value = int((mValue - mMinimum) * 100 / (mMaximum - mMinimum));
- mSlider = new QSlider(0, 100, 10, value, Qt::Horizontal, this);
- connect(mSlider, SIGNAL(valueChanged(int)), SLOT(slotValueChanged(int)));
+ mSlider = new TQSlider(0, 100, 10, value, Qt::Horizontal, this);
+ connect(mSlider, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotValueChanged(int)));
hb->add(mSlider);
if (!highLabel.isEmpty()){
- QLabel *l = new QLabel(i18n(highLabel.utf8()), this);
+ TQLabel *l = new TQLabel(i18n(highLabel.utf8()), this);
hb->addWidget(l);
}
}
@@ -152,22 +152,22 @@ void KXSDoubleRangeControl::read(KConfig &config)
}
//===========================================================================
-KXSCheckBoxControl::KXSCheckBoxControl(QWidget *parent, const QString &name,
+KXSCheckBoxControl::KXSCheckBoxControl(TQWidget *parent, const TQString &name,
KConfig &config)
- : QCheckBox(parent), KXSBoolItem(name, config)
+ : TQCheckBox(parent), KXSBoolItem(name, config)
{
setText(mLabel);
setChecked(mValue);
- connect(this, SIGNAL(toggled(bool)), SLOT(slotToggled(bool)));
+ connect(this, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotToggled(bool)));
}
-KXSCheckBoxControl::KXSCheckBoxControl(QWidget *parent, const QString &name,
- const QXmlAttributes &attr)
- : QCheckBox(parent), KXSBoolItem(name, attr)
+KXSCheckBoxControl::KXSCheckBoxControl(TQWidget *parent, const TQString &name,
+ const TQXmlAttributes &attr)
+ : TQCheckBox(parent), KXSBoolItem(name, attr)
{
setText(i18n(mLabel.utf8()));
setChecked(mValue);
- connect(this, SIGNAL(toggled(bool)), SLOT(slotToggled(bool)));
+ connect(this, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotToggled(bool)));
}
void KXSCheckBoxControl::slotToggled(bool state)
@@ -183,34 +183,34 @@ void KXSCheckBoxControl::read(KConfig &config)
}
//===========================================================================
-KXSDropListControl::KXSDropListControl(QWidget *parent, const QString &name,
+KXSDropListControl::KXSDropListControl(TQWidget *parent, const TQString &name,
KConfig &config)
- : QWidget(parent), KXSSelectItem(name, config)
+ : TQWidget(parent), KXSSelectItem(name, config)
{
- QVBoxLayout *l = new QVBoxLayout(this);
- QLabel *label = new QLabel(mLabel, this);
+ TQVBoxLayout *l = new TQVBoxLayout(this);
+ TQLabel *label = new TQLabel(mLabel, this);
l->add(label);
- mCombo = new QComboBox(this);
+ mCombo = new TQComboBox(this);
for(uint i=0; i < mOptions.count(); i++)
mCombo->insertItem( i18n(mOptions[i].utf8()) );
mCombo->setCurrentItem(mValue);
- connect(mCombo, SIGNAL(activated(int)), SLOT(slotActivated(int)));
+ connect(mCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(slotActivated(int)));
l->add(mCombo);
}
-KXSDropListControl::KXSDropListControl(QWidget *parent, const QString &name,
- const QXmlAttributes &attr)
- : QWidget(parent), KXSSelectItem(name, attr)
+KXSDropListControl::KXSDropListControl(TQWidget *parent, const TQString &name,
+ const TQXmlAttributes &attr)
+ : TQWidget(parent), KXSSelectItem(name, attr)
{
- QVBoxLayout *l = new QVBoxLayout(this);
- QLabel *label = new QLabel(i18n(mLabel.utf8()), this);
+ TQVBoxLayout *l = new TQVBoxLayout(this);
+ TQLabel *label = new TQLabel(i18n(mLabel.utf8()), this);
l->add(label);
- mCombo = new QComboBox(this);
- connect(mCombo, SIGNAL(activated(int)), SLOT(slotActivated(int)));
+ mCombo = new TQComboBox(this);
+ connect(mCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(slotActivated(int)));
l->add(mCombo);
}
-void KXSDropListControl::addOption(const QXmlAttributes &attr)
+void KXSDropListControl::addOption(const TQXmlAttributes &attr)
{
KXSSelectItem::addOption( attr );
mCombo->insertItem( i18n(mOptions[mOptions.count()-1].utf8()) );
@@ -231,31 +231,31 @@ void KXSDropListControl::read(KConfig &config)
}
//===========================================================================
-KXSLineEditControl::KXSLineEditControl(QWidget *parent, const QString &name,
+KXSLineEditControl::KXSLineEditControl(TQWidget *parent, const TQString &name,
KConfig &config)
- : QWidget(parent), KXSStringItem(name, config)
+ : TQWidget(parent), KXSStringItem(name, config)
{
- QVBoxLayout *l = new QVBoxLayout(this);
- QLabel *label = new QLabel(mLabel, this);
+ TQVBoxLayout *l = new TQVBoxLayout(this);
+ TQLabel *label = new TQLabel(mLabel, this);
l->add(label);
- mEdit = new QLineEdit(this);
- connect(mEdit, SIGNAL(textChanged(const QString &)), SLOT(textChanged(const QString &)));
+ mEdit = new TQLineEdit(this);
+ connect(mEdit, TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(textChanged(const TQString &)));
l->add(mEdit);
}
-KXSLineEditControl::KXSLineEditControl(QWidget *parent, const QString &name,
- const QXmlAttributes &attr )
- : QWidget(parent), KXSStringItem(name, attr)
+KXSLineEditControl::KXSLineEditControl(TQWidget *parent, const TQString &name,
+ const TQXmlAttributes &attr )
+ : TQWidget(parent), KXSStringItem(name, attr)
{
- QVBoxLayout *l = new QVBoxLayout(this);
- QLabel *label = new QLabel(i18n(mLabel.utf8()), this);
+ TQVBoxLayout *l = new TQVBoxLayout(this);
+ TQLabel *label = new TQLabel(i18n(mLabel.utf8()), this);
l->add(label);
- mEdit = new QLineEdit(this);
- connect(mEdit, SIGNAL(textChanged(const QString &)), SLOT(textChanged(const QString &)));
+ mEdit = new TQLineEdit(this);
+ connect(mEdit, TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(textChanged(const TQString &)));
l->add(mEdit);
}
-void KXSLineEditControl::textChanged( const QString &text )
+void KXSLineEditControl::textChanged( const TQString &text )
{
mValue = text;
emit changed();
@@ -268,35 +268,35 @@ void KXSLineEditControl::read(KConfig &config)
}
//===========================================================================
-KXSFileControl::KXSFileControl(QWidget *parent, const QString &name,
+KXSFileControl::KXSFileControl(TQWidget *parent, const TQString &name,
KConfig &config)
- : QWidget(parent), KXSStringItem(name, config)
+ : TQWidget(parent), KXSStringItem(name, config)
{
- QVBoxLayout *l = new QVBoxLayout(this);
- QLabel *label = new QLabel(mLabel, this);
+ TQVBoxLayout *l = new TQVBoxLayout(this);
+ TQLabel *label = new TQLabel(mLabel, this);
l->add(label);
- mEdit = new QLineEdit(this);
- connect(mEdit, SIGNAL(textChanged(const QString &)), SLOT(textChanged(const QString &)));
+ mEdit = new TQLineEdit(this);
+ connect(mEdit, TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(textChanged(const TQString &)));
l->add(mEdit);
}
-KXSFileControl::KXSFileControl(QWidget *parent, const QString &name,
- const QXmlAttributes &attr )
- : QWidget(parent), KXSStringItem(name, attr)
+KXSFileControl::KXSFileControl(TQWidget *parent, const TQString &name,
+ const TQXmlAttributes &attr )
+ : TQWidget(parent), KXSStringItem(name, attr)
{
- QVBoxLayout *l = new QVBoxLayout(this);
- QLabel *label = new QLabel(i18n(mLabel.utf8()), this);
+ TQVBoxLayout *l = new TQVBoxLayout(this);
+ TQLabel *label = new TQLabel(i18n(mLabel.utf8()), this);
l->add(label);
- QHBoxLayout *hb = new QHBoxLayout(l);
- mEdit = new QLineEdit(this);
- connect(mEdit, SIGNAL(textChanged(const QString &)), SLOT(textChanged(const QString &)));
+ TQHBoxLayout *hb = new TQHBoxLayout(l);
+ mEdit = new TQLineEdit(this);
+ connect(mEdit, TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(textChanged(const TQString &)));
hb->add(mEdit);
- QPushButton *pb = new QPushButton( "...", this );
- connect( pb, SIGNAL(clicked()), this, SLOT(selectFile()) );
+ TQPushButton *pb = new TQPushButton( "...", this );
+ connect( pb, TQT_SIGNAL(clicked()), this, TQT_SLOT(selectFile()) );
hb->addWidget(pb);
}
-void KXSFileControl::textChanged( const QString &text )
+void KXSFileControl::textChanged( const TQString &text )
{
mValue = text;
emit changed();
@@ -304,7 +304,7 @@ void KXSFileControl::textChanged( const QString &text )
void KXSFileControl::selectFile()
{
- QString f = KFileDialog::getOpenFileName();
+ TQString f = KFileDialog::getOpenFileName();
if ( !f.isEmpty() ) {
mValue = f;
mEdit->setText(mValue);
diff --git a/kscreensaver/kxsconfig/kxscontrol.h b/kscreensaver/kxsconfig/kxscontrol.h
index 36f16e43..8a6dde3c 100644
--- a/kscreensaver/kxsconfig/kxscontrol.h
+++ b/kscreensaver/kxsconfig/kxscontrol.h
@@ -22,8 +22,8 @@
#ifndef __KXSCONTROL_H__
#define __KXSCONTROL_H__
-#include <qwidget.h>
-#include <qcheckbox.h>
+#include <tqwidget.h>
+#include <tqcheckbox.h>
#include "kxsitem.h"
@@ -34,12 +34,12 @@ class QComboBox;
class QLineEdit;
//===========================================================================
-class KXSRangeControl : public QWidget, public KXSRangeItem
+class KXSRangeControl : public TQWidget, public KXSRangeItem
{
Q_OBJECT
public:
- KXSRangeControl(QWidget *parent, const QString &name, KConfig &config);
- KXSRangeControl(QWidget *parent, const QString &name, const QXmlAttributes &attr );
+ KXSRangeControl(TQWidget *parent, const TQString &name, KConfig &config);
+ KXSRangeControl(TQWidget *parent, const TQString &name, const TQXmlAttributes &attr );
virtual void read(KConfig &config);
@@ -50,17 +50,17 @@ protected slots:
void slotValueChanged(int value);
protected:
- QSlider *mSlider;
- QSpinBox *mSpinBox;
+ TQSlider *mSlider;
+ TQSpinBox *mSpinBox;
};
//===========================================================================
-class KXSDoubleRangeControl : public QWidget, public KXSDoubleRangeItem
+class KXSDoubleRangeControl : public TQWidget, public KXSDoubleRangeItem
{
Q_OBJECT
public:
- KXSDoubleRangeControl(QWidget *parent, const QString &name, KConfig &config);
- KXSDoubleRangeControl(QWidget *parent, const QString &name, const QXmlAttributes &attr );
+ KXSDoubleRangeControl(TQWidget *parent, const TQString &name, KConfig &config);
+ KXSDoubleRangeControl(TQWidget *parent, const TQString &name, const TQXmlAttributes &attr );
virtual void read(KConfig &config);
@@ -71,17 +71,17 @@ protected slots:
void slotValueChanged(int value);
protected:
- QSlider *mSlider;
+ TQSlider *mSlider;
double mStep;
};
//===========================================================================
-class KXSCheckBoxControl : public QCheckBox, public KXSBoolItem
+class KXSCheckBoxControl : public TQCheckBox, public KXSBoolItem
{
Q_OBJECT
public:
- KXSCheckBoxControl(QWidget *parent, const QString &name, KConfig &config);
- KXSCheckBoxControl(QWidget *parent, const QString &name, const QXmlAttributes &attr );
+ KXSCheckBoxControl(TQWidget *parent, const TQString &name, KConfig &config);
+ KXSCheckBoxControl(TQWidget *parent, const TQString &name, const TQXmlAttributes &attr );
virtual void read(KConfig &config);
@@ -93,16 +93,16 @@ protected slots:
};
//===========================================================================
-class KXSDropListControl : public QWidget, public KXSSelectItem
+class KXSDropListControl : public TQWidget, public KXSSelectItem
{
Q_OBJECT
public:
- KXSDropListControl(QWidget *parent, const QString &name, KConfig &config);
- KXSDropListControl(QWidget *parent, const QString &name, const QXmlAttributes &attr );
+ KXSDropListControl(TQWidget *parent, const TQString &name, KConfig &config);
+ KXSDropListControl(TQWidget *parent, const TQString &name, const TQXmlAttributes &attr );
virtual void read(KConfig &config);
- virtual void addOption( const QXmlAttributes &attr );
+ virtual void addOption( const TQXmlAttributes &attr );
signals:
void changed();
@@ -111,16 +111,16 @@ protected slots:
void slotActivated(int);
protected:
- QComboBox *mCombo;
+ TQComboBox *mCombo;
};
//===========================================================================
-class KXSLineEditControl : public QWidget, public KXSStringItem
+class KXSLineEditControl : public TQWidget, public KXSStringItem
{
Q_OBJECT
public:
- KXSLineEditControl(QWidget *parent, const QString &name, KConfig &config);
- KXSLineEditControl(QWidget *parent, const QString &name, const QXmlAttributes &attr );
+ KXSLineEditControl(TQWidget *parent, const TQString &name, KConfig &config);
+ KXSLineEditControl(TQWidget *parent, const TQString &name, const TQXmlAttributes &attr );
virtual void read(KConfig &config);
@@ -128,19 +128,19 @@ signals:
void changed();
protected slots:
- void textChanged(const QString &);
+ void textChanged(const TQString &);
protected:
- QLineEdit *mEdit;
+ TQLineEdit *mEdit;
};
//===========================================================================
-class KXSFileControl : public QWidget, public KXSStringItem
+class KXSFileControl : public TQWidget, public KXSStringItem
{
Q_OBJECT
public:
- KXSFileControl(QWidget *parent, const QString &name, KConfig &config);
- KXSFileControl(QWidget *parent, const QString &name, const QXmlAttributes &attr );
+ KXSFileControl(TQWidget *parent, const TQString &name, KConfig &config);
+ KXSFileControl(TQWidget *parent, const TQString &name, const TQXmlAttributes &attr );
virtual void read(KConfig &config);
@@ -148,11 +148,11 @@ signals:
void changed();
protected slots:
- void textChanged(const QString &);
+ void textChanged(const TQString &);
void selectFile();
protected:
- QLineEdit *mEdit;
+ TQLineEdit *mEdit;
};
diff --git a/kscreensaver/kxsconfig/kxsitem.cpp b/kscreensaver/kxsconfig/kxsitem.cpp
index d7cd010c..7d9ab034 100644
--- a/kscreensaver/kxsconfig/kxsitem.cpp
+++ b/kscreensaver/kxsconfig/kxsitem.cpp
@@ -21,24 +21,24 @@
#include "kxsconfig.h"
#include <klocale.h>
-#include <qxml.h>
+#include <tqxml.h>
//===========================================================================
-KXSConfigItem::KXSConfigItem(const QString &name, KConfig &config)
+KXSConfigItem::KXSConfigItem(const TQString &name, KConfig &config)
: mName(name)
{
config.setGroup(name);
mLabel = i18n(config.readEntry("Label").utf8());
}
-KXSConfigItem::KXSConfigItem(const QString &name, const QXmlAttributes &attr )
+KXSConfigItem::KXSConfigItem(const TQString &name, const TQXmlAttributes &attr )
: mName(name)
{
mLabel = attr.value("_label");
}
//===========================================================================
-KXSRangeItem::KXSRangeItem(const QString &name, KConfig &config)
+KXSRangeItem::KXSRangeItem(const TQString &name, KConfig &config)
: KXSConfigItem(name, config), mInvert(false)
{
mMinimum = config.readNumEntry("Minimum");
@@ -47,7 +47,7 @@ KXSRangeItem::KXSRangeItem(const QString &name, KConfig &config)
mSwitch = config.readEntry("Switch");
}
-KXSRangeItem::KXSRangeItem(const QString &name, const QXmlAttributes &attr )
+KXSRangeItem::KXSRangeItem(const TQString &name, const TQXmlAttributes &attr )
: KXSConfigItem(name, attr), mInvert(false)
{
mMinimum = attr.value("low").toInt();
@@ -63,7 +63,7 @@ KXSRangeItem::KXSRangeItem(const QString &name, const QXmlAttributes &attr )
mValue = mMaximum-(mValue-mMinimum);
}
-QString KXSRangeItem::command()
+TQString KXSRangeItem::command()
{
return mSwitch.arg(mInvert?mMaximum-(mValue-mMinimum):mValue);
}
@@ -82,7 +82,7 @@ void KXSRangeItem::save(KConfig &config)
}
//===========================================================================
-KXSDoubleRangeItem::KXSDoubleRangeItem(const QString &name, KConfig &config)
+KXSDoubleRangeItem::KXSDoubleRangeItem(const TQString &name, KConfig &config)
: KXSConfigItem(name, config), mInvert(false)
{
mMinimum = config.readDoubleNumEntry("Minimum");
@@ -91,7 +91,7 @@ KXSDoubleRangeItem::KXSDoubleRangeItem(const QString &name, KConfig &config)
mSwitch = config.readEntry("Switch");
}
-KXSDoubleRangeItem::KXSDoubleRangeItem(const QString &name, const QXmlAttributes &attr)
+KXSDoubleRangeItem::KXSDoubleRangeItem(const TQString &name, const TQXmlAttributes &attr)
: KXSConfigItem(name, attr), mInvert(false)
{
mMinimum = attr.value("low").toDouble();
@@ -107,7 +107,7 @@ KXSDoubleRangeItem::KXSDoubleRangeItem(const QString &name, const QXmlAttributes
mValue = mMaximum-(mValue-mMinimum);
}
-QString KXSDoubleRangeItem::command()
+TQString KXSDoubleRangeItem::command()
{
return mSwitch.arg(mInvert?mMaximum-(mValue-mMinimum):mValue);
}
@@ -127,7 +127,7 @@ void KXSDoubleRangeItem::save(KConfig &config)
//===========================================================================
-KXSBoolItem::KXSBoolItem(const QString &name, KConfig &config)
+KXSBoolItem::KXSBoolItem(const TQString &name, KConfig &config)
: KXSConfigItem(name, config)
{
mValue = config.readBoolEntry("Value");
@@ -135,7 +135,7 @@ KXSBoolItem::KXSBoolItem(const QString &name, KConfig &config)
mSwitchOff = config.readEntry("SwitchOff");
}
-KXSBoolItem::KXSBoolItem(const QString &name, const QXmlAttributes &attr )
+KXSBoolItem::KXSBoolItem(const TQString &name, const TQXmlAttributes &attr )
: KXSConfigItem(name, attr)
{
mSwitchOn = attr.value("arg-set");
@@ -143,7 +143,7 @@ KXSBoolItem::KXSBoolItem(const QString &name, const QXmlAttributes &attr )
mValue = mSwitchOn.isEmpty() ? true : false;
}
-QString KXSBoolItem::command()
+TQString KXSBoolItem::command()
{
return mValue ? mSwitchOn : mSwitchOff;
}
@@ -162,7 +162,7 @@ void KXSBoolItem::save(KConfig &config)
}
//===========================================================================
-KXSSelectItem::KXSSelectItem(const QString &name, KConfig &config)
+KXSSelectItem::KXSSelectItem(const TQString &name, KConfig &config)
: KXSConfigItem(name, config)
{
mOptions = config.readListEntry("Options");
@@ -170,24 +170,24 @@ KXSSelectItem::KXSSelectItem(const QString &name, KConfig &config)
mValue = config.readNumEntry("Value");
}
-KXSSelectItem::KXSSelectItem(const QString &name, const QXmlAttributes &attr )
+KXSSelectItem::KXSSelectItem(const TQString &name, const TQXmlAttributes &attr )
: KXSConfigItem(name, attr), mValue(0)
{
}
-void KXSSelectItem::addOption( const QXmlAttributes &attr )
+void KXSSelectItem::addOption( const TQXmlAttributes &attr )
{
- QString opt = attr.value("_label");
- QString arg = attr.value("arg-set");
+ TQString opt = attr.value("_label");
+ TQString arg = attr.value("arg-set");
if ( arg.isEmpty() )
mValue = mSwitches.count();
mOptions += opt;
mSwitches += arg;
}
-QString KXSSelectItem::command()
+TQString KXSSelectItem::command()
{
- QStringList::Iterator it = mSwitches.at(mValue);
+ TQStringList::Iterator it = mSwitches.at(mValue);
return (*it);
}
@@ -206,7 +206,7 @@ void KXSSelectItem::save(KConfig &config)
//===========================================================================
-KXSStringItem::KXSStringItem(const QString &name, KConfig &config)
+KXSStringItem::KXSStringItem(const TQString &name, KConfig &config)
: KXSConfigItem(name, config)
{
mValue = config.readEntry("Value");
@@ -218,7 +218,7 @@ KXSStringItem::KXSStringItem(const QString &name, KConfig &config)
}
}
-KXSStringItem::KXSStringItem(const QString &name, const QXmlAttributes &attr )
+KXSStringItem::KXSStringItem(const TQString &name, const TQXmlAttributes &attr )
: KXSConfigItem(name, attr)
{
mSwitch = attr.value("arg");
@@ -229,7 +229,7 @@ KXSStringItem::KXSStringItem(const QString &name, const QXmlAttributes &attr )
}
}
-QString KXSStringItem::command()
+TQString KXSStringItem::command()
{
if (!mValue.isEmpty())
return mSwitch.arg(mValue);
diff --git a/kscreensaver/kxsconfig/kxsitem.h b/kscreensaver/kxsconfig/kxsitem.h
index fdffb8fe..8a614bb1 100644
--- a/kscreensaver/kxsconfig/kxsitem.h
+++ b/kscreensaver/kxsconfig/kxsitem.h
@@ -29,31 +29,31 @@ class QXmlAttributes;
class KXSConfigItem
{
public:
- KXSConfigItem(const QString &name, KConfig &config);
- KXSConfigItem(const QString &name, const QXmlAttributes &attr);
+ KXSConfigItem(const TQString &name, KConfig &config);
+ KXSConfigItem(const TQString &name, const TQXmlAttributes &attr);
virtual ~KXSConfigItem() {}
- virtual QString command() = 0;
+ virtual TQString command() = 0;
virtual void save(KConfig &config) = 0;
virtual void read(KConfig &config) = 0;
protected:
- QString mName;
- QString mLabel;
+ TQString mName;
+ TQString mLabel;
};
class KXSRangeItem : public KXSConfigItem
{
public:
- KXSRangeItem(const QString &name, KConfig &config);
- KXSRangeItem(const QString &name, const QXmlAttributes &attr);
+ KXSRangeItem(const TQString &name, KConfig &config);
+ KXSRangeItem(const TQString &name, const TQXmlAttributes &attr);
- virtual QString command();
+ virtual TQString command();
virtual void save(KConfig &config);
virtual void read(KConfig &config);
protected:
- QString mSwitch;
+ TQString mSwitch;
int mMinimum;
int mMaximum;
int mValue;
@@ -63,15 +63,15 @@ protected:
class KXSDoubleRangeItem : public KXSConfigItem
{
public:
- KXSDoubleRangeItem(const QString &name, KConfig &config);
- KXSDoubleRangeItem(const QString &name, const QXmlAttributes &attr);
+ KXSDoubleRangeItem(const TQString &name, KConfig &config);
+ KXSDoubleRangeItem(const TQString &name, const TQXmlAttributes &attr);
- virtual QString command();
+ virtual TQString command();
virtual void read(KConfig &config);
virtual void save(KConfig &config);
protected:
- QString mSwitch;
+ TQString mSwitch;
double mMinimum;
double mMaximum;
double mValue;
@@ -81,51 +81,51 @@ protected:
class KXSBoolItem : public KXSConfigItem
{
public:
- KXSBoolItem(const QString &name, KConfig &config);
- KXSBoolItem(const QString &name, const QXmlAttributes &attr);
+ KXSBoolItem(const TQString &name, KConfig &config);
+ KXSBoolItem(const TQString &name, const TQXmlAttributes &attr);
- virtual QString command();
+ virtual TQString command();
virtual void read(KConfig &config);
virtual void save(KConfig &config);
protected:
- QString mSwitchOn;
- QString mSwitchOff;
+ TQString mSwitchOn;
+ TQString mSwitchOff;
bool mValue;
};
class KXSSelectItem : public KXSConfigItem
{
public:
- KXSSelectItem(const QString &name, KConfig &config);
- KXSSelectItem(const QString &name, const QXmlAttributes &attr);
+ KXSSelectItem(const TQString &name, KConfig &config);
+ KXSSelectItem(const TQString &name, const TQXmlAttributes &attr);
- virtual void addOption(const QXmlAttributes &attr);
+ virtual void addOption(const TQXmlAttributes &attr);
- virtual QString command();
+ virtual TQString command();
virtual void read(KConfig &config);
virtual void save(KConfig &config);
protected:
- QStringList mOptions;
- QStringList mSwitches;
+ TQStringList mOptions;
+ TQStringList mSwitches;
int mValue;
};
class KXSStringItem : public KXSConfigItem
{
public:
- KXSStringItem(const QString &name, KConfig &config);
- KXSStringItem(const QString &name, const QXmlAttributes &attr);
+ KXSStringItem(const TQString &name, KConfig &config);
+ KXSStringItem(const TQString &name, const TQXmlAttributes &attr);
- virtual QString command();
+ virtual TQString command();
virtual void save(KConfig &config);
virtual void read(KConfig &config);
protected:
- QString mSwitch;
- QString mValue;
+ TQString mSwitch;
+ TQString mValue;
};
#endif
diff --git a/kscreensaver/kxsconfig/kxsrun.cpp b/kscreensaver/kxsconfig/kxsrun.cpp
index 5a28f929..0f212c10 100644
--- a/kscreensaver/kxsconfig/kxsrun.cpp
+++ b/kscreensaver/kxsconfig/kxsrun.cpp
@@ -25,9 +25,9 @@
#include <stdio.h>
#include <unistd.h>
-#include <qptrlist.h>
-#include <qfile.h>
-#include <qfileinfo.h>
+#include <tqptrlist.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
#include <kdebug.h>
#include <kapplication.h>
@@ -41,7 +41,7 @@
#define MAX_ARGS 30
-template class QPtrList<KXSConfigItem>;
+template class TQPtrList<KXSConfigItem>;
//===========================================================================
static const char appName[] = "kxsrun";
@@ -71,33 +71,33 @@ int main(int argc, char *argv[])
if ( !args->count() )
exit( 1 );
- QString filename = args->arg(0);
- QString configFile(filename);
+ TQString filename = args->arg(0);
+ TQString configFile(filename);
// Get the config filename
int slash = filename.findRev('/');
if (slash >= 0)
configFile = filename.mid(slash+1);
- QString exeName = configFile;
+ TQString exeName = configFile;
configFile += "rc";
// read configuration args
KConfig config(configFile);
- QPtrList<KXSConfigItem> configItemList;
+ TQPtrList<KXSConfigItem> configItemList;
- QString xmlFile = "/doesntexist";
+ TQString xmlFile = "/doesntexist";
#ifdef XSCREENSAVER_CONFIG_DIR
xmlFile = XSCREENSAVER_CONFIG_DIR;
#endif
xmlFile += "/" + exeName + ".xml";
- if ( QFile::exists( xmlFile ) ) {
+ if ( TQFile::exists( xmlFile ) ) {
// We can use the xscreensaver xml config files.
KXSXml xmlParser(0);
xmlParser.parse(xmlFile);
configItemList = *xmlParser.items();
- QPtrListIterator<KXSConfigItem> it( configItemList );
+ TQPtrListIterator<KXSConfigItem> it( configItemList );
KXSConfigItem *item;
while ( (item = it.current()) != 0 ) {
++it;
@@ -108,10 +108,10 @@ int main(int argc, char *argv[])
int idx = 0;
while (true)
{
- QString group = QString("Arg%1").arg(idx);
+ TQString group = TQString("Arg%1").arg(idx);
if (config.hasGroup(group)) {
config.setGroup(group);
- QString type = config.readEntry("Type");
+ TQString type = config.readEntry("Type");
if (type == "Range") {
KXSRangeItem *rc = new KXSRangeItem(group, config);
configItemList.append(rc);
@@ -134,10 +134,10 @@ int main(int argc, char *argv[])
// find the xscreensaver executable
//work around a KStandarDirs::findExe() "feature" where it looks in $KDEDIR/bin first no matter what and sometimes finds the wrong executable
- QFileInfo checkExe;
- QString saverdir = QString("%1/%2").arg(XSCREENSAVER_HACKS_DIR).arg(filename);
+ TQFileInfo checkExe;
+ TQString saverdir = TQString("%1/%2").arg(XSCREENSAVER_HACKS_DIR).arg(filename);
kdDebug() << "saverdir is" << saverdir << endl;
- QString exeFile;
+ TQString exeFile;
checkExe.setFile(saverdir);
if (checkExe.exists() && checkExe.isExecutable() && checkExe.isFile())
{
@@ -151,10 +151,10 @@ int main(int argc, char *argv[])
strcpy(sargs[0], filename.ascii());
// add the command line options
- QString cmd;
+ TQString cmd;
unsigned int i;
for (i = 1; i < (unsigned)args->count(); i++)
- cmd += " " + QString(args->arg(i));
+ cmd += " " + TQString(args->arg(i));
// add the config options
KXSConfigItem *item;
@@ -163,7 +163,7 @@ int main(int argc, char *argv[])
}
// put into char * array for execv
- QString word;
+ TQString word;
int si = 1;
i = 0;
bool inQuotes = false;
diff --git a/kscreensaver/kxsconfig/kxsxml.cpp b/kscreensaver/kxsconfig/kxsxml.cpp
index d8a689be..e35294dd 100644
--- a/kscreensaver/kxsconfig/kxsxml.cpp
+++ b/kscreensaver/kxsconfig/kxsxml.cpp
@@ -21,23 +21,23 @@
#include "kxsxml.h"
#include "kxscontrol.h"
-#include <qobject.h>
-#include <qfile.h>
-#include <qvbox.h>
-#include <qhbox.h>
+#include <tqobject.h>
+#include <tqfile.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
#include <stdio.h>
-KXSXml::KXSXml( QWidget *p )
+KXSXml::KXSXml( TQWidget *p )
: parent(p), handler(0)
{
}
-bool KXSXml::parse( const QString &filename )
+bool KXSXml::parse( const TQString &filename )
{
- QFile file( filename );
+ TQFile file( filename );
handler = new KXSXmlHandler( parent );
- QXmlInputSource source( &file );
- QXmlSimpleReader reader;
+ TQXmlInputSource source( &file );
+ TQXmlSimpleReader reader;
reader.setContentHandler( handler );
if ( !reader.parse( &source, FALSE ) )
return FALSE;
@@ -45,24 +45,24 @@ bool KXSXml::parse( const QString &filename )
return true;
}
-const QPtrList<KXSConfigItem> *KXSXml::items() const
+const TQPtrList<KXSConfigItem> *KXSXml::items() const
{
if ( handler )
return handler->items();
return 0;
}
-QString KXSXml::description() const
+TQString KXSXml::description() const
{
if ( handler )
return handler->description();
- return QString();
+ return TQString();
}
//===========================================================================
-KXSXmlHandler::KXSXmlHandler( QWidget *p )
- : QXmlDefaultHandler(), parent(p), selItem(0), inDesc(false)
+KXSXmlHandler::KXSXmlHandler( TQWidget *p )
+ : TQXmlDefaultHandler(), parent(p), selItem(0), inDesc(false)
{
mParentStack.push( p );
}
@@ -72,15 +72,15 @@ bool KXSXmlHandler::startDocument()
return true;
}
-bool KXSXmlHandler::startElement( const QString&, const QString&,
- const QString& qName,
- const QXmlAttributes &atts )
+bool KXSXmlHandler::startElement( const TQString&, const TQString&,
+ const TQString& qName,
+ const TQXmlAttributes &atts )
{
KXSConfigItem *i = 0;
- QString id = atts.value("id");
+ TQString id = atts.value("id");
if ( qName == "number" ) {
- QString sLow = atts.value( "low" );
- QString sHigh = atts.value( "high" );
+ TQString sLow = atts.value( "low" );
+ TQString sHigh = atts.value( "high" );
if ( sLow.contains( '.' ) || sHigh.contains( '.' ) ) {
if ( parent )
i = new KXSDoubleRangeControl( parent, id, atts );
@@ -118,11 +118,11 @@ bool KXSXmlHandler::startElement( const QString&, const QString&,
} else if ( qName == "option" && selItem ) {
selItem->addOption( atts );
} else if ( qName == "hgroup" && parent ) {
- QHBox *hb = new QHBox( parent );
+ TQHBox *hb = new TQHBox( parent );
mParentStack.push( hb );
parent = hb;
} else if ( qName == "vgroup" && parent ) {
- QVBox *vb = new QVBox( parent );
+ TQVBox *vb = new TQVBox( parent );
mParentStack.push( vb );
parent = vb;
}
@@ -133,7 +133,7 @@ bool KXSXmlHandler::startElement( const QString&, const QString&,
return true;
}
-bool KXSXmlHandler::endElement( const QString&, const QString&, const QString &qName )
+bool KXSXmlHandler::endElement( const TQString&, const TQString&, const TQString &qName )
{
if ( qName == "select" ) {
selItem = 0;
@@ -148,7 +148,7 @@ bool KXSXmlHandler::endElement( const QString&, const QString&, const QString &q
return true;
}
-bool KXSXmlHandler::characters( const QString &ch )
+bool KXSXmlHandler::characters( const TQString &ch )
{
if ( inDesc )
desc += ch;
diff --git a/kscreensaver/kxsconfig/kxsxml.h b/kscreensaver/kxsconfig/kxsxml.h
index 922ad93e..c7278c20 100644
--- a/kscreensaver/kxsconfig/kxsxml.h
+++ b/kscreensaver/kxsconfig/kxsxml.h
@@ -23,46 +23,46 @@
#define KXSXML_H
#include "kxsconfig.h"
-#include <qxml.h>
-#include <qptrstack.h>
+#include <tqxml.h>
+#include <tqptrstack.h>
class KXSXmlHandler;
class KXSXml
{
public:
- KXSXml( QWidget *p );
+ KXSXml( TQWidget *p );
- bool parse( const QString &filename );
- const QPtrList<KXSConfigItem> *items() const;
- QString description() const;
+ bool parse( const TQString &filename );
+ const TQPtrList<KXSConfigItem> *items() const;
+ TQString description() const;
private:
- QWidget *parent;
+ TQWidget *parent;
KXSXmlHandler *handler;
};
class KXSXmlHandler : public QXmlDefaultHandler
{
public:
- KXSXmlHandler( QWidget *p );
+ KXSXmlHandler( TQWidget *p );
bool startDocument();
- bool startElement( const QString&, const QString&, const QString& ,
- const QXmlAttributes& );
- bool endElement( const QString&, const QString&, const QString& );
- bool characters( const QString & );
+ bool startElement( const TQString&, const TQString&, const TQString& ,
+ const TQXmlAttributes& );
+ bool endElement( const TQString&, const TQString&, const TQString& );
+ bool characters( const TQString & );
- const QPtrList<KXSConfigItem> *items() const { return &mConfigItemList; }
- const QString &description() const { return desc; }
+ const TQPtrList<KXSConfigItem> *items() const { return &mConfigItemList; }
+ const TQString &description() const { return desc; }
private:
- QWidget *parent;
+ TQWidget *parent;
KXSSelectItem *selItem;
bool inDesc;
- QString desc;
- QPtrList<KXSConfigItem> mConfigItemList;
- QPtrStack<QWidget> mParentStack;
+ TQString desc;
+ TQPtrList<KXSConfigItem> mConfigItemList;
+ TQPtrStack<TQWidget> mParentStack;
};
#endif // KXSXML_H