summaryrefslogtreecommitdiffstats
path: root/katapult/plugins/catalogs/amarokcatalog
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-28 18:03:09 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-28 18:03:09 +0000
commit98d15d90b6a83e2df32d678013847e18b8a8c7e8 (patch)
tree02a588c0979fe1a40ae6216d1f831bb24de91a9f /katapult/plugins/catalogs/amarokcatalog
parente0974f69b7603e3d8f2d936301e05535af25346e (diff)
downloadkatapult-98d15d90b6a83e2df32d678013847e18b8a8c7e8.tar.gz
katapult-98d15d90b6a83e2df32d678013847e18b8a8c7e8.zip
TQt4 port Katapult
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/katapult@1233929 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'katapult/plugins/catalogs/amarokcatalog')
-rw-r--r--katapult/plugins/catalogs/amarokcatalog/actionplaysong.cpp16
-rw-r--r--katapult/plugins/catalogs/amarokcatalog/actionplaysong.h8
-rw-r--r--katapult/plugins/catalogs/amarokcatalog/amarokcatalog.cpp166
-rw-r--r--katapult/plugins/catalogs/amarokcatalog/amarokcatalog.h11
-rw-r--r--katapult/plugins/catalogs/amarokcatalog/coverimage.cpp48
-rw-r--r--katapult/plugins/catalogs/amarokcatalog/coverimage.h30
-rw-r--r--katapult/plugins/catalogs/amarokcatalog/settings.ui14
-rw-r--r--katapult/plugins/catalogs/amarokcatalog/song.cpp34
-rw-r--r--katapult/plugins/catalogs/amarokcatalog/song.h23
9 files changed, 176 insertions, 174 deletions
diff --git a/katapult/plugins/catalogs/amarokcatalog/actionplaysong.cpp b/katapult/plugins/catalogs/amarokcatalog/actionplaysong.cpp
index 43fdc2b..9847bcb 100644
--- a/katapult/plugins/catalogs/amarokcatalog/actionplaysong.cpp
+++ b/katapult/plugins/catalogs/amarokcatalog/actionplaysong.cpp
@@ -20,10 +20,10 @@
#include <kglobal.h>
#include <kiconloader.h>
-#include <qpixmap.h>
-#include <qstring.h>
-#include <qcstring.h>
-#include <qdatastream.h>
+#include <tqpixmap.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqdatastream.h>
#include <kapp.h>
#include <dcopclient.h>
#include <klocale.h>
@@ -33,12 +33,12 @@
#include "actionplaysong.h"
#include "song.h"
-QPixmap ActionPlaySong::icon(int size) const
+TQPixmap ActionPlaySong::icon(int size) const
{
return KGlobal::iconLoader()->loadIcon("amarok", KIcon::NoGroup, size);
}
-QString ActionPlaySong::text() const
+TQString ActionPlaySong::text() const
{
return i18n("Play Song");
}
@@ -51,8 +51,8 @@ bool ActionPlaySong::accepts(const KatapultItem *item) const
void ActionPlaySong::execute(const KatapultItem *item) const
{
const Song *song = (const Song *) item;
- QByteArray buffer;
- QDataStream stream(buffer, IO_WriteOnly);
+ TQByteArray buffer;
+ TQDataStream stream(buffer, IO_WriteOnly);
stream << song->url();
kapp->dcopClient()->send("amarok", "playlist", "playMedia(KURL)", buffer);
}
diff --git a/katapult/plugins/catalogs/amarokcatalog/actionplaysong.h b/katapult/plugins/catalogs/amarokcatalog/actionplaysong.h
index bd2f0af..255d1b1 100644
--- a/katapult/plugins/catalogs/amarokcatalog/actionplaysong.h
+++ b/katapult/plugins/catalogs/amarokcatalog/actionplaysong.h
@@ -24,8 +24,8 @@
#include "katapultaction.h"
class KatapultItem;
-class QPixmap;
-class QString;
+class TQPixmap;
+class TQString;
/**
@author Bastian Holst
@@ -33,8 +33,8 @@ class QString;
class ActionPlaySong : public KatapultAction
{
public:
- virtual QPixmap icon(int) const;
- virtual QString text() const;
+ virtual TQPixmap icon(int) const;
+ virtual TQString text() const;
virtual bool accepts(const KatapultItem *) const;
virtual void execute(const KatapultItem *) const;
};
diff --git a/katapult/plugins/catalogs/amarokcatalog/amarokcatalog.cpp b/katapult/plugins/catalogs/amarokcatalog/amarokcatalog.cpp
index f924c6d..a4cbd91 100644
--- a/katapult/plugins/catalogs/amarokcatalog/amarokcatalog.cpp
+++ b/katapult/plugins/catalogs/amarokcatalog/amarokcatalog.cpp
@@ -26,12 +26,12 @@
#include <knuminput.h>
#include <kurl.h>
#include <kapp.h>
-#include <qstring.h>
-#include <qcstring.h>
-#include <qstringlist.h>
-#include <qdatastream.h>
+#include <tqstring.h>
+#include <tqcstring.h>
+#include <tqstringlist.h>
+#include <tqdatastream.h>
#include <dcopclient.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include "actionplaysong.h"
#include "song.h"
@@ -43,11 +43,11 @@
K_EXPORT_COMPONENT_FACTORY( katapult_amarokcatalog,
KGenericFactory<AmarokCatalog>( "katapult_amarokcatalog" ) )
-AmarokCatalog::AmarokCatalog(QObject*, const char*, const QStringList&): _result(QString::null)
+AmarokCatalog::AmarokCatalog(TQObject*, const char*, const TQStringList&): _result(TQString())
{
_minQueryLen = 3;
ActionRegistry::self()->registerAction(new ActionPlaySong());
- _gotCollectionStatus = false;
+ _gotCollectiontqStatus = false;
_dynamicCollection = false;
checkCollectionType();
@@ -58,16 +58,16 @@ AmarokCatalog::~AmarokCatalog()
void AmarokCatalog::queryChanged()
{
- int newStatus = 0;
- QString queryString = query();
+ int newtqStatus = 0;
+ TQString queryString = query();
- if((QString(queryString).remove(':').remove('\"').remove(' ').isEmpty()) || (queryString.length() < _minQueryLen)) {
+ if((TQString(queryString).remove(':').remove('\"').remove(' ').isEmpty()) || (queryString.length() < _minQueryLen)) {
reset();
setBestMatch(Match());
- setStatus(0);
+ settqStatus(0);
} else {
- if ( _gotCollectionStatus)
+ if ( _gotCollectiontqStatus)
{
if (!_dynamicCollection)
@@ -75,9 +75,9 @@ void AmarokCatalog::queryChanged()
// Stuff for Amarok < 1.4.2
- QStringList queryList;
- //prepares SQL-queryQRegExp
- QString sqlQuery(
+ TQStringList queryList;
+ //prepares SQL-queryTQRegExp
+ TQString sqlQuery(
"SELECT artist.name, tags.title, tags.url, images.path, album.name "
"FROM tags"
"INNER JOIN album ON (tags.album = album.id) "
@@ -87,29 +87,29 @@ void AmarokCatalog::queryChanged()
"WHERE 1=1 "
);// AND
- queryList = QStringList::split ( QString(" "), QString(queryString).replace(QChar(':')," ").replace(QChar('\''), " ").replace(QChar('\''), "%") );
- for(QStringList::Iterator it = queryList.begin(); it != queryList.end(); ++it) {
- sqlQuery.append(QString(" AND (t.title LIKE '\%%1\%'").arg(*it));
- sqlQuery.append(QString(" OR a.name LIKE '\%%1\%')").arg(*it));
+ queryList = TQStringList::split ( TQString(" "), TQString(queryString).tqreplace(TQChar(':')," ").tqreplace(TQChar('\''), " ").tqreplace(TQChar('\''), "%") );
+ for(TQStringList::Iterator it = queryList.begin(); it != queryList.end(); ++it) {
+ sqlQuery.append(TQString(" AND (t.title LIKE '\%%1\%'").tqarg(*it));
+ sqlQuery.append(TQString(" OR a.name LIKE '\%%1\%')").tqarg(*it));
}
sqlQuery.append(" ORDER BY a.name, t.title, s.percentage DESC");
//sending SQL-query to ararok via dcop
- QByteArray sqlQueryData, replyData;
- QCString replyType;
- QDataStream arg(sqlQueryData, IO_WriteOnly);
+ TQByteArray sqlQueryData, replyData;
+ TQCString replyType;
+ TQDataStream arg(sqlQueryData, IO_WriteOnly);
arg << sqlQuery;
- if (!kapp->dcopClient()->call("amarok", "collection", "query(QString)",
+ if (!kapp->dcopClient()->call("amarok", "collection", "query(TQString)",
sqlQueryData, replyType, replyData)) {
- newStatus = 0;
+ newtqStatus = 0;
} else {
- QDataStream reply(replyData, IO_ReadOnly);
- if (replyType == "QStringList") {
- QStringList sqlResult;
+ TQDataStream reply(replyData, IO_ReadOnly);
+ if (replyType == TQSTRINGLIST_OBJECT_NAME_STRING) {
+ TQStringList sqlResult;
reply >> sqlResult;
if(sqlResult.isEmpty()) {
- newStatus = 0;
+ newtqStatus = 0;
} else {
reset();
//Reads information from SQL-Query
@@ -118,35 +118,35 @@ void AmarokCatalog::queryChanged()
_result.setURL(KURL(sqlResult[2]));
_result.setAlbum(sqlResult[4]);
- //_result.setIcon(QString());
+ //_result.setIcon(TQString());
if ( !sqlResult[3].isEmpty() ) {
_result.setIcon(sqlResult[3]);
}
//counts the matched charecters
- int i = queryString.find( ':' );
+ int i = queryString.tqfind( ':' );
if ( i != -1 ) {
if ( queryString[i+1] != ' ' )
queryString.insert(i+1, ' ');
if ( queryString[i-1] != ' ' )
queryString.insert(i, ' ');
}
- queryList = QStringList::split ( " ", queryString );
+ queryList = TQStringList::split ( " ", queryString );
unsigned int matched = 0;
- for(QStringList::Iterator it = queryList.begin(); it != queryList.end(); ++it) {
- if(matched < (_result.text().find(*it, matched, false) + (*it).length()))
- matched = _result.text().find(*it, matched, false) + (*it).length();
+ for(TQStringList::Iterator it = queryList.begin(); it != queryList.end(); ++it) {
+ if(matched < (_result.text().tqfind(*it, matched, false) + (*it).length()))
+ matched = _result.text().tqfind(*it, matched, false) + (*it).length();
}
setBestMatch(Match(&_result, 100*queryString.length()/_result.text().length(), matched));
//Checks if there are multiple results
if( !sqlResult[5].isEmpty() )
- newStatus = S_HasResults | S_Multiple;
+ newtqStatus = S_HasResults | S_Multiple;
else
- newStatus = S_HasResults;
+ newtqStatus = S_HasResults;
}
} else {
- newStatus = 0;
+ newtqStatus = 0;
}
}
@@ -154,37 +154,37 @@ void AmarokCatalog::queryChanged()
// Do same as above here again but with dyn collection stuff
- QStringList queryList;
- //prepares SQL-queryQRegExp
- QString sqlQuery("SELECT a.name, t.title, t.deviceid, d.lastmountpoint, t.url, i.path, album.name FROM tags t LEFT JOIN statistics s ON (t.url = s.url AND t.deviceid = s.deviceid) LEFT JOIN artist a ON (t.artist = a.id) LEFT JOIN album ON (t.album = album.id) LEFT JOIN images i ON ( a.name = i.artist AND album.name = i.album) LEFT JOIN devices d ON (t.deviceid = d.id) WHERE ");
- queryList = QStringList::split ( QString(" "), QString(queryString).replace(QChar(':')," ").replace(QChar('\''), " ").replace(QChar('\''), "%") );
+ TQStringList queryList;
+ //prepares SQL-queryTQRegExp
+ TQString sqlQuery("SELECT a.name, t.title, t.deviceid, d.lastmountpoint, t.url, i.path, album.name FROM tags t LEFT JOIN statistics s ON (t.url = s.url AND t.deviceid = s.deviceid) LEFT JOIN artist a ON (t.artist = a.id) LEFT JOIN album ON (t.album = album.id) LEFT JOIN images i ON ( a.name = i.artist AND album.name = i.album) LEFT JOIN devices d ON (t.deviceid = d.id) WHERE ");
+ queryList = TQStringList::split ( TQString(" "), TQString(queryString).tqreplace(TQChar(':')," ").tqreplace(TQChar('\''), " ").tqreplace(TQChar('\''), "%") );
// Let's build each of these clauses
- QStringList clauses;
- for(QStringList::Iterator it = queryList.begin(); it != queryList.end(); ++it) {
+ TQStringList clauses;
+ for(TQStringList::Iterator it = queryList.begin(); it != queryList.end(); ++it) {
- clauses += QString(" (t.title LIKE '\%%1\%'").arg(*it) +
- QString(" OR a.name LIKE '\%%1\%')").arg(*it);
+ clauses += TQString(" (t.title LIKE '\%%1\%'").tqarg(*it) +
+ TQString(" OR a.name LIKE '\%%1\%')").tqarg(*it);
}
- sqlQuery.append(clauses.join(QString(" AND ")));
+ sqlQuery.append(clauses.join(TQString(" AND ")));
sqlQuery.append(" ORDER BY a.name, t.title, s.percentage DESC");
//sending SQL-query to ararok via dcop
- QByteArray sqlQueryData, replyData;
- QCString replyType;
- QDataStream arg(sqlQueryData, IO_WriteOnly);
+ TQByteArray sqlQueryData, replyData;
+ TQCString replyType;
+ TQDataStream arg(sqlQueryData, IO_WriteOnly);
arg << sqlQuery;
- if (!kapp->dcopClient()->call("amarok", "collection", "query(QString)",
+ if (!kapp->dcopClient()->call("amarok", "collection", "query(TQString)",
sqlQueryData, replyType, replyData)) {
- newStatus = 0;
+ newtqStatus = 0;
} else {
- QDataStream reply(replyData, IO_ReadOnly);
- if (replyType == "QStringList") {
- QStringList sqlResult;
+ TQDataStream reply(replyData, IO_ReadOnly);
+ if (replyType == TQSTRINGLIST_OBJECT_NAME_STRING) {
+ TQStringList sqlResult;
reply >> sqlResult;
if(sqlResult.isEmpty()) {
- newStatus = 0;
+ newtqStatus = 0;
} else {
reset();
//Reads information from SQL-Query
@@ -208,48 +208,48 @@ void AmarokCatalog::queryChanged()
_result.setAlbum(sqlResult[6]);
- //_result.setIcon(QString());
+ //_result.setIcon(TQString());
if ( !sqlResult[3].isEmpty() ) {
_result.setIcon(sqlResult[5]);
}
//counts the matched charecters
- int i = queryString.find( ':' );
+ int i = queryString.tqfind( ':' );
if ( i != -1 ) {
if ( queryString[i+1] != ' ' )
queryString.insert(i+1, ' ');
if ( queryString[i-1] != ' ' )
queryString.insert(i, ' ');
}
- queryList = QStringList::split ( " ", queryString );
+ queryList = TQStringList::split ( " ", queryString );
unsigned int matched = 0;
- for(QStringList::Iterator it = queryList.begin(); it != queryList.end(); ++it) {
- if(matched < (_result.text().find(*it, matched, false) + (*it).length()))
- matched = _result.text().find(*it, matched, false) + (*it).length();
+ for(TQStringList::Iterator it = queryList.begin(); it != queryList.end(); ++it) {
+ if(matched < (_result.text().tqfind(*it, matched, false) + (*it).length()))
+ matched = _result.text().tqfind(*it, matched, false) + (*it).length();
}
setBestMatch(Match(&_result, 100*queryString.length()/_result.text().length(), matched));
//Checks if there are multiple results
if( !sqlResult[7].isEmpty() )
- newStatus = S_HasResults | S_Multiple;
+ newtqStatus = S_HasResults | S_Multiple;
else
- newStatus = S_HasResults;
+ newtqStatus = S_HasResults;
}
} else {
- newStatus = 0;
+ newtqStatus = 0;
}
}
} //end of >1.4.2 section
- setStatus(newStatus);
+ settqStatus(newtqStatus);
} else { //We haven't got the collection status
checkCollectionType();
reset();
setBestMatch(Match());
- setStatus(0);
+ settqStatus(0);
}
@@ -259,31 +259,31 @@ void AmarokCatalog::queryChanged()
void AmarokCatalog::reset()
{
- _result.setName(QString::null);
- _result.setArtist(QString::null);
- _result.setAlbum(QString::null);
- _result.setIcon(QString::null);
+ _result.setName(TQString());
+ _result.setArtist(TQString());
+ _result.setAlbum(TQString());
+ _result.setIcon(TQString());
}
void AmarokCatalog::checkCollectionType()
{
- QString sqlQuery("SELECT COUNT(*) FROM admin WHERE noption = 'Database Devices Version'");
+ TQString sqlQuery("SELECT COUNT(*) FROM admin WHERE noption = 'Database Devices Version'");
- QByteArray sqlQueryData, replyData;
- QCString replyType;
- QDataStream arg(sqlQueryData, IO_WriteOnly);
+ TQByteArray sqlQueryData, replyData;
+ TQCString replyType;
+ TQDataStream arg(sqlQueryData, IO_WriteOnly);
arg << sqlQuery;
- if (!kapp->dcopClient()->call("amarok", "collection", "query(QString)", sqlQueryData, replyType, replyData))
+ if (!kapp->dcopClient()->call("amarok", "collection", "query(TQString)", sqlQueryData, replyType, replyData))
{
- _gotCollectionStatus = false;
+ _gotCollectiontqStatus = false;
}
else
{
- QDataStream reply(replyData, IO_ReadOnly);
- if (replyType == "QStringList")
+ TQDataStream reply(replyData, IO_ReadOnly);
+ if (replyType == TQSTRINGLIST_OBJECT_NAME_STRING)
{
- QStringList sqlResult;
+ TQStringList sqlResult;
reply >> sqlResult;
if (sqlResult[0] == "1")
@@ -296,11 +296,11 @@ void AmarokCatalog::checkCollectionType()
_dynamicCollection = false;
}
- _gotCollectionStatus = true;
+ _gotCollectiontqStatus = true;
}
else
{
- _gotCollectionStatus = false;
+ _gotCollectiontqStatus = false;
}
}
}
@@ -317,12 +317,12 @@ unsigned int AmarokCatalog::minQueryLen() const
return _minQueryLen;
}
-QWidget * AmarokCatalog::configure()
+TQWidget * AmarokCatalog::configure()
{
AmarokCatalogSettings *settings = new AmarokCatalogSettings();
settings->minQueryLen->setValue(_minQueryLen);
- connect(settings->minQueryLen, SIGNAL(valueChanged(int)), this, SLOT(minQueryLenChanged(int)));
+ connect(settings->minQueryLen, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(minQueryLenChanged(int)));
return settings;
}
diff --git a/katapult/plugins/catalogs/amarokcatalog/amarokcatalog.h b/katapult/plugins/catalogs/amarokcatalog/amarokcatalog.h
index bd735a3..aaff457 100644
--- a/katapult/plugins/catalogs/amarokcatalog/amarokcatalog.h
+++ b/katapult/plugins/catalogs/amarokcatalog/amarokcatalog.h
@@ -25,8 +25,8 @@
#include <kconfigbase.h>
#include "song.h"
-class QWidget;
-class QString;
+class TQWidget;
+class TQString;
/**
@author Bastian Holst
@@ -34,14 +34,15 @@ class QString;
class AmarokCatalog : public KatapultCatalog
{
Q_OBJECT
+ TQ_OBJECT
public:
- AmarokCatalog(QObject*, const char*, const QStringList&);
+ AmarokCatalog(TQObject*, const char*, const TQStringList&);
virtual ~AmarokCatalog();
unsigned int minQueryLen() const;
void readSettings(KConfigBase *);
void writeSettings(KConfigBase *);
- QWidget * configure();
+ TQWidget * configure();
//virtual void initialize();
public slots:
@@ -55,7 +56,7 @@ protected:
private:
unsigned int _minQueryLen;
bool _dynamicCollection;
- bool _gotCollectionStatus;
+ bool _gotCollectiontqStatus;
Song _result;
};
diff --git a/katapult/plugins/catalogs/amarokcatalog/coverimage.cpp b/katapult/plugins/catalogs/amarokcatalog/coverimage.cpp
index 4ea3f24..3324fee 100644
--- a/katapult/plugins/catalogs/amarokcatalog/coverimage.cpp
+++ b/katapult/plugins/catalogs/amarokcatalog/coverimage.cpp
@@ -19,23 +19,23 @@
***************************************************************************/
#include <kmdcodec.h>
-#include <qimage.h>
-#include <qdir.h>
+#include <tqimage.h>
+#include <tqdir.h>
#include "coverimage.h"
CoverImage::CoverImage()
{
- setArtist(QString());
- setAlbum(QString());
- setURL(QString());
+ setArtist(TQString());
+ setAlbum(TQString());
+ setURL(TQString());
- _coverfolder = QDir::homeDirPath();
+ _coverfolder = TQDir::homeDirPath();
_coverfolder.append("/.kde/share/apps/amarok/albumcovers/");
- _largefolder = QString(_coverfolder).append("large/");
- _cachefolder = QString(_coverfolder).append("cache/");
+ _largefolder = TQString(_coverfolder).append("large/");
+ _cachefolder = TQString(_coverfolder).append("cache/");
- QDir foldertest;
+ TQDir foldertest;
foldertest.setPath(_coverfolder);
if ( !foldertest.exists() )
foldertest.mkdir(_coverfolder);
@@ -45,12 +45,12 @@ CoverImage::CoverImage()
foldertest.mkdir(_cachefolder);
}
-QImage CoverImage::load(int size) const
+TQImage CoverImage::load(int size) const
{
- QString imagepath(_cachefolder);
+ TQString imagepath(_cachefolder);
KMD5 md5sum(artist().lower().utf8()+album().lower().utf8());
- imagepath.append(QString::number ( size )).append("@").append(md5sum.hexDigest());
- QImage image( imagepath );
+ imagepath.append(TQString::number ( size )).append("@").append(md5sum.hexDigest());
+ TQImage image( imagepath );
if ( image.isNull() )
{
if ( !url().isEmpty() ) {
@@ -62,45 +62,45 @@ QImage CoverImage::load(int size) const
}
if ( !image.isNull() ) {
- QString savepath(_cachefolder);
- savepath.append(QString::number ( size )).append("@").append(md5sum.hexDigest());
- image = image.smoothScale(size, size, QImage::ScaleMin);
+ TQString savepath(_cachefolder);
+ savepath.append(TQString::number ( size )).append("@").append(md5sum.hexDigest());
+ image = image.smoothScale(size, size, TQ_ScaleMin);
if ( !url().isEmpty() ) {
- image.save( savepath, QImage::imageFormat ( url() ));
+ image.save( savepath, TQImage::imageFormat ( url() ));
} else {
- image.save( savepath, QImage::imageFormat ( imagepath ));
+ image.save( savepath, TQImage::imageFormat ( imagepath ));
}
}
}
return image;
}
-QString CoverImage::artist() const
+TQString CoverImage::artist() const
{
return _artist;
}
-QString CoverImage::album() const
+TQString CoverImage::album() const
{
return _album;
}
-QString CoverImage::url() const
+TQString CoverImage::url() const
{
return _url;
}
-void CoverImage::setArtist(const QString& artist)
+void CoverImage::setArtist(const TQString& artist)
{
_artist = artist;
}
-void CoverImage::setAlbum(const QString& album)
+void CoverImage::setAlbum(const TQString& album)
{
_album = album;
}
-void CoverImage::setURL(const QString& url)
+void CoverImage::setURL(const TQString& url)
{
_url = url;
}
diff --git a/katapult/plugins/catalogs/amarokcatalog/coverimage.h b/katapult/plugins/catalogs/amarokcatalog/coverimage.h
index c7982c3..95be477 100644
--- a/katapult/plugins/catalogs/amarokcatalog/coverimage.h
+++ b/katapult/plugins/catalogs/amarokcatalog/coverimage.h
@@ -20,8 +20,8 @@
#ifndef COVERIMAGE_H
#define COVERIMAGE_H
-#include<qstring.h>
-#include<qimage.h>
+#include<tqstring.h>
+#include<tqimage.h>
/**
@author Bastian Holst
@@ -31,23 +31,23 @@ class CoverImage
public:
CoverImage();
- QImage load(int) const;
+ TQImage load(int) const;
- virtual QString artist() const;
- virtual QString album() const;
- virtual QString url() const;
+ virtual TQString artist() const;
+ virtual TQString album() const;
+ virtual TQString url() const;
- void setArtist(const QString&);
- void setAlbum(const QString&);
- void setURL(const QString&);
+ void setArtist(const TQString&);
+ void setAlbum(const TQString&);
+ void setURL(const TQString&);
private:
- QString _artist;
- QString _album;
- QString _url;
+ TQString _artist;
+ TQString _album;
+ TQString _url;
- QString _coverfolder;
- QString _largefolder;
- QString _cachefolder;
+ TQString _coverfolder;
+ TQString _largefolder;
+ TQString _cachefolder;
};
#endif // COVERIMAGE_H
diff --git a/katapult/plugins/catalogs/amarokcatalog/settings.ui b/katapult/plugins/catalogs/amarokcatalog/settings.ui
index 70bb3ab..a3f9c22 100644
--- a/katapult/plugins/catalogs/amarokcatalog/settings.ui
+++ b/katapult/plugins/catalogs/amarokcatalog/settings.ui
@@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>AmarokCatalogSettings</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>AmarokCatalogSettings</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@@ -19,15 +19,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout1</cstring>
+ <cstring>tqlayout1</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -64,7 +64,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>370</height>
@@ -73,7 +73,7 @@
</spacer>
</vbox>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>knuminput.h</includehint>
</includehints>
diff --git a/katapult/plugins/catalogs/amarokcatalog/song.cpp b/katapult/plugins/catalogs/amarokcatalog/song.cpp
index 78b69fb..ebad14a 100644
--- a/katapult/plugins/catalogs/amarokcatalog/song.cpp
+++ b/katapult/plugins/catalogs/amarokcatalog/song.cpp
@@ -21,35 +21,35 @@
#include <kglobal.h>
#include <kiconloader.h>
#include <kurl.h>
-#include <qpixmap.h>
-#include <qimage.h>
-#include <qstring.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
+#include <tqstring.h>
#include <amarokcatalog.h>
#include "song.h"
-Song::Song(const QString&)
+Song::Song(const TQString&)
: KatapultItem()
{
- setName(QString());
- setArtist(QString());
+ setName(TQString());
+ setArtist(TQString());
setURL(KURL());
- setIcon(QString());
- setAlbum(QString::null);
+ setIcon(TQString());
+ setAlbum(TQString());
}
-void Song::setArtist(const QString& artist)
+void Song::setArtist(const TQString& artist)
{
_artist = artist;
cover.setArtist(artist);
}
-void Song::setName(const QString& name)
+void Song::setName(const TQString& name)
{
_name = name;
}
-void Song::setAlbum(const QString& album)
+void Song::setAlbum(const TQString& album)
{
cover.setAlbum(album);
}
@@ -59,22 +59,22 @@ void Song::setURL(const KURL url)
_url = url;
}
-void Song::setIcon(const QString icon)
+void Song::setIcon(const TQString icon)
{
cover.setURL(icon);
}
-QPixmap Song::icon(int size) const
+TQPixmap Song::icon(int size) const
{
- QImage image = cover.load(size);
+ TQImage image = cover.load(size);
if ( image.isNull() )
return KGlobal::iconLoader()->loadIcon("multimedia", KIcon::NoGroup, size);
- return QPixmap(image);
+ return TQPixmap(image);
}
-QString Song::text() const
+TQString Song::text() const
{
- QString text;
+ TQString text;
if( !_artist.isEmpty() ) {
text.append(_artist);
text.append(": ");
diff --git a/katapult/plugins/catalogs/amarokcatalog/song.h b/katapult/plugins/catalogs/amarokcatalog/song.h
index 90e4819..12c796f 100644
--- a/katapult/plugins/catalogs/amarokcatalog/song.h
+++ b/katapult/plugins/catalogs/amarokcatalog/song.h
@@ -23,8 +23,8 @@
#include "katapultitem.h"
#include "coverimage.h"
#include <kurl.h>
-#include <qstring.h>
-#include <qpixmap.h>
+#include <tqstring.h>
+#include <tqpixmap.h>
/**
@author Bastian Holst
@@ -32,22 +32,23 @@
class Song : public KatapultItem
{
Q_OBJECT
+ TQ_OBJECT
public:
- Song(const QString&);
+ Song(const TQString&);
- virtual QPixmap icon(int) const;
- virtual QString text() const;
+ virtual TQPixmap icon(int) const;
+ virtual TQString text() const;
virtual KURL url() const;
- void setArtist(const QString&);
- void setName(const QString&);
+ void setArtist(const TQString&);
+ void setName(const TQString&);
void setURL(const KURL);
- void setIcon(const QString);
- void setAlbum(const QString&);
+ void setIcon(const TQString);
+ void setAlbum(const TQString&);
protected:
- QString _artist;
- QString _name;
+ TQString _artist;
+ TQString _name;
KURL _url;
CoverImage cover;