summaryrefslogtreecommitdiffstats
path: root/noatun/modules/winskin/waSkinManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'noatun/modules/winskin/waSkinManager.cpp')
-rw-r--r--noatun/modules/winskin/waSkinManager.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/noatun/modules/winskin/waSkinManager.cpp b/noatun/modules/winskin/waSkinManager.cpp
index 5cde117b..cb5b0e2a 100644
--- a/noatun/modules/winskin/waSkinManager.cpp
+++ b/noatun/modules/winskin/waSkinManager.cpp
@@ -1,8 +1,8 @@
#include <kglobal.h>
-#include <qfileinfo.h>
-#include <qregexp.h>
+#include <tqfileinfo.h>
+#include <tqregexp.h>
#include <kstandarddirs.h>
-#include <qdir.h>
+#include <tqdir.h>
#include <kdebug.h>
#include <kmimetype.h>
#include <kio/job.h>
@@ -19,21 +19,21 @@ WaSkinManager::WaSkinManager() : DCOPObject("WaSkinManager") {
WaSkinManager::~WaSkinManager() {
}
-QStringList WaSkinManager::availableSkins() {
- QStringList skinDirs = KGlobal::dirs()->findDirs("data", "noatun/skins/winamp");
- QStringList skin_list;
+TQStringList WaSkinManager::availableSkins() {
+ TQStringList skinDirs = KGlobal::dirs()->findDirs("data", "noatun/skins/winamp");
+ TQStringList skin_list;
// This loop adds them all to our skin list
for(unsigned int x = 0;x < skinDirs.count();x++) {
- QDir skinQDir(skinDirs[x]);
+ TQDir skinQDir(skinDirs[x]);
// We only want directories, although there shouldn't be anything else
- skinQDir.setFilter( QDir::Dirs );
+ skinQDir.setFilter( TQDir::Dirs );
// I guess name is as good as any
- skinQDir.setSorting( QDir::Name );
+ skinQDir.setSorting( TQDir::Name );
for (unsigned int y = 0;y < skinQDir.count();y++) {
- QStringList skins = skinQDir.entryList(QDir::Dirs, QDir::Name);
+ TQStringList skins = skinQDir.entryList(TQDir::Dirs, TQDir::Name);
// We really don't care for '.' and '..'
if (skinQDir[y][0] != (char)'.') {
@@ -46,16 +46,16 @@ QStringList WaSkinManager::availableSkins() {
return skin_list;
}
-QString WaSkinManager::currentSkin() {
+TQString WaSkinManager::currentSkin() {
return mCurrentSkin;
}
-QString WaSkinManager::defaultSkin() {
+TQString WaSkinManager::defaultSkin() {
return "Winamp";
}
-bool WaSkinManager::loadSkin(QString skinName) {
- QStringList skins = KGlobal::dirs()->findDirs("data", "noatun/skins/winamp/" + skinName);
+bool WaSkinManager::loadSkin(TQString skinName) {
+ TQStringList skins = KGlobal::dirs()->findDirs("data", "noatun/skins/winamp/" + skinName);
if (!skins.count())
mCurrentSkin = defaultSkin();
@@ -65,15 +65,15 @@ bool WaSkinManager::loadSkin(QString skinName) {
return _waskinmodel_instance->load(skins[0]);
}
-bool WaSkinManager::installSkin(QString _url) {
- QString location = KGlobal::dirs()->saveLocation("data", "noatun/skins/winamp");
+bool WaSkinManager::installSkin(TQString _url) {
+ TQString location = KGlobal::dirs()->saveLocation("data", "noatun/skins/winamp");
KURL url(_url);
- QString mimetype = KMimeType::findByURL(_url)->name();
+ TQString mimetype = KMimeType::findByURL(_url)->name();
if (mimetype == "inode/directory")
{
KIO::Job *job = KIO::copy(url, location, !url.isLocalFile());
- connect(job, SIGNAL(result(KIO::Job *)), this, SIGNAL(updateSkinList()));
+ connect(job, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SIGNAL(updateSkinList()));
return true;
}
else if ((mimetype == "interface/x-winamp-skin") || (mimetype == "application/x-zip"))
@@ -81,10 +81,10 @@ bool WaSkinManager::installSkin(QString _url) {
if (!url.isLocalFile())
return false;
- QString base_path;
- base_path = location + "/" + QFileInfo(url.path()).baseName().replace(QRegExp("_"), " ");
+ TQString base_path;
+ base_path = location + "/" + TQFileInfo(url.path()).baseName().replace(TQRegExp("_"), " ");
KIO::Job *job = KIO::copy("zip:" + url.path(), base_path);
- connect(job, SIGNAL(result(KIO::Job *)), this, SIGNAL(updateSkinList()));
+ connect(job, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SIGNAL(updateSkinList()));
return true;
}
@@ -92,30 +92,30 @@ bool WaSkinManager::installSkin(QString _url) {
return false;
}
-bool WaSkinManager::removeSkin(QString skinName) {
+bool WaSkinManager::removeSkin(TQString skinName) {
if (!skinRemovable(skinName))
return false;
- QStringList skins = KGlobal::dirs()->findDirs("data", "noatun/skins/winamp/" + skinName);
+ TQStringList skins = KGlobal::dirs()->findDirs("data", "noatun/skins/winamp/" + skinName);
KIO::Job *job = KIO::del(KURL(skins[0]), false, false);
- connect(job, SIGNAL(result(KIO::Job *)), this, SIGNAL(updateSkinList()));
+ connect(job, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SIGNAL(updateSkinList()));
return true;
}
-bool WaSkinManager::skinRemovable(QString skinName) {
- QStringList skins = KGlobal::dirs()->findDirs("data", "noatun/skins/winamp/" + skinName);
+bool WaSkinManager::skinRemovable(TQString skinName) {
+ TQStringList skins = KGlobal::dirs()->findDirs("data", "noatun/skins/winamp/" + skinName);
if (!skins.count())
return false;
- QFileInfo info(skins[0]);
+ TQFileInfo info(skins[0]);
return info.isWritable();
}
-QStringList WaSkinManager::skinMimeTypes() {
- QStringList temp;
+TQStringList WaSkinManager::skinMimeTypes() {
+ TQStringList temp;
temp.append("interface/x-winamp-skin");
temp.append("application/x-zip");