summaryrefslogtreecommitdiffstats
path: root/noatun-plugins/oblique
diff options
context:
space:
mode:
Diffstat (limited to 'noatun-plugins/oblique')
-rw-r--r--noatun-plugins/oblique/base.cpp112
-rw-r--r--noatun-plugins/oblique/base.h26
-rw-r--r--noatun-plugins/oblique/cmodule.cpp222
-rw-r--r--noatun-plugins/oblique/cmodule.h36
-rw-r--r--noatun-plugins/oblique/file.cpp48
-rw-r--r--noatun-plugins/oblique/file.h18
-rw-r--r--noatun-plugins/oblique/kbuffer.h4
-rw-r--r--noatun-plugins/oblique/kdatacollection.cpp56
-rw-r--r--noatun-plugins/oblique/kdatacollection.h40
-rw-r--r--noatun-plugins/oblique/kdbt.h16
-rw-r--r--noatun-plugins/oblique/menu.cpp68
-rw-r--r--noatun-plugins/oblique/menu.h32
-rw-r--r--noatun-plugins/oblique/oblique.cpp32
-rw-r--r--noatun-plugins/oblique/oblique.h10
-rw-r--r--noatun-plugins/oblique/query.cpp86
-rw-r--r--noatun-plugins/oblique/query.h46
-rw-r--r--noatun-plugins/oblique/selector.cpp12
-rw-r--r--noatun-plugins/oblique/selector.h10
-rw-r--r--noatun-plugins/oblique/tree.cpp106
-rw-r--r--noatun-plugins/oblique/tree.h38
-rw-r--r--noatun-plugins/oblique/view.cpp60
-rw-r--r--noatun-plugins/oblique/view.h16
22 files changed, 547 insertions, 547 deletions
diff --git a/noatun-plugins/oblique/base.cpp b/noatun-plugins/oblique/base.cpp
index 60bb272..c9e6fb6 100644
--- a/noatun-plugins/oblique/base.cpp
+++ b/noatun-plugins/oblique/base.cpp
@@ -7,10 +7,10 @@
#include "kdbt.h"
#include "kbuffer.h"
-#include <qstringlist.h>
-#include <qmap.h>
-#include <qfile.h>
-#include <qdom.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
+#include <tqfile.h>
+#include <tqdom.h>
#include <cstdlib>
#include <assert.h>
@@ -23,24 +23,24 @@ struct Base::Private
Private() : db(0, DB_CXX_NO_EXCEPTIONS) { }
Db db;
typedef KDbt<FileId> Key;
- typedef KDbt<QStringList> Data;
+ typedef KDbt<TQStringList> Data;
FileId high;
FileId cachedId;
- mutable QMap<QString,QString> cachedProperties;
+ mutable TQMap<TQString,TQString> cachedProperties;
- QPtrList<Slice> slices;
+ TQPtrList<Slice> slices;
int sliceHigh;
};
-Base::Base(const QString &file)
+Base::Base(const TQString &file)
{
d = new Private;
d->cachedId = 0;
- QCString filename = QFile::encodeName(file);
+ TQCString filename = TQFile::encodeName(file);
bool create = true;
if (d->db.open(
@@ -55,7 +55,7 @@ Base::Base(const QString &file)
Private::Key key(0);
if (d->db.get(0, &key, &data, 0)==0)
{
- QStringList strs;
+ TQStringList strs;
data.get(strs);
mFormatVersion = strs[0].toUInt(0, 16); // TODO
@@ -71,7 +71,7 @@ Base::Base(const QString &file)
}
if (create)
{ // failure
- QFile(filename).remove();
+ TQFile(filename).remove();
d->db.open(
#if DB_VERSION_MINOR > 0 && DB_VERSION_MAJOR >= 4
NULL,
@@ -80,7 +80,7 @@ Base::Base(const QString &file)
);
d->high=0;
- QStringList strs;
+ TQStringList strs;
strs << "00010002" << "0" << "";
resetFormatVersion();
loadMetaXML("");
@@ -102,8 +102,8 @@ void Base::resetFormatVersion()
Base::~Base()
{
- QStringList strs;
- strs << QString::number(mFormatVersion, 16) << QString::number(d->high);
+ TQStringList strs;
+ strs << TQString::number(mFormatVersion, 16) << TQString::number(d->high);
strs << saveMetaXML();
Private::Data data(strs);
@@ -114,10 +114,10 @@ Base::~Base()
delete d;
}
-File Base::add(const QString &file)
+File Base::add(const TQString &file)
{
Private::Key key(++d->high);
- QStringList properties;
+ TQStringList properties;
properties << "file" << file;
Private::Data data(properties);
@@ -180,23 +180,23 @@ File Base::first(FileId first)
return File(this, first);
}
-QString Base::property(FileId id, const QString &property) const
+TQString Base::property(FileId id, const TQString &property) const
{
loadIntoCache(id);
- if (!d->cachedProperties.contains(property)) return QString::null;
- QMap<QString,QString>::Iterator i = d->cachedProperties.find(property);
+ if (!d->cachedProperties.contains(property)) return TQString::null;
+ TQMap<TQString,TQString>::Iterator i = d->cachedProperties.find(property);
return i.data();
}
-void Base::setProperty(FileId id, const QString &key, const QString &value)
+void Base::setProperty(FileId id, const TQString &key, const TQString &value)
{
loadIntoCache(id);
d->cachedProperties.insert(key, value);
// reinsert it into the DB
- QStringList props;
+ TQStringList props;
for (
- QMap<QString,QString>::Iterator i(d->cachedProperties.begin());
+ TQMap<TQString,TQString>::Iterator i(d->cachedProperties.begin());
i != d->cachedProperties.end(); ++i
)
{
@@ -211,12 +211,12 @@ void Base::setProperty(FileId id, const QString &key, const QString &value)
emit modified(File(this, id));
}
-QStringList Base::properties(FileId id) const
+TQStringList Base::properties(FileId id) const
{
loadIntoCache(id);
- QStringList props;
+ TQStringList props;
for (
- QMap<QString,QString>::Iterator i(d->cachedProperties.begin());
+ TQMap<TQString,TQString>::Iterator i(d->cachedProperties.begin());
i != d->cachedProperties.end(); ++i
)
{
@@ -225,15 +225,15 @@ QStringList Base::properties(FileId id) const
return props;
}
-void Base::clearProperty(FileId id, const QString &key)
+void Base::clearProperty(FileId id, const TQString &key)
{
loadIntoCache(id);
d->cachedProperties.remove(key);
// reinsert it into the DB
- QStringList props;
+ TQStringList props;
for (
- QMap<QString,QString>::Iterator i(d->cachedProperties.begin());
+ TQMap<TQString,TQString>::Iterator i(d->cachedProperties.begin());
i != d->cachedProperties.end(); ++i
)
{
@@ -275,7 +275,7 @@ void Base::loadIntoCache(FileId id) const
Private::Data data;
unless (d->db.get(0, &key, &data, 0))
{
- QStringList props;
+ TQStringList props;
data.get(props);
if (props.count() % 2)
@@ -284,28 +284,28 @@ void Base::loadIntoCache(FileId id) const
return;
}
- for (QStringList::Iterator i(props.begin()); i != props.end(); ++i)
+ for (TQStringList::Iterator i(props.begin()); i != props.end(); ++i)
{
- QString &key = *i;
- QString &value = *++i;
+ TQString &key = *i;
+ TQString &value = *++i;
d->cachedProperties.insert(key, value);
}
}
}
-QString Base::saveMetaXML()
+TQString Base::saveMetaXML()
{
- QDomDocument doc;
- doc.setContent(QString("<meta />"));
- QDomElement doce = doc.documentElement();
+ TQDomDocument doc;
+ doc.setContent(TQString("<meta />"));
+ TQDomElement doce = doc.documentElement();
- QDomElement e = doc.createElement("slices");
- e.setAttribute("highslice", QString::number(d->sliceHigh));
+ TQDomElement e = doc.createElement("slices");
+ e.setAttribute("highslice", TQString::number(d->sliceHigh));
doce.appendChild(e);
- for (QPtrListIterator<Slice> i(d->slices); *i; ++i)
+ for (TQPtrListIterator<Slice> i(d->slices); *i; ++i)
{
- QDomElement slice = doc.createElement("slice");
+ TQDomElement slice = doc.createElement("slice");
slice.setAttribute("id", (*i)->id());
slice.setAttribute("name", (*i)->name());
e.appendChild(slice);
@@ -319,7 +319,7 @@ void Base::move(FileId oldid, FileId newid)
Private::Data data;
unless (d->db.get(0, &key, &data, 0))
{
- QStringList props;
+ TQStringList props;
data.get(props);
d->db.del(0, &key, 0);
@@ -332,11 +332,11 @@ void Base::dump()
{
for (FileId id=1; id <= high(); id++)
{
- QStringList props = properties(id);
+ TQStringList props = properties(id);
std::cerr << id << '.';
- for (QStringList::Iterator i(props.begin()); i != props.end(); ++i)
+ for (TQStringList::Iterator i(props.begin()); i != props.end(); ++i)
{
- QString prop = *i;
+ TQString prop = *i;
std::cerr << ' ' << prop.latin1() << '=' << property(id, prop).latin1();
}
std::cerr << std::endl;
@@ -349,12 +349,12 @@ void Base::notifyChanged(const File &file)
}
-QPtrList<Slice> Base::slices()
+TQPtrList<Slice> Base::slices()
{
return d->slices;
}
-Slice *Base::addSlice(const QString &name)
+Slice *Base::addSlice(const TQString &name)
{
Slice *sl = new Slice(this, d->sliceHigh++, name);
d->slices.append(sl);
@@ -364,7 +364,7 @@ Slice *Base::addSlice(const QString &name)
Slice *Base::defaultSlice()
{
- for (QPtrListIterator<Slice> i(d->slices); *i; ++i)
+ for (TQPtrListIterator<Slice> i(d->slices); *i; ++i)
{
if ((*i)->id() == 0) return *i;
}
@@ -382,7 +382,7 @@ void Base::removeSlice(Slice *slice)
Slice *Base::sliceById(int id)
{
- for (QPtrListIterator<Slice> i(d->slices); *i; ++i)
+ for (TQPtrListIterator<Slice> i(d->slices); *i; ++i)
{
if ((*i)->id() == id) return *i;
}
@@ -390,35 +390,35 @@ Slice *Base::sliceById(int id)
}
-void Base::loadMetaXML(const QString &xml)
+void Base::loadMetaXML(const TQString &xml)
{
d->slices.setAutoDelete(true);
d->slices.clear();
d->slices.setAutoDelete(false);
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent(xml);
- QDomElement doce = doc.documentElement();
+ TQDomElement doce = doc.documentElement();
bool loadedId0=false;
- for (QDomNode n = doce.firstChild(); !n.isNull(); n = n.nextSibling())
+ for (TQDomNode n = doce.firstChild(); !n.isNull(); n = n.nextSibling())
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if (e.isNull()) continue;
if (e.tagName().lower() == "slices")
{
d->sliceHigh = e.attribute("highslice", "1").toInt();
- for (QDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling())
+ for (TQDomNode n = e.firstChild(); !n.isNull(); n = n.nextSibling())
{
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if (e.isNull()) continue;
if (e.tagName().lower() == "slice")
{
int id = e.attribute("id").toInt();
if (id==0 && loadedId0) break;
loadedId0=true;
- QString name = e.attribute("name");
+ TQString name = e.attribute("name");
d->slices.append(new Slice(this, id, name));
}
}
diff --git a/noatun-plugins/oblique/base.h b/noatun-plugins/oblique/base.h
index c9cb8d4..611c5fe 100644
--- a/noatun-plugins/oblique/base.h
+++ b/noatun-plugins/oblique/base.h
@@ -6,9 +6,9 @@
// ;)
#define unless(e) if(!(e))
-#include <qstring.h>
-#include <qobject.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
class File;
class Slice;
@@ -26,10 +26,10 @@ Q_OBJECT
unsigned int mFormatVersion;
public:
- Base(const QString &file);
+ Base(const TQString &file);
~Base();
- File add(const QString &file);
+ File add(const TQString &file);
File find(FileId id);
@@ -45,10 +45,10 @@ public:
**/
File first(FileId id=1);
- QString property(FileId id, const QString &property) const;
- void setProperty(FileId id, const QString &key, const QString &value);
- QStringList properties(FileId id) const;
- void clearProperty(FileId, const QString &key);
+ TQString property(FileId id, const TQString &property) const;
+ void setProperty(FileId id, const TQString &key, const TQString &value);
+ TQStringList properties(FileId id) const;
+ void clearProperty(FileId, const TQString &key);
/**
* same as File::remove
@@ -62,8 +62,8 @@ public:
void dump();
- QPtrList<Slice> slices();
- Slice *addSlice(const QString &name);
+ TQPtrList<Slice> slices();
+ Slice *addSlice(const TQString &name);
Slice *defaultSlice();
Slice *sliceById(int id);
@@ -98,8 +98,8 @@ private:
* load the xml that lives at the head of the db and contains
* potentially lots of structured data
**/
- void loadMetaXML(const QString &xml);
- QString saveMetaXML();
+ void loadMetaXML(const TQString &xml);
+ TQString saveMetaXML();
};
#endif
diff --git a/noatun-plugins/oblique/cmodule.cpp b/noatun-plugins/oblique/cmodule.cpp
index 93b4069..729ff54 100644
--- a/noatun-plugins/oblique/cmodule.cpp
+++ b/noatun-plugins/oblique/cmodule.cpp
@@ -14,72 +14,72 @@
#include <kinputdialog.h>
#include <kconfig.h>
-#include <qgroupbox.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qvbox.h>
-#include <qhbox.h>
-#include <qfileinfo.h>
-#include <qtooltip.h>
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qcombobox.h>
-#include <qwhatsthis.h>
-#include <qtabwidget.h>
-#include <qheader.h>
-
-SchemaConfig::SchemaConfig(QWidget *parent, Oblique *oblique)
- : QWidget(parent)
+#include <tqgroupbox.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
+#include <tqfileinfo.h>
+#include <tqtooltip.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqcombobox.h>
+#include <tqwhatsthis.h>
+#include <tqtabwidget.h>
+#include <tqheader.h>
+
+SchemaConfig::SchemaConfig(TQWidget *parent, Oblique *oblique)
+ : TQWidget(parent)
{
mOblique = oblique;
mIgnore = true;
mRegexpEditor=0;
{
- QVBoxLayout *layout = new QVBoxLayout(this, 11, 7);
+ TQVBoxLayout *layout = new TQVBoxLayout(this, 11, 7);
layout->setAutoAdd(true);
layout->setSpacing(7);
}
{
- QHBox *box = new QHBox(this);
+ TQHBox *box = new TQHBox(this);
box->setSpacing(7);
- mSchemaList = new QComboBox(box);
+ mSchemaList = new TQComboBox(box);
connect(
- mSchemaList, SIGNAL(activated(const QString&)),
- SLOT(selectSchema(const QString&))
+ mSchemaList, TQT_SIGNAL(activated(const TQString&)),
+ TQT_SLOT(selectSchema(const TQString&))
);
- mAdd = new QPushButton(BarIconSet("filenew"), 0, box);
+ mAdd = new TQPushButton(BarIconSet("filenew"), 0, box);
mAdd->setFixedWidth(mAdd->height());
- QToolTip::add(mAdd, i18n("Create new schema"));
- connect(mAdd, SIGNAL(clicked()), SLOT(newSchema()));
+ TQToolTip::add(mAdd, i18n("Create new schema"));
+ connect(mAdd, TQT_SIGNAL(clicked()), TQT_SLOT(newSchema()));
- mRemove = new QPushButton(BarIconSet("editdelete"), 0, box);
+ mRemove = new TQPushButton(BarIconSet("editdelete"), 0, box);
mRemove->setFixedWidth(mRemove->height());
- QToolTip::add(mRemove, i18n("Remove this schema"));
- connect(mRemove, SIGNAL(clicked()), SLOT(removeSchema()));
+ TQToolTip::add(mRemove, i18n("Remove this schema"));
+ connect(mRemove, TQT_SIGNAL(clicked()), TQT_SLOT(removeSchema()));
- mCopy = new QPushButton(BarIconSet("editcopy"), 0, box);
+ mCopy = new TQPushButton(BarIconSet("editcopy"), 0, box);
mCopy->setFixedWidth(mCopy->height());
- QToolTip::add(mCopy, i18n("Copy this schema"));
- connect(mCopy, SIGNAL(clicked()), SLOT(copySchema()));
+ TQToolTip::add(mCopy, i18n("Copy this schema"));
+ connect(mCopy, TQT_SIGNAL(clicked()), TQT_SLOT(copySchema()));
}
{
- QHBox *middle = new QHBox(this);
+ TQHBox *middle = new TQHBox(this);
middle->setSpacing(7);
mSchemaTree = new KListView(middle);
connect(
- mSchemaTree, SIGNAL(currentChanged(QListViewItem*)),
- SLOT(setCurrent(QListViewItem*))
+ mSchemaTree, TQT_SIGNAL(currentChanged(TQListViewItem*)),
+ TQT_SLOT(setCurrent(TQListViewItem*))
);
connect(
- mSchemaTree, SIGNAL(moved(QListViewItem *, QListViewItem *, QListViewItem *)),
- SLOT(move(QListViewItem *, QListViewItem *, QListViewItem *))
+ mSchemaTree, TQT_SIGNAL(moved(TQListViewItem *, TQListViewItem *, TQListViewItem *)),
+ TQT_SLOT(move(TQListViewItem *, TQListViewItem *, TQListViewItem *))
);
mSchemaTree->setAcceptDrops(true);
@@ -92,79 +92,79 @@ SchemaConfig::SchemaConfig(QWidget *parent, Oblique *oblique)
mSchemaTree->addColumn(i18n("Value"));
mSchemaTree->addColumn(i18n("Presentation"));
- QVBox *buttons = new QVBox(middle);
+ TQVBox *buttons = new TQVBox(middle);
- mAddSibling = new QPushButton(BarIconSet("1rightarrow", KIcon::SizeSmall), "",buttons);
+ mAddSibling = new TQPushButton(BarIconSet("1rightarrow", KIcon::SizeSmall), "",buttons);
mAddSibling->setFixedWidth(mAddSibling->height());
- connect(mAddSibling, SIGNAL(clicked()), SLOT(addSibling()));
- QToolTip::add(mAddSibling, i18n("Create a new item after the selected one"));
+ connect(mAddSibling, TQT_SIGNAL(clicked()), TQT_SLOT(addSibling()));
+ TQToolTip::add(mAddSibling, i18n("Create a new item after the selected one"));
- mAddChild = new QPushButton(BarIconSet("2rightarrow", KIcon::SizeSmall), "", buttons);
+ mAddChild = new TQPushButton(BarIconSet("2rightarrow", KIcon::SizeSmall), "", buttons);
mAddChild->setFixedWidth(mAddChild->height());
- connect(mAddChild, SIGNAL(clicked()), SLOT(addChild()));
- QToolTip::add(mAddChild, i18n("Create a new child item under the selected one"));
+ connect(mAddChild, TQT_SIGNAL(clicked()), TQT_SLOT(addChild()));
+ TQToolTip::add(mAddChild, i18n("Create a new child item under the selected one"));
- mRemoveSelf = new QPushButton(BarIconSet("filenew", KIcon::SizeSmall), "", buttons);
+ mRemoveSelf = new TQPushButton(BarIconSet("filenew", KIcon::SizeSmall), "", buttons);
mRemoveSelf->setFixedWidth(mRemoveSelf->height());
- connect(mRemoveSelf, SIGNAL(clicked()), SLOT(removeSelf()));
- QToolTip::add(mRemoveSelf, i18n("Remove the selected item"));
+ connect(mRemoveSelf, TQT_SIGNAL(clicked()), TQT_SLOT(removeSelf()));
+ TQToolTip::add(mRemoveSelf, i18n("Remove the selected item"));
- new QWidget(buttons);
+ new TQWidget(buttons);
}
{
- QVBox *side = new QVBox(this);
+ TQVBox *side = new TQVBox(this);
side->setSpacing(7);
// the controllers
{
- QWidget *topSide = new QWidget(side);
- QGridLayout *grid = new QGridLayout(topSide);
+ TQWidget *topSide = new TQWidget(side);
+ TQGridLayout *grid = new TQGridLayout(topSide);
- QLabel *label;
+ TQLabel *label;
- label = new QLabel(i18n("&Property:"), topSide);
+ label = new TQLabel(i18n("&Property:"), topSide);
mPropertyEdit = new KLineEdit(topSide);
label->setBuddy(mPropertyEdit);
grid->addWidget(label, 0, 0);
grid->addMultiCellWidget(mPropertyEdit, 0, 0, 1, 2);
- connect(mPropertyEdit, SIGNAL(textChanged(const QString&)), SLOT(updateCurrent()));
+ connect(mPropertyEdit, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(updateCurrent()));
- label = new QLabel(i18n("&Value:"), topSide);
+ label = new TQLabel(i18n("&Value:"), topSide);
mValueEdit = new KLineEdit(topSide);
label->setBuddy(mPropertyEdit);
grid->addWidget(label, 1, 0);
grid->addMultiCellWidget(mValueEdit, 1, 1, 1, 1);
- connect(mValueEdit, SIGNAL(textChanged(const QString&)), SLOT(updateCurrent()));
+ connect(mValueEdit, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(updateCurrent()));
- QPushButton *editRe = new QPushButton(i18n("&Edit..."), topSide);
+ TQPushButton *editRe = new TQPushButton(i18n("&Edit..."), topSide);
grid->addWidget(editRe, 1, 2);
- connect(editRe, SIGNAL(clicked()), SLOT(editValueRegexp()));
+ connect(editRe, TQT_SIGNAL(clicked()), TQT_SLOT(editValueRegexp()));
- label = new QLabel(i18n("Pre&sentation:"), topSide);
+ label = new TQLabel(i18n("Pre&sentation:"), topSide);
mPresentationEdit = new KLineEdit(topSide);
label->setBuddy(mPropertyEdit);
grid->addWidget(label, 2, 0);
grid->addMultiCellWidget(mPresentationEdit, 2, 2, 1, 2);
- connect(mPresentationEdit, SIGNAL(textChanged(const QString&)), SLOT(updateCurrent()));
+ connect(mPresentationEdit, TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(updateCurrent()));
}
{
- QGroupBox *groupbox = new QGroupBox(
+ TQGroupBox *groupbox = new TQGroupBox(
3, Qt::Horizontal, i18n("Options"), side
);
- mOptionPlayable = new QCheckBox(i18n("Play&able"), groupbox);
- QWhatsThis::add(mOptionPlayable, i18n("This branch represents an individual file. If two items' presentation match, two items are created."));
- connect(mOptionPlayable, SIGNAL(toggled(bool)), SLOT(updateCurrent()));
+ mOptionPlayable = new TQCheckBox(i18n("Play&able"), groupbox);
+ TQWhatsThis::add(mOptionPlayable, i18n("This branch represents an individual file. If two items' presentation match, two items are created."));
+ connect(mOptionPlayable, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCurrent()));
- mOptionChildrenVisible = new QCheckBox(i18n("&Children visible"), groupbox);
- QWhatsThis::add(mOptionChildrenVisible, i18n("Don't create this node, this nodes children become direct children of this node's parent"));
- connect(mOptionChildrenVisible, SIGNAL(toggled(bool)), SLOT(updateCurrent()));
+ mOptionChildrenVisible = new TQCheckBox(i18n("&Children visible"), groupbox);
+ TQWhatsThis::add(mOptionChildrenVisible, i18n("Don't create this node, this nodes children become direct children of this node's parent"));
+ connect(mOptionChildrenVisible, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCurrent()));
- mOptionAutoOpen = new QCheckBox(i18n("Auto &open"), groupbox);
- QWhatsThis::add(mOptionAutoOpen, i18n("This branch is marked as open immediately."));
- connect(mOptionAutoOpen, SIGNAL(toggled(bool)), SLOT(updateCurrent()));
+ mOptionAutoOpen = new TQCheckBox(i18n("Auto &open"), groupbox);
+ TQWhatsThis::add(mOptionAutoOpen, i18n("This branch is marked as open immediately."));
+ connect(mOptionAutoOpen, TQT_SIGNAL(toggled(bool)), TQT_SLOT(updateCurrent()));
}
}
@@ -236,10 +236,10 @@ void SchemaConfig::reopen()
mQueries.clear();
mSchemaTree->clear();
- QStringList names = oblique()->schemaNames();
- QString firstTitle;
+ TQStringList names = oblique()->schemaNames();
+ TQString firstTitle;
- for (QStringList::Iterator i(names.begin()); i != names.end(); ++i)
+ for (TQStringList::Iterator i(names.begin()); i != names.end(); ++i)
{
QueryItem qi;
qi.title = oblique()->loadSchema(qi.query, *i);
@@ -256,10 +256,10 @@ void SchemaConfig::reopen()
void SchemaConfig::save()
{
- for (QMap<QString,QueryItem>::Iterator i(mQueries.begin()); i != mQueries.end(); ++i)
+ for (TQMap<TQString,QueryItem>::Iterator i(mQueries.begin()); i != mQueries.end(); ++i)
{
- QString name = i.key();
- name = QFileInfo(name).fileName();
+ TQString name = i.key();
+ name = TQFileInfo(name).fileName();
if (i.data().changed)
{
oblique()->saveSchema(i.data().query, name, i.data().title);
@@ -269,24 +269,24 @@ void SchemaConfig::save()
}
-QString SchemaConfig::nameToFilename(const QString &_name)
+TQString SchemaConfig::nameToFilename(const TQString &_name)
{
- QString name = _name;
- name = name.replace(QRegExp("[^a-zA-Z0-9]"), "_");
+ TQString name = _name;
+ name = name.replace(TQRegExp("[^a-zA-Z0-9]"), "_");
return name;
}
void SchemaConfig::newSchema()
{
bool ok;
- QString str=KInputDialog::getText(
+ TQString str=KInputDialog::getText(
i18n("Name of Schema"),
i18n("Please enter the name of the new schema:"),
"", &ok, this
);
if (!ok) return;
- QString filename = nameToFilename(str);
+ TQString filename = nameToFilename(str);
if (mQueries.contains(nameToFilename(filename))) return;
@@ -303,14 +303,14 @@ void SchemaConfig::newSchema()
void SchemaConfig::copySchema()
{
bool ok;
- QString str=KInputDialog::getText(
+ TQString str=KInputDialog::getText(
i18n("Name of Schema"),
i18n("Please enter the name of the new schema:"),
"", &ok, this
);
if (!ok) return;
- QString filename = nameToFilename(str);
+ TQString filename = nameToFilename(str);
if (mQueries.contains(nameToFilename(filename))) return;
@@ -332,7 +332,7 @@ void SchemaConfig::removeSchema()
selectSchema(mSchemaList->currentText());
}
-void SchemaConfig::selectSchema(const QString &title)
+void SchemaConfig::selectSchema(const TQString &title)
{
mSchemaTree->clear();
mSchemaList->setCurrentText(title);
@@ -354,8 +354,8 @@ void SchemaConfig::editValueRegexp()
unless (mRegexpEditor)
{
mRegexpEditor =
- KParts::ComponentFactory::createInstanceFromQuery<QDialog>(
- "KRegExpEditor/KRegExpEditor", QString::null, this
+ KParts::ComponentFactory::createInstanceFromQuery<TQDialog>(
+ "KRegExpEditor/KRegExpEditor", TQString::null, this
);
}
@@ -367,12 +367,12 @@ void SchemaConfig::editValueRegexp()
);
iface->setRegExp(mValueEdit->text());
- if (mRegexpEditor->exec() == QDialog::Accepted)
+ if (mRegexpEditor->exec() == TQDialog::Accepted)
mValueEdit->setText(iface->regExp());
}
}
-void SchemaConfig::setCurrent(QListViewItem *_item)
+void SchemaConfig::setCurrent(TQListViewItem *_item)
{
if (!_item) return;
QueryGroupItem *item = static_cast<QueryGroupItem*>(_item);
@@ -398,7 +398,7 @@ void SchemaConfig::updateCurrent()
mod->setPropertyName(mPropertyEdit->text());
mod->setPresentation(mPresentationEdit->text());
- mod->setValue(QRegExp(mValueEdit->text()));
+ mod->setValue(TQRegExp(mValueEdit->text()));
mod->setOption(QueryGroup::AutoOpen, mOptionAutoOpen->isChecked());
mod->setOption(QueryGroup::Playable, mOptionPlayable->isChecked());
@@ -406,7 +406,7 @@ void SchemaConfig::updateCurrent()
item->redisplay();
}
-void SchemaConfig::move(QListViewItem *_item, QListViewItem *, QListViewItem *_afterNow)
+void SchemaConfig::move(TQListViewItem *_item, TQListViewItem *, TQListViewItem *_afterNow)
{
setCurrentModified();
QueryGroupItem *item = static_cast<QueryGroupItem*>(_item);
@@ -490,8 +490,8 @@ void SchemaConfig::setCurrentModified()
SchemaConfig::QueryItem *SchemaConfig::currentQuery()
{
- QString title = mSchemaList->currentText();
- for (QMap<QString,QueryItem>::Iterator i(mQueries.begin()); i != mQueries.end(); ++i)
+ TQString title = mSchemaList->currentText();
+ for (TQMap<TQString,QueryItem>::Iterator i(mQueries.begin()); i != mQueries.end(); ++i)
{
if (i.data().title != title) continue;
return &i.data();
@@ -500,37 +500,37 @@ SchemaConfig::QueryItem *SchemaConfig::currentQuery()
}
-SliceConfig::SliceConfig(QWidget *parent, Oblique *oblique)
- : QWidget(parent)
+SliceConfig::SliceConfig(TQWidget *parent, Oblique *oblique)
+ : TQWidget(parent)
{
mOblique = oblique;
- (new QVBoxLayout(this, 11, 7))->setAutoAdd(true);
+ (new TQVBoxLayout(this, 11, 7))->setAutoAdd(true);
{
- QHBox *middle = new QHBox(this);
+ TQHBox *middle = new TQHBox(this);
middle->setSpacing(7);
mSliceList = new KListView(middle);
- QWhatsThis::add(mSliceList, i18n("The list of slices. A Slice is part of the full collection. This allows you to categorize your playlist. You can add an item to the list by right clicking on it and selecting the Slice you want it in."));
+ TQWhatsThis::add(mSliceList, i18n("The list of slices. A Slice is part of the full collection. This allows you to categorize your playlist. You can add an item to the list by right clicking on it and selecting the Slice you want it in."));
mSliceList->addColumn("");
mSliceList->header()->hide();
mSliceList->setSorting(0);
mSliceList->setItemsRenameable(true);
- QVBox *buttons = new QVBox(middle);
+ TQVBox *buttons = new TQVBox(middle);
- mAdd = new QPushButton(BarIconSet("1rightarrow", KIcon::SizeSmall), "",buttons);
+ mAdd = new TQPushButton(BarIconSet("1rightarrow", KIcon::SizeSmall), "",buttons);
mAdd->setFixedWidth(mAdd->height());
- connect(mAdd, SIGNAL(clicked()), SLOT(addSibling()));
- QToolTip::add(mAdd, i18n("Create a new item"));
+ connect(mAdd, TQT_SIGNAL(clicked()), TQT_SLOT(addSibling()));
+ TQToolTip::add(mAdd, i18n("Create a new item"));
- mRemove = new QPushButton(BarIconSet("filenew", KIcon::SizeSmall), "", buttons);
+ mRemove = new TQPushButton(BarIconSet("filenew", KIcon::SizeSmall), "", buttons);
mRemove->setFixedWidth(mRemove->height());
- connect(mRemove, SIGNAL(clicked()), SLOT(removeSelf()));
- QToolTip::add(mRemove, i18n("Remove the selected item"));
+ connect(mRemove, TQT_SIGNAL(clicked()), TQT_SLOT(removeSelf()));
+ TQToolTip::add(mRemove, i18n("Remove the selected item"));
- new QWidget(buttons);
+ new TQWidget(buttons);
}
}
@@ -557,7 +557,7 @@ public:
SliceListItem *SliceConfig::currentItem()
{
- QListViewItem *c = mSliceList->currentItem();
+ TQListViewItem *c = mSliceList->currentItem();
return static_cast<SliceListItem*>(c);
}
@@ -568,9 +568,9 @@ void SliceConfig::reopen()
mRemovedItems.clear();
mAddedItems.clear();
- QPtrList<Slice> slices = oblique()->base()->slices();
+ TQPtrList<Slice> slices = oblique()->base()->slices();
- for (QPtrListIterator<Slice> i(slices); *i; ++i)
+ for (TQPtrListIterator<Slice> i(slices); *i; ++i)
{
Slice *slice = *i;
new SliceListItem(mSliceList, slice);
@@ -580,7 +580,7 @@ void SliceConfig::reopen()
void SliceConfig::save()
{
for (
- QValueList<Slice*>::Iterator i(mRemovedItems.begin());
+ TQValueList<Slice*>::Iterator i(mRemovedItems.begin());
i != mRemovedItems.end();
++i
)
@@ -590,7 +590,7 @@ void SliceConfig::save()
}
for (
- QValueList<SliceListItem*>::Iterator i(mAddedItems.begin());
+ TQValueList<SliceListItem*>::Iterator i(mAddedItems.begin());
i != mAddedItems.end();
++i
)
@@ -598,7 +598,7 @@ void SliceConfig::save()
oblique()->base()->addSlice((*i)->text(0));
}
- for (QListViewItem *i = mSliceList->firstChild(); i; i = i->nextSibling())
+ for (TQListViewItem *i = mSliceList->firstChild(); i; i = i->nextSibling())
{
SliceListItem *si = static_cast<SliceListItem*>(i);
@@ -639,8 +639,8 @@ void SliceConfig::removeSelf()
Configure::Configure(Oblique *oblique)
: CModule(i18n("Oblique"), i18n("Configure Oblique Playlist"), "", oblique)
{
- (new QVBoxLayout(this))->setAutoAdd(true);
- tabs = new QTabWidget(this);
+ (new TQVBoxLayout(this))->setAutoAdd(true);
+ tabs = new TQTabWidget(this);
tabs->addTab(slice = new SliceConfig(tabs, oblique), i18n("Slices"));
tabs->addTab(schema = new SchemaConfig(tabs, oblique), i18n("Schemas"));
diff --git a/noatun-plugins/oblique/cmodule.h b/noatun-plugins/oblique/cmodule.h
index f60c6c3..41af7f1 100644
--- a/noatun-plugins/oblique/cmodule.h
+++ b/noatun-plugins/oblique/cmodule.h
@@ -23,43 +23,43 @@ Q_OBJECT
KListView *mSchemaTree;
KLineEdit *mPropertyEdit, *mValueEdit, *mPresentationEdit;
- QComboBox *mSchemaList;
+ TQComboBox *mSchemaList;
- QCheckBox *mOptionPlayable, *mOptionChildrenVisible, *mOptionAutoOpen;
+ TQCheckBox *mOptionPlayable, *mOptionChildrenVisible, *mOptionAutoOpen;
- QPushButton *mAdd, *mRemove, *mCopy;
+ TQPushButton *mAdd, *mRemove, *mCopy;
- QPushButton *mAddSibling, *mAddChild, *mRemoveSelf;
+ TQPushButton *mAddSibling, *mAddChild, *mRemoveSelf;
- QDialog *mRegexpEditor;
+ TQDialog *mRegexpEditor;
bool mIgnore;
struct QueryItem
{
Query query;
- QString title;
+ TQString title;
bool changed;
};
- QMap<QString, QueryItem> mQueries;
+ TQMap<TQString, QueryItem> mQueries;
public:
- SchemaConfig(QWidget *parent, Oblique *oblique);
+ SchemaConfig(TQWidget *parent, Oblique *oblique);
Oblique *oblique() { return mOblique; }
void reopen();
void save();
- static QString nameToFilename(const QString &name);
- static QString filenameToName(const QString &filename);
+ static TQString nameToFilename(const TQString &name);
+ static TQString filenameToName(const TQString &filename);
public slots:
void newSchema();
void copySchema();
void removeSchema();
- void selectSchema(const QString &title);
+ void selectSchema(const TQString &title);
void addSibling();
void addChild();
@@ -70,10 +70,10 @@ public slots:
private slots:
void editValueRegexp();
- void setCurrent(QListViewItem *_item);
+ void setCurrent(TQListViewItem *_item);
void updateCurrent();
- void move(QListViewItem *item, QListViewItem *afterFirst, QListViewItem *afterNow);
+ void move(TQListViewItem *item, TQListViewItem *afterFirst, TQListViewItem *afterNow);
private:
QueryItem *currentQuery();
@@ -86,12 +86,12 @@ class SliceConfig : public QWidget
Q_OBJECT
Oblique *mOblique;
KListView *mSliceList;
- QPushButton *mAdd, *mRemove;
- QValueList<SliceListItem*> mAddedItems;
- QValueList<Slice*> mRemovedItems;
+ TQPushButton *mAdd, *mRemove;
+ TQValueList<SliceListItem*> mAddedItems;
+ TQValueList<Slice*> mRemovedItems;
public:
- SliceConfig(QWidget *parent, Oblique *oblique);
+ SliceConfig(TQWidget *parent, Oblique *oblique);
Oblique *oblique() { return mOblique; }
void reopen();
@@ -108,7 +108,7 @@ private slots:
class Configure : public CModule
{
Q_OBJECT
- QTabWidget *tabs;
+ TQTabWidget *tabs;
SchemaConfig *schema;
SliceConfig *slice;
diff --git a/noatun-plugins/oblique/file.cpp b/noatun-plugins/oblique/file.cpp
index b478e0f..2946f23 100644
--- a/noatun-plugins/oblique/file.cpp
+++ b/noatun-plugins/oblique/file.cpp
@@ -38,7 +38,7 @@ File &File::operator=(const File &ref)
return *this;
}
-QString File::file() const
+TQString File::file() const
{
return property("file");
}
@@ -68,13 +68,13 @@ static const Map propertyMap[] =
{ 0, 0 }
};
-QString File::property(const QString &property) const
+TQString File::property(const TQString &property) const
{
- QString str = base()->property(id(), property);
+ TQString str = base()->property(id(), property);
if (!str)
{
- QString mangled = "ob::" + property + "_";
+ TQString mangled = "ob::" + property + "_";
str = base()->property(id(), mangled);
}
@@ -89,10 +89,10 @@ void File::makeCache()
for (int i=0; propertyMap[i].kfmi; i++)
{
- QString kname(propertyMap[i].kfmi);
+ TQString kname(propertyMap[i].kfmi);
if (info.isValid() && kname.length())
{
- QString val = info.item(kname).string(false);
+ TQString val = info.item(kname).string(false);
if (val=="---" || !val.stripWhiteSpace().length())
{ // grr
val = "";
@@ -106,7 +106,7 @@ void File::makeCache()
}
-void File::setProperty(const QString &key, const QString &value)
+void File::setProperty(const TQString &key, const TQString &value)
{
if (property(key) == value) return;
base()->setProperty(id(), key, value);
@@ -114,7 +114,7 @@ void File::setProperty(const QString &key, const QString &value)
p.data()->modified();
}
-void File::clearProperty(const QString &key)
+void File::clearProperty(const TQString &key)
{
if (property(key).isNull()) return;
base()->clearProperty(id(), key);
@@ -122,9 +122,9 @@ void File::clearProperty(const QString &key)
p.data()->modified();
}
-QStringList File::properties() const
+TQStringList File::properties() const
{
- QStringList l = base()->properties(id());
+ TQStringList l = base()->properties(id());
for (int i=0; propertyMap[i].noatun; i++)
{
@@ -147,7 +147,7 @@ void File::setPosition(Query *query, const File &after)
{
setProperty(
"Oblique:after_" + query->name() + '_',
- QString::number(after.id())
+ TQString::number(after.id())
);
}
@@ -155,10 +155,10 @@ bool File::getPosition(const Query *query, File *after) const
{
assert(query);
assert(after);
- QString name = "Oblique:after_" + query->name() + '_';
+ TQString name = "Oblique:after_" + query->name() + '_';
if (name.isEmpty()) return false;
- QString val = property(name);
+ TQString val = property(name);
if (val.isEmpty())
return false;
*after = File(mBase, val.toUInt());
@@ -175,17 +175,17 @@ void File::remove()
void File::addTo(Slice *slice)
{
- QString slices = property("Oblique:slices_");
- slices += "\n" + QString::number(slice->id(), 16);
+ TQString slices = property("Oblique:slices_");
+ slices += "\n" + TQString::number(slice->id(), 16);
setProperty("Oblique:slices_", slices);
emit mBase->addedTo(slice, *this);
}
void File::removeFrom(Slice *slice)
{
- QString slices = property("Oblique:slices_");
- QStringList sliceList = QStringList::split('\n', slices);
- QString sid = QString::number(slice->id(), 16);
+ TQString slices = property("Oblique:slices_");
+ TQStringList sliceList = TQStringList::split('\n', slices);
+ TQString sid = TQString::number(slice->id(), 16);
sliceList.remove(sid);
slices = sliceList.join("\n");
@@ -198,9 +198,9 @@ bool File::isIn(const Slice *slice) const
int id = slice->id();
if (id==0) return true;
- QString slices = property("Oblique:slices_");
- QStringList sliceList = QStringList::split('\n', slices);
- for (QStringList::Iterator i(sliceList.begin()); i!= sliceList.end(); ++i)
+ TQString slices = property("Oblique:slices_");
+ TQStringList sliceList = TQStringList::split('\n', slices);
+ for (TQStringList::Iterator i(sliceList.begin()); i!= sliceList.end(); ++i)
{
if ((*i).toInt(0, 16) == id) return true;
}
@@ -209,20 +209,20 @@ bool File::isIn(const Slice *slice) const
-Slice::Slice(Base *base, int id, const QString &name)
+Slice::Slice(Base *base, int id, const TQString &name)
{
mId = id;
mBase = base;
mName = name;
}
-QString Slice::name() const
+TQString Slice::name() const
{
if (mId == 0) return i18n("Complete Collection");
return mName;
}
-void Slice::setName(const QString &name)
+void Slice::setName(const TQString &name)
{
if (mId == 0) return;
mName = name;
diff --git a/noatun-plugins/oblique/file.h b/noatun-plugins/oblique/file.h
index 21d3be9..d2a43f0 100644
--- a/noatun-plugins/oblique/file.h
+++ b/noatun-plugins/oblique/file.h
@@ -42,12 +42,12 @@ public:
inline operator bool() const { return mId; }
- QString file() const;
+ TQString file() const;
KURL url() const;
- QString property(const QString &property) const;
- void setProperty(const QString &key, const QString &value);
- void clearProperty(const QString &key);
- QStringList properties() const;
+ TQString property(const TQString &property) const;
+ void setProperty(const TQString &key, const TQString &value);
+ void clearProperty(const TQString &key);
+ TQStringList properties() const;
inline FileId id() const { return mId; }
void setId(FileId id);
@@ -87,7 +87,7 @@ public:
class Slice
{
int mId;
- QString mName;
+ TQString mName;
Base *mBase;
public:
@@ -95,10 +95,10 @@ public:
* @internal
* create a slice based on its data
**/
- Slice(Base *base, int id, const QString &name);
+ Slice(Base *base, int id, const TQString &name);
- QString name() const;
- void setName(const QString &name);
+ TQString name() const;
+ void setName(const TQString &name);
/**
* remove this slice from the list of slices
diff --git a/noatun-plugins/oblique/kbuffer.h b/noatun-plugins/oblique/kbuffer.h
index adc62ba..63e626b 100644
--- a/noatun-plugins/oblique/kbuffer.h
+++ b/noatun-plugins/oblique/kbuffer.h
@@ -5,7 +5,7 @@
#ifndef KBUFFER_H
#define KBUFFER_H
-#include <qiodevice.h>
+#include <tqiodevice.h>
#include <vector>
#include <queue>
@@ -14,7 +14,7 @@
*@author Eray Ozkural (exa)
*/
-class KBuffer : public QIODevice {
+class KBuffer : public TQIODevice {
public:
KBuffer();
~KBuffer();
diff --git a/noatun-plugins/oblique/kdatacollection.cpp b/noatun-plugins/oblique/kdatacollection.cpp
index 9e2ddac..ed57aea 100644
--- a/noatun-plugins/oblique/kdatacollection.cpp
+++ b/noatun-plugins/oblique/kdatacollection.cpp
@@ -23,46 +23,46 @@
#include <kglobal.h>
#include <kstandarddirs.h>
-#include <qfile.h>
-#include <qfileinfo.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
KDataCollection::KDataCollection(
- KConfig *config, const QString &group, const QString &entry,
- const char *datadir, const QString &dir
+ KConfig *config, const TQString &group, const TQString &entry,
+ const char *datadir, const TQString &dir
)
{
init(config, group, entry, datadir, dir);
}
KDataCollection::KDataCollection(
- KConfig *config, const QString &group, const QString &entry,
- const QString &dir
+ KConfig *config, const TQString &group, const TQString &entry,
+ const TQString &dir
)
{
init(config, group, entry, "appdata", dir);
}
KDataCollection::KDataCollection(
- KConfig *config, const QString &group, const QString &dir
+ KConfig *config, const TQString &group, const TQString &dir
)
{
init(config, group, dir, "appdata", dir);
}
-KDataCollection::KDataCollection(KConfig *config, const QString &dir)
+KDataCollection::KDataCollection(KConfig *config, const TQString &dir)
{
init(config, "KDataCollection", dir, "appdata", dir);
}
-KDataCollection::KDataCollection(const QString &dir)
+KDataCollection::KDataCollection(const TQString &dir)
{
init(KGlobal::config(), "KDataCollection", dir, "appdata", dir);
}
void KDataCollection::init(
- KConfig *config, const QString &group, const QString &entry,
- const char *datadir, const QString &dir
+ KConfig *config, const TQString &group, const TQString &entry,
+ const char *datadir, const TQString &dir
)
{
mConfig = config;
@@ -72,19 +72,19 @@ void KDataCollection::init(
mDatadir = datadir;
}
-QStringList KDataCollection::names() const
+TQStringList KDataCollection::names() const
{
KConfigGroup g(mConfig, mGroup);
// these are the entries I have
- QStringList n = g.readListEntry(mEntry);
- QStringList fs = KGlobal::dirs()->findAllResources(mDatadir, mDir+"/*", false, true);
- QStringList total;
+ TQStringList n = g.readListEntry(mEntry);
+ TQStringList fs = KGlobal::dirs()->findAllResources(mDatadir, mDir+"/*", false, true);
+ TQStringList total;
- for (QStringList::Iterator i(fs.begin()); i != fs.end(); ++i)
+ for (TQStringList::Iterator i(fs.begin()); i != fs.end(); ++i)
{
- QFileInfo fi(*i);
- QString name = fi.fileName();
+ TQFileInfo fi(*i);
+ TQString name = fi.fileName();
if (!n.contains(name))
{
total.append(name);
@@ -94,28 +94,28 @@ QStringList KDataCollection::names() const
return total;
}
-void KDataCollection::remove(const QString &name)
+void KDataCollection::remove(const TQString &name)
{
KConfigGroup g(mConfig, mGroup);
- QString location = file(name);
+ TQString location = file(name);
if (location.isEmpty()) return;
if (location == saveFile(name, false))
{
- QFile(location).remove();
+ TQFile(location).remove();
// is there a system one too?
location = file(name, false);
if (location.isEmpty()) return;
}
- QStringList n = g.readListEntry(mEntry);
+ TQStringList n = g.readListEntry(mEntry);
if (n.contains(name)) return;
n.append(name);
g.writeEntry(mEntry, n);
}
-QString KDataCollection::file(const QString &name, bool create)
+TQString KDataCollection::file(const TQString &name, bool create)
{
- QString path = ::locate(mDatadir, mDir+"/"+name);
+ TQString path = ::locate(mDatadir, mDir+"/"+name);
if (path.isEmpty() && create)
{
@@ -124,20 +124,20 @@ QString KDataCollection::file(const QString &name, bool create)
return path;
}
-QString KDataCollection::saveFile(const QString &name, bool create)
+TQString KDataCollection::saveFile(const TQString &name, bool create)
{
if (!KGlobal::dirs()->isRestrictedResource(mDatadir, mDir+"/"+name))
{
- QString s = KGlobal::dirs()->saveLocation(mDatadir, mDir, create);
+ TQString s = KGlobal::dirs()->saveLocation(mDatadir, mDir, create);
if (s.length() && create)
{
s += "/" + name;
- QFile(s).open(IO_ReadWrite); // create it
+ TQFile(s).open(IO_ReadWrite); // create it
}
return s;
}
- return QString::null;
+ return TQString::null;
}
diff --git a/noatun-plugins/oblique/kdatacollection.h b/noatun-plugins/oblique/kdatacollection.h
index e8820f3..a737e43 100644
--- a/noatun-plugins/oblique/kdatacollection.h
+++ b/noatun-plugins/oblique/kdatacollection.h
@@ -20,8 +20,8 @@
#ifndef KDATACOLLECTION_H
#define KDATACOLLECTION_H
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
class KConfig;
@@ -36,9 +36,9 @@ class KConfig;
*
*<pre>
* KDataCollection profiles("appname/ui_profiles");
- * QStringList letUserSelectOne = profiles.names();
- * QString fileToOpen = profiles.file(theOneUserSelected);
- * QString fileToWriteTo = profiles.saveFile(theOneUserSelected);
+ * TQStringList letUserSelectOne = profiles.names();
+ * TQString fileToOpen = profiles.file(theOneUserSelected);
+ * TQString fileToWriteTo = profiles.saveFile(theOneUserSelected);
*</pre>
*
* @author Charles Samuels <[email protected]>
@@ -46,7 +46,7 @@ class KConfig;
class KDataCollection
{
KConfig *mConfig;
- QString mGroup, mEntry, mDir;
+ TQString mGroup, mEntry, mDir;
const char *mDatadir;
struct Private;
@@ -60,8 +60,8 @@ public:
* @param datadir is what is passed to locate, this is "appdata" by default
**/
KDataCollection(
- KConfig *config, const QString &group, const QString &entry,
- const char *datadir, const QString &dir
+ KConfig *config, const TQString &group, const TQString &entry,
+ const char *datadir, const TQString &dir
);
/**
@@ -69,8 +69,8 @@ public:
* settings, @p dir is the second argument to locate("appdata", ...)
**/
KDataCollection(
- KConfig *config, const QString &group, const QString &entry,
- const QString &dir
+ KConfig *config, const TQString &group, const TQString &entry,
+ const TQString &dir
);
/**
@@ -80,8 +80,8 @@ public:
* otherwise the same as the previous function
**/
KDataCollection(
- KConfig *config, const QString &group,
- const QString &dir
+ KConfig *config, const TQString &group,
+ const TQString &dir
);
/**
@@ -91,26 +91,26 @@ public:
*
* otherwise the same as the previous function
**/
- KDataCollection(KConfig *config, const QString &dir);
+ KDataCollection(KConfig *config, const TQString &dir);
/**
* constructor. the KConfig is assumed to be KGlobal::config()
*
* otherwise the same as the previous function
**/
- KDataCollection(const QString &dir);
+ KDataCollection(const TQString &dir);
/**
* returns a list of existant, non hidden files
**/
- QStringList names() const;
+ TQStringList names() const;
/**
* deletes the file if it is in KDEHOME, or marks it as hidden if it's a
* system file
**/
- void remove(const QString &name);
+ void remove(const TQString &name);
/**
* @returns the filename for a file named @p name, if @p create
@@ -119,7 +119,7 @@ public:
*
* if you want to modify this file, you should use saveFile instead
**/
- QString file(const QString &name, bool create=true);
+ TQString file(const TQString &name, bool create=true);
/**
* @returns the filename for a file you can save into. If @p create is
@@ -132,12 +132,12 @@ public:
* It will not return a file if the Kiosk framework claims that it's
* restricted
**/
- QString saveFile(const QString &name, bool create=true);
+ TQString saveFile(const TQString &name, bool create=true);
private:
void init(
- KConfig *config, const QString &group, const QString &entry,
- const char *datadir, const QString &dir
+ KConfig *config, const TQString &group, const TQString &entry,
+ const char *datadir, const TQString &dir
);
};
diff --git a/noatun-plugins/oblique/kdbt.h b/noatun-plugins/oblique/kdbt.h
index acaae57..4ecc71a 100644
--- a/noatun-plugins/oblique/kdbt.h
+++ b/noatun-plugins/oblique/kdbt.h
@@ -7,8 +7,8 @@
#define KDbt_Interface
#include <db_cxx.h>
-#include <qdatastream.h>
-#include <qbuffer.h>
+#include <tqdatastream.h>
+#include <tqbuffer.h>
#include "kbuffer.h"
/**A generic wrapper for "database thang" class that abstracts binary streaming operations.
@@ -19,8 +19,8 @@ template <typename T>
class KDbt : public Dbt {
public:
/* assume streaming operators on QDataStream
- QDataStream & operator>> ( QDataStream& >>, T &);
- QDataStream & operator<< ( QDataStream& >>, T &);
+ TQDataStream & operator>> ( TQDataStream& >>, T &);
+ TQDataStream & operator<< ( TQDataStream& >>, T &);
*/
KDbt() {
}
@@ -34,7 +34,7 @@ public:
/** set "thang" to the contents of obj */
void set(const T& obj) {
// KBuffer buffer(thang);
- QDataStream ds(&thang);
+ TQDataStream ds(&thang);
ds << obj;
// std::cerr << "thang size " << thang.size() << endl;
// buffer.close();
@@ -44,15 +44,15 @@ public:
set_size(thang.size());
}
void get(T& obj) {
- QByteArray buffer;
+ TQByteArray buffer;
buffer.setRawData((char*)get_data(),get_size());
- QDataStream ds(buffer,IO_ReadWrite);
+ TQDataStream ds(buffer,IO_ReadWrite);
ds >> obj;
buffer.resetRawData((char*)get_data(),get_size());
}
private:
/** Internal data */
-// QByteArray thang;
+// TQByteArray thang;
KBuffer thang;
};
diff --git a/noatun-plugins/oblique/menu.cpp b/noatun-plugins/oblique/menu.cpp
index 0556d88..3867f19 100644
--- a/noatun-plugins/oblique/menu.cpp
+++ b/noatun-plugins/oblique/menu.cpp
@@ -7,25 +7,25 @@
#include "tree.h"
-FileMenu::FileMenu(QWidget *parent, Oblique *oblique, File file)
+FileMenu::FileMenu(TQWidget *parent, Oblique *oblique, File file)
: KPopupMenu(parent)
{
if (file)
mFiles.append(file);
insertItem(
BarIconSet("delete"), i18n("&Remove From Playlist"),
- this, SLOT(removeFromList())
+ this, TQT_SLOT(removeFromList())
);
- insertItem(i18n("&Properties"), this, SLOT(properties()));
+ insertItem(i18n("&Properties"), this, TQT_SLOT(properties()));
(new SliceListAction(
i18n("&Slices"), oblique,
- this, SLOT(toggleInSlice(Slice *)),
+ this, TQT_SLOT(toggleInSlice(Slice *)),
mFiles, this
))->plug(this);
}
-static void addTo(QValueList<File> &files, TreeItem *item)
+static void addTo(TQValueList<File> &files, TreeItem *item)
{
File f = item->file();
if (f) files.append(f);
@@ -39,27 +39,27 @@ static void addTo(QValueList<File> &files, TreeItem *item)
}
}
-FileMenu::FileMenu(QWidget *parent, Oblique *oblique, TreeItem *items)
+FileMenu::FileMenu(TQWidget *parent, Oblique *oblique, TreeItem *items)
: KPopupMenu(parent)
{
addTo(mFiles, items);
insertItem(
BarIconSet("delete"), i18n("&Remove From Playlist"),
- this, SLOT(removeFromList())
+ this, TQT_SLOT(removeFromList())
);
- insertItem(i18n("&Properties"), this, SLOT(properties()));
+ insertItem(i18n("&Properties"), this, TQT_SLOT(properties()));
(new SliceListAction(
i18n("&Slices"), oblique,
- this, SLOT(toggleInSlice(Slice *)),
+ this, TQT_SLOT(toggleInSlice(Slice *)),
mFiles, this
))->plug(this);
}
void FileMenu::removeFromList()
{
- for (QValueList<File>::Iterator i(mFiles.begin()); i != mFiles.end(); ++i)
+ for (TQValueList<File>::Iterator i(mFiles.begin()); i != mFiles.end(); ++i)
{
(*i).remove();
}
@@ -73,7 +73,7 @@ void FileMenu::properties()
void FileMenu::toggleInSlice(Slice *slice)
{
void (File::*task)(Slice*)=0;
- for (QValueList<File>::Iterator i(mFiles.begin()); i != mFiles.end(); ++i)
+ for (TQValueList<File>::Iterator i(mFiles.begin()); i != mFiles.end(); ++i)
{
if (!task)
{ // we check with the first one
@@ -90,18 +90,18 @@ void FileMenu::toggleInSlice(Slice *slice)
SliceListAction::SliceListAction(
- const QString &text, Oblique *oblique,
- QObject *reciever, const char *slot,
- const QValueList<File> &files, QObject *parent, const char *name
+ const TQString &text, Oblique *oblique,
+ TQObject *reciever, const char *slot,
+ const TQValueList<File> &files, TQObject *parent, const char *name
) : KActionMenu(text, parent, name)
{
mFiles = files;
mOblique = oblique;
slicesModified();
if (reciever)
- connect(this, SIGNAL(activated(Slice*)), reciever, slot);
- connect(popupMenu(), SIGNAL(activated(int)), SLOT(hit(int)));
- connect(oblique->base(), SIGNAL(slicesModified()), SLOT(slicesModified()));
+ connect(this, TQT_SIGNAL(activated(Slice*)), reciever, slot);
+ connect(popupMenu(), TQT_SIGNAL(activated(int)), TQT_SLOT(hit(int)));
+ connect(oblique->base(), TQT_SIGNAL(slicesModified()), TQT_SLOT(slicesModified()));
}
void SliceListAction::slicesModified()
@@ -110,12 +110,12 @@ void SliceListAction::slicesModified()
KPopupMenu *menu = popupMenu();
menu->clear();
- QPtrList<Slice> slices = mOblique->base()->slices();
+ TQPtrList<Slice> slices = mOblique->base()->slices();
int id=1;
- for (QPtrListIterator<Slice> i(slices); *i; ++i)
+ for (TQPtrListIterator<Slice> i(slices); *i; ++i)
{
Slice *s = *i;
if (s->id()==0 && mFiles.count())
@@ -151,16 +151,16 @@ void SliceListAction::hit(int index)
SchemaListAction::SchemaListAction(
- const QString &text,
- QObject *reciever, const char *slot,
- QObject *parent, const char *name
+ const TQString &text,
+ TQObject *reciever, const char *slot,
+ TQObject *parent, const char *name
) : KActionMenu(text, parent, name)
{
mTree = 0;
if (reciever)
- connect(this, SIGNAL(activated(const QString&)), reciever, slot);
- connect(popupMenu(), SIGNAL(aboutToShow()), SLOT(prepare()));
- connect(popupMenu(), SIGNAL(activated(int)), SLOT(hit(int)));
+ connect(this, TQT_SIGNAL(activated(const TQString&)), reciever, slot);
+ connect(popupMenu(), TQT_SIGNAL(aboutToShow()), TQT_SLOT(prepare()));
+ connect(popupMenu(), TQT_SIGNAL(activated(int)), TQT_SLOT(hit(int)));
}
void SchemaListAction::prepare()
@@ -174,12 +174,12 @@ void SchemaListAction::prepare()
int id=1;
- QStringList names = mTree->oblique()->schemaNames();
+ TQStringList names = mTree->oblique()->schemaNames();
- for (QStringList::Iterator i(names.begin()); i != names.end(); ++i)
+ for (TQStringList::Iterator i(names.begin()); i != names.end(); ++i)
{
Query q;
- QString title = mTree->oblique()->loadSchema(q, *i);
+ TQString title = mTree->oblique()->loadSchema(q, *i);
menu->insertItem(title, id);
@@ -197,11 +197,11 @@ void SchemaListAction::hit(int index)
-ObliquePropertiesDialog::ObliquePropertiesDialog(const QValueList<File> &files, QWidget *parent)
+ObliquePropertiesDialog::ObliquePropertiesDialog(const TQValueList<File> &files, TQWidget *parent)
: KPropertiesDialog(makeItems(files), parent), mFiles(files)
{
- connect(this, SIGNAL(propertiesClosed()), SLOT(deleteLater()));
- connect(this, SIGNAL(applied()), SLOT(modified()));
+ connect(this, TQT_SIGNAL(propertiesClosed()), TQT_SLOT(deleteLater()));
+ connect(this, TQT_SIGNAL(applied()), TQT_SLOT(modified()));
show();
}
@@ -209,17 +209,17 @@ ObliquePropertiesDialog::ObliquePropertiesDialog(const QValueList<File> &files,
void ObliquePropertiesDialog::modified()
{
// TODO reload the file's info
- for (QValueList<File>::Iterator i(mFiles.begin()); i != mFiles.end(); ++i)
+ for (TQValueList<File>::Iterator i(mFiles.begin()); i != mFiles.end(); ++i)
{
(*i).makeCache();
(*i).base()->notifyChanged(*i);
}
}
-KFileItemList ObliquePropertiesDialog::makeItems(const QValueList<File> &files)
+KFileItemList ObliquePropertiesDialog::makeItems(const TQValueList<File> &files)
{
KFileItemList kl;
- for (QValueList<File>::ConstIterator i(files.begin()); i != files.end(); ++i)
+ for (TQValueList<File>::ConstIterator i(files.begin()); i != files.end(); ++i)
{
File f = *i;
kl.append(new KFileItem(f.url(), f.property("mimetype"), KFileItem::Unknown));
diff --git a/noatun-plugins/oblique/menu.h b/noatun-plugins/oblique/menu.h
index 793180c..da464dc 100644
--- a/noatun-plugins/oblique/menu.h
+++ b/noatun-plugins/oblique/menu.h
@@ -17,14 +17,14 @@
class FileMenu : public KPopupMenu
{
Q_OBJECT
- QValueList<File> mFiles;
+ TQValueList<File> mFiles;
public:
- FileMenu(QWidget *parent, Oblique *oblique, File file);
+ FileMenu(TQWidget *parent, Oblique *oblique, File file);
/**
* @recursively uses everything under @p files
**/
- FileMenu(QWidget *parent, Oblique *oblique, TreeItem *files);
+ FileMenu(TQWidget *parent, Oblique *oblique, TreeItem *files);
private slots:
void removeFromList();
@@ -35,15 +35,15 @@ private slots:
class SliceListAction : public KActionMenu
{
Q_OBJECT
- QMap<int, Slice*> mIndexToSlices;
- QValueList<File> mFiles;
+ TQMap<int, Slice*> mIndexToSlices;
+ TQValueList<File> mFiles;
Oblique *mOblique;
public:
SliceListAction(
- const QString &text, Oblique *oblique,
- QObject *reciever, const char *slot,
- const QValueList<File> &files = QValueList<File>(), QObject *parent=0, const char *name=0
+ const TQString &text, Oblique *oblique,
+ TQObject *reciever, const char *slot,
+ const TQValueList<File> &files = TQValueList<File>(), TQObject *parent=0, const char *name=0
);
signals:
@@ -58,20 +58,20 @@ private slots:
class SchemaListAction : public KActionMenu
{
Q_OBJECT
- QMap<int, QString> mIndexToSchemas;
+ TQMap<int, TQString> mIndexToSchemas;
Tree *mTree;
public:
SchemaListAction(
- const QString &text,
- QObject *reciever, const char *slot,
- QObject *parent, const char *name
+ const TQString &text,
+ TQObject *reciever, const char *slot,
+ TQObject *parent, const char *name
);
void setTree(Tree *tree) { mTree = tree; }
signals:
- void activated(const QString &);
+ void activated(const TQString &);
private slots:
void hit(int index);
@@ -82,13 +82,13 @@ private slots:
class ObliquePropertiesDialog : public KPropertiesDialog
{
Q_OBJECT
- QValueList<File> mFiles;
+ TQValueList<File> mFiles;
public:
- ObliquePropertiesDialog(const QValueList<File> &files, QWidget *parent);
+ ObliquePropertiesDialog(const TQValueList<File> &files, TQWidget *parent);
private:
- static KFileItemList makeItems(const QValueList<File> &files);
+ static KFileItemList makeItems(const TQValueList<File> &files);
private slots:
void modified();
diff --git a/noatun-plugins/oblique/oblique.cpp b/noatun-plugins/oblique/oblique.cpp
index 97e75be..234833a 100644
--- a/noatun-plugins/oblique/oblique.cpp
+++ b/noatun-plugins/oblique/oblique.cpp
@@ -15,7 +15,7 @@
#include <kio/job.h>
#include <kfileitem.h>
-#include <qtimer.h>
+#include <tqtimer.h>
extern "C" Plugin *create_plugin()
{
@@ -35,15 +35,15 @@ Oblique::Oblique()
mBase = new Base(::locate("data", "noatun/")+"/oblique-list");
mView = new View(this);
- connect(napp->player(), SIGNAL(loopTypeChange(int)), SLOT(loopTypeChange(int)));
+ connect(napp->player(), TQT_SIGNAL(loopTypeChange(int)), TQT_SLOT(loopTypeChange(int)));
mSelector = new SequentialSelector(mView->tree());
new Configure(this);
// psst, window's gone, pass it on!
- connect(mView, SIGNAL(listHidden()), SIGNAL(listHidden()));
- connect(mView, SIGNAL(listShown()), SIGNAL(listShown()));
+ connect(mView, TQT_SIGNAL(listHidden()), TQT_SIGNAL(listHidden()));
+ connect(mView, TQT_SIGNAL(listShown()), TQT_SIGNAL(listShown()));
loopTypeChange(napp->player()->loopStyle());
}
@@ -185,21 +185,21 @@ void Oblique::beginDirectoryAdd(const KURL &url)
else
{
mAdder = new DirectoryAdder(url, this);
- connect(mAdder, SIGNAL(done()), SLOT(adderDone()));
+ connect(mAdder, TQT_SIGNAL(done()), TQT_SLOT(adderDone()));
}
}
Loader::Loader(Tree *tree)
- : QObject(tree)
+ : TQObject(tree)
{
mTree = tree;
mBase = mTree->oblique()->base();
mDeferredLoaderAt=1;
- QTimer::singleShot(0, this, SLOT(loadItemsDeferred()));
+ TQTimer::singleShot(0, this, TQT_SLOT(loadItemsDeferred()));
}
void Loader::loadItemsDeferred()
@@ -228,7 +228,7 @@ void Loader::loadItemsDeferred()
mDeferredLoaderAt++;
}
- QTimer::singleShot(0, this, SLOT(loadItemsDeferred()));
+ TQTimer::singleShot(0, this, TQT_SLOT(loadItemsDeferred()));
}
@@ -265,16 +265,16 @@ void DirectoryAdder::addNextPending()
currentJobURL= *pendingIt;
listJob = KIO::listDir(currentJobURL, false, false);
connect(
- listJob, SIGNAL(entries(KIO::Job*, const KIO::UDSEntryList&)),
- SLOT(slotEntries(KIO::Job*, const KIO::UDSEntryList&))
+ listJob, TQT_SIGNAL(entries(KIO::Job*, const KIO::UDSEntryList&)),
+ TQT_SLOT(slotEntries(KIO::Job*, const KIO::UDSEntryList&))
);
connect(
- listJob, SIGNAL(result(KIO::Job *)),
- SLOT(slotResult(KIO::Job *))
+ listJob, TQT_SIGNAL(result(KIO::Job *)),
+ TQT_SLOT(slotResult(KIO::Job *))
);
connect(
- listJob, SIGNAL(redirection(KIO::Job *, const KURL &)),
- SLOT(slotRedirection(KIO::Job *, const KURL &))
+ listJob, TQT_SIGNAL(redirection(KIO::Job *, const KURL &)),
+ TQT_SLOT(slotRedirection(KIO::Job *, const KURL &))
);
pendingAddDirectories.remove(pendingIt);
lastAddedSubDirectory = pendingAddDirectories.begin();
@@ -293,7 +293,7 @@ void DirectoryAdder::slotResult(KIO::Job *job)
void DirectoryAdder::slotEntries(KIO::Job *, const KIO::UDSEntryList &entries)
{
- QMap<QString,KURL> __list; // temp list to sort entries
+ TQMap<TQString,KURL> __list; // temp list to sort entries
KIO::UDSEntryListConstIterator it = entries.begin();
KIO::UDSEntryListConstIterator end = entries.end();
@@ -309,7 +309,7 @@ void DirectoryAdder::slotEntries(KIO::Job *, const KIO::UDSEntryList &entries)
// - copied over from old kdirlister hack <[email protected]>
__list.insert(file.url().path(), file.url());
}
- QMap<QString,KURL>::Iterator __it;
+ TQMap<TQString,KURL>::Iterator __it;
for( __it = __list.begin(); __it != __list.end(); ++__it )
{
oblique()->addFile(__it.data(), false);
diff --git a/noatun-plugins/oblique/oblique.h b/noatun-plugins/oblique/oblique.h
index 93d1e18..f7e6bc8 100644
--- a/noatun-plugins/oblique/oblique.h
+++ b/noatun-plugins/oblique/oblique.h
@@ -40,21 +40,21 @@ public:
Base *base() { return mBase; }
- QStringList schemaNames() const { return mSchemaCollection.names(); }
- QString loadSchema(Query &q, const QString &name)
+ TQStringList schemaNames() const { return mSchemaCollection.names(); }
+ TQString loadSchema(Query &q, const TQString &name)
{
- QString t = q.load(mSchemaCollection.file(name));
+ TQString t = q.load(mSchemaCollection.file(name));
if (t.length())
q.setName(name);
return t;
}
- void saveSchema(Query &q, const QString &name, const QString &title)
+ void saveSchema(Query &q, const TQString &name, const TQString &title)
{
q.save(title, mSchemaCollection.saveFile(name));
}
- void removeSchema(const QString &name)
+ void removeSchema(const TQString &name)
{
mSchemaCollection.remove(name);
}
diff --git a/noatun-plugins/oblique/query.cpp b/noatun-plugins/oblique/query.cpp
index 292ff16..8c85b59 100644
--- a/noatun-plugins/oblique/query.cpp
+++ b/noatun-plugins/oblique/query.cpp
@@ -8,8 +8,8 @@
#include <klocale.h>
-#include <qdom.h>
-#include <qfile.h>
+#include <tqdom.h>
+#include <tqfile.h>
QueryGroup::QueryGroup()
{
@@ -136,23 +136,23 @@ void QueryGroup::setOption(Option option, bool on)
bool QueryGroup::matches(const File &file) const
{
- QString prop = file.property(propertyName());
+ TQString prop = file.property(propertyName());
prop = prop.simplifyWhiteSpace();
if (prop.isNull()) prop = "";
- QRegExp re(value());
+ TQRegExp re(value());
return re.search(prop) != -1;
}
-QString QueryGroup::presentation(const File &file) const
+TQString QueryGroup::presentation(const File &file) const
{
// "$(property)"
- QString format=presentation();
+ TQString format=presentation();
- QRegExp find("(?:(?:\\\\\\\\))*\\$\\((.*)");
+ TQRegExp find("(?:(?:\\\\\\\\))*\\$\\((.*)");
int start=0;
while (start != -1)
@@ -166,7 +166,7 @@ QString QueryGroup::presentation(const File &file) const
// yes, so half the amount of backslashes
// count how many there are first
- QRegExp counter("([\\\\]+)");
+ TQRegExp counter("([\\\\]+)");
counter.search(format, start-1);
uint len=counter.cap(1).length()-1;
@@ -181,7 +181,7 @@ QString QueryGroup::presentation(const File &file) const
if (format[start]=='\\')
{
// count how many there are first
- QRegExp counter("([\\\\]+)");
+ TQRegExp counter("([\\\\]+)");
counter.search(format, start);
uint len=counter.cap(1).length();
@@ -191,8 +191,8 @@ QString QueryGroup::presentation(const File &file) const
}
// "sth"foo"sth"
- QString cont(find.cap(1));
- QString prefix,suffix,propname;
+ TQString cont(find.cap(1));
+ TQString prefix,suffix,propname;
unsigned int i=0;
if (cont[i] == '"')
{
@@ -231,7 +231,7 @@ QString QueryGroup::presentation(const File &file) const
i++;
- QString propval = file.property(propname);
+ TQString propval = file.property(propname);
// the following code won't be enabled until the presentation is reloaded
// at the best times
@@ -318,27 +318,27 @@ void Query::clear()
mGroupFirst=0;
}
-QString Query::load(const QString &filename)
+TQString Query::load(const TQString &filename)
{
- QFile file(filename);
- unless (file.open(IO_ReadOnly)) return QString::null;
+ TQFile file(filename);
+ unless (file.open(IO_ReadOnly)) return TQString::null;
- QDomDocument doc;
+ TQDomDocument doc;
doc.setContent(&file);
return load(doc.documentElement());
}
-QString Query::load(QDomElement element)
+TQString Query::load(TQDomElement element)
{
clear();
if (element.tagName().lower() == "obliqueschema")
{
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while (!node.isNull())
{
- QDomElement e = node.toElement();
+ TQDomElement e = node.toElement();
if (e.tagName().lower() == "group")
loadGroup(e);
node = node.nextSibling();
@@ -346,20 +346,20 @@ QString Query::load(QDomElement element)
}
else
{
- return QString::null;
+ return TQString::null;
}
// for internationalization:
// Add these if you create new schemas and release them with Oblique
(void)I18N_NOOP("Standard");
- QString title = element.attribute("title");
+ TQString title = element.attribute("title");
if (element.hasAttribute("standard"))
title = i18n(title.utf8());
return title;
}
-void Query::save(const QString &name, QDomElement &element)
+void Query::save(const TQString &name, TQDomElement &element)
{
element.setTagName("ObliqueSchema");
element.setAttribute("version", "1.0");
@@ -368,22 +368,22 @@ void Query::save(const QString &name, QDomElement &element)
saveGroup(element, g);
}
-void Query::save(const QString &name, const QString &filename)
+void Query::save(const TQString &name, const TQString &filename)
{
- QFile file(filename);
+ TQFile file(filename);
unless (file.open(IO_Truncate|IO_ReadWrite ))
return;
- QDomDocument doc("ObliqueSchema");
- doc.setContent(QString("<!DOCTYPE ObliqueSchema><ObliqueSchema/>"));
- QDomElement e = doc.documentElement();
+ TQDomDocument doc("ObliqueSchema");
+ doc.setContent(TQString("<!DOCTYPE ObliqueSchema><ObliqueSchema/>"));
+ TQDomElement e = doc.documentElement();
save(name, e);
- QTextStream ts(&file);
- ts.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream ts(&file);
+ ts.setEncoding(TQTextStream::UnicodeUTF8);
// scourge elimination
- QString data = doc.toString();
- QString old = data;
- while (data.replace(QRegExp("([\n\r]+)(\t*) "), "\\1\\2\t") != old)
+ TQString data = doc.toString();
+ TQString old = data;
+ while (data.replace(TQRegExp("([\n\r]+)(\t*) "), "\\1\\2\t") != old)
{
old = data;
}
@@ -438,9 +438,9 @@ void Query::dump()
-void Query::loadGroup(QDomElement element, QueryGroup *parent)
+void Query::loadGroup(TQDomElement element, QueryGroup *parent)
{
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
QueryGroup *group = new QueryGroup;
if (parent)
@@ -457,7 +457,7 @@ void Query::loadGroup(QDomElement element, QueryGroup *parent)
while (!node.isNull())
{
- QDomElement e = node.toElement();
+ TQDomElement e = node.toElement();
if (e.tagName().lower() == "group")
{
loadGroup(e, group);
@@ -468,7 +468,7 @@ void Query::loadGroup(QDomElement element, QueryGroup *parent)
}
else if (e.tagName().lower() == "value")
{
- group->setValue(QRegExp(e.text()));
+ group->setValue(TQRegExp(e.text()));
}
else if (e.tagName().lower() == "presentation")
{
@@ -476,10 +476,10 @@ void Query::loadGroup(QDomElement element, QueryGroup *parent)
}
else if (e.tagName().lower() == "options")
{
- QDomNode node = e.firstChild();
+ TQDomNode node = e.firstChild();
while (!node.isNull())
{
- QDomElement e = node.toElement();
+ TQDomElement e = node.toElement();
if (e.tagName().lower() == "disabled")
group->setOption(QueryGroup::Disabled, true);
@@ -500,14 +500,14 @@ void Query::loadGroup(QDomElement element, QueryGroup *parent)
}
}
-void Query::saveGroup(QDomElement &parent, QueryGroup *group)
+void Query::saveGroup(TQDomElement &parent, QueryGroup *group)
{
- QDomDocument doc = parent.ownerDocument();
- QDomElement element = doc.createElement("group");
+ TQDomDocument doc = parent.ownerDocument();
+ TQDomElement element = doc.createElement("group");
parent.appendChild(element);
- QDomElement childe;
- QDomText childtext;
+ TQDomElement childe;
+ TQDomText childtext;
{
childe = doc.createElement("property");
element.appendChild(childe);
diff --git a/noatun-plugins/oblique/query.h b/noatun-plugins/oblique/query.h
index 60a19ff..d5835d6 100644
--- a/noatun-plugins/oblique/query.h
+++ b/noatun-plugins/oblique/query.h
@@ -6,8 +6,8 @@
#include "base.h"
-#include <qregexp.h>
-#include <qstring.h>
+#include <tqregexp.h>
+#include <tqstring.h>
class Query;
class QDomElement;
@@ -22,9 +22,9 @@ class QueryGroup
int mFuzzyness;
int mOptions;
- QString mPropertyName;
- QString mPresentation;
- QRegExp mValue;
+ TQString mPropertyName;
+ TQString mPresentation;
+ TQRegExp mValue;
public:
QueryGroup();
@@ -61,13 +61,13 @@ public:
**/
void move(Query *query, QueryGroup *under, QueryGroup *after);
- QString propertyName() const { return mPropertyName; }
- QRegExp value() const { return mValue; }
- QString presentation() const { return mPresentation; }
+ TQString propertyName() const { return mPropertyName; }
+ TQRegExp value() const { return mValue; }
+ TQString presentation() const { return mPresentation; }
- void setPropertyName(const QString &v) { mPropertyName = v; }
- void setPresentation(const QString &v) { mPresentation = v; }
- void setValue(const QRegExp &v) { mValue = v; }
+ void setPropertyName(const TQString &v) { mPropertyName = v; }
+ void setPresentation(const TQString &v) { mPresentation = v; }
+ void setValue(const TQRegExp &v) { mValue = v; }
enum Fuzzyness
{
@@ -90,14 +90,14 @@ public:
**/
bool matches(const File &file) const;
- QString presentation(const File &file) const;
+ TQString presentation(const File &file) const;
private:
/**
* apply all the "normalizing" transformations according
* to the fuzzyness
**/
- QString fuzzify(const QString &str) const;
+ TQString fuzzify(const TQString &str) const;
/**
* @returns the previous or parent of this item (slow)
**/
@@ -115,7 +115,7 @@ private:
class Query
{
QueryGroup *mGroupFirst;
- QString mName;
+ TQString mName;
public:
Query();
@@ -135,15 +135,15 @@ public:
/**
* @returns the name to be used internally
**/
- QString name() const { return mName; }
- void setName(const QString &name) { mName = name; }
+ TQString name() const { return mName; }
+ void setName(const TQString &name) { mName = name; }
/**
* @returns the name of the query
**/
- QString load(const QString &filename);
- void save(const QString &name, QDomElement &element);
- void save(const QString &name, const QString &filename);
+ TQString load(const TQString &filename);
+ void save(const TQString &name, TQDomElement &element);
+ void save(const TQString &name, const TQString &filename);
/**
* remove any trace of this from the tree, but don't actually delete it
@@ -157,18 +157,18 @@ public:
*
* Will give it a name in the db if necessary
**/
- QString dbname(Base *base);
+ TQString dbname(Base *base);
private:
- void loadGroup(QDomElement element, QueryGroup *parent=0);
- void saveGroup(QDomElement &parent, QueryGroup *group);
+ void loadGroup(TQDomElement element, QueryGroup *parent=0);
+ void saveGroup(TQDomElement &parent, QueryGroup *group);
void deepCopy(const QueryGroup *from, QueryGroup *toParent);
/**
* @returns the name of the query
**/
- QString load(QDomElement element);
+ TQString load(TQDomElement element);
};
diff --git a/noatun-plugins/oblique/selector.cpp b/noatun-plugins/oblique/selector.cpp
index 1c17650..f28c333 100644
--- a/noatun-plugins/oblique/selector.cpp
+++ b/noatun-plugins/oblique/selector.cpp
@@ -14,7 +14,7 @@ Item::Item(const File &file)
}
-QString Item::property(const QString &key, const QString &def) const
+TQString Item::property(const TQString &key, const TQString &def) const
{
if (key == "url")
{
@@ -23,27 +23,27 @@ QString Item::property(const QString &key, const QString &def) const
return url.url();
}
- QString str = mFile.property(key);
+ TQString str = mFile.property(key);
if (str.isNull()) return def;
return str;
}
-void Item::setProperty(const QString &key, const QString &property)
+void Item::setProperty(const TQString &key, const TQString &property)
{
mFile.setProperty(key, property);
}
-void Item::clearProperty(const QString &key)
+void Item::clearProperty(const TQString &key)
{
mFile.clearProperty(key);
}
-QStringList Item::properties() const
+TQStringList Item::properties() const
{
return mFile.properties();
}
-bool Item::isProperty(const QString &key) const
+bool Item::isProperty(const TQString &key) const
{
return !mFile.property(key).isNull();
}
diff --git a/noatun-plugins/oblique/selector.h b/noatun-plugins/oblique/selector.h
index 1447dec..6ce57dd 100644
--- a/noatun-plugins/oblique/selector.h
+++ b/noatun-plugins/oblique/selector.h
@@ -16,12 +16,12 @@ public:
File itemFile() const { return mFile; }
- virtual QString property(const QString &key, const QString &def=0) const;
- virtual void setProperty(const QString &key, const QString &property);
- virtual void clearProperty (const QString &key);
- virtual QStringList properties() const;
+ virtual TQString property(const TQString &key, const TQString &def=0) const;
+ virtual void setProperty(const TQString &key, const TQString &property);
+ virtual void clearProperty (const TQString &key);
+ virtual TQStringList properties() const;
- virtual bool isProperty(const QString &key) const;
+ virtual bool isProperty(const TQString &key) const;
virtual bool operator==(const PlaylistItemData &d) const;
virtual void remove();
diff --git a/noatun-plugins/oblique/tree.cpp b/noatun-plugins/oblique/tree.cpp
index 4160650..0087b99 100644
--- a/noatun-plugins/oblique/tree.cpp
+++ b/noatun-plugins/oblique/tree.cpp
@@ -7,7 +7,7 @@
#include "menu.h"
#include "oblique.h"
-#include <qpainter.h>
+#include <tqpainter.h>
#include <iostream>
#include <klocale.h>
@@ -105,7 +105,7 @@ static void treeItemSort(TreeItem *first)
if (at > 1)
treeItemSort(set, set+count-manually-1);
- // grr, QListView sucks
+ // grr, TQListView sucks
set[0]->moveItem(set[1]);
TreeItem *previous = set[0];
@@ -149,7 +149,7 @@ inline static void sortify(T *item)
}
-TreeItem::TreeItem(Tree *parent, QueryGroup *group, const File &file, const QString &p)
+TreeItem::TreeItem(Tree *parent, QueryGroup *group, const File &file, const TQString &p)
: KListViewItem(parent, p), mGroup(group), mUserOpened(false), mHidden(false)
{
if (group->option(QueryGroup::Playable))
@@ -161,7 +161,7 @@ TreeItem::TreeItem(Tree *parent, QueryGroup *group, const File &file, const QStr
sortify(parent);
}
-TreeItem::TreeItem(TreeItem *parent, QueryGroup *group, const File &file, const QString &p)
+TreeItem::TreeItem(TreeItem *parent, QueryGroup *group, const File &file, const TQString &p)
: KListViewItem(parent, p), mGroup(group), mUserOpened(false), mHidden(false)
{
if (group->option(QueryGroup::Playable))
@@ -196,7 +196,7 @@ void Tree::deleted(TreeItem *item)
}
}
-static void pad(QString &str)
+static void pad(TQString &str)
{
int len=str.length();
int at = 0;
@@ -205,11 +205,11 @@ static void pad(QString &str)
static const int paddingsize=12;
// not static for reason
- const QChar chars[paddingsize] =
+ const TQChar chars[paddingsize] =
{
- QChar('0'), QChar('0'), QChar('0'), QChar('0'),
- QChar('0'), QChar('0'), QChar('0'), QChar('0'),
- QChar('0'), QChar('0'), QChar('0'), QChar('0')
+ TQChar('0'), TQChar('0'), TQChar('0'), TQChar('0'),
+ TQChar('0'), TQChar('0'), TQChar('0'), TQChar('0'),
+ TQChar('0'), TQChar('0'), TQChar('0'), TQChar('0')
};
for (int i=0; i < len; i++)
@@ -237,10 +237,10 @@ static void pad(QString &str)
}
}
-int TreeItem::compare(QListViewItem *i, int col, bool) const
+int TreeItem::compare(TQListViewItem *i, int col, bool) const
{
- QString text1 = text(col);
- QString text2 = i->text(col);
+ TQString text1 = text(col);
+ TQString text2 = i->text(col);
pad(text1);
pad(text2);
@@ -253,7 +253,7 @@ Tree *TreeItem::tree()
return static_cast<Tree*>(KListViewItem::listView());
}
-QString TreeItem::presentation() const
+TQString TreeItem::presentation() const
{
return text(0);
}
@@ -287,27 +287,27 @@ TreeItem *TreeItem::nextPlayable()
return next;
}
-void TreeItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align)
+void TreeItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align)
{
- QFont font = p->font();
+ TQFont font = p->font();
if (tree()->current() == this)
{
font.setUnderline(true);
p->setFont(font);
}
- QColorGroup newcg(cg);
+ TQColorGroup newcg(cg);
if (parent() && parent()->isOpen() && !parent()->mUserOpened)
{
// slow, but not often used
- QColor text = newcg.text();
- QColor bg = newcg.background();
+ TQColor text = newcg.text();
+ TQColor bg = newcg.background();
int r = text.red() + bg.red();
int g = text.green() + bg.green();
int b = text.blue() + bg.blue();
text.setRgb(r/2,g/2,b/2);
- newcg.setColor(QColorGroup::Text, text);
+ newcg.setColor(TQColorGroup::Text, text);
}
KListViewItem::paintCell(p, newcg, column, width, align);
@@ -346,7 +346,7 @@ void TreeItem::forceAutoExpand()
setOpen(true);
}
-bool TreeItem::hideIfNoMatch(const QString &match)
+bool TreeItem::hideIfNoMatch(const TQString &match)
{
if (!firstChild())
{
@@ -372,7 +372,7 @@ bool TreeItem::hideIfNoMatch(const QString &match)
if (visible)
{
- QString empty;
+ TQString empty;
for (TreeItem *ch = firstChild(); ch; ch = ch->nextSibling())
{
ch->hideIfNoMatch(empty);
@@ -395,7 +395,7 @@ bool TreeItem::hideIfNoMatch(const QString &match)
void TreeItem::setup()
{
- QListViewItem::setup();
+ TQListViewItem::setup();
if (mHidden)
setHeight(0);
}
@@ -431,7 +431,7 @@ TreeItem *TreeItem::next()
-Tree::Tree(Oblique *oblique, QWidget *parent)
+Tree::Tree(Oblique *oblique, TQWidget *parent)
: KListView(parent), mOblique(oblique), mAutoExpanding(0)
{
mCurrent = 0;
@@ -449,32 +449,32 @@ Tree::Tree(Oblique *oblique, QWidget *parent)
setDropVisualizer(true);
setSorting(-1);
- ((QWidget*)header())->hide();
+ ((TQWidget*)header())->hide();
connect(
- this, SIGNAL(moved(QPtrList<QListViewItem>&, QPtrList<QListViewItem>&, QPtrList<QListViewItem>&)),
- SLOT(dropped(QPtrList<QListViewItem>&, QPtrList<QListViewItem>&, QPtrList<QListViewItem>&))
+ this, TQT_SIGNAL(moved(TQPtrList<TQListViewItem>&, TQPtrList<TQListViewItem>&, TQPtrList<TQListViewItem>&)),
+ TQT_SLOT(dropped(TQPtrList<TQListViewItem>&, TQPtrList<TQListViewItem>&, TQPtrList<TQListViewItem>&))
);
connect(
- this, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)),
- SLOT(contextMenu(KListView*, QListViewItem*, const QPoint&))
+ this, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)),
+ TQT_SLOT(contextMenu(KListView*, TQListViewItem*, const TQPoint&))
);
connect(
- this, SIGNAL(executed(QListViewItem*)),
- SLOT(play(QListViewItem*))
+ this, TQT_SIGNAL(executed(TQListViewItem*)),
+ TQT_SLOT(play(TQListViewItem*))
);
Base *base = oblique->base();
- connect(base, SIGNAL(added(File)), SLOT(insert(File)));
- connect(base, SIGNAL(removed(File)), SLOT(remove(File)));
- connect(base, SIGNAL(modified(File)), SLOT(update(File)));
+ connect(base, TQT_SIGNAL(added(File)), TQT_SLOT(insert(File)));
+ connect(base, TQT_SIGNAL(removed(File)), TQT_SLOT(remove(File)));
+ connect(base, TQT_SIGNAL(modified(File)), TQT_SLOT(update(File)));
- connect(base, SIGNAL(addedTo(Slice*, File)), SLOT(checkInsert(Slice*, File)));
- connect(base, SIGNAL(removedFrom(Slice*, File)), SLOT(checkRemove(Slice*, File)));
+ connect(base, TQT_SIGNAL(addedTo(Slice*, File)), TQT_SLOT(checkInsert(Slice*, File)));
+ connect(base, TQT_SIGNAL(removedFrom(Slice*, File)), TQT_SLOT(checkRemove(Slice*, File)));
- connect(this, SIGNAL(selected(TreeItem*)), oblique, SLOT(selected(TreeItem*)));
+ connect(this, TQT_SIGNAL(selected(TreeItem*)), oblique, TQT_SLOT(selected(TreeItem*)));
mSlice = oblique->base()->defaultSlice();
@@ -503,10 +503,10 @@ void Tree::clear()
KListView::clear();
}
-void Tree::movableDropEvent (QListViewItem* parent, QListViewItem* afterme)
+void Tree::movableDropEvent (TQListViewItem* parent, TQListViewItem* afterme)
{
- QPtrList<QListViewItem> items = selectedItems(true);
- for (QPtrList<QListViewItem>::Iterator i(items.begin()); *i; ++i)
+ TQPtrList<TQListViewItem> items = selectedItems(true);
+ for (TQPtrList<TQListViewItem>::Iterator i(items.begin()); *i; ++i)
{
if ((*i)->parent() != parent)
return;
@@ -516,10 +516,10 @@ void Tree::movableDropEvent (QListViewItem* parent, QListViewItem* afterme)
}
-void Tree::dropped(QPtrList<QListViewItem> &items, QPtrList<QListViewItem> &, QPtrList<QListViewItem> &afterNow)
+void Tree::dropped(TQPtrList<TQListViewItem> &items, TQPtrList<TQListViewItem> &, TQPtrList<TQListViewItem> &afterNow)
{
- QPtrList<QListViewItem>::Iterator itemi = items.begin();
- QPtrList<QListViewItem>::Iterator afteri = afterNow.begin();
+ TQPtrList<TQListViewItem>::Iterator itemi = items.begin();
+ TQPtrList<TQListViewItem>::Iterator afteri = afterNow.begin();
while (*itemi)
{
TreeItem *item = static_cast<TreeItem*>(*itemi);
@@ -622,21 +622,21 @@ void Tree::setCurrent(TreeItem *cur)
// undo the old one
TreeItem *old = mCurrent;
mCurrent = cur;
- QPtrList<TreeItem> oldAutoExpanded = mAutoExpanded;
+ TQPtrList<TreeItem> oldAutoExpanded = mAutoExpanded;
mAutoExpanded.clear();
repaintItem(old);
repaintItem(cur);
if (cur) cur->autoExpand();
// do an anti-intersection on oldAutoUpdated and the new mAutoExpanded
- for (QPtrListIterator<TreeItem> i(mAutoExpanded); *i; ++i)
+ for (TQPtrListIterator<TreeItem> i(mAutoExpanded); *i; ++i)
{
oldAutoExpanded.removeRef(*i);
}
bool user=false;
- for (QPtrListIterator<TreeItem> i(oldAutoExpanded); *i; ++i)
+ for (TQPtrListIterator<TreeItem> i(oldAutoExpanded); *i; ++i)
{
if ((*i)->userOpened())
{
@@ -646,7 +646,7 @@ void Tree::setCurrent(TreeItem *cur)
}
if (!user)
{
- for (QPtrListIterator<TreeItem> i(oldAutoExpanded); *i; ++i)
+ for (TQPtrListIterator<TreeItem> i(oldAutoExpanded); *i; ++i)
{
(*i)->setOpen(false);
}
@@ -660,7 +660,7 @@ void Tree::reload()
delete mLoader;
clear();
mLoader = new Loader(this);
- connect(mLoader, SIGNAL(finished()), SLOT(destroyLoader()));
+ connect(mLoader, TQT_SIGNAL(finished()), TQT_SLOT(destroyLoader()));
}
void Tree::setSlice(Slice *slice)
@@ -670,7 +670,7 @@ void Tree::setSlice(Slice *slice)
reload();
}
-bool Tree::setSchema(const QString &name)
+bool Tree::setSchema(const TQString &name)
{
mFileOfQuery = name;
if (!oblique()->loadSchema(mQuery, name))
@@ -679,7 +679,7 @@ bool Tree::setSchema(const QString &name)
return true;
}
-QDragObject *Tree::dragObject()
+TQDragObject *Tree::dragObject()
{
if (currentItem() && static_cast<TreeItem*>(currentItem())->file())
return KListView::dragObject();
@@ -692,7 +692,7 @@ void Tree::destroyLoader()
mLoader = 0;
}
-void Tree::setLimit(const QString &text)
+void Tree::setLimit(const TQString &text)
{
for (TreeItem *ch = firstChild(); ch; ch = ch->nextSibling())
{
@@ -701,7 +701,7 @@ void Tree::setLimit(const QString &text)
}
-void Tree::contextMenu(KListView*, QListViewItem* i, const QPoint& p)
+void Tree::contextMenu(KListView*, TQListViewItem* i, const TQPoint& p)
{
if (!i) return;
delete lastMenu;
@@ -709,7 +709,7 @@ void Tree::contextMenu(KListView*, QListViewItem* i, const QPoint& p)
lastMenu->popup(p);
}
-void Tree::play(QListViewItem *_item)
+void Tree::play(TQListViewItem *_item)
{
if (!_item) return;
TreeItem *item = static_cast<TreeItem*>(_item);
@@ -757,7 +757,7 @@ TreeItem *Tree::node(TreeItem *fix, QueryGroup *group, const File &file, TreeIte
else
children = firstChild();
- QString presentation = group->presentation(file);
+ TQString presentation = group->presentation(file);
while (children)
{
// merging would be done here
diff --git a/noatun-plugins/oblique/tree.h b/noatun-plugins/oblique/tree.h
index 0d53732..f059931 100644
--- a/noatun-plugins/oblique/tree.h
+++ b/noatun-plugins/oblique/tree.h
@@ -4,7 +4,7 @@
#ifndef TREE_H
#define TREE_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <klistview.h>
#include "base.h"
@@ -23,8 +23,8 @@ class TreeItem : public KListViewItem
bool mHidden:1;
public:
- TreeItem(Tree *parent, QueryGroup *group, const File &file, const QString &p=0);
- TreeItem(TreeItem *parent, QueryGroup *group, const File &file, const QString &p=0);
+ TreeItem(Tree *parent, QueryGroup *group, const File &file, const TQString &p=0);
+ TreeItem(TreeItem *parent, QueryGroup *group, const File &file, const TQString &p=0);
~TreeItem();
QueryGroup *group() { return mGroup; }
@@ -38,7 +38,7 @@ public:
TreeItem *nextSibling() { return static_cast<TreeItem*>(KListViewItem::nextSibling()); }
// for gdb, which sucks.
- QString presentation() const;
+ TQString presentation() const;
File file() { return mFile; }
void setFile(File file) { mFile = file; }
@@ -56,9 +56,9 @@ public:
**/
TreeItem *nextPlayable();
- void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align);
+ void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align);
- virtual int compare(QListViewItem * i, int col, bool) const;
+ virtual int compare(TQListViewItem * i, int col, bool) const;
/**
* open my parents so that I'm visible, if I'm playing or
@@ -67,7 +67,7 @@ public:
**/
void autoExpand();
bool userOpened() const { return mUserOpened; }
- bool hideIfNoMatch(const QString &match);
+ bool hideIfNoMatch(const TQString &match);
void setHidden(bool on);
@@ -92,18 +92,18 @@ Q_OBJECT
TreeItem *mCurrent;
FileMenu *lastMenu;
Slice *mSlice;
- QString mFileOfQuery;
+ TQString mFileOfQuery;
friend class TreeItem;
int mPlayableItemCount; // used by the friendship
- QPtrList<TreeItem> mAutoExpanded;
+ TQPtrList<TreeItem> mAutoExpanded;
unsigned int mAutoExpanding;
Loader *mLoader;
public:
- Tree(Oblique *oblique, QWidget *parent=0);
+ Tree(Oblique *oblique, TQWidget *parent=0);
~Tree();
TreeItem *firstChild();
TreeItem *find(File item);
@@ -111,7 +111,7 @@ public:
Query *query() { return &mQuery; }
Oblique *oblique() { return mOblique; }
Slice *slice() { return mSlice; }
- QString fileOfQuery() const { return mFileOfQuery; }
+ TQString fileOfQuery() const { return mFileOfQuery; }
void clear();
@@ -125,11 +125,11 @@ public:
bool autoExpanding() const { return mAutoExpanding; }
void deleted(TreeItem *item);
- bool setSchema(const QString &name);
+ bool setSchema(const TQString &name);
protected:
- virtual QDragObject *dragObject();
- void movableDropEvent(QListViewItem* parent, QListViewItem* afterme);
+ virtual TQDragObject *dragObject();
+ void movableDropEvent(TQListViewItem* parent, TQListViewItem* afterme);
public slots:
void insert(TreeItem *replace, File file);
@@ -147,15 +147,15 @@ public slots:
* or it will not be displayed
* (used for Jump)
**/
- void setLimit(const QString &text);
+ void setLimit(const TQString &text);
private slots:
- void contextMenu(KListView* l, QListViewItem* i, const QPoint& p);
- void play(QListViewItem *item);
+ void contextMenu(KListView* l, TQListViewItem* i, const TQPoint& p);
+ void play(TQListViewItem *item);
void destroyLoader();
- void dropped(QPtrList<QListViewItem> &items, QPtrList<QListViewItem> &, QPtrList<QListViewItem> &afterNow);
+ void dropped(TQPtrList<TQListViewItem> &items, TQPtrList<TQListViewItem> &, TQPtrList<TQListViewItem> &afterNow);
signals:
void selected(TreeItem *);
@@ -185,7 +185,7 @@ private:
**/
void remove(TreeItem *, const File &file);
- void limitHide(TreeItem *i, const QString &text);
+ void limitHide(TreeItem *i, const TQString &text);
void reload();
};
diff --git a/noatun-plugins/oblique/view.cpp b/noatun-plugins/oblique/view.cpp
index 93b79ce..8c7f81d 100644
--- a/noatun-plugins/oblique/view.cpp
+++ b/noatun-plugins/oblique/view.cpp
@@ -11,21 +11,21 @@
#include <klocale.h>
#include <kedittoolbar.h>
#include <kfiledialog.h>
-#include <qlabel.h>
+#include <tqlabel.h>
#include <klineeditdlg.h>
#include <kmessagebox.h>
#include <ktabwidget.h>
-#include <qtabbar.h>
+#include <tqtabbar.h>
class TabWidget : public KTabWidget
{
public:
- TabWidget(QWidget *parent)
+ TabWidget(TQWidget *parent)
: KTabWidget(parent)
{
}
public:
- QTabBar *tabBar() const { return KTabWidget::tabBar(); }
+ TQTabBar *tabBar() const { return KTabWidget::tabBar(); }
};
@@ -37,45 +37,45 @@ View::View(Oblique *oblique)
mTabs = new TabWidget(this);
mTabs->tabBar()->hide();
- connect(mTabs, SIGNAL(currentChanged(QWidget*)), SLOT(currentTabChanged(QWidget*)));
+ connect(mTabs, TQT_SIGNAL(currentChanged(TQWidget*)), TQT_SLOT(currentTabChanged(TQWidget*)));
setCentralWidget(mTabs);
KAction *ac;
- ac = new KAction(i18n("Add &Files..."), "queue", 0, this, SLOT(addFiles()), actionCollection(), "add_files");
+ ac = new KAction(i18n("Add &Files..."), "queue", 0, this, TQT_SLOT(addFiles()), actionCollection(), "add_files");
ac->setWhatsThis(i18n("Add a reference to a media file on disk to this collection."));
- ac = new KAction(i18n("Add Fol&ders..."), "folder", 0, this, SLOT(addDirectory()), actionCollection(), "add_dir");
+ ac = new KAction(i18n("Add Fol&ders..."), "folder", 0, this, TQT_SLOT(addDirectory()), actionCollection(), "add_dir");
-// ac = new KAction(i18n("&Reload"), "reload", 0, oblique, SLOT(reload()), actionCollection(), "reload");
+// ac = new KAction(i18n("&Reload"), "reload", 0, oblique, TQT_SLOT(reload()), actionCollection(), "reload");
// ac->setWhatsThis(i18n("Reread the collection and meta-information from its files."));
ac = new SliceListAction(
i18n("&Slices"), oblique,
- this, SLOT(use(Slice*)), QValueList<File>(), actionCollection(), "slices"
+ this, TQT_SLOT(use(Slice*)), TQValueList<File>(), actionCollection(), "slices"
);
ac->setWhatsThis(i18n("Select a sub-collection to display"));
mSchemaListAction = new SchemaListAction(
- i18n("&Schemas"), this, SLOT(setSchema(const QString&)), actionCollection(), "schemas"
+ i18n("&Schemas"), this, TQT_SLOT(setSchema(const TQString&)), actionCollection(), "schemas"
);
mSchemaListAction->setWhatsThis(i18n("Select a schema to use to collate the tree."));
ac = new KAction(
- i18n("&New Tab"), "tab_new", "CTRL+SHIFT+N;CTRL+T", this, SLOT(addTab()),
+ i18n("&New Tab"), "tab_new", "CTRL+SHIFT+N;CTRL+T", this, TQT_SLOT(addTab()),
actionCollection(), "newtab"
);
mRemoveTabAction = new KAction(
- i18n("&Close Current Tab"), "tab_remove", CTRL+Key_W, this, SLOT(removeTab()),
+ i18n("&Close Current Tab"), "tab_remove", CTRL+Key_W, this, TQT_SLOT(removeTab()),
actionCollection(), "removecurrenttab"
);
{
- QLabel *l = new QLabel(i18n("&Jump:"), 0, "kde toolbar widget");
+ TQLabel *l = new TQLabel(i18n("&Jump:"), 0, "kde toolbar widget");
l->setBackgroundMode( Qt::PaletteButton );
l->setAlignment(
- (QApplication::reverseLayout() ? Qt::AlignRight : Qt::AlignLeft) |
+ (TQApplication::reverseLayout() ? Qt::AlignRight : Qt::AlignLeft) |
Qt::AlignVCenter | Qt::ShowPrefix
);
l->adjustSize();
@@ -84,22 +84,22 @@ View::View(Oblique *oblique)
LineEditAction *jumpAction = new LineEditAction(i18n("Jump Bar"), 0, 0, actionCollection(), "jump_text");
jumpAction->setWhatsThis(i18n("Only display items which contain this string"));
l->setBuddy(jumpAction->lineEdit());
- connect(jumpAction->lineEdit(), SIGNAL(textChanged(const QString&)), SLOT(jumpTextChanged(const QString&)));
+ connect(jumpAction->lineEdit(), TQT_SIGNAL(textChanged(const TQString&)), TQT_SLOT(jumpTextChanged(const TQString&)));
}
- KStdAction::configureToolbars(this, SLOT(configureToolBars()), actionCollection());
+ KStdAction::configureToolbars(this, TQT_SLOT(configureToolBars()), actionCollection());
applyMainWindowSettings(KGlobal::config(), "Oblique View");
createGUI("obliqueui.rc");
KConfigGroup g(KGlobal::config(), "oblique");
- QStringList tabids = g.readListEntry("tabids");
+ TQStringList tabids = g.readListEntry("tabids");
- for (QStringList::Iterator i(tabids.begin()); i != tabids.end(); ++i)
+ for (TQStringList::Iterator i(tabids.begin()); i != tabids.end(); ++i)
{
- QString t = *i;
+ TQString t = *i;
int sliceid = t.section(':', 0, 0).toInt();
- QString fileOfQuery = t.section(':', 1, 1);
+ TQString fileOfQuery = t.section(':', 1, 1);
Slice *slice = oblique->base()->sliceById(sliceid);
if (!slice)
@@ -131,14 +131,14 @@ View::View(Oblique *oblique)
View::~View()
{
- QStringList tabids;
+ TQStringList tabids;
for (int i=0; i < mTabs->count(); i++)
{
Tree *tree = static_cast<Tree*>(mTabs->page(i));
int slice = tree->slice()->id();
- QString query = tree->fileOfQuery();
+ TQString query = tree->fileOfQuery();
- QString t = QString("%1:%2").arg(slice).arg(query);
+ TQString t = TQString("%1:%2").arg(slice).arg(query);
tabids.append(t);
}
@@ -151,7 +151,7 @@ void View::configureToolBars()
{
saveMainWindowSettings(KGlobal::config(), "Oblique View");
KEditToolbar dlg(actionCollection(), "obliqueui.rc");
- connect(&dlg, SIGNAL(newToolbarConfig()), SLOT(newToolBarConfig()));
+ connect(&dlg, TQT_SIGNAL(newToolbarConfig()), TQT_SLOT(newToolBarConfig()));
dlg.exec();
}
@@ -161,7 +161,7 @@ void View::newToolBarConfig()
applyMainWindowSettings(KGlobal::config(), "Oblique View");
}
-void View::closeEvent(QCloseEvent*)
+void View::closeEvent(TQCloseEvent*)
{
hide();
}
@@ -177,7 +177,7 @@ void View::addFiles()
void View::addDirectory()
{
- QString folder = KFileDialog::getExistingDirectory(":mediadir:", this,
+ TQString folder = KFileDialog::getExistingDirectory(":mediadir:", this,
i18n("Select Folder to Add"));
if (!folder)
@@ -213,20 +213,20 @@ void View::removeTab()
mTabs->tabBar()->hide();
}
-void View::currentTabChanged(QWidget *w)
+void View::currentTabChanged(TQWidget *w)
{
mRemoveTabAction->setEnabled(w != mTree);
mSchemaListAction->setTree(static_cast<Tree*>(w));
}
-void View::setSchema(const QString &file)
+void View::setSchema(const TQString &file)
{
Tree *current = static_cast<Tree*>(mTabs->currentPage());
current->setSchema(file);
}
-void View::jumpTextChanged(const QString &text)
+void View::jumpTextChanged(const TQString &text)
{
Tree *current = static_cast<Tree*>(mTabs->currentPage());
current->setLimit(text);
@@ -241,7 +241,7 @@ void View::use(Slice *s)
-LineEditAction::LineEditAction(const QString &text, const QObject *reciever, const char *slot, KActionCollection *parent, const char *name)
+LineEditAction::LineEditAction(const TQString &text, const TQObject *reciever, const char *slot, KActionCollection *parent, const char *name)
: KWidgetAction(new KLineEdit(0), text, KShortcut(0), reciever, slot, parent, name)
{
setAutoSized(true);
diff --git a/noatun-plugins/oblique/view.h b/noatun-plugins/oblique/view.h
index 598c0cc..bf216ea 100644
--- a/noatun-plugins/oblique/view.h
+++ b/noatun-plugins/oblique/view.h
@@ -18,7 +18,7 @@ class View : public KMainWindow
Q_OBJECT
Oblique *mOblique;
Tree *mTree;
- QValueList<Tree*> mTrees;
+ TQValueList<Tree*> mTrees;
TabWidget *mTabs;
KAction *mRemoveTabAction;
SchemaListAction *mSchemaListAction;
@@ -44,15 +44,15 @@ signals:
private slots:
void configureToolBars();
void newToolBarConfig();
- void jumpTextChanged(const QString &text);
+ void jumpTextChanged(const TQString &text);
void use(Slice*);
- void currentTabChanged(QWidget *);
- void setSchema(const QString &file);
+ void currentTabChanged(TQWidget *);
+ void setSchema(const TQString &file);
protected:
- virtual void showEvent(QShowEvent *) { emit listShown(); }
- virtual void hideEvent(QHideEvent *) { emit listHidden(); }
- void closeEvent(QCloseEvent*);
+ virtual void showEvent(TQShowEvent *) { emit listShown(); }
+ virtual void hideEvent(TQHideEvent *) { emit listHidden(); }
+ void closeEvent(TQCloseEvent*);
};
@@ -60,7 +60,7 @@ class LineEditAction : public KWidgetAction
{
Q_OBJECT
public:
- LineEditAction(const QString &text, const QObject *reciever, const char *slot, KActionCollection *parent, const char *name);
+ LineEditAction(const TQString &text, const TQObject *reciever, const char *slot, KActionCollection *parent, const char *name);
KLineEdit *widget() { return static_cast<KLineEdit*>(KWidgetAction::widget()); }
KLineEdit *lineEdit() { return widget(); }