summaryrefslogtreecommitdiffstats
path: root/noatun/library/playlist.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:43:15 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:43:15 +0000
commite654398e46e37abf457b2b1122ab898d2c51c49f (patch)
treed39ee6440f3c3663c3ead84a2d4cc2d034667e96 /noatun/library/playlist.cpp
parente4f29b18e19394b9352f52a6c0d0d0e3932cf511 (diff)
downloadtdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.tar.gz
tdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1157644 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'noatun/library/playlist.cpp')
-rw-r--r--noatun/library/playlist.cpp62
1 files changed, 31 insertions, 31 deletions
diff --git a/noatun/library/playlist.cpp b/noatun/library/playlist.cpp
index 4e729924..7cc28337 100644
--- a/noatun/library/playlist.cpp
+++ b/noatun/library/playlist.cpp
@@ -7,9 +7,9 @@
#include <kcmdlineargs.h>
#include <kfile.h>
#include <kmimetype.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <assert.h>
-#include <qmetaobject.h>
+#include <tqmetaobject.h>
#include <kmedia2.h>
#include <vector>
@@ -22,7 +22,7 @@ PlaylistItemData::~PlaylistItemData()
{
}
-QCString PlaylistItemData::mimetype() const
+TQCString PlaylistItemData::mimetype() const
{
if (isProperty("mimetype"))
return property("mimetype").latin1();
@@ -31,7 +31,7 @@ QCString PlaylistItemData::mimetype() const
return mimetype->name().latin1();
}
-QCString PlaylistItemData::playObject() const
+TQCString PlaylistItemData::playObject() const
{
if (isProperty("playObject"))
return property("playObject").latin1();
@@ -50,19 +50,19 @@ QCString PlaylistItemData::playObject() const
delete offers;
- return QCString(objectType.c_str());
+ return TQCString(objectType.c_str());
}
-QString PlaylistItemData::title() const
+TQString PlaylistItemData::title() const
{
if (isProperty("realtitle"))
return property("realtitle");
// "$(property)"
- QString format=napp->titleFormat();
+ TQString format=napp->titleFormat();
- QRegExp find("(?:(?:\\\\\\\\))*\\$\\((.*)");
+ TQRegExp find("(?:(?:\\\\\\\\))*\\$\\((.*)");
int start=0;
while (start != -1)
@@ -76,7 +76,7 @@ QString PlaylistItemData::title() 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;
@@ -91,7 +91,7 @@ QString PlaylistItemData::title() const
if (format[start]=='\\')
{
// count how many there are first
- QRegExp counter("([\\\\]+)");
+ TQRegExp counter("([\\\\]+)");
counter.search(format, start);
uint len=counter.cap(1).length();
@@ -101,8 +101,8 @@ QString PlaylistItemData::title() 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] == '"')
{
@@ -141,7 +141,7 @@ QString PlaylistItemData::title() const
i++;
- QString propval = property(propname);
+ TQString propval = property(propname);
if (propname == "title" && !propval.length())
{
propval = url().filename();
@@ -175,7 +175,7 @@ int PlaylistItemData::length() const
void PlaylistItemData::setLength(int ms)
{
- setProperty("length", QString::number(ms));
+ setProperty("length", TQString::number(ms));
}
PlaylistItem::PlaylistItem(const PlaylistItem &source)
@@ -246,14 +246,14 @@ void PlaylistItem::addRef() const
mData->addRef();
}
-QString PlaylistItemData::lengthString() const
+TQString PlaylistItemData::lengthString() const
{
if ( length() == -1 ) // no file loaded
- return QString("--:--");
+ return TQString("--:--");
int secs = length()/1000; // convert milliseconds -> seconds
int seconds = secs % 60;
- return QString().sprintf("%.2d:%.2d", ((secs-seconds)/60), seconds);
+ return TQString().sprintf("%.2d:%.2d", ((secs-seconds)/60), seconds);
}
@@ -278,11 +278,11 @@ bool PlaylistItemData::operator != (const PlaylistItemData &d) const
-Playlist::Playlist(QObject *parent, const char *name) : QObject(parent, name)
+Playlist::Playlist(TQObject *parent, const char *name) : TQObject(parent, name)
{
- napp->player()->connect(this, SIGNAL(playCurrent()), SLOT(playCurrent()));
- napp->player()->connect(this, SIGNAL(listHidden()), SIGNAL(playlistHidden()));
- napp->player()->connect(this, SIGNAL(listShown()), SIGNAL(playlistShown()));
+ napp->player()->connect(this, TQT_SIGNAL(playCurrent()), TQT_SLOT(playCurrent()));
+ napp->player()->connect(this, TQT_SIGNAL(listHidden()), TQT_SIGNAL(playlistHidden()));
+ napp->player()->connect(this, TQT_SIGNAL(listShown()), TQT_SIGNAL(playlistShown()));
}
@@ -316,15 +316,15 @@ int Playlist::handleArguments()
return i;
}
-QValueList<PlaylistItem> Playlist::select(
- const QStringList &keys, const QStringList &values,
+TQValueList<PlaylistItem> Playlist::select(
+ const TQStringList &keys, const TQStringList &values,
int limit, bool exact, bool caseSensitive
)
{
- QValueList<PlaylistItem> list;
- QString k;
- QString v;
- QStringList::ConstIterator key, val;
+ TQValueList<PlaylistItem> list;
+ TQString k;
+ TQString v;
+ TQStringList::ConstIterator key, val;
for (PlaylistItem i(getFirst()); i && limit; i=getAfter(i))
{
for (key = keys.begin(); key != keys.end() && limit ; ++key)
@@ -371,13 +371,13 @@ QValueList<PlaylistItem> Playlist::select(
return list;
}
-QValueList<PlaylistItem> Playlist::select(
- const QString &key, const QString &value,
+TQValueList<PlaylistItem> Playlist::select(
+ const TQString &key, const TQString &value,
int limit, bool exact, bool caseSensitive
)
{
- QStringList keys(key);
- QStringList values(value);
+ TQStringList keys(key);
+ TQStringList values(value);
return select(keys, values, limit, exact, caseSensitive);
}