summaryrefslogtreecommitdiffstats
path: root/juk
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 /juk
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 'juk')
-rw-r--r--juk/actioncollection.cpp2
-rw-r--r--juk/advancedsearchdialog.cpp48
-rw-r--r--juk/advancedsearchdialog.h16
-rw-r--r--juk/akodeplayer.cpp4
-rw-r--r--juk/akodeplayer.h2
-rw-r--r--juk/artsplayer.cpp6
-rw-r--r--juk/artsplayer.h4
-rw-r--r--juk/cache.cpp54
-rw-r--r--juk/cache.h8
-rw-r--r--juk/categoryreaderinterface.cpp14
-rw-r--r--juk/categoryreaderinterface.h18
-rw-r--r--juk/collectionlist.cpp50
-rw-r--r--juk/collectionlist.h56
-rw-r--r--juk/coverdialog.cpp38
-rw-r--r--juk/coverdialog.h6
-rw-r--r--juk/covericonview.cpp8
-rw-r--r--juk/covericonview.h6
-rw-r--r--juk/coverinfo.cpp64
-rw-r--r--juk/coverinfo.h8
-rw-r--r--juk/covermanager.cpp142
-rw-r--r--juk/covermanager.h46
-rw-r--r--juk/deletedialog.cpp26
-rw-r--r--juk/deletedialog.h12
-rw-r--r--juk/directorylist.cpp22
-rw-r--r--juk/directorylist.h14
-rw-r--r--juk/dynamicplaylist.cpp16
-rw-r--r--juk/dynamicplaylist.h14
-rw-r--r--juk/exampleoptions.cpp28
-rw-r--r--juk/exampleoptions.h12
-rw-r--r--juk/filehandle.cpp46
-rw-r--r--juk/filehandle.h26
-rw-r--r--juk/filehandleproperties.h28
-rw-r--r--juk/filerenamer.cpp256
-rw-r--r--juk/filerenamer.h80
-rw-r--r--juk/filerenamerconfigdlg.cpp2
-rw-r--r--juk/filerenamerconfigdlg.h2
-rw-r--r--juk/filerenameroptions.cpp26
-rw-r--r--juk/filerenameroptions.h4
-rw-r--r--juk/folderplaylist.cpp22
-rw-r--r--juk/folderplaylist.h14
-rw-r--r--juk/gstreamerplayer.cpp8
-rw-r--r--juk/gstreamerplayer.h4
-rw-r--r--juk/historyplaylist.cpp24
-rw-r--r--juk/historyplaylist.h16
-rw-r--r--juk/juk.cpp96
-rw-r--r--juk/juk.h4
-rw-r--r--juk/jukIface.h56
-rw-r--r--juk/k3bexporter.cpp40
-rw-r--r--juk/keydialog.cpp36
-rw-r--r--juk/keydialog.h18
-rw-r--r--juk/ktrm.cpp80
-rw-r--r--juk/ktrm.h18
-rw-r--r--juk/mediafiles.cpp38
-rw-r--r--juk/mediafiles.h22
-rw-r--r--juk/musicbrainzquery.cpp10
-rw-r--r--juk/musicbrainzquery.h2
-rw-r--r--juk/nowplaying.cpp102
-rw-r--r--juk/nowplaying.h44
-rw-r--r--juk/player.h4
-rw-r--r--juk/playermanager.cpp54
-rw-r--r--juk/playermanager.h22
-rw-r--r--juk/playlist.cpp320
-rw-r--r--juk/playlist.h118
-rw-r--r--juk/playlistbox.cpp142
-rw-r--r--juk/playlistbox.h74
-rw-r--r--juk/playlistcollection.cpp214
-rw-r--r--juk/playlistcollection.h82
-rw-r--r--juk/playlistexporter.h2
-rw-r--r--juk/playlistinterface.cpp6
-rw-r--r--juk/playlistinterface.h4
-rw-r--r--juk/playlistitem.cpp60
-rw-r--r--juk/playlistitem.h36
-rw-r--r--juk/playlistsearch.cpp20
-rw-r--r--juk/playlistsearch.h32
-rw-r--r--juk/playlistsplitter.cpp68
-rw-r--r--juk/playlistsplitter.h14
-rw-r--r--juk/searchplaylist.cpp14
-rw-r--r--juk/searchplaylist.h6
-rw-r--r--juk/searchwidget.cpp76
-rw-r--r--juk/searchwidget.h16
-rw-r--r--juk/slideraction.cpp94
-rw-r--r--juk/slideraction.h22
-rw-r--r--juk/sortedstringlist.cpp20
-rw-r--r--juk/sortedstringlist.h16
-rw-r--r--juk/splashscreen.cpp16
-rw-r--r--juk/splashscreen.h2
-rw-r--r--juk/statuslabel.cpp60
-rw-r--r--juk/statuslabel.h12
-rw-r--r--juk/stringhash.h20
-rw-r--r--juk/stringshare.cpp8
-rw-r--r--juk/stringshare.h6
-rw-r--r--juk/systemtray.cpp172
-rw-r--r--juk/systemtray.h52
-rw-r--r--juk/tag.cpp36
-rw-r--r--juk/tag.h50
-rw-r--r--juk/tageditor.cpp180
-rw-r--r--juk/tageditor.h22
-rw-r--r--juk/tagguesser.cpp56
-rw-r--r--juk/tagguesser.h52
-rw-r--r--juk/tagguesserconfigdlg.cpp46
-rw-r--r--juk/tagguesserconfigdlg.h6
-rw-r--r--juk/tagguessertest.cpp44
-rw-r--r--juk/tagrenameroptions.cpp38
-rw-r--r--juk/tagrenameroptions.h24
-rw-r--r--juk/tagtransactionmanager.cpp28
-rw-r--r--juk/tagtransactionmanager.h20
-rw-r--r--juk/trackpickerdialog.cpp12
-rw-r--r--juk/trackpickerdialog.h4
-rw-r--r--juk/tracksequenceiterator.cpp4
-rw-r--r--juk/tracksequencemanager.cpp10
-rw-r--r--juk/tracksequencemanager.h2
-rw-r--r--juk/treeviewitemplaylist.cpp12
-rw-r--r--juk/treeviewitemplaylist.h4
-rw-r--r--juk/upcomingplaylist.cpp12
-rw-r--r--juk/upcomingplaylist.h12
-rw-r--r--juk/viewmode.cpp94
-rw-r--r--juk/viewmode.h40
-rw-r--r--juk/webimagefetcher.cpp44
-rw-r--r--juk/webimagefetcher.h32
-rw-r--r--juk/webimagefetcherdialog.cpp78
-rw-r--r--juk/webimagefetcherdialog.h22
121 files changed, 2368 insertions, 2368 deletions
diff --git a/juk/actioncollection.cpp b/juk/actioncollection.cpp
index 2ba64474..6290d6ee 100644
--- a/juk/actioncollection.cpp
+++ b/juk/actioncollection.cpp
@@ -23,7 +23,7 @@ namespace ActionCollection
KActionCollection *actions()
{
static KActionCollection *a =
- new KActionCollection(static_cast<QWidget *>(0), "JuK Action Collection");
+ new KActionCollection(static_cast<TQWidget *>(0), "JuK Action Collection");
return a;
}
diff --git a/juk/advancedsearchdialog.cpp b/juk/advancedsearchdialog.cpp
index 4b5f2dbb..711c1275 100644
--- a/juk/advancedsearchdialog.cpp
+++ b/juk/advancedsearchdialog.cpp
@@ -18,13 +18,13 @@
#include <kpushbutton.h>
#include <klocale.h>
-#include <qradiobutton.h>
-#include <qvgroupbox.h>
-#include <qlabel.h>
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qlayout.h>
-#include <qhbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqvgroupbox.h>
+#include <tqlabel.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
+#include <tqlayout.h>
+#include <tqhbuttongroup.h>
#include "collectionlist.h"
#include "advancedsearchdialog.h"
@@ -34,28 +34,28 @@
// public methods
////////////////////////////////////////////////////////////////////////////////
-AdvancedSearchDialog::AdvancedSearchDialog(const QString &defaultName,
+AdvancedSearchDialog::AdvancedSearchDialog(const TQString &defaultName,
const PlaylistSearch &defaultSearch,
- QWidget *parent,
+ TQWidget *parent,
const char *name) :
KDialogBase(parent, name, true, i18n("Create Search Playlist"), Ok|Cancel)
{
makeVBoxMainWidget();
- QHBox *box = new QHBox(mainWidget());
+ TQHBox *box = new TQHBox(mainWidget());
box->setSpacing(5);
- new QLabel(i18n("Playlist name:"), box);
+ new TQLabel(i18n("Playlist name:"), box);
m_playlistNameLineEdit = new KLineEdit(defaultName, box);
- QVGroupBox *criteriaGroupBox = new QVGroupBox(i18n("Search Criteria"), mainWidget());
- static_cast<QHBox *>(mainWidget())->setStretchFactor(criteriaGroupBox, 1);
+ TQVGroupBox *criteriaGroupBox = new TQVGroupBox(i18n("Search Criteria"), mainWidget());
+ static_cast<TQHBox *>(mainWidget())->setStretchFactor(criteriaGroupBox, 1);
- QHButtonGroup *group = new QHButtonGroup(criteriaGroupBox);
- m_matchAnyButton = new QRadioButton(i18n("Match any of the following"), group);
- m_matchAllButton = new QRadioButton(i18n("Match all of the following"), group);
+ TQHButtonGroup *group = new TQHButtonGroup(criteriaGroupBox);
+ m_matchAnyButton = new TQRadioButton(i18n("Match any of the following"), group);
+ m_matchAllButton = new TQRadioButton(i18n("Match all of the following"), group);
- m_criteria = new QVBox(criteriaGroupBox);
+ m_criteria = new TQVBox(criteriaGroupBox);
if(defaultSearch.isNull()) {
m_searchLines.append(new SearchLine(m_criteria));
@@ -78,21 +78,21 @@ AdvancedSearchDialog::AdvancedSearchDialog(const QString &defaultName,
m_matchAllButton->setChecked(true);
}
- QWidget *buttons = new QWidget(criteriaGroupBox);
- QBoxLayout *l = new QHBoxLayout(buttons, 0, 5);
+ TQWidget *buttons = new TQWidget(criteriaGroupBox);
+ TQBoxLayout *l = new TQHBoxLayout(buttons, 0, 5);
KPushButton *clearButton = new KPushButton(KStdGuiItem::clear(), buttons);
- connect(clearButton, SIGNAL(clicked()), SLOT(clear()));
+ connect(clearButton, TQT_SIGNAL(clicked()), TQT_SLOT(clear()));
l->addWidget(clearButton);
l->addStretch(1);
m_moreButton = new KPushButton(i18n("More"), buttons);
- connect(m_moreButton, SIGNAL(clicked()), SLOT(more()));
+ connect(m_moreButton, TQT_SIGNAL(clicked()), TQT_SLOT(more()));
l->addWidget(m_moreButton);
m_fewerButton = new KPushButton(i18n("Fewer"), buttons);
- connect(m_fewerButton, SIGNAL(clicked()), SLOT(fewer()));
+ connect(m_fewerButton, TQT_SIGNAL(clicked()), TQT_SLOT(fewer()));
l->addWidget(m_fewerButton);
m_playlistNameLineEdit->setFocus();
@@ -127,7 +127,7 @@ void AdvancedSearchDialog::accept()
m_search.addPlaylist(CollectionList::instance());
- QValueListConstIterator<SearchLine *> it = m_searchLines.begin();
+ TQValueListConstIterator<SearchLine *> it = m_searchLines.begin();
for(; it != m_searchLines.end(); ++it)
m_search.addComponent((*it)->searchComponent());
@@ -141,7 +141,7 @@ void AdvancedSearchDialog::accept()
void AdvancedSearchDialog::clear()
{
- QValueListConstIterator<SearchLine *> it = m_searchLines.begin();
+ TQValueListConstIterator<SearchLine *> it = m_searchLines.begin();
for(; it != m_searchLines.end(); ++it)
(*it)->clear();
}
diff --git a/juk/advancedsearchdialog.h b/juk/advancedsearchdialog.h
index 03280d19..3cfb7163 100644
--- a/juk/advancedsearchdialog.h
+++ b/juk/advancedsearchdialog.h
@@ -33,12 +33,12 @@ public:
{
DialogCode result;
PlaylistSearch search;
- QString playlistName;
+ TQString playlistName;
};
- AdvancedSearchDialog(const QString &defaultName,
+ AdvancedSearchDialog(const TQString &defaultName,
const PlaylistSearch &defaultSearch = PlaylistSearch(),
- QWidget *parent = 0,
+ TQWidget *parent = 0,
const char *name = 0);
virtual ~AdvancedSearchDialog();
@@ -55,13 +55,13 @@ protected slots:
private:
void updateButtons();
- QWidget *m_criteria;
+ TQWidget *m_criteria;
PlaylistSearch m_search;
- QString m_playlistName;
- QValueList<SearchLine *> m_searchLines;
+ TQString m_playlistName;
+ TQValueList<SearchLine *> m_searchLines;
KLineEdit *m_playlistNameLineEdit;
- QRadioButton *m_matchAnyButton;
- QRadioButton *m_matchAllButton;
+ TQRadioButton *m_matchAnyButton;
+ TQRadioButton *m_matchAllButton;
KPushButton *m_moreButton;
KPushButton *m_fewerButton;
};
diff --git a/juk/akodeplayer.cpp b/juk/akodeplayer.cpp
index 0d75d830..89b0c094 100644
--- a/juk/akodeplayer.cpp
+++ b/juk/akodeplayer.cpp
@@ -18,7 +18,7 @@
#include <kdebug.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <akode/player.h>
#include <akode/decoder.h>
@@ -53,7 +53,7 @@ void aKodePlayer::play(const FileHandle &file)
return;
}
- QString filename = file.absFilePath();
+ TQString filename = file.absFilePath();
kdDebug( 65432 ) << "Opening: " << filename << endl;
diff --git a/juk/akodeplayer.h b/juk/akodeplayer.h
index 6b44f2fd..07181ba5 100644
--- a/juk/akodeplayer.h
+++ b/juk/akodeplayer.h
@@ -20,7 +20,7 @@
#ifdef HAVE_AKODE
-#include <qstring.h>
+#include <tqstring.h>
#include "player.h"
#include <kdemacros.h>
diff --git a/juk/artsplayer.cpp b/juk/artsplayer.cpp
index 410a6356..4022b0f1 100644
--- a/juk/artsplayer.cpp
+++ b/juk/artsplayer.cpp
@@ -24,7 +24,7 @@
#include <kconfig.h>
#include <kstandarddirs.h>
-#include <qdir.h>
+#include <tqdir.h>
#include <kartsserver.h>
#include <kartsdispatcher.h>
@@ -84,7 +84,7 @@ void ArtsPlayer::play(const FileHandle &file)
m_playobject = m_factory->createPlayObject(m_currentURL, false);
if(m_playobject->object().isNull())
- connect(m_playobject, SIGNAL(playObjectCreated()), SLOT(playObjectCreated()));
+ connect(m_playobject, TQT_SIGNAL(playObjectCreated()), TQT_SLOT(playObjectCreated()));
else
playObjectCreated();
}
@@ -251,7 +251,7 @@ void ArtsPlayer::setupPlayer()
m_dispatcher = new KArtsDispatcher;
m_server = new KArtsServer;
setupArtsObjects();
- connect(m_server, SIGNAL(restartedServer()), SLOT(setupArtsObjects()));
+ connect(m_server, TQT_SIGNAL(restartedServer()), TQT_SLOT(setupArtsObjects()));
}
void ArtsPlayer::setupVolumeControl()
diff --git a/juk/artsplayer.h b/juk/artsplayer.h
index 2c1306e1..73601b33 100644
--- a/juk/artsplayer.h
+++ b/juk/artsplayer.h
@@ -27,8 +27,8 @@
#include <kurl.h>
-#include <qstring.h>
-#include <qobject.h>
+#include <tqstring.h>
+#include <tqobject.h>
#include <artsflow.h>
class KArtsDispatcher;
diff --git a/juk/cache.cpp b/juk/cache.cpp
index 3f37ee4a..ada9334b 100644
--- a/juk/cache.cpp
+++ b/juk/cache.cpp
@@ -20,8 +20,8 @@
#include <kactionclasses.h>
#include <kdebug.h>
-#include <qdir.h>
-#include <qbuffer.h>
+#include <tqdir.h>
+#include <tqbuffer.h>
#include "cache.h"
#include "tag.h"
@@ -66,23 +66,23 @@ Cache *Cache::instance()
void Cache::save()
{
- QString dirName = KGlobal::dirs()->saveLocation("appdata");
- QString cacheFileName = dirName + "cache.new";
+ TQString dirName = KGlobal::dirs()->saveLocation("appdata");
+ TQString cacheFileName = dirName + "cache.new";
- QFile f(cacheFileName);
+ TQFile f(cacheFileName);
if(!f.open(IO_WriteOnly))
return;
- QByteArray data;
- QDataStream s(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream s(data, IO_WriteOnly);
for(Iterator it = begin(); it != end(); ++it) {
s << (*it).absFilePath();
s << *it;
}
- QDataStream fs(&f);
+ TQDataStream fs(&f);
Q_INT32 checksum = qChecksum(data.data(), data.size());
@@ -92,19 +92,19 @@ void Cache::save()
f.close();
- QDir(dirName).rename("cache.new", "cache");
+ TQDir(dirName).rename("cache.new", "cache");
}
void Cache::loadPlaylists(PlaylistCollection *collection) // static
{
- QString playlistsFile = KGlobal::dirs()->saveLocation("appdata") + "playlists";
+ TQString playlistsFile = KGlobal::dirs()->saveLocation("appdata") + "playlists";
- QFile f(playlistsFile);
+ TQFile f(playlistsFile);
if(!f.open(IO_ReadOnly))
return;
- QDataStream fs(&f);
+ TQDataStream fs(&f);
Q_INT32 version;
fs >> version;
@@ -116,7 +116,7 @@ void Cache::loadPlaylists(PlaylistCollection *collection) // static
// Our checksum is only for the values after the version and checksum so
// we want to get a byte array with just the checksummed data.
- QByteArray data;
+ TQByteArray data;
Q_UINT16 checksum;
fs >> checksum >> data;
@@ -125,7 +125,7 @@ void Cache::loadPlaylists(PlaylistCollection *collection) // static
// Create a new stream just based on the data.
- QDataStream s(data, IO_ReadOnly);
+ TQDataStream s(data, IO_ReadOnly);
while(!s.atEnd()) {
@@ -204,15 +204,15 @@ void Cache::loadPlaylists(PlaylistCollection *collection) // static
void Cache::savePlaylists(const PlaylistList &playlists)
{
- QString dirName = KGlobal::dirs()->saveLocation("appdata");
- QString playlistsFile = dirName + "playlists.new";
- QFile f(playlistsFile);
+ TQString dirName = KGlobal::dirs()->saveLocation("appdata");
+ TQString playlistsFile = dirName + "playlists.new";
+ TQFile f(playlistsFile);
if(!f.open(IO_WriteOnly))
return;
- QByteArray data;
- QDataStream s(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream s(data, IO_WriteOnly);
for(PlaylistList::ConstIterator it = playlists.begin(); it != playlists.end(); ++it) {
if(*it) {
@@ -242,19 +242,19 @@ void Cache::savePlaylists(const PlaylistList &playlists)
}
}
- QDataStream fs(&f);
+ TQDataStream fs(&f);
fs << Q_INT32(playlistCacheVersion);
fs << qChecksum(data.data(), data.size());
fs << data;
f.close();
- QDir(dirName).rename("playlists.new", "playlists");
+ TQDir(dirName).rename("playlists.new", "playlists");
}
bool Cache::cacheFileExists() // static
{
- return QFile::exists(KGlobal::dirs()->saveLocation("appdata") + "cache");
+ return TQFile::exists(KGlobal::dirs()->saveLocation("appdata") + "cache");
}
////////////////////////////////////////////////////////////////////////////////
@@ -268,9 +268,9 @@ Cache::Cache() : FileHandleHash()
void Cache::load()
{
- QString cacheFileName = KGlobal::dirs()->saveLocation("appdata") + "cache";
+ TQString cacheFileName = KGlobal::dirs()->saveLocation("appdata") + "cache";
- QFile f(cacheFileName);
+ TQFile f(cacheFileName);
if(!f.open(IO_ReadOnly))
return;
@@ -280,7 +280,7 @@ void Cache::load()
Q_INT32 version;
s >> version;
- QBuffer buffer;
+ TQBuffer buffer;
// Do the version specific stuff.
@@ -289,7 +289,7 @@ void Cache::load()
s.setCacheVersion(1);
Q_INT32 checksum;
- QByteArray data;
+ TQByteArray data;
s >> checksum
>> data;
@@ -314,7 +314,7 @@ void Cache::load()
// Read the cached tags.
while(!s.atEnd()) {
- QString fileName;
+ TQString fileName;
s >> fileName;
fileName.squeeze();
diff --git a/juk/cache.h b/juk/cache.h
index 09f6906d..6d67f1fd 100644
--- a/juk/cache.h
+++ b/juk/cache.h
@@ -23,7 +23,7 @@ class Tag;
class Playlist;
class PlaylistCollection;
-typedef QValueList<Playlist *> PlaylistList;
+typedef TQValueList<Playlist *> PlaylistList;
class Cache : public FileHandleHash
{
@@ -45,15 +45,15 @@ private:
};
/**
- * A simple QDataStream subclass that has an extra field to indicate the cache
+ * A simple TQDataStream subclass that has an extra field to indicate the cache
* version.
*/
class CacheDataStream : public QDataStream
{
public:
- CacheDataStream(QIODevice *d) : QDataStream(d), m_cacheVersion(0) {}
- CacheDataStream(QByteArray a, int mode) : QDataStream(a, mode), m_cacheVersion(0) {}
+ CacheDataStream(TQIODevice *d) : TQDataStream(d), m_cacheVersion(0) {}
+ CacheDataStream(TQByteArray a, int mode) : TQDataStream(a, mode), m_cacheVersion(0) {}
virtual ~CacheDataStream() {}
diff --git a/juk/categoryreaderinterface.cpp b/juk/categoryreaderinterface.cpp
index f9f73103..3844fc21 100644
--- a/juk/categoryreaderinterface.cpp
+++ b/juk/categoryreaderinterface.cpp
@@ -13,14 +13,14 @@
* *
***************************************************************************/
-#include <qstring.h>
+#include <tqstring.h>
#include "filerenameroptions.h"
#include "categoryreaderinterface.h"
-QString CategoryReaderInterface::value(const CategoryID &category) const
+TQString CategoryReaderInterface::value(const CategoryID &category) const
{
- QString value = categoryValue(category.category).stripWhiteSpace();
+ TQString value = categoryValue(category.category).stripWhiteSpace();
if(category.category == Track)
value = fixupTrack(value, category.categoryNumber).stripWhiteSpace();
@@ -41,22 +41,22 @@ bool CategoryReaderInterface::isEmpty(TagType category) const
return categoryValue(category).isEmpty();
}
-QString CategoryReaderInterface::fixupTrack(const QString &track, unsigned categoryNum) const
+TQString CategoryReaderInterface::fixupTrack(const TQString &track, unsigned categoryNum) const
{
- QString str(track);
+ TQString str(track);
CategoryID trackId(Track, categoryNum);
if(track == "0") {
if(emptyAction(trackId) == TagRenamerOptions::UseReplacementValue)
str = emptyText(trackId);
else
- return QString::null;
+ return TQString::null;
}
unsigned minimumWidth = trackWidth(categoryNum);
if(str.length() < minimumWidth) {
- QString prefix;
+ TQString prefix;
prefix.fill('0', minimumWidth - str.length());
return prefix + str;
}
diff --git a/juk/categoryreaderinterface.h b/juk/categoryreaderinterface.h
index 5d2dfd0f..2b037c1a 100644
--- a/juk/categoryreaderinterface.h
+++ b/juk/categoryreaderinterface.h
@@ -43,7 +43,7 @@ public:
* @param type, The category to retrieve the value of.
* @return textual representation of that category's value.
*/
- virtual QString categoryValue(TagType type) const = 0;
+ virtual TQString categoryValue(TagType type) const = 0;
/**
* Returns the user-specified prefix string for \p category.
@@ -51,7 +51,7 @@ public:
* @param category the category to retrieve the value for.
* @return user-specified prefix string for \p category.
*/
- virtual QString prefix(const CategoryID &category) const = 0;
+ virtual TQString prefix(const CategoryID &category) const = 0;
/**
* Returns the user-specified suffix string for \p category.
@@ -59,7 +59,7 @@ public:
* @param category the category to retrieve the value for.
* @return user-specified suffix string for \p category.
*/
- virtual QString suffix(const CategoryID &category) const = 0;
+ virtual TQString suffix(const CategoryID &category) const = 0;
/**
* Returns the user-specified empty action for \p category.
@@ -76,14 +76,14 @@ public:
* @param category the category to retrieve the value for.
* @return the user-specified empty text for \p category.
*/
- virtual QString emptyText(const CategoryID &category) const = 0;
+ virtual TQString emptyText(const CategoryID &category) const = 0;
/**
* @return the categories in the order the user has chosen. Categories may
* be repeated (which is why CategoryID has the categoryNumber value to
* disambiguate duplicates).
*/
- virtual QValueList<CategoryID> categoryOrder() const = 0;
+ virtual TQValueList<CategoryID> categoryOrder() const = 0;
/**
* @return track width for the Track item identified by categoryNum.
@@ -91,11 +91,11 @@ public:
virtual int trackWidth(unsigned categoryNum) const = 0;
// You probably shouldn't reimplement this
- virtual QString value(const CategoryID &category) const;
+ virtual TQString value(const CategoryID &category) const;
- virtual QString separator() const = 0;
+ virtual TQString separator() const = 0;
- virtual QString musicFolder() const = 0;
+ virtual TQString musicFolder() const = 0;
/**
* @param index the zero-based index of the item just before the
@@ -114,7 +114,7 @@ public:
virtual bool isEmpty(TagType category) const;
// You probably shouldn't reimplement this
- virtual QString fixupTrack(const QString &track, unsigned categoryNum) const;
+ virtual TQString fixupTrack(const TQString &track, unsigned categoryNum) const;
};
#endif /* JUK_CATEGORYREADERINTERFACE_H */
diff --git a/juk/collectionlist.cpp b/juk/collectionlist.cpp
index 9540be85..5c06049a 100644
--- a/juk/collectionlist.cpp
+++ b/juk/collectionlist.cpp
@@ -85,7 +85,7 @@ void CollectionList::initialize(PlaylistCollection *collection)
// public methods
////////////////////////////////////////////////////////////////////////////////
-PlaylistItem *CollectionList::createItem(const FileHandle &file, QListViewItem *, bool)
+PlaylistItem *CollectionList::createItem(const FileHandle &file, TQListViewItem *, bool)
{
// It's probably possible to optimize the line below away, but, well, right
// now it's more important to not load duplicate items.
@@ -125,13 +125,13 @@ void CollectionList::setupTreeViewEntries(ViewMode *viewMode) const
return;
}
- QValueList<int> columnList;
+ TQValueList<int> columnList;
columnList << PlaylistItem::ArtistColumn;
columnList << PlaylistItem::GenreColumn;
columnList << PlaylistItem::AlbumColumn;
- QStringList items;
- for(QValueList<int>::Iterator colIt = columnList.begin(); colIt != columnList.end(); ++colIt) {
+ TQStringList items;
+ for(TQValueList<int>::Iterator colIt = columnList.begin(); colIt != columnList.end(); ++colIt) {
items.clear();
for(TagCountDictIterator it(*m_columnTags[*colIt]); it.current(); ++it)
items << it.currentKey();
@@ -142,7 +142,7 @@ void CollectionList::setupTreeViewEntries(ViewMode *viewMode) const
void CollectionList::slotNewItems(const KFileItemList &items)
{
- QStringList files;
+ TQStringList files;
for(KFileItemListIterator it(items); it.current(); ++it)
files.append((*it)->url().path());
@@ -200,7 +200,7 @@ void CollectionList::slotCheckCache()
{
PlaylistItemList invalidItems;
- for(QDictIterator<CollectionListItem>it(m_itemsDict); it.current(); ++it) {
+ for(TQDictIterator<CollectionListItem>it(m_itemsDict); it.current(); ++it) {
if(!it.current()->checkCurrent())
invalidItems.append(*it);
processEvents();
@@ -209,12 +209,12 @@ void CollectionList::slotCheckCache()
clearItems(invalidItems);
}
-void CollectionList::slotRemoveItem(const QString &file)
+void CollectionList::slotRemoveItem(const TQString &file)
{
clearItem(m_itemsDict[file]);
}
-void CollectionList::slotRefreshItem(const QString &file)
+void CollectionList::slotRefreshItem(const TQString &file)
{
m_itemsDict[file]->refresh();
}
@@ -230,12 +230,12 @@ CollectionList::CollectionList(PlaylistCollection *collection) :
{
new KAction(i18n("Show Playing"), KShortcut(), actions(), "showPlaying");
- connect(action("showPlaying"), SIGNAL(activated()), this, SLOT(slotShowPlaying()));
+ connect(action("showPlaying"), TQT_SIGNAL(activated()), this, TQT_SLOT(slotShowPlaying()));
- connect(action<KToolBarPopupAction>("back")->popupMenu(), SIGNAL(aboutToShow()),
- this, SLOT(slotPopulateBackMenu()));
- connect(action<KToolBarPopupAction>("back")->popupMenu(), SIGNAL(activated(int)),
- this, SLOT(slotPlayFromBackMenu(int)));
+ connect(action<KToolBarPopupAction>("back")->popupMenu(), TQT_SIGNAL(aboutToShow()),
+ this, TQT_SLOT(slotPopulateBackMenu()));
+ connect(action<KToolBarPopupAction>("back")->popupMenu(), TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotPlayFromBackMenu(int)));
setSorting(-1); // Temporarily disable sorting to add items faster.
m_columnTags[PlaylistItem::ArtistColumn] = new TagCountDict(5001, false);
@@ -265,7 +265,7 @@ CollectionList::~CollectionList()
delete *it;
}
-void CollectionList::contentsDropEvent(QDropEvent *e)
+void CollectionList::contentsDropEvent(TQDropEvent *e)
{
if(e->source() == this)
return; // Don't rearrange in the CollectionList.
@@ -273,7 +273,7 @@ void CollectionList::contentsDropEvent(QDropEvent *e)
Playlist::contentsDropEvent(e);
}
-void CollectionList::contentsDragMoveEvent(QDragMoveEvent *e)
+void CollectionList::contentsDragMoveEvent(TQDragMoveEvent *e)
{
if(canDecode(e) && e->source() != this)
e->accept(true);
@@ -281,10 +281,10 @@ void CollectionList::contentsDragMoveEvent(QDragMoveEvent *e)
e->accept(false);
}
-QString CollectionList::addStringToDict(const QString &value, unsigned column)
+TQString CollectionList::addStringToDict(const TQString &value, unsigned column)
{
if(column > m_columnTags.count() || value.stripWhiteSpace().isEmpty())
- return QString::null;
+ return TQString::null;
int *refCountPtr = m_columnTags[column]->find(value);
if(refCountPtr)
@@ -297,7 +297,7 @@ QString CollectionList::addStringToDict(const QString &value, unsigned column)
return value;
}
-QStringList CollectionList::uniqueSet(UniqueSetType t) const
+TQStringList CollectionList::uniqueSet(UniqueSetType t) const
{
int column;
@@ -316,14 +316,14 @@ QStringList CollectionList::uniqueSet(UniqueSetType t) const
break;
default:
- return QStringList();
+ return TQStringList();
}
if((unsigned) column >= m_columnTags.count())
- return QStringList();
+ return TQStringList();
TagCountDictIterator it(*m_columnTags[column]);
- QStringList list;
+ TQStringList list;
for(; it.current(); ++it)
list += it.currentKey();
@@ -331,7 +331,7 @@ QStringList CollectionList::uniqueSet(UniqueSetType t) const
return list;
}
-void CollectionList::removeStringFromDict(const QString &value, unsigned column)
+void CollectionList::removeStringFromDict(const TQString &value, unsigned column)
{
if(column > m_columnTags.count() || value.isEmpty())
return;
@@ -363,7 +363,7 @@ void CollectionListItem::refresh()
if(id != TrackNumberColumn && id != LengthColumn) {
// All columns other than track num and length need local-encoded data for sorting
- QCString lower = text(i).lower().local8Bit();
+ TQCString lower = text(i).lower().local8Bit();
// For some columns, we may be able to share some strings
@@ -417,7 +417,7 @@ PlaylistItem *CollectionListItem::itemForPlaylist(const Playlist *playlist)
return 0;
}
-void CollectionListItem::updateCollectionDict(const QString &oldPath, const QString &newPath)
+void CollectionListItem::updateCollectionDict(const TQString &oldPath, const TQString &newPath)
{
CollectionList *collection = CollectionList::instance();
@@ -430,7 +430,7 @@ void CollectionListItem::updateCollectionDict(const QString &oldPath, const QStr
void CollectionListItem::repaint() const
{
- QListViewItem::repaint();
+ TQListViewItem::repaint();
for(PlaylistItemList::ConstIterator it = m_children.begin(); it != m_children.end(); ++it)
(*it)->repaint();
}
diff --git a/juk/collectionlist.h b/juk/collectionlist.h
index c5cafca2..4143889c 100644
--- a/juk/collectionlist.h
+++ b/juk/collectionlist.h
@@ -20,9 +20,9 @@
#include <kdirwatch.h>
#include <kfileitem.h>
-#include <qdict.h>
-#include <qclipboard.h>
-#include <qvaluevector.h>
+#include <tqdict.h>
+#include <tqclipboard.h>
+#include <tqvaluevector.h>
#include "playlist.h"
#include "playlistitem.h"
@@ -32,21 +32,21 @@ class CollectionListItem;
class ViewMode;
/**
- * This type is for mapping QString track attributes like the album, artist
+ * This type is for mapping TQString track attributes like the album, artist
* and track to an integer count representing the number of outstanding items
* that hold the string.
*/
-typedef QDict<int> TagCountDict;
-typedef QDictIterator<int> TagCountDictIterator;
+typedef TQDict<int> TagCountDict;
+typedef TQDictIterator<int> TagCountDictIterator;
/**
* We then have an array of dicts, one for each column in the list view. We
- * use pointers to TagCountDicts because QDict has a broken copy ctor, which
+ * use pointers to TagCountDicts because TQDict has a broken copy ctor, which
* doesn't copy the case sensitivity setting.
*/
-typedef QValueVector<TagCountDict*> TagCountDicts;
+typedef TQValueVector<TagCountDict*> TagCountDicts;
/**
* This is the "collection", or all of the music files that have been opened
@@ -78,12 +78,12 @@ public:
/**
* Returns a unique set of values associated with the type specified.
*/
- QStringList uniqueSet(UniqueSetType t) const;
+ TQStringList uniqueSet(UniqueSetType t) const;
- CollectionListItem *lookup(const QString &file) { return m_itemsDict.find(file); }
+ CollectionListItem *lookup(const TQString &file) { return m_itemsDict.find(file); }
virtual PlaylistItem *createItem(const FileHandle &file,
- QListViewItem * = 0,
+ TQListViewItem * = 0,
bool = false);
void emitVisibleColumnsChanged() { emit signalVisibleColumnsChanged(); }
@@ -99,8 +99,8 @@ public slots:
virtual void clear();
void slotCheckCache();
- void slotRemoveItem(const QString &file);
- void slotRefreshItem(const QString &file);
+ void slotRemoveItem(const TQString &file);
+ void slotRefreshItem(const TQString &file);
void slotNewItems(const KFileItemList &items);
void slotRefreshItems(const KFileItemList &items);
@@ -110,24 +110,24 @@ protected:
CollectionList(PlaylistCollection *collection);
virtual ~CollectionList();
- virtual void contentsDropEvent(QDropEvent *e);
- virtual void contentsDragMoveEvent(QDragMoveEvent *e);
+ virtual void contentsDropEvent(TQDropEvent *e);
+ virtual void contentsDragMoveEvent(TQDragMoveEvent *e);
// These methods are used by CollectionListItem, which is a friend class.
- void addToDict(const QString &file, CollectionListItem *item) { m_itemsDict.replace(file, item); }
- void removeFromDict(const QString &file) { m_itemsDict.remove(file); }
+ void addToDict(const TQString &file, CollectionListItem *item) { m_itemsDict.replace(file, item); }
+ void removeFromDict(const TQString &file) { m_itemsDict.remove(file); }
// These methods are also used by CollectionListItem, to manage the
// strings used in generating the unique sets and tree view mode playlists.
- QString addStringToDict(const QString &value, unsigned column);
- void removeStringFromDict(const QString &value, unsigned column);
+ TQString addStringToDict(const TQString &value, unsigned column);
+ void removeStringFromDict(const TQString &value, unsigned column);
- void addWatched(const QString &file) { m_dirWatch->addFile(file); }
- void removeWatched(const QString &file) { m_dirWatch->removeFile(file); }
+ void addWatched(const TQString &file) { m_dirWatch->addFile(file); }
+ void removeWatched(const TQString &file) { m_dirWatch->removeFile(file); }
- virtual bool hasItem(const QString &file) const { return m_itemsDict.find(file); }
+ virtual bool hasItem(const TQString &file) const { return m_itemsDict.find(file); }
signals:
void signalCollectionChanged();
@@ -140,8 +140,8 @@ signals:
* \see Playlsit::isColumnVisible()
*/
void signalVisibleColumnsChanged();
- void signalNewTag(const QString &, unsigned);
- void signalRemovedTag(const QString &, unsigned);
+ void signalNewTag(const TQString &, unsigned);
+ void signalRemovedTag(const TQString &, unsigned);
private:
/**
@@ -151,7 +151,7 @@ private:
static const int m_uniqueSetCount = 3;
static CollectionList *m_list;
- QDict<CollectionListItem> m_itemsDict;
+ TQDict<CollectionListItem> m_itemsDict;
KDirWatch *m_dirWatch;
TagCountDicts m_columnTags;
};
@@ -163,14 +163,14 @@ class CollectionListItem : public PlaylistItem
friend class PlaylistItem;
/**
- * Needs access to the destructor, even though the destructor isn't used by QDict.
+ * Needs access to the destructor, even though the destructor isn't used by TQDict.
*/
- friend class QDict<CollectionListItem>;
+ friend class TQDict<CollectionListItem>;
public:
virtual void refresh();
PlaylistItem *itemForPlaylist(const Playlist *playlist);
- void updateCollectionDict(const QString &oldPath, const QString &newPath);
+ void updateCollectionDict(const TQString &oldPath, const TQString &newPath);
void repaint() const;
PlaylistItemList children() const { return m_children; }
diff --git a/juk/coverdialog.cpp b/juk/coverdialog.cpp
index cdb9853a..509f0695 100644
--- a/juk/coverdialog.cpp
+++ b/juk/coverdialog.cpp
@@ -21,8 +21,8 @@
#include <kpopupmenu.h>
#include <klocale.h>
-#include <qtimer.h>
-#include <qtoolbutton.h>
+#include <tqtimer.h>
+#include <tqtoolbutton.h>
#include "coverdialog.h"
#include "covericonview.h"
@@ -34,12 +34,12 @@ using CoverUtility::CoverIconViewItem;
class AllArtistsListViewItem : public KListViewItem
{
public:
- AllArtistsListViewItem(QListView *parent) :
+ AllArtistsListViewItem(TQListView *parent) :
KListViewItem(parent, i18n("<All Artists>"))
{
}
- int compare(QListViewItem *, int, bool) const
+ int compare(TQListViewItem *, int, bool) const
{
return -1; // Always be at the top.
}
@@ -48,22 +48,22 @@ public:
class CaseInsensitiveItem : public KListViewItem
{
public:
- CaseInsensitiveItem(QListView *parent, const QString &text) :
+ CaseInsensitiveItem(TQListView *parent, const TQString &text) :
KListViewItem(parent, text)
{
}
- int compare(QListViewItem *item, int column, bool ascending) const
+ int compare(TQListViewItem *item, int column, bool ascending) const
{
Q_UNUSED(ascending);
return text(column).lower().localeAwareCompare(item->text(column).lower());
}
};
-CoverDialog::CoverDialog(QWidget *parent) :
+CoverDialog::CoverDialog(TQWidget *parent) :
CoverDialogBase(parent, "juk_cover_dialog", WType_Dialog)
{
- m_covers->setResizeMode(QIconView::Adjust);
+ m_covers->setResizeMode(TQIconView::Adjust);
m_covers->setGridX(140);
m_covers->setGridY(150);
@@ -80,16 +80,16 @@ void CoverDialog::show()
m_artists->clear();
m_covers->clear();
- QStringList artists = CollectionList::instance()->uniqueSet(CollectionList::Artists);
+ TQStringList artists = CollectionList::instance()->uniqueSet(CollectionList::Artists);
m_artists->setSorting(-1);
new AllArtistsListViewItem(m_artists);
- for(QStringList::ConstIterator it = artists.begin(); it != artists.end(); ++it)
+ for(TQStringList::ConstIterator it = artists.begin(); it != artists.end(); ++it)
new CaseInsensitiveItem(m_artists, *it);
m_artists->setSorting(0);
- QTimer::singleShot(0, this, SLOT(loadCovers()));
+ TQTimer::singleShot(0, this, TQT_SLOT(loadCovers()));
CoverDialogBase::show();
}
@@ -97,8 +97,8 @@ void CoverDialog::show()
// covers.
void CoverDialog::loadCovers()
{
- QValueList<coverKey> keys = CoverManager::keys();
- QValueList<coverKey>::ConstIterator it;
+ TQValueList<coverKey> keys = CoverManager::keys();
+ TQValueList<coverKey>::ConstIterator it;
int i = 0;
for(it = keys.begin(); it != keys.end(); ++it) {
@@ -112,7 +112,7 @@ void CoverDialog::loadCovers()
}
// TODO: Add a way to show cover art for tracks with no artist.
-void CoverDialog::slotArtistClicked(QListViewItem *item)
+void CoverDialog::slotArtistClicked(TQListViewItem *item)
{
m_covers->clear();
@@ -121,9 +121,9 @@ void CoverDialog::slotArtistClicked(QListViewItem *item)
loadCovers();
}
else {
- QString artist = item->text(0).lower();
- QValueList<coverKey> keys = CoverManager::keys();
- QValueList<coverKey>::ConstIterator it;
+ TQString artist = item->text(0).lower();
+ TQValueList<coverKey> keys = CoverManager::keys();
+ TQValueList<coverKey>::ConstIterator it;
for(it = keys.begin(); it != keys.end(); ++it) {
CoverDataPtr data = CoverManager::coverInfo(*it);
@@ -133,7 +133,7 @@ void CoverDialog::slotArtistClicked(QListViewItem *item)
}
}
-void CoverDialog::slotContextRequested(QIconViewItem *item, const QPoint &pt)
+void CoverDialog::slotContextRequested(TQIconViewItem *item, const TQPoint &pt)
{
static KPopupMenu *menu = 0;
@@ -142,7 +142,7 @@ void CoverDialog::slotContextRequested(QIconViewItem *item, const QPoint &pt)
if(!menu) {
menu = new KPopupMenu(this);
- menu->insertItem(i18n("Remove Cover"), this, SLOT(removeSelectedCover()));
+ menu->insertItem(i18n("Remove Cover"), this, TQT_SLOT(removeSelectedCover()));
}
menu->popup(pt);
diff --git a/juk/coverdialog.h b/juk/coverdialog.h
index 3ced0d75..751f77c2 100644
--- a/juk/coverdialog.h
+++ b/juk/coverdialog.h
@@ -22,14 +22,14 @@ class CoverDialog : public CoverDialogBase
{
Q_OBJECT
public:
- CoverDialog(QWidget *parent);
+ CoverDialog(TQWidget *parent);
~CoverDialog();
virtual void show();
public slots:
- void slotArtistClicked(QListViewItem *item);
- void slotContextRequested(QIconViewItem *item, const QPoint &pt);
+ void slotArtistClicked(TQListViewItem *item);
+ void slotContextRequested(TQIconViewItem *item, const TQPoint &pt);
private slots:
void loadCovers();
diff --git a/juk/covericonview.cpp b/juk/covericonview.cpp
index 88defcab..fc400e78 100644
--- a/juk/covericonview.cpp
+++ b/juk/covericonview.cpp
@@ -18,15 +18,15 @@
using CoverUtility::CoverIconViewItem;
-CoverIconViewItem::CoverIconViewItem(coverKey id, QIconView *parent) :
+CoverIconViewItem::CoverIconViewItem(coverKey id, TQIconView *parent) :
KIconViewItem(parent), m_id(id)
{
CoverDataPtr data = CoverManager::coverInfo(id);
- setText(QString("%1 - %2").arg(data->artist, data->album));
+ setText(TQString("%1 - %2").arg(data->artist, data->album));
setPixmap(data->thumbnail());
}
-CoverIconView::CoverIconView(QWidget *parent, const char *name) : KIconView(parent, name)
+CoverIconView::CoverIconView(TQWidget *parent, const char *name) : KIconView(parent, name)
{
setResizeMode(Adjust);
}
@@ -36,7 +36,7 @@ CoverIconViewItem *CoverIconView::currentItem() const
return static_cast<CoverIconViewItem *>(KIconView::currentItem());
}
-QDragObject *CoverIconView::dragObject()
+TQDragObject *CoverIconView::dragObject()
{
CoverIconViewItem *item = currentItem();
if(item)
diff --git a/juk/covericonview.h b/juk/covericonview.h
index 4126cb3f..42e44d66 100644
--- a/juk/covericonview.h
+++ b/juk/covericonview.h
@@ -29,7 +29,7 @@ namespace CoverUtility
class CoverIconViewItem : public KIconViewItem
{
public:
- CoverIconViewItem(coverKey id, QIconView *parent);
+ CoverIconViewItem(coverKey id, TQIconView *parent);
coverKey id() const { return m_id; }
@@ -49,12 +49,12 @@ using CoverUtility::CoverIconViewItem;
class CoverIconView : public KIconView
{
public:
- CoverIconView(QWidget *parent, const char *name);
+ CoverIconView(TQWidget *parent, const char *name);
CoverIconViewItem *currentItem() const;
protected:
- virtual QDragObject *dragObject();
+ virtual TQDragObject *dragObject();
};
#endif /* JUK_COVERICONVIEW_H */
diff --git a/juk/coverinfo.cpp b/juk/coverinfo.cpp
index 243bc429..67e8514a 100644
--- a/juk/coverinfo.cpp
+++ b/juk/coverinfo.cpp
@@ -18,10 +18,10 @@
#include <kstandarddirs.h>
#include <kdebug.h>
-#include <qregexp.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcursor.h>
+#include <tqregexp.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcursor.h>
#include "collectionlist.h"
#include "playlistsearch.h"
@@ -31,22 +31,22 @@
struct CoverPopup : public QWidget
{
- CoverPopup(const QPixmap &image, const QPoint &p) :
- QWidget(0, 0, WDestructiveClose | WX11BypassWM)
+ CoverPopup(const TQPixmap &image, const TQPoint &p) :
+ TQWidget(0, 0, WDestructiveClose | WX11BypassWM)
{
- QHBoxLayout *layout = new QHBoxLayout(this);
- QLabel *label = new QLabel(this);
+ TQHBoxLayout *layout = new TQHBoxLayout(this);
+ TQLabel *label = new TQLabel(this);
layout->addWidget(label);
- label->setFrameStyle(QFrame::Box | QFrame::Raised);
+ label->setFrameStyle(TQFrame::Box | TQFrame::Raised);
label->setLineWidth(1);
label->setPixmap(image);
setGeometry(p.x(), p.y(), label->width(), label->height());
show();
}
- virtual void leaveEvent(QEvent *) { close(); }
- virtual void mouseReleaseEvent(QMouseEvent *) { close(); }
+ virtual void leaveEvent(TQEvent *) { close(); }
+ virtual void mouseReleaseEvent(TQMouseEvent *) { close(); }
};
////////////////////////////////////////////////////////////////////////////////
@@ -85,7 +85,7 @@ bool CoverInfo::hasCover()
// We *still* don't have it? Check the old-style covers then.
if(!m_hasCover) {
- m_hasCover = QFile(coverLocation(FullSize)).exists();
+ m_hasCover = TQFile(coverLocation(FullSize)).exists();
if(m_hasCover)
m_needsConverting = true;
@@ -109,7 +109,7 @@ void CoverInfo::clearCover()
m_coverKey = CoverManager::NoMatch;
}
-void CoverInfo::setCover(const QImage &image)
+void CoverInfo::setCover(const TQImage &image)
{
if(image.isNull())
return;
@@ -118,7 +118,7 @@ void CoverInfo::setCover(const QImage &image)
m_needsConverting = false;
m_hasCover = true;
- QPixmap cover;
+ TQPixmap cover;
cover.convertFromImage(image);
// If we use replaceCover we'll change the cover for every other track
@@ -142,8 +142,8 @@ void CoverInfo::setCoverId(coverKey id)
void CoverInfo::applyCoverToWholeAlbum(bool overwriteExistingCovers) const
{
- QString artist = m_file.tag()->artist();
- QString album = m_file.tag()->album();
+ TQString artist = m_file.tag()->artist();
+ TQString album = m_file.tag()->album();
PlaylistSearch::ComponentList components;
ColumnList columns;
@@ -175,13 +175,13 @@ void CoverInfo::applyCoverToWholeAlbum(bool overwriteExistingCovers) const
}
}
-QPixmap CoverInfo::pixmap(CoverSize size) const
+TQPixmap CoverInfo::pixmap(CoverSize size) const
{
if(m_needsConverting)
convertOldStyleCover();
if(m_coverKey == CoverManager::NoMatch)
- return QPixmap();
+ return TQPixmap();
if(size == Thumbnail)
return CoverManager::coverFromId(m_coverKey, CoverManager::Thumbnail);
@@ -191,9 +191,9 @@ QPixmap CoverInfo::pixmap(CoverSize size) const
void CoverInfo::popup() const
{
- QPixmap image = pixmap(FullSize);
- QPoint mouse = QCursor::pos();
- QRect desktop = KApplication::desktop()->screenGeometry(mouse);
+ TQPixmap image = pixmap(FullSize);
+ TQPoint mouse = TQCursor::pos();
+ TQRect desktop = KApplication::desktop()->screenGeometry(mouse);
int x = mouse.x();
int y = mouse.y();
@@ -216,22 +216,22 @@ void CoverInfo::popup() const
else
y = (y - desktop.y() > desktop.height() - 10) ? desktop.height() - height + desktop.y() : (y - height + 10);
- new CoverPopup(image, QPoint(x, y));
+ new CoverPopup(image, TQPoint(x, y));
}
/**
* DEPRECATED
*/
-QString CoverInfo::coverLocation(CoverSize size) const
+TQString CoverInfo::coverLocation(CoverSize size) const
{
- QString fileName(QFile::encodeName(m_file.tag()->artist() + " - " + m_file.tag()->album()));
- QRegExp maskedFileNameChars("[ /?:\"]");
+ TQString fileName(TQFile::encodeName(m_file.tag()->artist() + " - " + m_file.tag()->album()));
+ TQRegExp maskedFileNameChars("[ /?:\"]");
fileName.replace(maskedFileNameChars, "_");
fileName.append(".png");
- QString dataDir = KGlobal::dirs()->saveLocation("appdata");
- QString subDir;
+ TQString dataDir = KGlobal::dirs()->saveLocation("appdata");
+ TQString subDir;
switch (size) {
case FullSize:
@@ -240,7 +240,7 @@ QString CoverInfo::coverLocation(CoverSize size) const
default:
break;
}
- QString fileLocation = dataDir + "covers/" + subDir + fileName.lower();
+ TQString fileLocation = dataDir + "covers/" + subDir + fileName.lower();
return fileLocation;
}
@@ -250,9 +250,9 @@ bool CoverInfo::convertOldStyleCover() const
// Ah, old-style cover. Let's transfer it to the new system.
kdDebug() << "Found old style cover for " << m_file.absFilePath() << endl;
- QString artist = m_file.tag()->artist();
- QString album = m_file.tag()->album();
- QString oldLocation = coverLocation(FullSize);
+ TQString artist = m_file.tag()->artist();
+ TQString album = m_file.tag()->album();
+ TQString oldLocation = coverLocation(FullSize);
m_coverKey = CoverManager::addCover(oldLocation, artist, album);
m_needsConverting = false;
@@ -269,7 +269,7 @@ bool CoverInfo::convertOldStyleCover() const
// If we convert we need to remove the old cover otherwise we'll find
// it later if the user un-sets the new cover.
- if(!QFile::remove(oldLocation))
+ if(!TQFile::remove(oldLocation))
kdError(65432) << "Unable to remove converted cover at " << oldLocation << endl;
return true;
diff --git a/juk/coverinfo.h b/juk/coverinfo.h
index 1caae8d0..8c1bdcfc 100644
--- a/juk/coverinfo.h
+++ b/juk/coverinfo.h
@@ -15,7 +15,7 @@
#ifndef COVERINFO_H
#define COVERINFO_H
-#include <qimage.h>
+#include <tqimage.h>
#include "filehandle.h"
#include "covermanager.h"
@@ -32,7 +32,7 @@ public:
bool hasCover();
void clearCover();
- void setCover(const QImage &image = QImage());
+ void setCover(const TQImage &image = TQImage());
// Use this to assign to a specific cover id.
void setCoverId(coverKey id);
@@ -50,11 +50,11 @@ public:
coverKey coverId() const { return m_coverKey; }
- QPixmap pixmap(CoverSize size) const;
+ TQPixmap pixmap(CoverSize size) const;
void popup() const;
private:
- QString coverLocation(CoverSize size) const;
+ TQString coverLocation(CoverSize size) const;
bool convertOldStyleCover() const;
FileHandle m_file;
diff --git a/juk/covermanager.cpp b/juk/covermanager.cpp
index 1fe36cc4..f7530daa 100644
--- a/juk/covermanager.cpp
+++ b/juk/covermanager.cpp
@@ -13,17 +13,17 @@
* *
***************************************************************************/
-#include <qpixmap.h>
-#include <qmap.h>
-#include <qstring.h>
-#include <qfile.h>
-#include <qimage.h>
-#include <qdir.h>
-#include <qdatastream.h>
-#include <qdict.h>
-#include <qcache.h>
-#include <qmime.h>
-#include <qbuffer.h>
+#include <tqpixmap.h>
+#include <tqmap.h>
+#include <tqstring.h>
+#include <tqfile.h>
+#include <tqimage.h>
+#include <tqdir.h>
+#include <tqdatastream.h>
+#include <tqdict.h>
+#include <tqcache.h>
+#include <tqmime.h>
+#include <tqbuffer.h>
#include <kdebug.h>
#include <kstaticdeleter.h>
@@ -35,7 +35,7 @@
// This is a dictionary to map the track path to their ID. Otherwise we'd have
// to store this info with each CollectionListItem, which would break the cache
// of users who upgrade, and would just generally be a big mess.
-typedef QDict<coverKey> TrackLookupMap;
+typedef TQDict<coverKey> TrackLookupMap;
// This is responsible for making sure that the CoverManagerPrivate class
// gets properly destructed on shutdown.
@@ -44,24 +44,24 @@ static KStaticDeleter<CoverManagerPrivate> sd;
const char *CoverDrag::mimetype = "application/x-juk-coverid";
// Caches the QPixmaps for the covers so that the covers are not all kept in
// memory for no reason.
-typedef QCache<QPixmap> CoverPixmapCache;
+typedef TQCache<TQPixmap> CoverPixmapCache;
CoverManagerPrivate *CoverManager::m_data = 0;
// Used to save and load CoverData from a QDataStream
-QDataStream &operator<<(QDataStream &out, const CoverData &data);
-QDataStream &operator>>(QDataStream &in, CoverData &data);
+TQDataStream &operator<<(TQDataStream &out, const CoverData &data);
+TQDataStream &operator>>(TQDataStream &in, CoverData &data);
//
// Implementation of CoverData struct
//
-QPixmap CoverData::pixmap() const
+TQPixmap CoverData::pixmap() const
{
return CoverManager::coverFromData(*this, CoverManager::FullSize);
}
-QPixmap CoverData::thumbnail() const
+TQPixmap CoverData::thumbnail() const
{
return CoverManager::coverFromData(*this, CoverManager::Thumbnail);
}
@@ -123,7 +123,7 @@ public:
* @return the full path and filename of the file storing the cover
* lookup map and the translations between pathnames and ids.
*/
- QString coverLocation() const;
+ TQString coverLocation() const;
};
//
@@ -131,8 +131,8 @@ public:
//
void CoverManagerPrivate::createDataDir() const
{
- QDir dir;
- QString dirPath(QDir::cleanDirPath(coverLocation() + "/.."));
+ TQDir dir;
+ TQString dirPath(TQDir::cleanDirPath(coverLocation() + "/.."));
if(!dir.exists(dirPath))
KStandardDirs::makeDir(dirPath);
}
@@ -144,7 +144,7 @@ void CoverManagerPrivate::saveCovers() const
// Make sure the directory exists first.
createDataDir();
- QFile file(coverLocation());
+ TQFile file(coverLocation());
kdDebug() << "Opening covers db: " << coverLocation() << endl;
@@ -153,7 +153,7 @@ void CoverManagerPrivate::saveCovers() const
return;
}
- QDataStream out(&file);
+ TQDataStream out(&file);
// Write out the version and count
out << Q_UINT32(0) << Q_UINT32(covers.count());
@@ -167,7 +167,7 @@ void CoverManagerPrivate::saveCovers() const
// Now write out the track mapping.
out << Q_UINT32(tracks.count());
- QDictIterator<coverKey> trackMapIt(tracks);
+ TQDictIterator<coverKey> trackMapIt(tracks);
while(trackMapIt.current()) {
out << trackMapIt.currentKey() << Q_UINT32(*trackMapIt.current());
++trackMapIt;
@@ -178,14 +178,14 @@ void CoverManagerPrivate::loadCovers()
{
kdDebug() << k_funcinfo << endl;
- QFile file(coverLocation());
+ TQFile file(coverLocation());
if(!file.open(IO_ReadOnly)) {
// Guess we don't have any covers yet.
return;
}
- QDataStream in(&file);
+ TQDataStream in(&file);
Q_UINT32 count, version;
// First thing we'll read in will be the version.
@@ -214,7 +214,7 @@ void CoverManagerPrivate::loadCovers()
in >> count;
for(Q_UINT32 i = 0; i < count; ++i) {
- QString path;
+ TQString path;
Q_UINT32 id;
in >> path >> id;
@@ -230,7 +230,7 @@ void CoverManagerPrivate::loadCovers()
}
}
-QString CoverManagerPrivate::coverLocation() const
+TQString CoverManagerPrivate::coverLocation() const
{
return KGlobal::dirs()->saveLocation("appdata") + "coverdb/covers";
}
@@ -251,10 +251,10 @@ coverKey CoverManagerPrivate::nextId() const
//
// Implementation of CoverDrag
//
-CoverDrag::CoverDrag(coverKey id, QWidget *src) : QDragObject(src, "coverDrag"),
+CoverDrag::CoverDrag(coverKey id, TQWidget *src) : TQDragObject(src, "coverDrag"),
m_id(id)
{
- QPixmap cover = CoverManager::coverFromId(id);
+ TQPixmap cover = CoverManager::coverFromId(id);
if(!cover.isNull())
setPixmap(cover);
}
@@ -269,20 +269,20 @@ const char *CoverDrag::format(int i) const
return 0;
}
-QByteArray CoverDrag::encodedData(const char *mimetype) const
+TQByteArray CoverDrag::encodedData(const char *mimetype) const
{
if(qstrcmp(CoverDrag::mimetype, mimetype) == 0) {
- QByteArray data;
- QDataStream ds(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream ds(data, IO_WriteOnly);
ds << Q_UINT32(m_id);
return data;
}
else if(qstrcmp(mimetype, "image/png") == 0) {
- QPixmap large = CoverManager::coverFromId(m_id, CoverManager::FullSize);
- QImage img = large.convertToImage();
- QByteArray data;
- QBuffer buffer(data);
+ TQPixmap large = CoverManager::coverFromId(m_id, CoverManager::FullSize);
+ TQImage img = large.convertToImage();
+ TQByteArray data;
+ TQBuffer buffer(data);
buffer.open(IO_WriteOnly);
img.save(&buffer, "PNG"); // Write in PNG format.
@@ -290,21 +290,21 @@ QByteArray CoverDrag::encodedData(const char *mimetype) const
return data;
}
- return QByteArray();
+ return TQByteArray();
}
-bool CoverDrag::canDecode(const QMimeSource *e)
+bool CoverDrag::canDecode(const TQMimeSource *e)
{
return e->provides(mimetype);
}
-bool CoverDrag::decode(const QMimeSource *e, coverKey &id)
+bool CoverDrag::decode(const TQMimeSource *e, coverKey &id)
{
if(!canDecode(e))
return false;
- QByteArray data = e->encodedData(mimetype);
- QDataStream ds(data, IO_ReadOnly);
+ TQByteArray data = e->encodedData(mimetype);
+ TQDataStream ds(data, IO_ReadOnly);
Q_UINT32 i;
ds >> i;
@@ -316,10 +316,10 @@ bool CoverDrag::decode(const QMimeSource *e, coverKey &id)
//
// Implementation of CoverManager methods.
//
-coverKey CoverManager::idFromMetadata(const QString &artist, const QString &album)
+coverKey CoverManager::idFromMetadata(const TQString &artist, const TQString &album)
{
// Search for the string, yay! It might make sense to use a cache here,
- // if so it's not hard to add a QCache.
+ // if so it's not hard to add a TQCache.
CoverDataMap::ConstIterator it = begin();
CoverDataMap::ConstIterator endIt = end();
@@ -331,12 +331,12 @@ coverKey CoverManager::idFromMetadata(const QString &artist, const QString &albu
return NoMatch;
}
-QPixmap CoverManager::coverFromId(coverKey id, Size size)
+TQPixmap CoverManager::coverFromId(coverKey id, Size size)
{
CoverDataPtr info = coverInfo(id);
if(!info)
- return QPixmap();
+ return TQPixmap();
if(size == Thumbnail)
return info->thumbnail();
@@ -344,9 +344,9 @@ QPixmap CoverManager::coverFromId(coverKey id, Size size)
return info->pixmap();
}
-QPixmap CoverManager::coverFromData(const CoverData &coverData, Size size)
+TQPixmap CoverManager::coverFromData(const CoverData &coverData, Size size)
{
- QString path = coverData.path;
+ TQString path = coverData.path;
// Prepend a tag to the path to separate in the cache between full size
// and thumbnail pixmaps. If we add a different kind of pixmap in the
@@ -357,31 +357,31 @@ QPixmap CoverManager::coverFromData(const CoverData &coverData, Size size)
path.prepend('t');
// Check in cache for the pixmap.
- QPixmap *pix = data()->pixmapCache[path];
+ TQPixmap *pix = data()->pixmapCache[path];
if(pix) {
kdDebug(65432) << "Found pixmap in cover cache.\n";
return *pix;
}
// Not in cache, load it and add it.
- pix = new QPixmap(coverData.path);
+ pix = new TQPixmap(coverData.path);
if(pix->isNull())
- return QPixmap();
+ return TQPixmap();
if(size == Thumbnail) {
// Convert to image for smoothScale()
- QImage image = pix->convertToImage();
- pix->convertFromImage(image.smoothScale(80, 80, QImage::ScaleMin));
+ TQImage image = pix->convertToImage();
+ pix->convertFromImage(image.smoothScale(80, 80, TQImage::ScaleMin));
}
- QPixmap returnValue = *pix; // Save it early.
+ TQPixmap returnValue = *pix; // Save it early.
if(!data()->pixmapCache.insert(path, pix, pix->height() * pix->width()))
delete pix;
return returnValue;
}
-coverKey CoverManager::addCover(const QPixmap &large, const QString &artist, const QString &album)
+coverKey CoverManager::addCover(const TQPixmap &large, const TQString &artist, const TQString &album)
{
kdDebug() << k_funcinfo << endl;
@@ -395,7 +395,7 @@ coverKey CoverManager::addCover(const QPixmap &large, const QString &artist, con
// Save it to file first!
- QString ext = QString("/coverdb/coverID-%1.png").arg(id);
+ TQString ext = TQString("/coverdb/coverID-%1.png").arg(id);
coverData->path = KGlobal::dirs()->saveLocation("appdata") + ext;
kdDebug() << "Saving pixmap to " << coverData->path << endl;
@@ -413,15 +413,15 @@ coverKey CoverManager::addCover(const QPixmap &large, const QString &artist, con
data()->covers[id] = coverData;
// Make sure the new cover isn't inadvertently cached.
- data()->pixmapCache.remove(QString("f%1").arg(coverData->path));
- data()->pixmapCache.remove(QString("t%1").arg(coverData->path));
+ data()->pixmapCache.remove(TQString("f%1").arg(coverData->path));
+ data()->pixmapCache.remove(TQString("t%1").arg(coverData->path));
return id;
}
-coverKey CoverManager::addCover(const QString &path, const QString &artist, const QString &album)
+coverKey CoverManager::addCover(const TQString &path, const TQString &artist, const TQString &album)
{
- return addCover(QPixmap(path), artist, album);
+ return addCover(TQPixmap(path), artist, album);
}
bool CoverManager::hasCover(coverKey id)
@@ -436,17 +436,17 @@ bool CoverManager::removeCover(coverKey id)
// Remove cover from cache.
CoverDataPtr coverData = coverInfo(id);
- data()->pixmapCache.remove(QString("f%1").arg(coverData->path));
- data()->pixmapCache.remove(QString("t%1").arg(coverData->path));
+ data()->pixmapCache.remove(TQString("f%1").arg(coverData->path));
+ data()->pixmapCache.remove(TQString("t%1").arg(coverData->path));
// Remove references to files that had that track ID.
- QDictIterator<coverKey> it(data()->tracks);
+ TQDictIterator<coverKey> it(data()->tracks);
for(; it.current(); ++it)
if(*it.current() == id)
data()->tracks.remove(it.currentKey());
// Remove covers from disk.
- QFile::remove(coverData->path);
+ TQFile::remove(coverData->path);
// Finally, forget that we ever knew about this cover.
data()->covers.remove(id);
@@ -454,7 +454,7 @@ bool CoverManager::removeCover(coverKey id)
return true;
}
-bool CoverManager::replaceCover(coverKey id, const QPixmap &large)
+bool CoverManager::replaceCover(coverKey id, const TQPixmap &large)
{
if(!hasCover(id))
return false;
@@ -462,8 +462,8 @@ bool CoverManager::replaceCover(coverKey id, const QPixmap &large)
CoverDataPtr coverData = coverInfo(id);
// Empty old pixmaps from cache.
- data()->pixmapCache.remove(QString("%1%2").arg("t", coverData->path));
- data()->pixmapCache.remove(QString("%1%2").arg("f", coverData->path));
+ data()->pixmapCache.remove(TQString("%1%2").arg("t", coverData->path));
+ data()->pixmapCache.remove(TQString("%1%2").arg("f", coverData->path));
large.save(coverData->path, "PNG");
return true;
@@ -497,12 +497,12 @@ CoverDataMap::ConstIterator CoverManager::end()
return data()->covers.constEnd();
}
-QValueList<coverKey> CoverManager::keys()
+TQValueList<coverKey> CoverManager::keys()
{
return data()->covers.keys();
}
-void CoverManager::setIdForTrack(const QString &path, coverKey id)
+void CoverManager::setIdForTrack(const TQString &path, coverKey id)
{
coverKey *oldId = data()->tracks.find(path);
if(oldId && (id == *oldId))
@@ -524,7 +524,7 @@ void CoverManager::setIdForTrack(const QString &path, coverKey id)
}
}
-coverKey CoverManager::idForTrack(const QString &path)
+coverKey CoverManager::idForTrack(const TQString &path)
{
coverKey *coverPtr = data()->tracks.find(path);
@@ -549,7 +549,7 @@ CoverDataPtr CoverManager::coverInfo(coverKey id)
* @param data the CoverData to write out.
* @return the data stream that the data was written to.
*/
-QDataStream &operator<<(QDataStream &out, const CoverData &data)
+TQDataStream &operator<<(TQDataStream &out, const CoverData &data)
{
out << data.artist;
out << data.album;
@@ -565,7 +565,7 @@ QDataStream &operator<<(QDataStream &out, const CoverData &data)
* @param data the CoverData to read into.
* @return the data stream read from.
*/
-QDataStream &operator>>(QDataStream &in, CoverData &data)
+TQDataStream &operator>>(TQDataStream &in, CoverData &data)
{
in >> data.artist;
in >> data.album;
diff --git a/juk/covermanager.h b/juk/covermanager.h
index 9a95d991..a935b810 100644
--- a/juk/covermanager.h
+++ b/juk/covermanager.h
@@ -18,8 +18,8 @@
#include <ksharedptr.h>
-#include <qmap.h>
-#include <qdragobject.h>
+#include <tqmap.h>
+#include <tqdragobject.h>
class CoverManagerPrivate;
class QString;
@@ -39,19 +39,19 @@ class QDataStream;
class CoverData : public KShared
{
public:
- QPixmap pixmap() const;
- QPixmap thumbnail() const;
+ TQPixmap pixmap() const;
+ TQPixmap thumbnail() const;
- QString artist;
- QString album;
- QString path;
+ TQString artist;
+ TQString album;
+ TQString path;
unsigned refCount; // Refers to number of tracks using this.
};
typedef KSharedPtr<CoverData> CoverDataPtr;
typedef unsigned long coverKey; ///< Type of the id for a cover.
-typedef QMap<coverKey, CoverDataPtr> CoverDataMap;
+typedef TQMap<coverKey, CoverDataPtr> CoverDataMap;
/**
* This class is used to drag covers in JuK. It adds a special mimetype that
@@ -65,10 +65,10 @@ typedef QMap<coverKey, CoverDataPtr> CoverDataMap;
class CoverDrag : public QDragObject
{
public:
- CoverDrag(coverKey id, QWidget *src);
+ CoverDrag(coverKey id, TQWidget *src);
virtual const char *format(int i) const;
- virtual QByteArray encodedData(const char *mimetype) const;
+ virtual TQByteArray encodedData(const char *mimetype) const;
void setId(coverKey id) { m_id = id; }
@@ -77,8 +77,8 @@ public:
* true is returned only if \p e contains a cover id, even though
* CoverDrag can convert it to an image.
*/
- static bool canDecode(const QMimeSource *e);
- static bool decode(const QMimeSource *e, coverKey &id);
+ static bool canDecode(const TQMimeSource *e);
+ static bool decode(const TQMimeSource *e, coverKey &id);
static const char* mimetype;
@@ -114,7 +114,7 @@ public:
* @return NoMatch if no match could be found, otherwise the id of the
* cover art that matches the given metadata.
*/
- static coverKey idFromMetadata(const QString &artist, const QString &album);
+ static coverKey idFromMetadata(const TQString &artist, const TQString &album);
/**
* Returns the cover art for @p id.
@@ -123,10 +123,10 @@ public:
* @param size The size to return it as. Note that FullSize doesn't
* necessarily mean the pixmap is large, so you may need to
* scale it up.
- * @return QPixmap::null if there is no cover art for @p id, otherwise the
+ * @return TQPixmap::null if there is no cover art for @p id, otherwise the
* cover art.
*/
- static QPixmap coverFromId(coverKey id, Size size = Thumbnail);
+ static TQPixmap coverFromId(coverKey id, Size size = Thumbnail);
/**
* Returns the cover art for @p ptr. This function is intended for use
@@ -137,7 +137,7 @@ public:
* @param size The size to return it as.
* @see CoverData
*/
- static QPixmap coverFromData(const CoverData &coverData, Size size = Thumbnail);
+ static TQPixmap coverFromData(const CoverData &coverData, Size size = Thumbnail);
/**
* Returns the full suite of information known about the cover given by
@@ -157,7 +157,7 @@ public:
* @param artist The artist of the new cover.
* @param album The album of the new cover.
*/
- static coverKey addCover(const QPixmap &large, const QString &artist = "", const QString &album = "");
+ static coverKey addCover(const TQPixmap &large, const TQString &artist = "", const TQString &album = "");
/**
* Adds the file pointed to by the local path @p path to the database,
@@ -167,7 +167,7 @@ public:
* @param artist The artist of the new cover.
* @param album The album of the new cover.
*/
- static coverKey addCover(const QString &path, const QString &artist = "", const QString &album = "");
+ static coverKey addCover(const TQString &path, const TQString &artist = "", const TQString &album = "");
/**
* Function to determine if @p id matches any covers in the database.
@@ -194,7 +194,7 @@ public:
* @param id The id of the cover to replace.
* @param large The full size cover art for the new cover.
*/
- static bool replaceCover(coverKey id, const QPixmap &large);
+ static bool replaceCover(coverKey id, const TQPixmap &large);
/**
* Saves the current CoverManager information to disk. Changes are not
@@ -224,7 +224,7 @@ public:
/**
* @return A list of all of the id's listed in the database.
*/
- static QValueList<coverKey> keys();
+ static TQValueList<coverKey> keys();
/**
* Associates @p path with the cover identified by @id. No comparison of
@@ -233,7 +233,7 @@ public:
* @param path The absolute file path to the track.
* @param id The identifier of the cover to use with @p path.
*/
- static void setIdForTrack(const QString &path, coverKey id);
+ static void setIdForTrack(const TQString &path, coverKey id);
/**
* Returns the identifier of the cover for the track at @p path.
@@ -242,7 +242,7 @@ public:
* @return NoMatch if @p path doesn't have a cover, otherwise the id of
* its cover.
*/
- static coverKey idForTrack(const QString &path);
+ static coverKey idForTrack(const TQString &path);
/**
* This identifier is used to indicate that no cover was found in the
@@ -254,7 +254,7 @@ public:
static CoverManagerPrivate *m_data;
static CoverManagerPrivate *data();
- static QPixmap createThumbnail(const QPixmap &base);
+ static TQPixmap createThumbnail(const TQPixmap &base);
};
#endif /* JUK_COVERMANAGER_H */
diff --git a/juk/deletedialog.cpp b/juk/deletedialog.cpp
index cafd7849..e780eec0 100644
--- a/juk/deletedialog.cpp
+++ b/juk/deletedialog.cpp
@@ -20,12 +20,12 @@
#include <kiconloader.h>
#include <kconfig.h>
-#include <qstringlist.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qvbox.h>
-#include <qhbox.h>
+#include <tqstringlist.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
#include "deletedialog.h"
@@ -33,7 +33,7 @@
// DeleteWidget implementation
//////////////////////////////////////////////////////////////////////////////
-DeleteWidget::DeleteWidget(QWidget *parent, const char *name)
+DeleteWidget::DeleteWidget(TQWidget *parent, const char *name)
: DeleteDialogBase(parent, name)
{
KConfigGroup messageGroup(KGlobal::config(), "FileRemover");
@@ -43,7 +43,7 @@ DeleteWidget::DeleteWidget(QWidget *parent, const char *name)
ddShouldDelete->setChecked(deleteInstead);
}
-void DeleteWidget::setFiles(const QStringList &files)
+void DeleteWidget::setFiles(const TQStringList &files)
{
ddFileList->clear();
ddFileList->insertStringList(files);
@@ -69,7 +69,7 @@ void DeleteWidget::slotShouldDelete(bool shouldDelete)
// DeleteDialog implementation
//////////////////////////////////////////////////////////////////////////////
-DeleteDialog::DeleteDialog(QWidget *parent, const char *name) :
+DeleteDialog::DeleteDialog(TQWidget *parent, const char *name) :
KDialogBase(Swallow, WStyle_DialogBorder, parent, name,
true /* modal */, i18n("About to delete selected files"),
Ok | Cancel, Cancel /* Default */, true /* separator */),
@@ -84,17 +84,17 @@ DeleteDialog::DeleteDialog(QWidget *parent, const char *name) :
slotShouldDelete(shouldDelete());
- connect(m_widget->ddShouldDelete, SIGNAL(toggled(bool)), SLOT(slotShouldDelete(bool)));
+ connect(m_widget->ddShouldDelete, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotShouldDelete(bool)));
}
-bool DeleteDialog::confirmDeleteList(const QStringList &condemnedFiles)
+bool DeleteDialog::confirmDeleteList(const TQStringList &condemnedFiles)
{
m_widget->setFiles(condemnedFiles);
- return exec() == QDialog::Accepted;
+ return exec() == TQDialog::Accepted;
}
-void DeleteDialog::setFiles(const QStringList &files)
+void DeleteDialog::setFiles(const TQStringList &files)
{
m_widget->setFiles(files);
}
diff --git a/juk/deletedialog.h b/juk/deletedialog.h
index 9fd45838..4a442b23 100644
--- a/juk/deletedialog.h
+++ b/juk/deletedialog.h
@@ -17,7 +17,7 @@
#define _DELETEDIALOG_H
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include "deletedialogbase.h"
@@ -31,9 +31,9 @@ class DeleteWidget : public DeleteDialogBase
Q_OBJECT
public:
- DeleteWidget(QWidget *parent = 0, const char *name = 0);
+ DeleteWidget(TQWidget *parent = 0, const char *name = 0);
- void setFiles(const QStringList &files);
+ void setFiles(const TQStringList &files);
protected slots:
virtual void slotShouldDelete(bool shouldDelete);
@@ -44,10 +44,10 @@ class DeleteDialog : public KDialogBase
Q_OBJECT
public:
- DeleteDialog(QWidget *parent, const char *name = "delete_dialog");
+ DeleteDialog(TQWidget *parent, const char *name = "delete_dialog");
- bool confirmDeleteList(const QStringList &condemnedFiles);
- void setFiles(const QStringList &files);
+ bool confirmDeleteList(const TQStringList &condemnedFiles);
+ void setFiles(const TQStringList &files);
bool shouldDelete() const { return m_widget->ddShouldDelete->isChecked(); }
protected slots:
diff --git a/juk/directorylist.cpp b/juk/directorylist.cpp
index 1e53cac8..43df3dda 100644
--- a/juk/directorylist.cpp
+++ b/juk/directorylist.cpp
@@ -18,7 +18,7 @@
#include <klistview.h>
#include <kpushbutton.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include "directorylistbase.h"
#include "directorylist.h"
@@ -27,8 +27,8 @@
// public methods
////////////////////////////////////////////////////////////////////////////////
-DirectoryList::DirectoryList(const QStringList &directories, bool importPlaylists,
- QWidget *parent, const char *name) :
+DirectoryList::DirectoryList(const TQStringList &directories, bool importPlaylists,
+ TQWidget *parent, const char *name) :
KDialogBase(parent, name, true, i18n("Folder List"), Ok | Cancel, Ok, true),
m_dirList(directories),
m_importPlaylists(importPlaylists)
@@ -39,18 +39,18 @@ DirectoryList::DirectoryList(const QStringList &directories, bool importPlaylist
m_base->directoryListView->setFullWidth(true);
- connect(m_base->addDirectoryButton, SIGNAL(clicked()),
- SLOT(slotAddDirectory()));
- connect(m_base->removeDirectoryButton, SIGNAL(clicked()),
- SLOT(slotRemoveDirectory()));
+ connect(m_base->addDirectoryButton, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotAddDirectory()));
+ connect(m_base->removeDirectoryButton, TQT_SIGNAL(clicked()),
+ TQT_SLOT(slotRemoveDirectory()));
- QStringList::ConstIterator it = directories.begin();
+ TQStringList::ConstIterator it = directories.begin();
for(; it != directories.end(); ++it)
new KListViewItem(m_base->directoryListView, *it);
m_base->importPlaylistsCheckBox->setChecked(importPlaylists);
- QSize sz = sizeHint();
+ TQSize sz = sizeHint();
setMinimumSize(kMax(350, sz.width()), kMax(250, sz.height()));
resize(sizeHint());
}
@@ -77,7 +77,7 @@ DirectoryList::Result DirectoryList::exec()
void DirectoryList::slotAddDirectory()
{
- QString dir = KFileDialog::getExistingDirectory();
+ TQString dir = KFileDialog::getExistingDirectory();
if(!dir.isEmpty() && m_dirList.find(dir) == m_dirList.end()) {
m_dirList.append(dir);
new KListViewItem(m_base->directoryListView, dir);
@@ -90,7 +90,7 @@ void DirectoryList::slotRemoveDirectory()
if(!m_base->directoryListView->selectedItem())
return;
- QString dir = m_base->directoryListView->selectedItem()->text(0);
+ TQString dir = m_base->directoryListView->selectedItem()->text(0);
m_dirList.remove(dir);
m_result.removedDirs.append(dir);
delete m_base->directoryListView->selectedItem();
diff --git a/juk/directorylist.h b/juk/directorylist.h
index fef730a2..d9b2a080 100644
--- a/juk/directorylist.h
+++ b/juk/directorylist.h
@@ -26,29 +26,29 @@ class DirectoryList : public KDialogBase
public:
struct Result
{
- QStringList addedDirs;
- QStringList removedDirs;
+ TQStringList addedDirs;
+ TQStringList removedDirs;
DialogCode status;
bool addPlaylists;
};
- DirectoryList(const QStringList &directories, bool importPlaylists,
- QWidget *parent = 0, const char *name = 0);
+ DirectoryList(const TQStringList &directories, bool importPlaylists,
+ TQWidget *parent = 0, const char *name = 0);
virtual ~DirectoryList();
public slots:
Result exec();
signals:
- void signalDirectoryAdded(const QString &directory);
- void signalDirectoryRemoved(const QString &directory);
+ void signalDirectoryAdded(const TQString &directory);
+ void signalDirectoryRemoved(const TQString &directory);
private slots:
void slotAddDirectory();
void slotRemoveDirectory();
private:
- QStringList m_dirList;
+ TQStringList m_dirList;
bool m_importPlaylists;
DirectoryListBase *m_base;
Result m_result;
diff --git a/juk/dynamicplaylist.cpp b/juk/dynamicplaylist.cpp
index 69d0a4ae..336d1e3e 100644
--- a/juk/dynamicplaylist.cpp
+++ b/juk/dynamicplaylist.cpp
@@ -42,8 +42,8 @@ private:
DynamicPlaylist::DynamicPlaylist(const PlaylistList &playlists,
PlaylistCollection *collection,
- const QString &name,
- const QString &iconName,
+ const TQString &name,
+ const TQString &iconName,
bool setupPlaylist,
bool synchronizePlaying) :
Playlist(collection, true),
@@ -60,14 +60,14 @@ DynamicPlaylist::DynamicPlaylist(const PlaylistList &playlists,
for(PlaylistList::ConstIterator it = playlists.begin(); it != playlists.end(); ++it)
m_observers.append(new PlaylistDirtyObserver(this, *it));
- connect(CollectionList::instance(), SIGNAL(signalCollectionChanged()), this, SLOT(slotSetDirty()));
+ connect(CollectionList::instance(), TQT_SIGNAL(signalCollectionChanged()), this, TQT_SLOT(slotSetDirty()));
}
DynamicPlaylist::~DynamicPlaylist()
{
lower();
- for(QValueList<PlaylistObserver *>::ConstIterator it = m_observers.begin();
+ for(TQValueList<PlaylistObserver *>::ConstIterator it = m_observers.begin();
it != m_observers.end();
++it)
{
@@ -93,7 +93,7 @@ void DynamicPlaylist::slotReload()
checkUpdateItems();
}
-void DynamicPlaylist::lower(QWidget *top)
+void DynamicPlaylist::lower(TQWidget *top)
{
if(top == this)
return;
@@ -130,13 +130,13 @@ PlaylistItemList DynamicPlaylist::items()
return Playlist::items();
}
-void DynamicPlaylist::showEvent(QShowEvent *e)
+void DynamicPlaylist::showEvent(TQShowEvent *e)
{
checkUpdateItems();
Playlist::showEvent(e);
}
-void DynamicPlaylist::paintEvent(QPaintEvent *e)
+void DynamicPlaylist::paintEvent(TQPaintEvent *e)
{
checkUpdateItems();
Playlist::paintEvent(e);
@@ -153,7 +153,7 @@ void DynamicPlaylist::updateItems()
PlaylistItemList newSiblings = siblings;
if(m_siblings != newSiblings) {
m_siblings = newSiblings;
- QTimer::singleShot(0, this, SLOT(slotUpdateItems()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotUpdateItems()));
}
}
diff --git a/juk/dynamicplaylist.h b/juk/dynamicplaylist.h
index 3e6e2c4b..20e496d0 100644
--- a/juk/dynamicplaylist.h
+++ b/juk/dynamicplaylist.h
@@ -31,8 +31,8 @@ public:
*/
DynamicPlaylist(const PlaylistList &lists,
PlaylistCollection *collection,
- const QString &name = QString::null,
- const QString &iconName = "midi",
+ const TQString &name = TQString::null,
+ const TQString &iconName = "midi",
bool setupPlaylist = true,
bool synchronizePlaying = false);
@@ -55,7 +55,7 @@ public slots:
* it can synchronize the playing item with the one that playlist it was
* create from.
*/
- void lower(QWidget *top = 0);
+ void lower(TQWidget *top = 0);
protected:
/**
@@ -72,12 +72,12 @@ protected:
virtual PlaylistItemList items();
/**
- * Reimplemented from QWidget. Here it updates the list of items (when
+ * Reimplemented from TQWidget. Here it updates the list of items (when
* appropriate) as the widget is shown.
*/
- virtual void showEvent(QShowEvent *e);
+ virtual void showEvent(TQShowEvent *e);
- virtual void paintEvent(QPaintEvent *e);
+ virtual void paintEvent(TQPaintEvent *e);
/**
* Updates the items (unconditionally). This should be reimplemented in
@@ -100,7 +100,7 @@ private slots:
void slotUpdateItems();
private:
- QValueList<PlaylistObserver *> m_observers;
+ TQValueList<PlaylistObserver *> m_observers;
PlaylistItemList m_siblings;
PlaylistList m_playlists;
bool m_dirty;
diff --git a/juk/exampleoptions.cpp b/juk/exampleoptions.cpp
index 68e2bc0f..e365546a 100644
--- a/juk/exampleoptions.cpp
+++ b/juk/exampleoptions.cpp
@@ -16,12 +16,12 @@
#include <kurlrequester.h>
#include <klocale.h>
-#include <qradiobutton.h>
-#include <qlayout.h>
+#include <tqradiobutton.h>
+#include <tqlayout.h>
#include "exampleoptions.h"
-ExampleOptions::ExampleOptions(QWidget *parent) :
+ExampleOptions::ExampleOptions(TQWidget *parent) :
ExampleOptionsBase(parent, "example options widget")
{
}
@@ -44,31 +44,31 @@ void ExampleOptions::exampleFileChanged()
emit fileChanged();
}
-ExampleOptionsDialog::ExampleOptionsDialog(QWidget *parent) :
- QDialog(parent, "example options dialog")
+ExampleOptionsDialog::ExampleOptionsDialog(TQWidget *parent) :
+ TQDialog(parent, "example options dialog")
{
setCaption(i18n("JuK"));
- QVBoxLayout *l = new QVBoxLayout(this);
+ TQVBoxLayout *l = new TQVBoxLayout(this);
m_options = new ExampleOptions(this);
l->addWidget(m_options);
// Forward signals
- connect(m_options, SIGNAL(fileChanged()), SLOT(fileModeSelected()));
- connect(m_options, SIGNAL(dataChanged()), SIGNAL(dataChanged()));
- connect(m_options->m_exampleFile, SIGNAL(urlSelected(const QString &)),
- this, SIGNAL(fileChanged(const QString &)));
- connect(m_options->m_exampleFile, SIGNAL(returnPressed(const QString &)),
- this, SIGNAL(fileChanged(const QString &)));
+ connect(m_options, TQT_SIGNAL(fileChanged()), TQT_SLOT(fileModeSelected()));
+ connect(m_options, TQT_SIGNAL(dataChanged()), TQT_SIGNAL(dataChanged()));
+ connect(m_options->m_exampleFile, TQT_SIGNAL(urlSelected(const TQString &)),
+ this, TQT_SIGNAL(fileChanged(const TQString &)));
+ connect(m_options->m_exampleFile, TQT_SIGNAL(returnPressed(const TQString &)),
+ this, TQT_SIGNAL(fileChanged(const TQString &)));
}
-void ExampleOptionsDialog::hideEvent(QHideEvent *)
+void ExampleOptionsDialog::hideEvent(TQHideEvent *)
{
emit signalHidden();
}
-void ExampleOptionsDialog::showEvent(QShowEvent *)
+void ExampleOptionsDialog::showEvent(TQShowEvent *)
{
emit signalShown();
}
diff --git a/juk/exampleoptions.h b/juk/exampleoptions.h
index 26ee23c1..dca7a465 100644
--- a/juk/exampleoptions.h
+++ b/juk/exampleoptions.h
@@ -16,14 +16,14 @@
#ifndef JUK_EXAMPLEOPTIONS_H
#define JUK_EXAMPLEOPTIONS_H
-#include <qdialog.h>
+#include <tqdialog.h>
#include "exampleoptionsbase.h"
class ExampleOptions : public ExampleOptionsBase
{
Q_OBJECT
public:
- ExampleOptions(QWidget *parent);
+ ExampleOptions(TQWidget *parent);
protected slots:
virtual void exampleSelectionChanged();
@@ -37,19 +37,19 @@ class ExampleOptionsDialog : public QDialog
{
Q_OBJECT
public:
- ExampleOptionsDialog(QWidget *parent);
+ ExampleOptionsDialog(TQWidget *parent);
const ExampleOptions *widget() const { return m_options; }
protected:
- virtual void hideEvent(QHideEvent *);
- virtual void showEvent(QShowEvent *);
+ virtual void hideEvent(TQHideEvent *);
+ virtual void showEvent(TQShowEvent *);
protected slots:
void fileModeSelected();
signals:
- void fileChanged(const QString &);
+ void fileChanged(const TQString &);
void dataChanged();
void signalHidden();
void signalShown();
diff --git a/juk/filehandle.cpp b/juk/filehandle.cpp
index 583cfc0d..70932063 100644
--- a/juk/filehandle.cpp
+++ b/juk/filehandle.cpp
@@ -18,7 +18,7 @@
#include <kdebug.h>
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
#include "filehandle.h"
#include "filehandleproperties.h"
@@ -39,12 +39,12 @@ AddProperty(Path, absFilePath())
AddNumberProperty(Size, fileInfo().size())
AddProperty(Extension, fileInfo().extension(false))
-static QString resolveSymLinks(const QFileInfo &file) // static
+static TQString resolveSymLinks(const TQFileInfo &file) // static
{
char real[PATH_MAX];
- if(file.exists() && realpath(QFile::encodeName(file.absFilePath()).data(), real))
- return QFile::decodeName(real);
+ if(file.exists() && realpath(TQFile::encodeName(file.absFilePath()).data(), real))
+ return TQFile::decodeName(real);
else
return file.filePath();
}
@@ -79,10 +79,10 @@ public:
mutable Tag *tag;
mutable CoverInfo *coverInfo;
- mutable QString absFilePath;
- QFileInfo fileInfo;
- QDateTime modificationTime;
- QDateTime lastModified;
+ mutable TQString absFilePath;
+ TQFileInfo fileInfo;
+ TQDateTime modificationTime;
+ TQDateTime lastModified;
};
////////////////////////////////////////////////////////////////////////////////
@@ -106,22 +106,22 @@ FileHandle::FileHandle(const FileHandle &f) :
d->ref();
}
-FileHandle::FileHandle(const QFileInfo &info, const QString &path) :
+FileHandle::FileHandle(const TQFileInfo &info, const TQString &path) :
d(0)
{
setup(info, path);
}
-FileHandle::FileHandle(const QString &path) :
+FileHandle::FileHandle(const TQString &path) :
d(0)
{
- setup(QFileInfo(path), path);
+ setup(TQFileInfo(path), path);
}
-FileHandle::FileHandle(const QString &path, CacheDataStream &s)
+FileHandle::FileHandle(const TQString &path, CacheDataStream &s)
{
d = new FileHandlePrivate;
- d->fileInfo = QFileInfo(path);
+ d->fileInfo = TQFileInfo(path);
d->absFilePath = path;
read(s);
Cache::instance()->insert(*this);
@@ -140,10 +140,10 @@ void FileHandle::refresh()
d->tag = new Tag(d->absFilePath);
}
-void FileHandle::setFile(const QString &path)
+void FileHandle::setFile(const TQString &path)
{
if(!d || isNull())
- setup(QFileInfo(path), path);
+ setup(TQFileInfo(path), path);
else {
d->absFilePath = resolveSymLinks(path);
d->fileInfo.setFile(path);
@@ -167,14 +167,14 @@ CoverInfo *FileHandle::coverInfo() const
return d->coverInfo;
}
-QString FileHandle::absFilePath() const
+TQString FileHandle::absFilePath() const
{
if(d->absFilePath.isNull())
d->absFilePath = resolveSymLinks(d->fileInfo.absFilePath());
return d->absFilePath;
}
-const QFileInfo &FileHandle::fileInfo() const
+const TQFileInfo &FileHandle::fileInfo() const
{
return d->fileInfo;
}
@@ -191,7 +191,7 @@ bool FileHandle::current() const
d->modificationTime >= lastModified());
}
-const QDateTime &FileHandle::lastModified() const
+const TQDateTime &FileHandle::lastModified() const
{
if(d->lastModified.isNull())
d->lastModified = d->fileInfo.lastModified();
@@ -237,12 +237,12 @@ bool FileHandle::operator!=(const FileHandle &f) const
return d != f.d;
}
-QStringList FileHandle::properties() // static
+TQStringList FileHandle::properties() // static
{
return FileHandleProperties::properties();
}
-QString FileHandle::property(const QString &name) const
+TQString FileHandle::property(const TQString &name) const
{
return FileHandleProperties::property(*this, name.latin1());
}
@@ -257,12 +257,12 @@ const FileHandle &FileHandle::null() // static
// private methods
////////////////////////////////////////////////////////////////////////////////
-void FileHandle::setup(const QFileInfo &info, const QString &path)
+void FileHandle::setup(const TQFileInfo &info, const TQString &path)
{
if(d && !isNull())
return;
- QString fileName = path.isNull() ? info.absFilePath() : path;
+ TQString fileName = path.isNull() ? info.absFilePath() : path;
FileHandle cached = Cache::instance()->value(resolveSymLinks(fileName));
@@ -283,7 +283,7 @@ void FileHandle::setup(const QFileInfo &info, const QString &path)
// related functions
////////////////////////////////////////////////////////////////////////////////
-QDataStream &operator<<(QDataStream &s, const FileHandle &f)
+TQDataStream &operator<<(TQDataStream &s, const FileHandle &f)
{
s << *(f.tag())
<< f.lastModified();
diff --git a/juk/filehandle.h b/juk/filehandle.h
index 6c12a344..846e3320 100644
--- a/juk/filehandle.h
+++ b/juk/filehandle.h
@@ -16,7 +16,7 @@
#ifndef JUK_FILEHANDLE_H
#define JUK_FILEHANDLE_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
class QFileInfo;
class QDateTime;
@@ -36,25 +36,25 @@ class FileHandle
public:
FileHandle();
FileHandle(const FileHandle &f);
- explicit FileHandle(const QFileInfo &info, const QString &path = QString::null);
- explicit FileHandle(const QString &path);
- FileHandle(const QString &path, CacheDataStream &s);
+ explicit FileHandle(const TQFileInfo &info, const TQString &path = TQString::null);
+ explicit FileHandle(const TQString &path);
+ FileHandle(const TQString &path, CacheDataStream &s);
~FileHandle();
/**
* Forces the FileHandle to reread its information from the disk.
*/
void refresh();
- void setFile(const QString &path);
+ void setFile(const TQString &path);
Tag *tag() const;
CoverInfo *coverInfo() const;
- QString absFilePath() const;
- const QFileInfo &fileInfo() const;
+ TQString absFilePath() const;
+ const TQFileInfo &fileInfo() const;
bool isNull() const;
bool current() const;
- const QDateTime &lastModified() const;
+ const TQDateTime &lastModified() const;
void read(CacheDataStream &s);
@@ -62,8 +62,8 @@ public:
bool operator==(const FileHandle &f) const;
bool operator!=(const FileHandle &f) const;
- static QStringList properties();
- QString property(const QString &name) const;
+ static TQStringList properties();
+ TQString property(const TQString &name) const;
static const FileHandle &null();
@@ -71,12 +71,12 @@ private:
class FileHandlePrivate;
FileHandlePrivate *d;
- void setup(const QFileInfo &info, const QString &path);
+ void setup(const TQFileInfo &info, const TQString &path);
};
-typedef QValueList<FileHandle> FileHandleList;
+typedef TQValueList<FileHandle> FileHandleList;
-QDataStream &operator<<(QDataStream &s, const FileHandle &f);
+TQDataStream &operator<<(TQDataStream &s, const FileHandle &f);
CacheDataStream &operator>>(CacheDataStream &s, FileHandle &f);
#endif
diff --git a/juk/filehandleproperties.h b/juk/filehandleproperties.h
index b0b708bc..4fc31f92 100644
--- a/juk/filehandleproperties.h
+++ b/juk/filehandleproperties.h
@@ -14,7 +14,7 @@
#ifndef FILEHANDLEPROPERTIES_H
#define FILEHANDLEPROPERTIES_H
-#include <qmap.h>
+#include <tqmap.h>
/*
* These ugly macros make possible a property registration system that makes it
@@ -30,7 +30,7 @@
{ \
struct name##Property : public Property \
{ \
- virtual QString value(const FileHandle &f) const \
+ virtual TQString value(const FileHandle &f) const \
{ \
return f.method; \
} \
@@ -45,9 +45,9 @@
{ \
struct name##Property : public Property \
{ \
- virtual QString value(const FileHandle &f) const \
+ virtual TQString value(const FileHandle &f) const \
{ \
- return QString::number(f.method); \
+ return TQString::number(f.method); \
} \
static const int dummy; \
}; \
@@ -59,33 +59,33 @@ namespace FileHandleProperties
{
struct Property
{
- virtual QString value(const FileHandle &) const
+ virtual TQString value(const FileHandle &) const
{
- return QString::null;
+ return TQString::null;
}
};
- static QMap<QCString, const Property *> propertyMap;
+ static TQMap<TQCString, const Property *> propertyMap;
- static int addToPropertyMap(const QCString &name, Property *property)
+ static int addToPropertyMap(const TQCString &name, Property *property)
{
propertyMap[name] = property;
return 0;
}
- static QString property(const FileHandle &file, const QCString &key)
+ static TQString property(const FileHandle &file, const TQCString &key)
{
- return propertyMap.contains(key) ? propertyMap[key]->value(file) : QString::null;
+ return propertyMap.contains(key) ? propertyMap[key]->value(file) : TQString::null;
}
- static QStringList properties()
+ static TQStringList properties()
{
- static QStringList l;
+ static TQStringList l;
if(l.isEmpty()) {
- QMap<QCString, const Property *>::ConstIterator it = propertyMap.begin();
+ TQMap<TQCString, const Property *>::ConstIterator it = propertyMap.begin();
for(; it != propertyMap.end(); ++it)
- l.append(QString(it.key()));
+ l.append(TQString(it.key()));
}
return l;
}
diff --git a/juk/filerenamer.cpp b/juk/filerenamer.cpp
index ec45a268..c1acb2ce 100644
--- a/juk/filerenamer.cpp
+++ b/juk/filerenamer.cpp
@@ -34,19 +34,19 @@
#include <kmessagebox.h>
#include <ksimpleconfig.h>
-#include <qfile.h>
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qscrollview.h>
-#include <qobjectlist.h>
-#include <qtimer.h>
-#include <qregexp.h>
-#include <qcheckbox.h>
-#include <qdir.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qsignalmapper.h>
-#include <qheader.h>
+#include <tqfile.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
+#include <tqscrollview.h>
+#include <tqobjectlist.h>
+#include <tqtimer.h>
+#include <tqregexp.h>
+#include <tqcheckbox.h>
+#include <tqdir.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqsignalmapper.h>
+#include <tqheader.h>
#include "tag.h"
#include "filehandle.h"
@@ -59,17 +59,17 @@
class ConfirmationDialog : public KDialogBase
{
public:
- ConfirmationDialog(const QMap<QString, QString> &files,
- QWidget *parent = 0, const char *name = 0)
+ ConfirmationDialog(const TQMap<TQString, TQString> &files,
+ TQWidget *parent = 0, const char *name = 0)
: KDialogBase(parent, name, true, i18n("Warning"), Ok | Cancel)
{
- QVBox *vbox = makeVBoxMainWidget();
- QHBox *hbox = new QHBox(vbox);
+ TQVBox *vbox = makeVBoxMainWidget();
+ TQHBox *hbox = new TQHBox(vbox);
- QLabel *l = new QLabel(hbox);
+ TQLabel *l = new TQLabel(hbox);
l->setPixmap(SmallIcon("messagebox_warning", 32));
- l = new QLabel(i18n("You are about to rename the following files. "
+ l = new TQLabel(i18n("You are about to rename the following files. "
"Are you sure you want to continue?"), hbox);
hbox->setStretchFactor(l, 1);
@@ -80,7 +80,7 @@ public:
int lvHeight = 0;
- QMap<QString, QString>::ConstIterator it = files.begin();
+ TQMap<TQString, TQString>::ConstIterator it = files.begin();
for(; it != files.end(); ++it) {
KListViewItem *i = it.key() != it.data()
? new KListViewItem(lv, it.key(), it.data())
@@ -103,7 +103,7 @@ ConfigCategoryReader::ConfigCategoryReader() : CategoryReaderInterface(),
{
KConfigGroup config(KGlobal::config(), "FileRenamer");
- QValueList<int> categoryOrder = config.readIntListEntry("CategoryOrder");
+ TQValueList<int> categoryOrder = config.readIntListEntry("CategoryOrder");
unsigned categoryCount[NumTypes] = { 0 }; // Keep track of each category encountered.
// Set a default:
@@ -111,7 +111,7 @@ ConfigCategoryReader::ConfigCategoryReader() : CategoryReaderInterface(),
if(categoryOrder.isEmpty())
categoryOrder << Artist << Album << Title << Track;
- QValueList<int>::ConstIterator catIt = categoryOrder.constBegin();
+ TQValueList<int>::ConstIterator catIt = categoryOrder.constBegin();
for(; catIt != categoryOrder.constEnd(); ++catIt)
{
unsigned catCount = categoryCount[*catIt]++;
@@ -124,9 +124,9 @@ ConfigCategoryReader::ConfigCategoryReader() : CategoryReaderInterface(),
m_folderSeparators.resize(m_categoryOrder.count() - 1, false);
- QValueList<int> checkedSeparators = config.readIntListEntry("CheckedDirSeparators");
+ TQValueList<int> checkedSeparators = config.readIntListEntry("CheckedDirSeparators");
- QValueList<int>::ConstIterator it = checkedSeparators.constBegin();
+ TQValueList<int>::ConstIterator it = checkedSeparators.constBegin();
for(; it != checkedSeparators.constEnd(); ++it) {
unsigned index = static_cast<unsigned>(*it);
if(index < m_folderSeparators.count())
@@ -137,19 +137,19 @@ ConfigCategoryReader::ConfigCategoryReader() : CategoryReaderInterface(),
m_separator = config.readEntry("Separator", " - ");
}
-QString ConfigCategoryReader::categoryValue(TagType type) const
+TQString ConfigCategoryReader::categoryValue(TagType type) const
{
if(!m_currentItem)
- return QString::null;
+ return TQString::null;
Tag *tag = m_currentItem->file().tag();
switch(type) {
case Track:
- return QString::number(tag->track());
+ return TQString::number(tag->track());
case Year:
- return QString::number(tag->year());
+ return TQString::number(tag->year());
case Title:
return tag->title();
@@ -164,16 +164,16 @@ QString ConfigCategoryReader::categoryValue(TagType type) const
return tag->genre();
default:
- return QString::null;
+ return TQString::null;
}
}
-QString ConfigCategoryReader::prefix(const CategoryID &category) const
+TQString ConfigCategoryReader::prefix(const CategoryID &category) const
{
return m_options[category].prefix();
}
-QString ConfigCategoryReader::suffix(const CategoryID &category) const
+TQString ConfigCategoryReader::suffix(const CategoryID &category) const
{
return m_options[category].suffix();
}
@@ -183,22 +183,22 @@ TagRenamerOptions::EmptyActions ConfigCategoryReader::emptyAction(const Category
return m_options[category].emptyAction();
}
-QString ConfigCategoryReader::emptyText(const CategoryID &category) const
+TQString ConfigCategoryReader::emptyText(const CategoryID &category) const
{
return m_options[category].emptyText();
}
-QValueList<CategoryID> ConfigCategoryReader::categoryOrder() const
+TQValueList<CategoryID> ConfigCategoryReader::categoryOrder() const
{
return m_categoryOrder;
}
-QString ConfigCategoryReader::separator() const
+TQString ConfigCategoryReader::separator() const
{
return m_separator;
}
-QString ConfigCategoryReader::musicFolder() const
+TQString ConfigCategoryReader::musicFolder() const
{
return m_musicFolder;
}
@@ -224,11 +224,11 @@ bool ConfigCategoryReader::isDisabled(const CategoryID &category) const
// Implementation of FileRenamerWidget
//
-FileRenamerWidget::FileRenamerWidget(QWidget *parent) :
+FileRenamerWidget::FileRenamerWidget(TQWidget *parent) :
FileRenamerBase(parent), CategoryReaderInterface(),
m_exampleFromFile(false)
{
- QLabel *temp = new QLabel(0);
+ TQLabel *temp = new TQLabel(0);
m_exampleText->setPaletteBackgroundColor(temp->paletteBackgroundColor());
delete temp;
@@ -244,22 +244,22 @@ FileRenamerWidget::FileRenamerWidget(QWidget *parent) :
// Add correct text to combo box.
m_category->clear();
for(unsigned i = StartTag; i < NumTypes; ++i) {
- QString category = TagRenamerOptions::tagTypeText(static_cast<TagType>(i));
+ TQString category = TagRenamerOptions::tagTypeText(static_cast<TagType>(i));
m_category->insertItem(category);
}
- connect(m_exampleDialog, SIGNAL(signalShown()), SLOT(exampleDialogShown()));
- connect(m_exampleDialog, SIGNAL(signalHidden()), SLOT(exampleDialogHidden()));
- connect(m_exampleDialog, SIGNAL(dataChanged()), SLOT(dataSelected()));
- connect(m_exampleDialog, SIGNAL(fileChanged(const QString &)),
- this, SLOT(fileSelected(const QString &)));
+ connect(m_exampleDialog, TQT_SIGNAL(signalShown()), TQT_SLOT(exampleDialogShown()));
+ connect(m_exampleDialog, TQT_SIGNAL(signalHidden()), TQT_SLOT(exampleDialogHidden()));
+ connect(m_exampleDialog, TQT_SIGNAL(dataChanged()), TQT_SLOT(dataSelected()));
+ connect(m_exampleDialog, TQT_SIGNAL(fileChanged(const TQString &)),
+ this, TQT_SLOT(fileSelected(const TQString &)));
exampleTextChanged();
}
void FileRenamerWidget::loadConfig()
{
- QValueList<int> checkedSeparators;
+ TQValueList<int> checkedSeparators;
KConfigGroup config(KGlobal::config(), "FileRenamer");
for(unsigned i = 0; i < m_rows.count(); ++i)
@@ -267,14 +267,14 @@ void FileRenamerWidget::loadConfig()
checkedSeparators = config.readIntListEntry("CheckedDirSeparators");
- QValueList<int>::ConstIterator it = checkedSeparators.begin();
+ TQValueList<int>::ConstIterator it = checkedSeparators.begin();
for(; it != checkedSeparators.end(); ++it) {
unsigned separator = static_cast<unsigned>(*it);
if(separator < m_folderSwitches.count())
m_folderSwitches[separator]->setChecked(true);
}
- QString url = config.readPathEntry("MusicFolder", "${HOME}/music");
+ TQString url = config.readPathEntry("MusicFolder", "${HOME}/music");
m_musicFolder->setURL(url);
m_separator->setCurrentText(config.readEntry("Separator", " - "));
@@ -283,8 +283,8 @@ void FileRenamerWidget::loadConfig()
void FileRenamerWidget::saveConfig()
{
KConfigGroup config(KGlobal::config(), "FileRenamer");
- QValueList<int> checkedSeparators;
- QValueList<int> categoryOrder;
+ TQValueList<int> checkedSeparators;
+ TQValueList<int> categoryOrder;
for(unsigned i = 0; i < m_rows.count(); ++i) {
unsigned rowId = idOfPosition(i); // Write out in GUI order, not m_rows order
@@ -310,8 +310,8 @@ FileRenamerWidget::~FileRenamerWidget()
unsigned FileRenamerWidget::addRowCategory(TagType category)
{
- static QPixmap up = SmallIcon("up");
- static QPixmap down = SmallIcon("down");
+ static TQPixmap up = SmallIcon("up");
+ static TQPixmap down = SmallIcon("down");
// Find number of categories already of this type.
unsigned categoryCount = 0;
@@ -325,18 +325,18 @@ unsigned FileRenamerWidget::addRowCategory(TagType category)
row.position = m_rows.count();
unsigned id = row.position;
- QHBox *frame = new QHBox(m_mainFrame);
+ TQHBox *frame = new TQHBox(m_mainFrame);
frame->setPaletteBackgroundColor(frame->paletteBackgroundColor().dark(110));
row.widget = frame;
- frame->setFrameShape(QFrame::Box);
+ frame->setFrameShape(TQFrame::Box);
frame->setLineWidth(1);
frame->setMargin(3);
m_mainFrame->setStretchFactor(frame, 1);
- QVBox *buttons = new QVBox(frame);
- buttons->setFrameStyle(QFrame::Plain | QFrame::Box);
+ TQVBox *buttons = new TQVBox(frame);
+ buttons->setFrameStyle(TQFrame::Plain | TQFrame::Box);
buttons->setLineWidth(1);
row.upButton = new KPushButton(buttons);
@@ -347,23 +347,23 @@ unsigned FileRenamerWidget::addRowCategory(TagType category)
row.upButton->setFlat(true);
row.downButton->setFlat(true);
- upMapper->connect(row.upButton, SIGNAL(clicked()), SLOT(map()));
+ upMapper->connect(row.upButton, TQT_SIGNAL(clicked()), TQT_SLOT(map()));
upMapper->setMapping(row.upButton, id);
- downMapper->connect(row.downButton, SIGNAL(clicked()), SLOT(map()));
+ downMapper->connect(row.downButton, TQT_SIGNAL(clicked()), TQT_SLOT(map()));
downMapper->setMapping(row.downButton, id);
- QString labelText = QString("<b>%1</b>").arg(TagRenamerOptions::tagTypeText(category));
- QLabel *label = new QLabel(labelText, frame);
+ TQString labelText = TQString("<b>%1</b>").arg(TagRenamerOptions::tagTypeText(category));
+ TQLabel *label = new TQLabel(labelText, frame);
frame->setStretchFactor(label, 1);
label->setAlignment(AlignCenter);
- QVBox *options = new QVBox(frame);
+ TQVBox *options = new TQVBox(frame);
row.enableButton = new KPushButton(i18n("Remove"), options);
- toggleMapper->connect(row.enableButton, SIGNAL(clicked()), SLOT(map()));
+ toggleMapper->connect(row.enableButton, TQT_SIGNAL(clicked()), TQT_SLOT(map()));
toggleMapper->setMapping(row.enableButton, id);
row.optionsButton = new KPushButton(i18n("Options"), options);
- mapper->connect(row.optionsButton, SIGNAL(clicked()), SLOT(map()));
+ mapper->connect(row.optionsButton, TQT_SIGNAL(clicked()), TQT_SLOT(map()));
mapper->setMapping(row.optionsButton, id);
row.widget->show();
@@ -396,7 +396,7 @@ bool FileRenamerWidget::removeRow(unsigned id)
return false;
}
- // Remove widget. Don't delete it since it appears QSignalMapper may still need it.
+ // Remove widget. Don't delete it since it appears TQSignalMapper may still need it.
m_rows[id].widget->deleteLater();
m_rows[id].widget = 0;
m_rows[id].enableButton = 0;
@@ -448,22 +448,22 @@ bool FileRenamerWidget::removeRow(unsigned id)
// We can insert another row now, make sure GUI is updated to match.
m_insertCategory->setEnabled(true);
- QTimer::singleShot(0, this, SLOT(exampleTextChanged()));
+ TQTimer::singleShot(0, this, TQT_SLOT(exampleTextChanged()));
return true;
}
void FileRenamerWidget::addFolderSeparatorCheckbox()
{
- QWidget *temp = new QWidget(m_mainFrame);
- QHBoxLayout *l = new QHBoxLayout(temp);
+ TQWidget *temp = new TQWidget(m_mainFrame);
+ TQHBoxLayout *l = new TQHBoxLayout(temp);
- QCheckBox *cb = new QCheckBox(i18n("Insert folder separator"), temp);
+ TQCheckBox *cb = new TQCheckBox(i18n("Insert folder separator"), temp);
m_folderSwitches.append(cb);
l->addWidget(cb, 0, AlignCenter);
cb->setChecked(false);
- connect(cb, SIGNAL(toggled(bool)),
- SLOT(exampleTextChanged()));
+ connect(cb, TQT_SIGNAL(toggled(bool)),
+ TQT_SLOT(exampleTextChanged()));
temp->show();
}
@@ -471,7 +471,7 @@ void FileRenamerWidget::addFolderSeparatorCheckbox()
void FileRenamerWidget::createTagRows()
{
KConfigGroup config(KGlobal::config(), "FileRenamer");
- QValueList<int> categoryOrder = config.readIntListEntry("CategoryOrder");
+ TQValueList<int> categoryOrder = config.readIntListEntry("CategoryOrder");
if(categoryOrder.isEmpty())
categoryOrder << Artist << Album << Artist << Title << Track;
@@ -480,22 +480,22 @@ void FileRenamerWidget::createTagRows()
m_rows.reserve(categoryOrder.count());
m_folderSwitches.reserve(categoryOrder.count() - 1);
- mapper = new QSignalMapper(this, "signal mapper");
- toggleMapper = new QSignalMapper(this, "toggle mapper");
- upMapper = new QSignalMapper(this, "up button mapper");
- downMapper = new QSignalMapper(this, "down button mapper");
+ mapper = new TQSignalMapper(this, "signal mapper");
+ toggleMapper = new TQSignalMapper(this, "toggle mapper");
+ upMapper = new TQSignalMapper(this, "up button mapper");
+ downMapper = new TQSignalMapper(this, "down button mapper");
- connect(mapper, SIGNAL(mapped(int)), SLOT(showCategoryOption(int)));
- connect(toggleMapper, SIGNAL(mapped(int)), SLOT(slotRemoveRow(int)));
- connect(upMapper, SIGNAL(mapped(int)), SLOT(moveItemUp(int)));
- connect(downMapper, SIGNAL(mapped(int)), SLOT(moveItemDown(int)));
+ connect(mapper, TQT_SIGNAL(mapped(int)), TQT_SLOT(showCategoryOption(int)));
+ connect(toggleMapper, TQT_SIGNAL(mapped(int)), TQT_SLOT(slotRemoveRow(int)));
+ connect(upMapper, TQT_SIGNAL(mapped(int)), TQT_SLOT(moveItemUp(int)));
+ connect(downMapper, TQT_SIGNAL(mapped(int)), TQT_SLOT(moveItemDown(int)));
- m_mainFrame = new QVBox(m_mainView->viewport());
+ m_mainFrame = new TQVBox(m_mainView->viewport());
m_mainFrame->setMargin(10);
m_mainFrame->setSpacing(5);
m_mainView->addChild(m_mainFrame);
- m_mainView->setResizePolicy(QScrollView::AutoOneFit);
+ m_mainView->setResizePolicy(TQScrollView::AutoOneFit);
// OK, the deal with the categoryOrder variable is that we need to create
// the rows in the order that they were saved in (the order given by categoryOrder).
@@ -503,7 +503,7 @@ void FileRenamerWidget::createTagRows()
// a row given the identifier, use m_rows[id].position. To find the id of a given
// position, use idOfPosition(position).
- QValueList<int>::ConstIterator it = categoryOrder.constBegin();
+ TQValueList<int>::ConstIterator it = categoryOrder.constBegin();
for(; it != categoryOrder.constEnd(); ++it) {
if(*it < StartTag || *it >= NumTypes) {
@@ -523,7 +523,7 @@ void FileRenamerWidget::createTagRows()
// Insert the directory separator checkbox if this isn't the last
// item.
- QValueList<int>::ConstIterator dup(it);
+ TQValueList<int>::ConstIterator dup(it);
// Check for last item
if(++dup != categoryOrder.constEnd())
@@ -553,17 +553,17 @@ void FileRenamerWidget::exampleTextChanged()
m_exampleText->setText(FileRenamer::fileName(*this) + ".mp3");
}
-QString FileRenamerWidget::fileCategoryValue(TagType category) const
+TQString FileRenamerWidget::fileCategoryValue(TagType category) const
{
FileHandle file(m_exampleFile);
Tag *tag = file.tag();
switch(category) {
case Track:
- return QString::number(tag->track());
+ return TQString::number(tag->track());
case Year:
- return QString::number(tag->year());
+ return TQString::number(tag->year());
case Title:
return tag->title();
@@ -578,11 +578,11 @@ QString FileRenamerWidget::fileCategoryValue(TagType category) const
return tag->genre();
default:
- return QString::null;
+ return TQString::null;
}
}
-QString FileRenamerWidget::categoryValue(TagType category) const
+TQString FileRenamerWidget::categoryValue(TagType category) const
{
if(m_exampleFromFile)
return fileCategoryValue(category);
@@ -609,13 +609,13 @@ QString FileRenamerWidget::categoryValue(TagType category) const
return example->m_exampleGenre->text();
default:
- return QString::null;
+ return TQString::null;
}
}
-QValueList<CategoryID> FileRenamerWidget::categoryOrder() const
+TQValueList<CategoryID> FileRenamerWidget::categoryOrder() const
{
- QValueList<CategoryID> list;
+ TQValueList<CategoryID> list;
// Iterate in GUI row order.
for(unsigned i = 0; i < m_rows.count(); ++i) {
@@ -636,7 +636,7 @@ bool FileRenamerWidget::hasFolderSeparator(unsigned index) const
void FileRenamerWidget::moveItem(unsigned id, MovementDirection direction)
{
- QWidget *l = m_rows[id].widget;
+ TQWidget *l = m_rows[id].widget;
unsigned bottom = m_rows.count() - 1;
unsigned pos = m_rows[id].position;
unsigned newPos = (direction == MoveUp) ? pos - 1 : pos + 1;
@@ -666,7 +666,7 @@ void FileRenamerWidget::moveItem(unsigned id, MovementDirection direction)
// This is the item we're swapping with.
unsigned idSwitchWith = idOfPosition(newPos);
- QWidget *w = m_rows[idSwitchWith].widget;
+ TQWidget *w = m_rows[idSwitchWith].widget;
// Update the table of widget rows.
@@ -675,7 +675,7 @@ void FileRenamerWidget::moveItem(unsigned id, MovementDirection direction)
// Move the item two spaces above/below its previous position. It has to
// be 2 spaces because of the checkbox.
- QBoxLayout *layout = dynamic_cast<QBoxLayout *>(m_mainFrame->layout());
+ TQBoxLayout *layout = dynamic_cast<TQBoxLayout *>(m_mainFrame->layout());
layout->remove(l);
layout->insertWidget(2 * newPos, l);
@@ -687,7 +687,7 @@ void FileRenamerWidget::moveItem(unsigned id, MovementDirection direction)
layout->insertWidget(2 * pos, w);
layout->invalidate();
- QTimer::singleShot(0, this, SLOT(exampleTextChanged()));
+ TQTimer::singleShot(0, this, TQT_SLOT(exampleTextChanged()));
}
unsigned FileRenamerWidget::idOfPosition(unsigned position) const
@@ -734,7 +734,7 @@ void FileRenamerWidget::showCategoryOption(int id)
{
TagOptionsDialog *dialog = new TagOptionsDialog(this, m_rows[id].options, m_rows[id].category.categoryNumber);
- if(dialog->exec() == QDialog::Accepted) {
+ if(dialog->exec() == TQDialog::Accepted) {
m_rows[id].options = dialog->options();
exampleTextChanged();
}
@@ -796,7 +796,7 @@ void FileRenamerWidget::exampleDialogHidden()
m_showExample->setText(i18n("Show Renamer Test Dialog"));
}
-void FileRenamerWidget::fileSelected(const QString &file)
+void FileRenamerWidget::fileSelected(const TQString &file)
{
m_exampleFromFile = true;
m_exampleFile = file;
@@ -809,12 +809,12 @@ void FileRenamerWidget::dataSelected()
exampleTextChanged();
}
-QString FileRenamerWidget::separator() const
+TQString FileRenamerWidget::separator() const
{
return m_separator->currentText();
}
-QString FileRenamerWidget::musicFolder() const
+TQString FileRenamerWidget::musicFolder() const
{
return m_musicFolder->url();
}
@@ -845,15 +845,15 @@ void FileRenamer::rename(PlaylistItem *item)
void FileRenamer::rename(const PlaylistItemList &items)
{
ConfigCategoryReader reader;
- QStringList errorFiles;
- QMap<QString, QString> map;
- QMap<QString, PlaylistItem *> itemMap;
+ TQStringList errorFiles;
+ TQMap<TQString, TQString> map;
+ TQMap<TQString, PlaylistItem *> itemMap;
for(PlaylistItemList::ConstIterator it = items.begin(); it != items.end(); ++it) {
reader.setPlaylistItem(*it);
- QString oldFile = (*it)->file().absFilePath();
- QString extension = (*it)->file().fileInfo().extension(false);
- QString newFile = fileName(reader) + "." + extension;
+ TQString oldFile = (*it)->file().absFilePath();
+ TQString extension = (*it)->file().fileInfo().extension(false);
+ TQString newFile = fileName(reader) + "." + extension;
if(oldFile != newFile) {
map[oldFile] = newFile;
@@ -861,11 +861,11 @@ void FileRenamer::rename(const PlaylistItemList &items)
}
}
- if(itemMap.isEmpty() || ConfirmationDialog(map).exec() != QDialog::Accepted)
+ if(itemMap.isEmpty() || ConfirmationDialog(map).exec() != TQDialog::Accepted)
return;
KApplication::setOverrideCursor(Qt::waitCursor);
- for(QMap<QString, QString>::ConstIterator it = map.begin();
+ for(TQMap<TQString, TQString>::ConstIterator it = map.begin();
it != map.end(); ++it)
{
if(moveFile(it.key(), it.data())) {
@@ -885,7 +885,7 @@ void FileRenamer::rename(const PlaylistItemList &items)
KMessageBox::errorList(0, i18n("The following rename operations failed:\n"), errorFiles);
}
-bool FileRenamer::moveFile(const QString &src, const QString &dest)
+bool FileRenamer::moveFile(const TQString &src, const TQString &dest)
{
kdDebug(65432) << "Moving file " << src << " to " << dest << endl;
@@ -906,7 +906,7 @@ bool FileRenamer::moveFile(const QString &src, const QString &dest)
// Get just the directory.
KURL dir = dstURL;
- dir.setFileName(QString::null);
+ dir.setFileName(TQString::null);
// Create the directory.
if(!KStandardDirs::exists(dir.path()))
@@ -932,27 +932,27 @@ void FileRenamer::setFolderIcon(const KURL &dst, const PlaylistItem *item)
// Split path, and go through each path element. If a path element has
// the album information, set its folder icon.
- QStringList elements = QStringList::split("/", dstURL.directory());
- QString path;
+ TQStringList elements = TQStringList::split("/", dstURL.directory());
+ TQString path;
- for(QStringList::ConstIterator it = elements.begin(); it != elements.end(); ++it) {
+ for(TQStringList::ConstIterator it = elements.begin(); it != elements.end(); ++it) {
path.append("/" + (*it));
kdDebug() << "Checking path: " << path << endl;
if((*it).find(item->file().tag()->album()) != -1 &&
- !QFile::exists(path + "/.directory"))
+ !TQFile::exists(path + "/.directory"))
{
// Seems to be a match, let's set the folder icon for the current
// path. First we should write out the file.
- QPixmap thumb = item->file().coverInfo()->pixmap(CoverInfo::Thumbnail);
+ TQPixmap thumb = item->file().coverInfo()->pixmap(CoverInfo::Thumbnail);
thumb.save(path + "/.juk-thumbnail.png", "PNG");
KSimpleConfig config(path + "/.directory");
config.setGroup("Desktop Entry");
if(!config.hasKey("Icon")) {
- config.writeEntry("Icon", QString("%1/.juk-thumbnail.png").arg(path));
+ config.writeEntry("Icon", TQString("%1/.juk-thumbnail.png").arg(path));
config.sync();
}
@@ -965,11 +965,11 @@ void FileRenamer::setFolderIcon(const KURL &dst, const PlaylistItem *item)
* Returns iterator pointing to the last item enabled in the given list with
* a non-empty value (or is required to be included).
*/
-QValueList<CategoryID>::ConstIterator lastEnabledItem(const QValueList<CategoryID> &list,
+TQValueList<CategoryID>::ConstIterator lastEnabledItem(const TQValueList<CategoryID> &list,
const CategoryReaderInterface &interface)
{
- QValueList<CategoryID>::ConstIterator it = list.constBegin();
- QValueList<CategoryID>::ConstIterator last = list.constEnd();
+ TQValueList<CategoryID>::ConstIterator it = list.constBegin();
+ TQValueList<CategoryID>::ConstIterator last = list.constEnd();
for(; it != list.constEnd(); ++it) {
if(interface.isRequired(*it) || (!interface.isDisabled(*it) &&
@@ -982,21 +982,21 @@ QValueList<CategoryID>::ConstIterator lastEnabledItem(const QValueList<CategoryI
return last;
}
-QString FileRenamer::fileName(const CategoryReaderInterface &interface)
+TQString FileRenamer::fileName(const CategoryReaderInterface &interface)
{
- const QValueList<CategoryID> categoryOrder = interface.categoryOrder();
- const QString separator = interface.separator();
- const QString folder = interface.musicFolder();
- QValueList<CategoryID>::ConstIterator lastEnabled;
+ const TQValueList<CategoryID> categoryOrder = interface.categoryOrder();
+ const TQString separator = interface.separator();
+ const TQString folder = interface.musicFolder();
+ TQValueList<CategoryID>::ConstIterator lastEnabled;
unsigned i = 0;
- QStringList list;
- QChar dirSeparator = QChar(QDir::separator());
+ TQStringList list;
+ TQChar dirSeparator = TQChar(TQDir::separator());
// Use lastEnabled to properly handle folder separators.
lastEnabled = lastEnabledItem(categoryOrder, interface);
bool pastLast = false; // Toggles to true once we've passed lastEnabled.
- for(QValueList<CategoryID>::ConstIterator it = categoryOrder.begin();
+ for(TQValueList<CategoryID>::ConstIterator it = categoryOrder.begin();
it != categoryOrder.end();
++it, ++i)
{
@@ -1006,7 +1006,7 @@ QString FileRenamer::fileName(const CategoryReaderInterface &interface)
if(interface.isDisabled(*it))
continue;
- QString value = interface.value(*it);
+ TQString value = interface.value(*it);
// The user can use the folder separator checkbox to add folders, so don't allow
// slashes that slip in to accidentally create new folders. Should we filter this
@@ -1023,9 +1023,9 @@ QString FileRenamer::fileName(const CategoryReaderInterface &interface)
// Construct a single string representation, handling strings ending in
// '/' specially
- QString result;
+ TQString result;
- for(QStringList::ConstIterator it = list.constBegin(); it != list.constEnd(); /* Empty */) {
+ for(TQStringList::ConstIterator it = list.constBegin(); it != list.constEnd(); /* Empty */) {
result += *it;
++it; // Manually advance iterator to check for end-of-list.
@@ -1039,7 +1039,7 @@ QString FileRenamer::fileName(const CategoryReaderInterface &interface)
}
}
- return QString(folder + dirSeparator + result);
+ return TQString(folder + dirSeparator + result);
}
#include "filerenamer.moc"
diff --git a/juk/filerenamer.h b/juk/filerenamer.h
index 0097ed86..66548039 100644
--- a/juk/filerenamer.h
+++ b/juk/filerenamer.h
@@ -17,9 +17,9 @@
#ifndef JUK_FILERENAMER_H
#define JUK_FILERENAMER_H
-#include <qstring.h>
-#include <qvaluevector.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqvaluevector.h>
+#include <tqmap.h>
#include "filerenamerbase.h"
#include "filerenameroptions.h"
@@ -41,21 +41,21 @@ enum MovementDirection { MoveUp, MoveDown };
/**
* This is used by FileRenamerWidget to store information about a particular
- * tag type, including its position, the QFrame holding the information,
+ * tag type, including its position, the TQFrame holding the information,
* the up, down, and enable buttons, and the user-selected renaming options.
*/
struct Row
{
Row() : widget(0), upButton(0), downButton(0), enableButton(0) {}
- QWidget *widget;
+ TQWidget *widget;
- QPushButton *upButton, *downButton, *optionsButton, *enableButton;
+ TQPushButton *upButton, *downButton, *optionsButton, *enableButton;
TagRenamerOptions options;
CategoryID category; // Includes category and a disambiguation id.
unsigned position; ///< Position in the GUI (0 == top)
- QString name;
+ TQString name;
};
/**
@@ -65,7 +65,7 @@ struct Row
* takes up. The index into the vector is known as the row identifier (which is unique but
* not necessarily constant).
*/
-typedef QValueVector<Row> Rows;
+typedef TQValueVector<Row> Rows;
/**
* Holds a list directory separator checkboxes which separate a row. There
@@ -73,14 +73,14 @@ typedef QValueVector<Row> Rows;
*
* Used for ConfigCategoryReader.
*/
-typedef QValueVector<QCheckBox *> DirSeparatorCheckBoxes;
+typedef TQValueVector<TQCheckBox *> DirSeparatorCheckBoxes;
/**
* Associates a CategoryID combination with a set of options.
*
* Used for ConfigCategoryReader
*/
-typedef QMap<CategoryID, TagRenamerOptions> CategoryOptionsMap;
+typedef TQMap<CategoryID, TagRenamerOptions> CategoryOptionsMap;
/**
* An implementation of CategoryReaderInterface that reads the user's settings
@@ -102,14 +102,14 @@ public:
// CategoryReaderInterface reimplementations
- virtual QString categoryValue(TagType type) const;
- virtual QString prefix(const CategoryID &category) const;
- virtual QString suffix(const CategoryID &category) const;
+ virtual TQString categoryValue(TagType type) const;
+ virtual TQString prefix(const CategoryID &category) const;
+ virtual TQString suffix(const CategoryID &category) const;
virtual TagRenamerOptions::EmptyActions emptyAction(const CategoryID &category) const;
- virtual QString emptyText(const CategoryID &category) const;
- virtual QValueList<CategoryID> categoryOrder() const;
- virtual QString separator() const;
- virtual QString musicFolder() const;
+ virtual TQString emptyText(const CategoryID &category) const;
+ virtual TQValueList<CategoryID> categoryOrder() const;
+ virtual TQString separator() const;
+ virtual TQString musicFolder() const;
virtual int trackWidth(unsigned categoryNum) const;
virtual bool hasFolderSeparator(unsigned index) const;
virtual bool isDisabled(const CategoryID &category) const;
@@ -117,10 +117,10 @@ public:
private:
const PlaylistItem *m_currentItem;
CategoryOptionsMap m_options;
- QValueList<CategoryID> m_categoryOrder;
- QString m_separator;
- QString m_musicFolder;
- QValueVector<bool> m_folderSeparators;
+ TQValueList<CategoryID> m_categoryOrder;
+ TQString m_separator;
+ TQString m_musicFolder;
+ TQValueVector<bool> m_folderSeparators;
};
/**
@@ -142,7 +142,7 @@ class FileRenamerWidget : public FileRenamerBase, public CategoryReaderInterface
Q_OBJECT
public:
- FileRenamerWidget(QWidget *parent);
+ FileRenamerWidget(TQWidget *parent);
~FileRenamerWidget();
/// Maximum number of total categories the widget will allow.
@@ -232,7 +232,7 @@ private:
* @param category the category to retrieve the value for.
* @return the string representation of the value for \p category.
*/
- QString fileCategoryValue(TagType category) const;
+ TQString fileCategoryValue(TagType category) const;
/**
* Returns the value for \p category by reading the user entry for that
@@ -242,7 +242,7 @@ private:
* @param category the category to retrieve the value for.
* @return the string representation of the value for \p category.
*/
- virtual QString categoryValue(TagType category) const;
+ virtual TQString categoryValue(TagType category) const;
/**
* Returns the user-specified prefix string for \p category.
@@ -250,7 +250,7 @@ private:
* @param category the category to retrieve the value for.
* @return user-specified prefix string for \p category.
*/
- virtual QString prefix(const CategoryID &category) const
+ virtual TQString prefix(const CategoryID &category) const
{
return m_rows[findIdentifier(category)].options.prefix();
}
@@ -261,7 +261,7 @@ private:
* @param category the category to retrieve the value for.
* @return user-specified suffix string for \p category.
*/
- virtual QString suffix(const CategoryID &category) const
+ virtual TQString suffix(const CategoryID &category) const
{
return m_rows[findIdentifier(category)].options.suffix();
}
@@ -284,7 +284,7 @@ private:
* @param category the category to retrieve the value for.
* @return the user-specified empty text for \p category.
*/
- virtual QString emptyText(const CategoryID &category) const
+ virtual TQString emptyText(const CategoryID &category) const
{
return m_rows[findIdentifier(category)].options.emptyText();
}
@@ -292,17 +292,17 @@ private:
/**
* @return list of CategoryIDs corresponding to the user-specified category order.
*/
- virtual QValueList<CategoryID> categoryOrder() const;
+ virtual TQValueList<CategoryID> categoryOrder() const;
/**
* @return string that separates the tag values in the file name.
*/
- virtual QString separator() const;
+ virtual TQString separator() const;
/**
* @return local path to the music folder used to store renamed files.
*/
- virtual QString musicFolder() const;
+ virtual TQString musicFolder() const;
/**
* @param categoryNum Zero-based number of category to get results for (if more than one).
@@ -399,7 +399,7 @@ private slots:
*
* @param file the path to the local file to read.
*/
- virtual void fileSelected(const QString &file);
+ virtual void fileSelected(const TQString &file);
/**
* This function reads the tags from the user-supplied examples and ensures
@@ -419,7 +419,7 @@ private slots:
/**
* This function removes the row identified by id and updates the internal data to be
* consistent again, by forwarding the call to removeRow().
- * This roundabout way is done due to QSignalMapper.
+ * This roundabout way is done due to TQSignalMapper.
*
* @param id The unique id to update
*/
@@ -451,7 +451,7 @@ private slots:
private:
/// This is the frame that holds all of the category widgets and checkboxes.
- QVBox *m_mainFrame;
+ TQVBox *m_mainFrame;
/**
* This is the meat of the widget, it holds the rows for the user configuration. It is
@@ -475,13 +475,13 @@ private:
/// This is true if we're reading example tags from m_exampleFile.
bool m_exampleFromFile;
- QString m_exampleFile;
+ TQString m_exampleFile;
// Used to map signals from rows to the correct widget.
- QSignalMapper *mapper;
- QSignalMapper *toggleMapper;
- QSignalMapper *upMapper;
- QSignalMapper *downMapper;
+ TQSignalMapper *mapper;
+ TQSignalMapper *toggleMapper;
+ TQSignalMapper *upMapper;
+ TQSignalMapper *downMapper;
};
/**
@@ -521,7 +521,7 @@ public:
*
* @param interface object to read options/data from.
*/
- static QString fileName(const CategoryReaderInterface &interface);
+ static TQString fileName(const CategoryReaderInterface &interface);
private:
/**
@@ -535,7 +535,7 @@ private:
* Attempts to rename the file from \a src to \a dest. Returns true if the
* operation succeeded.
*/
- bool moveFile(const QString &src, const QString &dest);
+ bool moveFile(const TQString &src, const TQString &dest);
};
#endif /* JUK_FILERENAMER_H */
diff --git a/juk/filerenamerconfigdlg.cpp b/juk/filerenamerconfigdlg.cpp
index 74038dc6..8a741d03 100644
--- a/juk/filerenamerconfigdlg.cpp
+++ b/juk/filerenamerconfigdlg.cpp
@@ -19,7 +19,7 @@
#include "filerenamer.h"
#include "filerenamerconfigdlg.h"
-FileRenamerConfigDlg::FileRenamerConfigDlg(QWidget *parent) :
+FileRenamerConfigDlg::FileRenamerConfigDlg(TQWidget *parent) :
KDialogBase(parent, "file renamer dialog", true,
i18n("File Renamer Options"), Ok | Cancel),
m_renamerWidget(new FileRenamerWidget(this))
diff --git a/juk/filerenamerconfigdlg.h b/juk/filerenamerconfigdlg.h
index 0678f52b..0c42ab54 100644
--- a/juk/filerenamerconfigdlg.h
+++ b/juk/filerenamerconfigdlg.h
@@ -24,7 +24,7 @@ class FileRenamerConfigDlg : public KDialogBase
{
Q_OBJECT
public:
- FileRenamerConfigDlg(QWidget *parent);
+ FileRenamerConfigDlg(TQWidget *parent);
protected slots:
virtual void accept();
diff --git a/juk/filerenameroptions.cpp b/juk/filerenameroptions.cpp
index 2813be4b..d40fd81c 100644
--- a/juk/filerenameroptions.cpp
+++ b/juk/filerenameroptions.cpp
@@ -17,15 +17,15 @@
#include <kdebug.h>
#include <knuminput.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qradiobutton.h>
-#include <qlineedit.h>
-#include <qbuttongroup.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqradiobutton.h>
+#include <tqlineedit.h>
+#include <tqbuttongroup.h>
#include "filerenameroptions.h"
-FileRenamerTagOptions::FileRenamerTagOptions(QWidget *parent,
+FileRenamerTagOptions::FileRenamerTagOptions(TQWidget *parent,
const TagRenamerOptions &options) :
FileRenamerTagOptionsBase(parent), m_options(options)
{
@@ -44,7 +44,7 @@ FileRenamerTagOptions::FileRenamerTagOptions(QWidget *parent,
if(m_options.category() != Track)
m_trackGroup->hide();
- QString tagText = m_options.tagTypeText();
+ TQString tagText = m_options.tagTypeText();
setCaption(caption().arg(tagText));
m_tagFormatGroup->setTitle(m_tagFormatGroup->title().arg(tagText));
@@ -68,7 +68,7 @@ FileRenamerTagOptions::FileRenamerTagOptions(QWidget *parent,
void FileRenamerTagOptions::slotBracketsChanged()
{
- QString tag = m_options.tagTypeText();
+ TQString tag = m_options.tagTypeText();
m_options.setPrefix(m_prefixText->text());
m_options.setSuffix(m_suffixText->text());
@@ -82,19 +82,19 @@ void FileRenamerTagOptions::slotTrackWidthChanged()
m_options.setTrackWidth(width);
- QString singleDigitText = m_singleDigit->text();
+ TQString singleDigitText = m_singleDigit->text();
singleDigitText.remove(" ->");
- QString doubleDigitText = m_doubleDigit->text();
+ TQString doubleDigitText = m_doubleDigit->text();
doubleDigitText.remove(" ->");
if(singleDigitText.length() < width) {
- QString p;
+ TQString p;
p.fill('0', width - singleDigitText.length());
singleDigitText.prepend(p);
}
if(doubleDigitText.length() < width) {
- QString p;
+ TQString p;
p.fill('0', width - doubleDigitText.length());
doubleDigitText.prepend(p);
}
@@ -115,7 +115,7 @@ void FileRenamerTagOptions::slotEmptyActionChanged()
m_options.setEmptyAction(TagRenamerOptions::ForceEmptyInclude);
}
-TagOptionsDialog::TagOptionsDialog(QWidget *parent,
+TagOptionsDialog::TagOptionsDialog(TQWidget *parent,
const TagRenamerOptions &options,
unsigned categoryNumber) :
KDialogBase(parent, 0, true, i18n("File Renamer"), Ok | Cancel),
diff --git a/juk/filerenameroptions.h b/juk/filerenameroptions.h
index 0711fbf7..07408827 100644
--- a/juk/filerenameroptions.h
+++ b/juk/filerenameroptions.h
@@ -30,7 +30,7 @@ class FileRenamerTagOptions : public FileRenamerTagOptionsBase
Q_OBJECT
public:
- FileRenamerTagOptions(QWidget *parent, const TagRenamerOptions &options);
+ FileRenamerTagOptions(TQWidget *parent, const TagRenamerOptions &options);
const TagRenamerOptions &options() const { return m_options; }
@@ -53,7 +53,7 @@ class TagOptionsDialog : public KDialogBase
Q_OBJECT
public:
- TagOptionsDialog(QWidget *parent, const TagRenamerOptions &options, unsigned categoryNumber);
+ TagOptionsDialog(TQWidget *parent, const TagRenamerOptions &options, unsigned categoryNumber);
const TagRenamerOptions &options() const { return m_options; }
diff --git a/juk/folderplaylist.cpp b/juk/folderplaylist.cpp
index ecde8f77..71934359 100644
--- a/juk/folderplaylist.cpp
+++ b/juk/folderplaylist.cpp
@@ -15,18 +15,18 @@
#include "folderplaylist.h"
#include "playlistcollection.h"
-#include <qtimer.h>
+#include <tqtimer.h>
////////////////////////////////////////////////////////////////////////////////
// public methods
////////////////////////////////////////////////////////////////////////////////
-FolderPlaylist::FolderPlaylist(PlaylistCollection *collection, const QString &folder,
- const QString &name) :
+FolderPlaylist::FolderPlaylist(PlaylistCollection *collection, const TQString &folder,
+ const TQString &name) :
Playlist(collection, name, "folder"),
m_folder(folder)
{
- QTimer::singleShot(0, this, SLOT(slotReload()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotReload()));
}
FolderPlaylist::~FolderPlaylist()
@@ -34,15 +34,15 @@ FolderPlaylist::~FolderPlaylist()
}
-QString FolderPlaylist::folder() const
+TQString FolderPlaylist::folder() const
{
return m_folder;
}
-void FolderPlaylist::setFolder(const QString &s)
+void FolderPlaylist::setFolder(const TQString &s)
{
m_folder = s;
- QTimer::singleShot(0, this, SLOT(slotReload()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotReload()));
}
////////////////////////////////////////////////////////////////////////////////
@@ -59,17 +59,17 @@ void FolderPlaylist::slotReload()
// helper functions
////////////////////////////////////////////////////////////////////////////////
-QDataStream &operator<<(QDataStream &s, const FolderPlaylist &p)
+TQDataStream &operator<<(TQDataStream &s, const FolderPlaylist &p)
{
s << p.name()
<< p.folder();
return s;
}
-QDataStream &operator>>(QDataStream &s, FolderPlaylist &p)
+TQDataStream &operator>>(TQDataStream &s, FolderPlaylist &p)
{
- QString name;
- QString folder;
+ TQString name;
+ TQString folder;
s >> name
>> folder;
diff --git a/juk/folderplaylist.h b/juk/folderplaylist.h
index 0635a131..4369a6fb 100644
--- a/juk/folderplaylist.h
+++ b/juk/folderplaylist.h
@@ -22,12 +22,12 @@ class FolderPlaylist : public Playlist
Q_OBJECT
public:
- FolderPlaylist(PlaylistCollection *collection, const QString &folder = QString::null,
- const QString &name = QString::null);
+ FolderPlaylist(PlaylistCollection *collection, const TQString &folder = TQString::null,
+ const TQString &name = TQString::null);
virtual ~FolderPlaylist();
- QString folder() const;
- void setFolder(const QString &s);
+ TQString folder() const;
+ void setFolder(const TQString &s);
virtual bool canReload() const { return true; }
@@ -35,10 +35,10 @@ public slots:
virtual void slotReload();
private:
- QString m_folder;
+ TQString m_folder;
};
-QDataStream &operator<<(QDataStream &s, const FolderPlaylist &p);
-QDataStream &operator>>(QDataStream &s, FolderPlaylist &p);
+TQDataStream &operator<<(TQDataStream &s, const FolderPlaylist &p);
+TQDataStream &operator>>(TQDataStream &s, FolderPlaylist &p);
#endif
diff --git a/juk/gstreamerplayer.cpp b/juk/gstreamerplayer.cpp
index c538d9ff..39f371a3 100644
--- a/juk/gstreamerplayer.cpp
+++ b/juk/gstreamerplayer.cpp
@@ -21,8 +21,8 @@
#include <kglobal.h>
#include <kdebug.h>
-#include <qfile.h>
-#include <qtimer.h>
+#include <tqfile.h>
+#include <tqtimer.h>
// Defined because recent versions of glib add support for having gcc check
// whether the sentinel used on g_object_{set,get} is correct. Although 0
@@ -142,7 +142,7 @@ void GStreamerPlayer::seekPosition(int position)
void GStreamerPlayer::readConfig()
{
KConfigGroup config(KGlobal::config(), "GStreamerPlayer");
- m_sinkName = config.readEntry("SinkName", QString::null);
+ m_sinkName = config.readEntry("SinkName", TQString::null);
}
void GStreamerPlayer::setupPipeline()
@@ -193,7 +193,7 @@ static GstBusSyncReply messageHandler(GstBus *, GstMessage *message, gpointer da
{
if(GST_MESSAGE_TYPE(message) == GST_MESSAGE_EOS) {
GStreamerPlayer *player = static_cast<GStreamerPlayer *>(data);
- QTimer::singleShot(0, player, SLOT(stop()));
+ TQTimer::singleShot(0, player, TQT_SLOT(stop()));
}
gst_message_unref(message);
diff --git a/juk/gstreamerplayer.h b/juk/gstreamerplayer.h
index 1d15562b..6cc8ebfd 100644
--- a/juk/gstreamerplayer.h
+++ b/juk/gstreamerplayer.h
@@ -21,7 +21,7 @@
#if HAVE_GSTREAMER
#include <gst/gst.h>
-#include <qstring.h>
+#include <tqstring.h>
#include "player.h"
class GStreamerPlayer : public Player
@@ -59,7 +59,7 @@ private:
void readConfig();
long long time(GstQueryType type) const;
- QString m_sinkName;
+ TQString m_sinkName;
GstElement *m_pipeline;
GstElement *m_source;
GstElement *m_decoder;
diff --git a/juk/historyplaylist.cpp b/juk/historyplaylist.cpp
index 6ebd4643..26758fd6 100644
--- a/juk/historyplaylist.cpp
+++ b/juk/historyplaylist.cpp
@@ -29,10 +29,10 @@ HistoryPlaylist::HistoryPlaylist(PlaylistCollection *collection) :
Playlist(collection, true), m_timer(0)
{
setAllowDuplicates(true);
- m_timer = new QTimer(this);
+ m_timer = new TQTimer(this);
- connect(PlayerManager::instance(), SIGNAL(signalPlay()), this, SLOT(slotAddPlaying()));
- connect(m_timer, SIGNAL(timeout()), this, SLOT(slotCreateNewItem()));
+ connect(PlayerManager::instance(), TQT_SIGNAL(signalPlay()), this, TQT_SLOT(slotAddPlaying()));
+ connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotCreateNewItem()));
}
HistoryPlaylist::~HistoryPlaylist()
@@ -41,7 +41,7 @@ HistoryPlaylist::~HistoryPlaylist()
}
HistoryPlaylistItem *HistoryPlaylist::createItem(const FileHandle &file,
- QListViewItem *after, bool emitChanged)
+ TQListViewItem *after, bool emitChanged)
{
if(!after)
after = lastItem();
@@ -90,16 +90,16 @@ void HistoryPlaylist::slotCreateNewItem()
// HistoryPlaylistItem public members
////////////////////////////////////////////////////////////////////////////////
-HistoryPlaylistItem::HistoryPlaylistItem(CollectionListItem *item, Playlist *parent, QListViewItem *after) :
+HistoryPlaylistItem::HistoryPlaylistItem(CollectionListItem *item, Playlist *parent, TQListViewItem *after) :
PlaylistItem(item, parent, after),
- m_dateTime(QDateTime::currentDateTime())
+ m_dateTime(TQDateTime::currentDateTime())
{
setText(0, KGlobal::locale()->formatDateTime(m_dateTime));
}
HistoryPlaylistItem::HistoryPlaylistItem(CollectionListItem *item, Playlist *parent) :
PlaylistItem(item, parent),
- m_dateTime(QDateTime::currentDateTime())
+ m_dateTime(TQDateTime::currentDateTime())
{
setText(0, KGlobal::locale()->formatDateTime(m_dateTime));
}
@@ -109,7 +109,7 @@ HistoryPlaylistItem::~HistoryPlaylistItem()
}
-void HistoryPlaylistItem::setDateTime(const QDateTime &dt)
+void HistoryPlaylistItem::setDateTime(const TQDateTime &dt)
{
m_dateTime = dt;
setText(0, KGlobal::locale()->formatDateTime(m_dateTime));
@@ -119,7 +119,7 @@ void HistoryPlaylistItem::setDateTime(const QDateTime &dt)
// helper functions
////////////////////////////////////////////////////////////////////////////////
-QDataStream &operator<<(QDataStream &s, const HistoryPlaylist &p)
+TQDataStream &operator<<(TQDataStream &s, const HistoryPlaylist &p)
{
PlaylistItemList l = const_cast<HistoryPlaylist *>(&p)->items();
@@ -134,15 +134,15 @@ QDataStream &operator<<(QDataStream &s, const HistoryPlaylist &p)
return s;
}
-QDataStream &operator>>(QDataStream &s, HistoryPlaylist &p)
+TQDataStream &operator>>(TQDataStream &s, HistoryPlaylist &p)
{
Q_INT32 count;
s >> count;
HistoryPlaylistItem *after = 0;
- QString fileName;
- QDateTime dateTime;
+ TQString fileName;
+ TQDateTime dateTime;
for(int i = 0; i < count; i++) {
s >> fileName;
diff --git a/juk/historyplaylist.h b/juk/historyplaylist.h
index 144ec11c..5f2776d5 100644
--- a/juk/historyplaylist.h
+++ b/juk/historyplaylist.h
@@ -23,15 +23,15 @@
class HistoryPlaylistItem : public PlaylistItem
{
public:
- HistoryPlaylistItem(CollectionListItem *item, Playlist *parent, QListViewItem *after);
+ HistoryPlaylistItem(CollectionListItem *item, Playlist *parent, TQListViewItem *after);
HistoryPlaylistItem(CollectionListItem *item, Playlist *parent);
virtual ~HistoryPlaylistItem();
- QDateTime dateTime() const { return m_dateTime; }
- void setDateTime(const QDateTime &dt);
+ TQDateTime dateTime() const { return m_dateTime; }
+ void setDateTime(const TQDateTime &dt);
private:
- QDateTime m_dateTime;
+ TQDateTime m_dateTime;
};
class HistoryPlaylist : public Playlist
@@ -42,7 +42,7 @@ public:
HistoryPlaylist(PlaylistCollection *collection);
virtual ~HistoryPlaylist();
- virtual HistoryPlaylistItem *createItem(const FileHandle &file, QListViewItem *after = 0,
+ virtual HistoryPlaylistItem *createItem(const FileHandle &file, TQListViewItem *after = 0,
bool emitChanged = true);
virtual void createItems(const PlaylistItemList &siblings);
virtual int columnOffset() const { return 1; }
@@ -63,10 +63,10 @@ private slots:
private:
FileHandle m_file;
- QTimer *m_timer;
+ TQTimer *m_timer;
};
-QDataStream &operator<<(QDataStream &s, const HistoryPlaylist &p);
-QDataStream &operator>>(QDataStream &s, HistoryPlaylist &p);
+TQDataStream &operator<<(TQDataStream &s, const HistoryPlaylist &p);
+TQDataStream &operator>>(TQDataStream &s, HistoryPlaylist &p);
#endif
diff --git a/juk/juk.cpp b/juk/juk.cpp
index a3e0988c..35c08dff 100644
--- a/juk/juk.cpp
+++ b/juk/juk.cpp
@@ -43,7 +43,7 @@ using namespace ActionCollection;
// public members
////////////////////////////////////////////////////////////////////////////////
-JuK::JuK(QWidget *parent, const char *name) :
+JuK::JuK(TQWidget *parent, const char *name) :
KMainWindow(parent, name, WDestructiveClose),
m_player(PlayerManager::instance()),
m_shuttingDown(false)
@@ -60,7 +60,7 @@ JuK::JuK(QWidget *parent, const char *name) :
setupActions();
setupLayout();
- if(QApplication::reverseLayout())
+ if(TQApplication::reverseLayout())
setupGUI(ToolBar | Save | Create, "jukui-rtl.rc");
else
setupGUI(ToolBar | Save | Create);
@@ -71,8 +71,8 @@ JuK::JuK(QWidget *parent, const char *name) :
createDirs();
SplashScreen::finishedLoading();
- QTimer::singleShot(0, CollectionList::instance(), SLOT(slotCheckCache()));
- QTimer::singleShot(0, this, SLOT(slotProcessArgs()));
+ TQTimer::singleShot(0, CollectionList::instance(), TQT_SLOT(slotCheckCache()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotProcessArgs()));
m_sliderAction->slotUpdateOrientation();
}
@@ -99,8 +99,8 @@ void JuK::setupLayout()
setCentralWidget(m_splitter);
m_statusLabel = new StatusLabel(m_splitter->playlist(), statusBar());
- connect(CollectionList::instance(), SIGNAL(signalCollectionChanged()),
- m_statusLabel, SLOT(updateData()));
+ connect(CollectionList::instance(), TQT_SIGNAL(signalCollectionChanged()),
+ m_statusLabel, TQT_SLOT(updateData()));
statusBar()->addWidget(m_statusLabel, 1);
PlayerManager::instance()->setStatusLabel(m_statusLabel);
@@ -112,15 +112,15 @@ void JuK::setupActions()
{
ActionCollection::actions()->setWidget(this);
- KStdAction::quit(this, SLOT(slotQuit()), actions());
- KStdAction::undo(this, SLOT(slotUndo()), actions());
- KStdAction::cut(kapp, SLOT(cut()), actions());
- KStdAction::copy(kapp, SLOT(copy()), actions());
- KStdAction::paste(kapp, SLOT(paste()), actions());
- KStdAction::clear(kapp, SLOT(clear()), actions());
- KStdAction::selectAll(kapp, SLOT(selectAll()), actions());
+ KStdAction::quit(this, TQT_SLOT(slotQuit()), actions());
+ KStdAction::undo(this, TQT_SLOT(slotUndo()), actions());
+ KStdAction::cut(kapp, TQT_SLOT(cut()), actions());
+ KStdAction::copy(kapp, TQT_SLOT(copy()), actions());
+ KStdAction::paste(kapp, TQT_SLOT(paste()), actions());
+ KStdAction::clear(kapp, TQT_SLOT(clear()), actions());
+ KStdAction::selectAll(kapp, TQT_SLOT(selectAll()), actions());
- new KAction(i18n("Remove From Playlist"), "edit_remove", 0, kapp, SLOT(clear()), actions(), "removeFromPlaylist");
+ new KAction(i18n("Remove From Playlist"), "edit_remove", 0, kapp, TQT_SLOT(clear()), actions(), "removeFromPlaylist");
KActionMenu *actionMenu = new KActionMenu(i18n("&Random Play"), "roll", actions(), "actionMenu");
actionMenu->setDelayed(false);
@@ -135,15 +135,15 @@ void JuK::setupActions()
ka = new KRadioAction(i18n("Use &Album Random Play"), "roll", 0, actions(), "albumRandomPlay");
ka->setExclusiveGroup("randomPlayGroup");
- connect(ka, SIGNAL(toggled(bool)), SLOT(slotCheckAlbumNextAction(bool)));
+ connect(ka, TQT_SIGNAL(toggled(bool)), TQT_SLOT(slotCheckAlbumNextAction(bool)));
actionMenu->insert(ka);
- new KAction(i18n("&Play"), "player_play", 0, m_player, SLOT(play()), actions(), "play");
- new KAction(i18n("P&ause"), "player_pause", 0, m_player, SLOT(pause()), actions(), "pause");
- new KAction(i18n("&Stop"), "player_stop", 0, m_player, SLOT(stop()), actions(), "stop");
+ new KAction(i18n("&Play"), "player_play", 0, m_player, TQT_SLOT(play()), actions(), "play");
+ new KAction(i18n("P&ause"), "player_pause", 0, m_player, TQT_SLOT(pause()), actions(), "pause");
+ new KAction(i18n("&Stop"), "player_stop", 0, m_player, TQT_SLOT(stop()), actions(), "stop");
- new KToolBarPopupAction(i18n("previous track", "Previous"), "player_start", KShortcut(), m_player, SLOT(back()), actions(), "back");
- new KAction(i18n("next track", "&Next"), "player_end", KShortcut(), m_player, SLOT(forward()), actions(), "forward");
+ new KToolBarPopupAction(i18n("previous track", "Previous"), "player_start", KShortcut(), m_player, TQT_SLOT(back()), actions(), "back");
+ new KAction(i18n("next track", "&Next"), "player_end", KShortcut(), m_player, TQT_SLOT(forward()), actions(), "forward");
new KToggleAction(i18n("&Loop Playlist"), 0, KShortcut(), actions(), "loopPlaylist");
KToggleAction *resizeColumnAction =
new KToggleAction(i18n("&Resize Playlist Columns Manually"),
@@ -152,12 +152,12 @@ void JuK::setupActions()
// the following are not visible by default
- new KAction(i18n("Mute"), "mute", 0, m_player, SLOT(mute()), actions(), "mute");
- new KAction(i18n("Volume Up"), "volumeUp", 0, m_player, SLOT(volumeUp()), actions(), "volumeUp");
- new KAction(i18n("Volume Down"), "volumeDown", 0, m_player, SLOT(volumeDown()), actions(), "volumeDown");
- new KAction(i18n("Play / Pause"), "playPause", 0, m_player, SLOT(playPause()), actions(), "playPause");
- new KAction(i18n("Seek Forward"), "seekForward", 0, m_player, SLOT(seekForward()), actions(), "seekForward");
- new KAction(i18n("Seek Back"), "seekBack", 0, m_player, SLOT(seekBack()), actions(), "seekBack");
+ new KAction(i18n("Mute"), "mute", 0, m_player, TQT_SLOT(mute()), actions(), "mute");
+ new KAction(i18n("Volume Up"), "volumeUp", 0, m_player, TQT_SLOT(volumeUp()), actions(), "volumeUp");
+ new KAction(i18n("Volume Down"), "volumeDown", 0, m_player, TQT_SLOT(volumeDown()), actions(), "volumeDown");
+ new KAction(i18n("Play / Pause"), "playPause", 0, m_player, TQT_SLOT(playPause()), actions(), "playPause");
+ new KAction(i18n("Seek Forward"), "seekForward", 0, m_player, TQT_SLOT(seekForward()), actions(), "seekForward");
+ new KAction(i18n("Seek Back"), "seekBack", 0, m_player, TQT_SLOT(seekBack()), actions(), "seekBack");
//////////////////////////////////////////////////
// settings menu
@@ -179,8 +179,8 @@ void JuK::setupActions()
new KToggleAction(i18n("Save &Play Queue on Exit"),
KShortcut(), this, 0, actions(), "saveUpcomingTracks");
- connect(m_toggleSystemTrayAction, SIGNAL(toggled(bool)),
- this, SLOT(slotToggleSystemTray(bool)));
+ connect(m_toggleSystemTrayAction, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotToggleSystemTray(bool)));
m_outputSelectAction = PlayerManager::playerSelectAction(actions());
@@ -188,13 +188,13 @@ void JuK::setupActions()
if(m_outputSelectAction)
m_outputSelectAction->setCurrentItem(0);
- new KAction(i18n("&Tag Guesser..."), 0, 0, this, SLOT(slotConfigureTagGuesser()),
+ new KAction(i18n("&Tag Guesser..."), 0, 0, this, TQT_SLOT(slotConfigureTagGuesser()),
actions(), "tagGuesserConfig");
- new KAction(i18n("&File Renamer..."), 0, 0, this, SLOT(slotConfigureFileRenamer()),
+ new KAction(i18n("&File Renamer..."), 0, 0, this, TQT_SLOT(slotConfigureFileRenamer()),
actions(), "fileRenamerConfig");
- KStdAction::keyBindings(this, SLOT(slotEditKeys()), actions());
+ KStdAction::keyBindings(this, TQT_SLOT(slotEditKeys()), actions());
//////////////////////////////////////////////////
// just in the toolbar
@@ -213,7 +213,7 @@ void JuK::setupSystemTray()
m_toggleDockOnCloseAction->setEnabled(true);
m_togglePopupsAction->setEnabled(true);
- connect(m_systemTray, SIGNAL(quitSelected()), this, SLOT(slotAboutToQuit()));
+ connect(m_systemTray, TQT_SIGNAL(quitSelected()), this, TQT_SLOT(slotAboutToQuit()));
}
else {
m_systemTray = 0;
@@ -226,18 +226,18 @@ void JuK::setupGlobalAccels()
{
m_accel = new KGlobalAccel(this);
- KeyDialog::insert(m_accel, "Play", i18n("Play"), action("play"), SLOT(activate()));
- KeyDialog::insert(m_accel, "PlayPause", i18n("Play / Pause"), action("playPause"), SLOT(activate()));
- KeyDialog::insert(m_accel, "Stop", i18n("Stop Playing"), action("stop"), SLOT(activate()));
- KeyDialog::insert(m_accel, "Back", i18n("Back"), action("back"), SLOT(activate()));
- KeyDialog::insert(m_accel, "Forward", i18n("Forward"), action("forward"), SLOT(activate()));
- KeyDialog::insert(m_accel, "SeekBack", i18n("Seek Back"), action("seekBack"), SLOT(activate()));
- KeyDialog::insert(m_accel, "SeekForward", i18n("Seek Forward"), action("seekForward"), SLOT(activate()));
- KeyDialog::insert(m_accel, "VolumeUp", i18n("Volume Up"), action("volumeUp"), SLOT(activate()));
- KeyDialog::insert(m_accel, "VolumeDown", i18n("Volume Down"), action("volumeDown"), SLOT(activate()));
- KeyDialog::insert(m_accel, "Mute", i18n("Mute"), action("mute"), SLOT(activate()));
- KeyDialog::insert(m_accel, "ShowHide", i18n("Show / Hide"), this, SLOT(slotShowHide()));
- KeyDialog::insert(m_accel, "ForwardAlbum", i18n("Play Next Album"), action("forwardAlbum"), SLOT(activate()));
+ KeyDialog::insert(m_accel, "Play", i18n("Play"), action("play"), TQT_SLOT(activate()));
+ KeyDialog::insert(m_accel, "PlayPause", i18n("Play / Pause"), action("playPause"), TQT_SLOT(activate()));
+ KeyDialog::insert(m_accel, "Stop", i18n("Stop Playing"), action("stop"), TQT_SLOT(activate()));
+ KeyDialog::insert(m_accel, "Back", i18n("Back"), action("back"), TQT_SLOT(activate()));
+ KeyDialog::insert(m_accel, "Forward", i18n("Forward"), action("forward"), TQT_SLOT(activate()));
+ KeyDialog::insert(m_accel, "SeekBack", i18n("Seek Back"), action("seekBack"), TQT_SLOT(activate()));
+ KeyDialog::insert(m_accel, "SeekForward", i18n("Seek Forward"), action("seekForward"), TQT_SLOT(activate()));
+ KeyDialog::insert(m_accel, "VolumeUp", i18n("Volume Up"), action("volumeUp"), TQT_SLOT(activate()));
+ KeyDialog::insert(m_accel, "VolumeDown", i18n("Volume Down"), action("volumeDown"), TQT_SLOT(activate()));
+ KeyDialog::insert(m_accel, "Mute", i18n("Mute"), action("mute"), TQT_SLOT(activate()));
+ KeyDialog::insert(m_accel, "ShowHide", i18n("Show / Hide"), this, TQT_SLOT(slotShowHide()));
+ KeyDialog::insert(m_accel, "ForwardAlbum", i18n("Play Next Album"), action("forwardAlbum"), TQT_SLOT(activate()));
m_accel->setConfigGroup("Shortcuts");
m_accel->readSettings();
@@ -247,7 +247,7 @@ void JuK::setupGlobalAccels()
void JuK::slotProcessArgs()
{
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
- QStringList files;
+ TQStringList files;
for(int i = 0; i < args->count(); i++)
files.append(args->arg(i));
@@ -257,7 +257,7 @@ void JuK::slotProcessArgs()
void JuK::createDirs()
{
- QDir dir(KGlobal::dirs()->saveLocation("data", kapp->instanceName() + '/'));
+ TQDir dir(KGlobal::dirs()->saveLocation("data", kapp->instanceName() + '/'));
if (!dir.exists("covers", false))
dir.mkdir("covers", false);
dir.cd("covers");
@@ -265,7 +265,7 @@ void JuK::createDirs()
dir.mkdir("large", false);
}
-void JuK::keyPressEvent(QKeyEvent *e)
+void JuK::keyPressEvent(TQKeyEvent *e)
{
if (e->key() >= Qt::Key_Back && e->key() <= Qt::Key_MediaLast)
e->accept();
@@ -299,7 +299,7 @@ void JuK::readConfig()
ActionCollection::action<KToggleAction>("disableRandomPlay")->setChecked(true);
- QString randomPlayMode = playerConfig.readEntry("RandomPlay", "Disabled");
+ TQString randomPlayMode = playerConfig.readEntry("RandomPlay", "Disabled");
if(randomPlayMode == "true" || randomPlayMode == "Normal")
m_randomPlayAction->setChecked(true);
else if(randomPlayMode == "AlbumRandomPlay")
diff --git a/juk/juk.h b/juk/juk.h
index 41f3150a..0c4ce27a 100644
--- a/juk/juk.h
+++ b/juk/juk.h
@@ -39,7 +39,7 @@ class JuK : public KMainWindow
Q_OBJECT
public:
- JuK(QWidget* parent = 0, const char *name = 0);
+ JuK(TQWidget* parent = 0, const char *name = 0);
virtual ~JuK();
virtual KActionCollection *actionCollection() const;
@@ -50,7 +50,7 @@ private:
void setupGlobalAccels();
void createDirs();
- void keyPressEvent(QKeyEvent *);
+ void keyPressEvent(TQKeyEvent *);
/**
* readSettings() is separate from readConfig() in that it contains settings
diff --git a/juk/jukIface.h b/juk/jukIface.h
index b431ea90..575bb63d 100644
--- a/juk/jukIface.h
+++ b/juk/jukIface.h
@@ -2,38 +2,38 @@
#define JUKIFACE_H
#include <dcopobject.h>
-#include <qstringlist.h>
-#include <qpixmap.h>
+#include <tqstringlist.h>
+#include <tqpixmap.h>
class CollectionIface : public DCOPObject
{
K_DCOP
k_dcop:
- void openFile(const QString &file) { open(file); }
- void openFile(const QStringList &files) { open(files); }
- void openFile(const QString &playlist, const QString &file) { open(playlist, file); }
- void openFile(const QString &playlist, const QStringList &files) { open(playlist, files); }
+ void openFile(const TQString &file) { open(file); }
+ void openFile(const TQStringList &files) { open(files); }
+ void openFile(const TQString &playlist, const TQString &file) { open(playlist, file); }
+ void openFile(const TQString &playlist, const TQStringList &files) { open(playlist, files); }
- virtual QStringList playlists() const = 0;
- virtual void createPlaylist(const QString &) = 0;
+ virtual TQStringList playlists() const = 0;
+ virtual void createPlaylist(const TQString &) = 0;
virtual void remove() = 0;
- virtual void removeTrack(const QString &playlist, const QString &file) { removeTrack(playlist, QStringList(file)); }
- virtual void removeTrack(const QString &playlist, const QStringList &files) = 0;
+ virtual void removeTrack(const TQString &playlist, const TQString &file) { removeTrack(playlist, TQStringList(file)); }
+ virtual void removeTrack(const TQString &playlist, const TQStringList &files) = 0;
- virtual QString playlist() const = 0;
- virtual QString playingPlaylist() const = 0;
- virtual void setPlaylist(const QString &playlist) = 0;
+ virtual TQString playlist() const = 0;
+ virtual TQString playingPlaylist() const = 0;
+ virtual void setPlaylist(const TQString &playlist) = 0;
- virtual QStringList playlistTracks(const QString &playlist) const = 0;
- virtual QString trackProperty(const QString &file, const QString &property) const = 0;
+ virtual TQStringList playlistTracks(const TQString &playlist) const = 0;
+ virtual TQString trackProperty(const TQString &file, const TQString &property) const = 0;
- virtual QPixmap trackCover(const QString &file, const QString &size = "Small") const = 0;
+ virtual TQPixmap trackCover(const TQString &file, const TQString &size = "Small") const = 0;
protected:
CollectionIface() : DCOPObject("Collection") {}
- virtual void open(const QStringList &files) = 0;
- virtual void open(const QString &playlist, const QStringList &files) = 0;
+ virtual void open(const TQStringList &files) = 0;
+ virtual void open(const TQString &playlist, const TQStringList &files) = 0;
};
class PlayerIface : public DCOPObject
@@ -45,17 +45,17 @@ k_dcop:
virtual float volume() const = 0;
virtual int status() const = 0;
- virtual QStringList trackProperties() = 0;
- virtual QString trackProperty(const QString &property) const = 0;
- virtual QPixmap trackCover(const QString &size = "Small") const = 0;
+ virtual TQStringList trackProperties() = 0;
+ virtual TQString trackProperty(const TQString &property) const = 0;
+ virtual TQPixmap trackCover(const TQString &size = "Small") const = 0;
- virtual QString currentFile() const
+ virtual TQString currentFile() const
{
return trackProperty("Path");
}
virtual void play() = 0;
- virtual void play(const QString &file) = 0;
+ virtual void play(const TQString &file) = 0;
virtual void pause() = 0;
virtual void stop() = 0;
virtual void playPause() = 0;
@@ -72,7 +72,7 @@ k_dcop:
virtual void setVolume(float volume) = 0;
virtual void seek(int time) = 0;
- virtual QString playingString() const = 0;
+ virtual TQString playingString() const = 0;
virtual int currentTime() const = 0;
virtual int totalTime() const = 0;
@@ -80,7 +80,7 @@ k_dcop:
* @return The current player mode.
* @see setRandomPlayMode()
*/
- virtual QString randomPlayMode() const = 0;
+ virtual TQString randomPlayMode() const = 0;
/**
* Sets the player mode to one of normal, random play, or album
@@ -89,7 +89,7 @@ k_dcop:
* "Random" -> Random
* "AlbumRandom" -> Album Random
*/
- virtual void setRandomPlayMode(const QString &randomMode) = 0;
+ virtual void setRandomPlayMode(const TQString &randomMode) = 0;
protected:
PlayerIface() : DCOPObject("Player") {}
@@ -99,8 +99,8 @@ class SearchIface : public DCOPObject
{
K_DCOP
k_dcop:
- virtual QString searchText() const = 0;
- virtual void setSearchText(const QString &text) = 0;
+ virtual TQString searchText() const = 0;
+ virtual void setSearchText(const TQString &text) = 0;
protected:
SearchIface() : DCOPObject("Search") {}
diff --git a/juk/k3bexporter.cpp b/juk/k3bexporter.cpp
index a08ddcfe..d19021e6 100644
--- a/juk/k3bexporter.cpp
+++ b/juk/k3bexporter.cpp
@@ -23,8 +23,8 @@
#include <kiconloader.h>
#include <kapplication.h>
-#include <qcstring.h>
-#include <qmap.h>
+#include <tqcstring.h>
+#include <tqmap.h>
#include <dcopref.h>
#include <dcopclient.h>
@@ -50,8 +50,8 @@ class PlaylistAction : public KAction
{
public:
PlaylistAction(const char *name,
- const QString &userText,
- const QIconSet &pix,
+ const TQString &userText,
+ const TQIconSet &pix,
const char *slot,
const KShortcut &cut = 0) :
KAction(userText, pix, cut, 0 /* receiver */, 0 /* slot */, actions(), name),
@@ -59,13 +59,13 @@ class PlaylistAction : public KAction
{
}
- typedef QMap<const Playlist *, QObject *> PlaylistRecipientMap;
+ typedef TQMap<const Playlist *, TQObject *> PlaylistRecipientMap;
/**
- * Defines a QObject to call (using the m_slot SLOT) when an action is
+ * Defines a TQObject to call (using the m_slot SLOT) when an action is
* emitted from a Playlist.
*/
- void addCallMapping(const Playlist *p, QObject *obj)
+ void addCallMapping(const Playlist *p, TQObject *obj)
{
m_playlistRecipient[p] = obj;
}
@@ -81,19 +81,19 @@ class PlaylistAction : public KAction
return;
// Make sure we're supposed to notify someone about this playlist.
- QObject *recipient = m_playlistRecipient[p];
+ TQObject *recipient = m_playlistRecipient[p];
if(!recipient)
return;
// Invoke the slot using some trickery.
- // XXX: Use the QMetaObject to do this in Qt 4.
- connect(this, SIGNAL(activated()), recipient, m_slot);
+ // XXX: Use the TQMetaObject to do this in Qt 4.
+ connect(this, TQT_SIGNAL(activated()), recipient, m_slot);
emit(activated());
- disconnect(this, SIGNAL(activated()), recipient, m_slot);
+ disconnect(this, TQT_SIGNAL(activated()), recipient, m_slot);
}
private:
- QCString m_slot;
+ TQCString m_slot;
PlaylistRecipientMap m_playlistRecipient;
};
@@ -108,7 +108,7 @@ KAction *K3bExporter::action()
"export_to_k3b",
i18n("Add Selected Items to Audio or Data CD"),
SmallIconSet("k3b"),
- SLOT(slotExport())
+ TQT_SLOT(slotExport())
);
m_action->setShortcutConfigurable(false);
@@ -129,8 +129,8 @@ void K3bExporter::exportPlaylistItems(const PlaylistItemList &items)
return;
DCOPClient *client = DCOPClient::mainClient();
- QCString appId, appObj;
- QByteArray data;
+ TQCString appId, appObj;
+ TQByteArray data;
if(!client->findObject("k3b-*", "K3bInterface", "", data, appId, appObj))
exportViaCmdLine(items);
@@ -149,7 +149,7 @@ void K3bExporter::slotExport()
void K3bExporter::exportViaCmdLine(const PlaylistItemList &items)
{
K3bOpenMode mode = openMode();
- QCString cmdOption;
+ TQCString cmdOption;
switch(mode) {
case AudioCD:
@@ -179,10 +179,10 @@ void K3bExporter::exportViaCmdLine(const PlaylistItemList &items)
void K3bExporter::exportViaDCOP(const PlaylistItemList &items, DCOPRef &ref)
{
- QValueList<DCOPRef> projectList;
+ TQValueList<DCOPRef> projectList;
DCOPReply projectListReply = ref.call("projects()");
- if(!projectListReply.get<QValueList<DCOPRef> >(projectList, "QValueList<DCOPRef>")) {
+ if(!projectListReply.get<TQValueList<DCOPRef> >(projectList, "TQValueList<DCOPRef>")) {
DCOPErrorMessage();
return;
}
@@ -213,7 +213,7 @@ void K3bExporter::DCOPErrorMessage()
bool K3bExporter::startNewK3bProject(DCOPRef &ref)
{
- QCString request;
+ TQCString request;
K3bOpenMode mode = openMode();
switch(mode) {
@@ -276,7 +276,7 @@ KAction *K3bPlaylistExporter::action()
SmallIconSet("k3b"),
0,
this,
- SLOT(slotExport()),
+ TQT_SLOT(slotExport()),
actions(),
"export_playlist_to_k3b"
);
diff --git a/juk/keydialog.cpp b/juk/keydialog.cpp
index 2fe429c1..c8d24a5a 100644
--- a/juk/keydialog.cpp
+++ b/juk/keydialog.cpp
@@ -18,9 +18,9 @@
#include <kconfig.h>
#include <klocale.h>
-#include <qradiobutton.h>
-#include <qvbox.h>
-#include <qwhatsthis.h>
+#include <tqradiobutton.h>
+#include <tqvbox.h>
+#include <tqwhatsthis.h>
// Table of shortcut keys for each action, key group and three or four button modifier
@@ -75,7 +75,7 @@ const KeyDialog::KeyInfo KeyDialog::keyInfo[] = {
const uint KeyDialog::keyInfoCount = sizeof(KeyDialog::keyInfo) / sizeof(KeyDialog::keyInfo[0]);
KeyDialog::KeyDialog(KGlobalAccel *keys, KActionCollection *actionCollection,
- QWidget *parent, const char *name)
+ TQWidget *parent, const char *name)
: KDialogBase(parent, name, true, i18n("Configure Shortcuts"), Default | Ok | Cancel, Ok)
{
// Read key group from configuration
@@ -87,20 +87,20 @@ KeyDialog::KeyDialog(KGlobalAccel *keys, KActionCollection *actionCollection,
// Create widgets for key chooser - widget stack used to replace key chooser
- QVBox *vbox = new QVBox(this);
+ TQVBox *vbox = new TQVBox(this);
vbox->setSpacing(KDialog::spacingHint());
- m_widgetStack = new QWidgetStack(vbox);
+ m_widgetStack = new TQWidgetStack(vbox);
vbox->setStretchFactor(m_widgetStack, 1);
// Create buttons to select key group
- m_group = new QHButtonGroup(i18n("Global Shortcuts"), vbox);
- new QRadioButton(i18n("&No keys"), m_group);
- new QRadioButton(i18n("&Standard keys"), m_group);
- new QRadioButton(i18n("&Multimedia keys"), m_group);
- connect(m_group, SIGNAL(clicked(int)), this, SLOT(slotKeys(int)));
- QWhatsThis::add(m_group,
+ m_group = new TQHButtonGroup(i18n("Global Shortcuts"), vbox);
+ new TQRadioButton(i18n("&No keys"), m_group);
+ new TQRadioButton(i18n("&Standard keys"), m_group);
+ new TQRadioButton(i18n("&Multimedia keys"), m_group);
+ connect(m_group, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(slotKeys(int)));
+ TQWhatsThis::add(m_group,
i18n("Here you can select the keys used as global shortcuts to control the player"));
// Create the key chooser
@@ -127,7 +127,7 @@ void KeyDialog::newDialog(KGlobalAccel *keys, KActionCollection *actionCollectio
m_widgetStack->raiseWidget(m_pKeyChooser);
m_group->setButton(selectedButton);
- connect(this, SIGNAL(defaultClicked()), this, SLOT(slotDefault()));
+ connect(this, TQT_SIGNAL(defaultClicked()), this, TQT_SLOT(slotDefault()));
}
int KeyDialog::configure()
@@ -157,7 +157,7 @@ void KeyDialog::slotKeys(int group)
// Create a new key chooser to show the keys, and delete the old one
- QWidget *w = m_widgetStack->visibleWidget();
+ TQWidget *w = m_widgetStack->visibleWidget();
newDialog(m_keys, m_actionCollection, group);
m_widgetStack->removeWidget(w);
delete w;
@@ -172,7 +172,7 @@ void KeyDialog::slotDefault()
}
int KeyDialog::configure(KGlobalAccel *keys, KActionCollection *actionCollection,
- QWidget *parent)
+ TQWidget *parent)
{
// Create and show dialog - update connections if accepted
@@ -183,8 +183,8 @@ int KeyDialog::configure(KGlobalAccel *keys, KActionCollection *actionCollection
return retcode;
}
-void KeyDialog::insert(KGlobalAccel *keys, const QString &action, const QString &label,
- const QObject *objSlot, const char *methodSlot)
+void KeyDialog::insert(KGlobalAccel *keys, const TQString &action, const TQString &label,
+ const TQObject *objSlot, const char *methodSlot)
{
KShortcut def3 = KShortcut::null();
KShortcut def4 = KShortcut::null();
@@ -198,7 +198,7 @@ void KeyDialog::insert(KGlobalAccel *keys, const QString &action, const QString
break;
}
}
- keys->insert(action, label, QString::null, def3, def4, objSlot, methodSlot);
+ keys->insert(action, label, TQString::null, def3, def4, objSlot, methodSlot);
}
#include "keydialog.moc"
diff --git a/juk/keydialog.h b/juk/keydialog.h
index 13d76d4f..13801ee1 100644
--- a/juk/keydialog.h
+++ b/juk/keydialog.h
@@ -20,8 +20,8 @@
#include <kglobalaccel.h>
#include <kkeydialog.h>
-#include <qhbuttongroup.h>
-#include <qwidgetstack.h>
+#include <tqhbuttongroup.h>
+#include <tqwidgetstack.h>
class KeyDialog : public KDialogBase
{
@@ -31,7 +31,7 @@ public:
/**
* Constructs a KeyDialog called @p name as a child of @p parent.
*/
- KeyDialog(KGlobalAccel *keys, KActionCollection *actionCollection, QWidget *parent = 0, const char* name = 0);
+ KeyDialog(KGlobalAccel *keys, KActionCollection *actionCollection, TQWidget *parent = 0, const char* name = 0);
/**
* Destructor. Deletes all resources used by a KeyDialog object.
@@ -43,14 +43,14 @@ public:
* accelerators and actions. It behaves essentially like the functions
* in KKeyDialog.
*/
- static int configure(KGlobalAccel *keys, KActionCollection *actionCollection, QWidget *parent = 0);
+ static int configure(KGlobalAccel *keys, KActionCollection *actionCollection, TQWidget *parent = 0);
/**
* This is a member function, provided to create a global accelerator with
* standard keys. It behaves like the function in KGlobalAccel.
*/
- static void insert(KGlobalAccel *keys, const QString &action, const QString &label,
- const QObject *objSlot, const char *methodSlot);
+ static void insert(KGlobalAccel *keys, const TQString &action, const TQString &label,
+ const TQObject *objSlot, const char *methodSlot);
private:
@@ -60,7 +60,7 @@ private:
enum KeyGroup { NoKeys = 0, StandardKeys = 1, MultimediaKeys = 2 };
struct KeyInfo {
- QString action;
+ TQString action;
KShortcut shortcut[3][2];
};
@@ -75,8 +75,8 @@ private:
KActionCollection *m_actionCollection;
KGlobalAccel *m_keys;
KKeyChooser *m_pKeyChooser;
- QHButtonGroup *m_group;
- QWidgetStack *m_widgetStack;
+ TQHButtonGroup *m_group;
+ TQWidgetStack *m_widgetStack;
static const KeyInfo keyInfo[];
static const uint keyInfoCount;
diff --git a/juk/ktrm.cpp b/juk/ktrm.cpp
index 38fd4ef5..cb45c685 100644
--- a/juk/ktrm.cpp
+++ b/juk/ktrm.cpp
@@ -29,11 +29,11 @@
#include <kurl.h>
#include <kdebug.h>
-#include <qmutex.h>
-#include <qregexp.h>
-#include <qevent.h>
-#include <qobject.h>
-#include <qfile.h>
+#include <tqmutex.h>
+#include <tqregexp.h>
+#include <tqevent.h>
+#include <tqobject.h>
+#include <tqfile.h>
#include <tunepimp/tp_c.h>
#include <fixx11h.h>
@@ -58,7 +58,7 @@ class KTRMRequestHandler
public:
static KTRMRequestHandler *instance()
{
- static QMutex mutex;
+ static TQMutex mutex;
mutex.lock();
static KTRMRequestHandler handler;
mutex.unlock();
@@ -71,9 +71,9 @@ public:
if(!m_fileMap.contains(lookup->file())) {
#if HAVE_MUSICBRAINZ >= 4
- id = tp_AddFile(m_pimp, QFile::encodeName(lookup->file()), 0);
+ id = tp_AddFile(m_pimp, TQFile::encodeName(lookup->file()), 0);
#else
- id = tp_AddFile(m_pimp, QFile::encodeName(lookup->file()));
+ id = tp_AddFile(m_pimp, TQFile::encodeName(lookup->file()));
#endif
m_fileMap.insert(lookup->file(), id);
}
@@ -141,18 +141,18 @@ protected:
if(KProtocolManager::useProxy()) {
// split code copied from kcm_kio.
- QString noProxiesFor = KProtocolManager::noProxyFor();
- QStringList noProxies = QStringList::split(QRegExp("[',''\t'' ']"), noProxiesFor);
+ TQString noProxiesFor = KProtocolManager::noProxyFor();
+ TQStringList noProxies = TQStringList::split(TQRegExp("[',''\t'' ']"), noProxiesFor);
bool useProxy = true;
// Host that libtunepimp will contact.
- QString tunepimpHost = "www.musicbrainz.org";
- QString tunepimpHostWithPort = "www.musicbrainz.org:80";
+ TQString tunepimpHost = "www.musicbrainz.org";
+ TQString tunepimpHostWithPort = "www.musicbrainz.org:80";
// Check what hosts are allowed to proceed without being proxied,
// or is using reversed proxy, what hosts must be proxied.
- for(QStringList::ConstIterator it = noProxies.constBegin(); it != noProxies.constEnd(); ++it) {
- QString normalizedHost = KNetwork::KResolver::normalizeDomain(*it);
+ for(TQStringList::ConstIterator it = noProxies.constBegin(); it != noProxies.constEnd(); ++it) {
+ TQString normalizedHost = KNetwork::KResolver::normalizeDomain(*it);
if(normalizedHost == tunepimpHost ||
tunepimpHost.endsWith("." + normalizedHost))
@@ -177,7 +177,7 @@ protected:
if(useProxy) {
KURL proxy = KProtocolManager::proxyFor("http");
- QString proxyHost = proxy.host();
+ TQString proxyHost = proxy.host();
kdDebug(65432) << "Using proxy server " << proxyHost << " for www.musicbrainz.org.\n";
tp_SetProxy(m_pimp, proxyHost.latin1(), short(proxy.port()));
@@ -192,9 +192,9 @@ protected:
private:
tunepimp_t m_pimp;
- QMap<int, KTRMLookup *> m_lookupMap;
- QMap<QString, int> m_fileMap;
- mutable QMutex m_lookupMapMutex;
+ TQMap<int, KTRMLookup *> m_lookupMap;
+ TQMap<TQString, int> m_fileMap;
+ mutable TQMutex m_lookupMapMutex;
};
@@ -213,7 +213,7 @@ public:
};
KTRMEvent(int fileId, Status status) :
- QCustomEvent(id),
+ TQCustomEvent(id),
m_fileId(fileId),
m_status(status) {}
@@ -248,25 +248,25 @@ public:
}
protected:
- KTRMEventHandler() : QObject() {}
+ KTRMEventHandler() : TQObject() {}
static KTRMEventHandler *instance()
{
- static QMutex mutex;
+ static TQMutex mutex;
mutex.lock();
static KTRMEventHandler handler;
mutex.unlock();
return &handler;
}
- virtual void customEvent(QCustomEvent *event)
+ virtual void customEvent(TQCustomEvent *event)
{
if(!event->type() == KTRMEvent::id)
return;
KTRMEvent *e = static_cast<KTRMEvent *>(event);
- static QMutex mutex;
+ static TQMutex mutex;
mutex.lock();
if(!KTRMRequestHandler::instance()->lookupMapContains(e->fileId())) {
@@ -348,9 +348,9 @@ class KTRMResult::KTRMResultPrivate
{
public:
KTRMResultPrivate() : track(0), year(0), relevance(0) {}
- QString title;
- QString artist;
- QString album;
+ TQString title;
+ TQString artist;
+ TQString album;
int track;
int year;
int relevance;
@@ -375,17 +375,17 @@ KTRMResult::~KTRMResult()
delete d;
}
-QString KTRMResult::title() const
+TQString KTRMResult::title() const
{
return d->title;
}
-QString KTRMResult::artist() const
+TQString KTRMResult::artist() const
{
return d->artist;
}
-QString KTRMResult::album() const
+TQString KTRMResult::album() const
{
return d->album;
}
@@ -425,7 +425,7 @@ class KTRMLookup::KTRMLookupPrivate
public:
KTRMLookupPrivate() :
fileId(-1) {}
- QString file;
+ TQString file;
KTRMResultList results;
int fileId;
bool autoDelete;
@@ -435,7 +435,7 @@ public:
// KTRMLookup public methods
////////////////////////////////////////////////////////////////////////////////
-KTRMLookup::KTRMLookup(const QString &file, bool autoDelete)
+KTRMLookup::KTRMLookup(const TQString &file, bool autoDelete)
{
d = new KTRMLookupPrivate;
d->file = file;
@@ -449,7 +449,7 @@ KTRMLookup::~KTRMLookup()
delete d;
}
-QString KTRMLookup::file() const
+TQString KTRMLookup::file() const
{
return d->file;
}
@@ -472,9 +472,9 @@ void KTRMLookup::recognized()
KTRMResult result;
- result.d->title = QString::fromUtf8(metaData->track);
- result.d->artist = QString::fromUtf8(metaData->artist);
- result.d->album = QString::fromUtf8(metaData->album);
+ result.d->title = TQString::fromUtf8(metaData->track);
+ result.d->artist = TQString::fromUtf8(metaData->artist);
+ result.d->album = TQString::fromUtf8(metaData->album);
result.d->track = metaData->trackNum;
result.d->year = metaData->releaseYear;
@@ -548,14 +548,14 @@ void KTRMLookup::collision()
for(int i = 0; i < resultCount; i++) {
KTRMResult result;
- result.d->title = QString::fromUtf8(tracks[i]->name);
+ result.d->title = TQString::fromUtf8(tracks[i]->name);
#if HAVE_MUSICBRAINZ >= 4
- result.d->artist = QString::fromUtf8(tracks[i]->artist.name);
- result.d->album = QString::fromUtf8(tracks[i]->album.name);
+ result.d->artist = TQString::fromUtf8(tracks[i]->artist.name);
+ result.d->album = TQString::fromUtf8(tracks[i]->album.name);
result.d->year = tracks[i]->album.releaseYear;
#else
- result.d->artist = QString::fromUtf8(tracks[i]->artist->name);
- result.d->album = QString::fromUtf8(tracks[i]->album->name);
+ result.d->artist = TQString::fromUtf8(tracks[i]->artist->name);
+ result.d->album = TQString::fromUtf8(tracks[i]->album->name);
result.d->year = tracks[i]->album->releaseYear;
#endif
result.d->track = tracks[i]->trackNum;
diff --git a/juk/ktrm.h b/juk/ktrm.h
index 3dfa9e47..d99cf9b3 100644
--- a/juk/ktrm.h
+++ b/juk/ktrm.h
@@ -31,9 +31,9 @@
#if HAVE_MUSICBRAINZ
-#include <qstring.h>
-#include <qvaluelist.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
+#include <tqmap.h>
/**
* This represents a potential match for a TRM lookup. KTRMResultList is
@@ -53,17 +53,17 @@ public:
/**
* Returns the title of the track for the potential match.
*/
- QString title() const;
+ TQString title() const;
/**
* Returns the artist name of the track for the potential match.
*/
- QString artist() const;
+ TQString artist() const;
/**
* Returns the album name of the track for the potential match.
*/
- QString album() const;
+ TQString album() const;
/**
* Returns the track number of the track for the potential match.
@@ -97,7 +97,7 @@ private:
KTRMResultPrivate *d;
};
-typedef QValueList<KTRMResult> KTRMResultList;
+typedef TQValueList<KTRMResult> KTRMResultList;
/**
* An abstraction for libtunepimp's TRM based lookup and file recognition.
@@ -117,14 +117,14 @@ public:
* Creates and starts a lookup for \a file. If \a autoDelete is set to
* true the lookup will delete itself when it has finished.
*/
- KTRMLookup(const QString &file, bool autoDelete = false);
+ KTRMLookup(const TQString &file, bool autoDelete = false);
virtual ~KTRMLookup();
/**
* Returns the file name that was specified in the constructor.
*/
- QString file() const;
+ TQString file() const;
/**
* Returns the TunePimp file ID for the file. This is of no use to the
diff --git a/juk/mediafiles.cpp b/juk/mediafiles.cpp
index b52c4be3..3752ec06 100644
--- a/juk/mediafiles.cpp
+++ b/juk/mediafiles.cpp
@@ -31,7 +31,7 @@
#endif
namespace MediaFiles {
- QStringList mimeTypes();
+ TQStringList mimeTypes();
static const char mp3Type[] = "audio/mpeg";
static const char oggType[] = "application/ogg";
@@ -45,9 +45,9 @@ namespace MediaFiles {
static const char playlistExtension[] = ".m3u";
}
-QStringList MediaFiles::openDialog(QWidget *parent)
+TQStringList MediaFiles::openDialog(TQWidget *parent)
{
- KFileDialog dialog(QString::null, QString::null, parent, "filedialog", true);
+ KFileDialog dialog(TQString::null, TQString::null, parent, "filedialog", true);
dialog.setOperationMode(KFileDialog::Opening);
dialog.setCaption(i18n("Open"));
@@ -60,10 +60,10 @@ QStringList MediaFiles::openDialog(QWidget *parent)
return convertURLsToLocal(dialog.selectedFiles());
}
-QString MediaFiles::savePlaylistDialog(const QString &playlistName, QWidget *parent)
+TQString MediaFiles::savePlaylistDialog(const TQString &playlistName, TQWidget *parent)
{
- QString fileName = KFileDialog::getSaveFileName(playlistName + playlistExtension,
- QString("*").append(playlistExtension),
+ TQString fileName = KFileDialog::getSaveFileName(playlistName + playlistExtension,
+ TQString("*").append(playlistExtension),
parent,
i18n("Playlists"));
if(!fileName.isEmpty() && !fileName.endsWith(playlistExtension))
@@ -72,7 +72,7 @@ QString MediaFiles::savePlaylistDialog(const QString &playlistName, QWidget *par
return fileName;
}
-bool MediaFiles::isMediaFile(const QString &fileName)
+bool MediaFiles::isMediaFile(const TQString &fileName)
{
KMimeType::Ptr result = KMimeType::findByPath(fileName, 0, true);
@@ -83,51 +83,51 @@ bool MediaFiles::isMediaFile(const QString &fileName)
;
}
-bool MediaFiles::isPlaylistFile(const QString &fileName)
+bool MediaFiles::isPlaylistFile(const TQString &fileName)
{
KMimeType::Ptr result = KMimeType::findByPath(fileName, 0, true);
return result->is(m3uType);
}
-bool MediaFiles::isMP3(const QString &fileName)
+bool MediaFiles::isMP3(const TQString &fileName)
{
KMimeType::Ptr result = KMimeType::findByPath(fileName, 0, true);
return result->is(mp3Type);
}
-bool MediaFiles::isOgg(const QString &fileName)
+bool MediaFiles::isOgg(const TQString &fileName)
{
KMimeType::Ptr result = KMimeType::findByPath(fileName, 0, true);
return result->is(oggType);
}
-bool MediaFiles::isFLAC(const QString &fileName)
+bool MediaFiles::isFLAC(const TQString &fileName)
{
KMimeType::Ptr result = KMimeType::findByPath(fileName, 0, true);
return result->is(flacType);
}
-bool MediaFiles::isMPC(const QString &fileName)
+bool MediaFiles::isMPC(const TQString &fileName)
{
KMimeType::Ptr result = KMimeType::findByPath(fileName, 0, true);
return result->is(mpcType);
}
-bool MediaFiles::isVorbis(const QString &fileName)
+bool MediaFiles::isVorbis(const TQString &fileName)
{
KMimeType::Ptr result = KMimeType::findByPath(fileName, 0, false);
return result->is(vorbisType);
}
-bool MediaFiles::isOggFLAC(const QString &fileName)
+bool MediaFiles::isOggFLAC(const TQString &fileName)
{
KMimeType::Ptr result = KMimeType::findByPath(fileName, 0, false);
return result->is(oggflacType);
}
-QStringList MediaFiles::mimeTypes()
+TQStringList MediaFiles::mimeTypes()
{
- QStringList l;
+ TQStringList l;
l << mp3Type << oggType << flacType << m3uType << vorbisType
#ifdef TAGLIB_1_2
@@ -140,12 +140,12 @@ QStringList MediaFiles::mimeTypes()
return l;
}
-QStringList MediaFiles::convertURLsToLocal(const QStringList &urlList, QWidget *w)
+TQStringList MediaFiles::convertURLsToLocal(const TQStringList &urlList, TQWidget *w)
{
- QStringList result;
+ TQStringList result;
KURL localUrl;
- for(QStringList::ConstIterator it = urlList.constBegin(); it != urlList.constEnd(); ++it) {
+ for(TQStringList::ConstIterator it = urlList.constBegin(); it != urlList.constEnd(); ++it) {
localUrl = KIO::NetAccess::mostLocalURL(KURL::fromPathOrURL(*it), w);
if(!localUrl.isLocalFile())
diff --git a/juk/mediafiles.h b/juk/mediafiles.h
index e0cc8458..342739e7 100644
--- a/juk/mediafiles.h
+++ b/juk/mediafiles.h
@@ -26,53 +26,53 @@ namespace MediaFiles
/**
* Creates a JuK specific KFileDialog with the specified parent.
*/
- QStringList openDialog(QWidget *parent = 0);
+ TQStringList openDialog(TQWidget *parent = 0);
/**
* Creates a JuK specific KFileDialog for saving a playlist with the name
* playlistName and the specified parent and returns the file name.
*/
- QString savePlaylistDialog(const QString &playlistName, QWidget *parent = 0);
+ TQString savePlaylistDialog(const TQString &playlistName, TQWidget *parent = 0);
/**
* Returns true if fileName is a supported media file.
*/
- bool isMediaFile(const QString &fileName);
+ bool isMediaFile(const TQString &fileName);
/**
* Returns true if fileName is a supported playlist file.
*/
- bool isPlaylistFile(const QString &fileName);
+ bool isPlaylistFile(const TQString &fileName);
/**
* Returns true if fileName is a mp3 file.
*/
- bool isMP3(const QString &fileName);
+ bool isMP3(const TQString &fileName);
/**
* Returns true if fileName is a mpc (aka musepack) file.
*/
- bool isMPC(const QString &fileName);
+ bool isMPC(const TQString &fileName);
/**
* Returns true if fileName is an Ogg file.
*/
- bool isOgg(const QString &fileName);
+ bool isOgg(const TQString &fileName);
/**
* Returns true if fileName is a FLAC file.
*/
- bool isFLAC(const QString &fileName);
+ bool isFLAC(const TQString &fileName);
/**
* Returns true if fileName is an Ogg/Vorbis file.
*/
- bool isVorbis(const QString &fileName);
+ bool isVorbis(const TQString &fileName);
/**
* Returns true if fileName is an Ogg/FLAC file.
*/
- bool isOggFLAC(const QString &fileName);
+ bool isOggFLAC(const TQString &fileName);
/**
* Returns a list of absolute local filenames, mapped from \p urlList.
@@ -83,7 +83,7 @@ namespace MediaFiles
* @param w KIO may need the widget to handle user interaction.
* @return list of all local files in urlList, converted to absolute paths.
*/
- QStringList convertURLsToLocal(const QStringList &urlList, QWidget *w = 0);
+ TQStringList convertURLsToLocal(const TQStringList &urlList, TQWidget *w = 0);
}
#endif
diff --git a/juk/musicbrainzquery.cpp b/juk/musicbrainzquery.cpp
index 84bb38d7..577e240f 100644
--- a/juk/musicbrainzquery.cpp
+++ b/juk/musicbrainzquery.cpp
@@ -28,7 +28,7 @@
#include <klocale.h>
#include <kdebug.h>
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
MusicBrainzLookup::MusicBrainzLookup(const FileHandle &file) :
KTRMLookup(file.absFilePath()),
@@ -65,10 +65,10 @@ void MusicBrainzLookup::error()
delete this;
}
-void MusicBrainzLookup::message(const QString &s) const
+void MusicBrainzLookup::message(const TQString &s) const
{
KMainWindow *w = static_cast<KMainWindow *>(kapp->mainWidget());
- w->statusBar()->message(QString("%1 (%2)").arg(s).arg(m_file.fileInfo().fileName()), 3000);
+ w->statusBar()->message(TQString("%1 (%2)").arg(s).arg(m_file.fileInfo().fileName()), 3000);
}
void MusicBrainzLookup::confirmation()
@@ -76,7 +76,7 @@ void MusicBrainzLookup::confirmation()
// Here we do a bit of queuing to make sure that we don't pop up multiple
// instances of the confirmation dialog at once.
- static QValueList< QPair<FileHandle, KTRMResultList> > queue;
+ static TQValueList< QPair<FileHandle, KTRMResultList> > queue;
if(results().isEmpty())
return;
@@ -94,7 +94,7 @@ void MusicBrainzLookup::confirmation()
KTRMResultList results = item.second;
TrackPickerDialog dialog(file.fileInfo().fileName(), results);
- if(dialog.exec() == QDialog::Accepted && !dialog.result().isEmpty()) {
+ if(dialog.exec() == TQDialog::Accepted && !dialog.result().isEmpty()) {
KTRMResult result = dialog.result();
Tag *tag = TagTransactionManager::duplicateTag(file.tag());
diff --git a/juk/musicbrainzquery.h b/juk/musicbrainzquery.h
index 6bf51278..d88b166f 100644
--- a/juk/musicbrainzquery.h
+++ b/juk/musicbrainzquery.h
@@ -33,7 +33,7 @@ public:
virtual void error();
private:
- void message(const QString &s) const;
+ void message(const TQString &s) const;
void confirmation();
FileHandle m_file;
diff --git a/juk/nowplaying.cpp b/juk/nowplaying.cpp
index 2336faac..4256ecff 100644
--- a/juk/nowplaying.cpp
+++ b/juk/nowplaying.cpp
@@ -19,13 +19,13 @@
#include <kurldrag.h>
#include <kio/netaccess.h>
-#include <qimage.h>
-#include <qlayout.h>
-#include <qevent.h>
-#include <qdragobject.h>
-#include <qimage.h>
-#include <qtimer.h>
-#include <qpoint.h>
+#include <tqimage.h>
+#include <tqlayout.h>
+#include <tqevent.h>
+#include <tqdragobject.h>
+#include <tqimage.h>
+#include <tqtimer.h>
+#include <tqpoint.h>
#include "nowplaying.h"
#include "playlistcollection.h"
@@ -41,15 +41,15 @@ static const int imageSize = 64;
struct Line : public QFrame
{
- Line(QWidget *parent) : QFrame(parent) { setFrameShape(VLine); }
+ Line(TQWidget *parent) : TQFrame(parent) { setFrameShape(VLine); }
};
////////////////////////////////////////////////////////////////////////////////
// NowPlaying
////////////////////////////////////////////////////////////////////////////////
-NowPlaying::NowPlaying(QWidget *parent, PlaylistCollection *collection, const char *name) :
- QHBox(parent, name),
+NowPlaying::NowPlaying(TQWidget *parent, PlaylistCollection *collection, const char *name) :
+ TQHBox(parent, name),
m_observer(this, collection),
m_collection(collection)
{
@@ -67,8 +67,8 @@ NowPlaying::NowPlaying(QWidget *parent, PlaylistCollection *collection, const ch
setStretchFactor(new Line(this), 0);
setStretchFactor(new HistoryItem(this), 1);
- connect(PlayerManager::instance(), SIGNAL(signalPlay()), this, SLOT(slotUpdate()));
- connect(PlayerManager::instance(), SIGNAL(signalStop()), this, SLOT(slotUpdate()));
+ connect(PlayerManager::instance(), TQT_SIGNAL(signalPlay()), this, TQT_SLOT(slotUpdate()));
+ connect(PlayerManager::instance(), TQT_SIGNAL(signalStop()), this, TQT_SLOT(slotUpdate()));
hide();
}
@@ -94,7 +94,7 @@ void NowPlaying::slotUpdate()
else
show();
- for(QValueList<NowPlayingItem *>::Iterator it = m_items.begin();
+ for(TQValueList<NowPlayingItem *>::Iterator it = m_items.begin();
it != m_items.end(); ++it)
{
(*it)->update(file);
@@ -106,7 +106,7 @@ void NowPlaying::slotUpdate()
////////////////////////////////////////////////////////////////////////////////
CoverItem::CoverItem(NowPlaying *parent) :
- QLabel(parent, "CoverItem"),
+ TQLabel(parent, "CoverItem"),
NowPlayingItem(parent)
{
setFixedHeight(parent->height() - parent->layout()->margin() * 2);
@@ -122,14 +122,14 @@ void CoverItem::update(const FileHandle &file)
if(file.coverInfo()->hasCover()) {
show();
- QImage image = file.coverInfo()->pixmap(CoverInfo::Thumbnail).convertToImage();
- setPixmap(image.smoothScale(imageSize, imageSize, QImage::ScaleMin));
+ TQImage image = file.coverInfo()->pixmap(CoverInfo::Thumbnail).convertToImage();
+ setPixmap(image.smoothScale(imageSize, imageSize, TQImage::ScaleMin));
}
else
hide();
}
-void CoverItem::mouseReleaseEvent(QMouseEvent *event)
+void CoverItem::mouseReleaseEvent(TQMouseEvent *event)
{
if(m_dragging) {
m_dragging = false;
@@ -144,21 +144,21 @@ void CoverItem::mouseReleaseEvent(QMouseEvent *event)
m_file.coverInfo()->popup();
}
- QLabel::mousePressEvent(event);
+ TQLabel::mousePressEvent(event);
}
-void CoverItem::mousePressEvent(QMouseEvent *e)
+void CoverItem::mousePressEvent(TQMouseEvent *e)
{
m_dragging = false;
m_dragStart = e->globalPos();
}
-void CoverItem::mouseMoveEvent(QMouseEvent *e)
+void CoverItem::mouseMoveEvent(TQMouseEvent *e)
{
if(m_dragging)
return;
- QPoint diff = m_dragStart - e->globalPos();
+ TQPoint diff = m_dragStart - e->globalPos();
if(QABS(diff.x()) > 1 || QABS(diff.y()) > 1) {
// Start a drag.
@@ -170,21 +170,21 @@ void CoverItem::mouseMoveEvent(QMouseEvent *e)
}
}
-void CoverItem::dragEnterEvent(QDragEnterEvent *e)
+void CoverItem::dragEnterEvent(TQDragEnterEvent *e)
{
- e->accept(QImageDrag::canDecode(e) || KURLDrag::canDecode(e) || CoverDrag::canDecode(e));
+ e->accept(TQImageDrag::canDecode(e) || KURLDrag::canDecode(e) || CoverDrag::canDecode(e));
}
-void CoverItem::dropEvent(QDropEvent *e)
+void CoverItem::dropEvent(TQDropEvent *e)
{
- QImage image;
+ TQImage image;
KURL::List urls;
coverKey key;
if(e->source() == this)
return;
- if(QImageDrag::decode(e, image)) {
+ if(TQImageDrag::decode(e, image)) {
m_file.coverInfo()->setCover(image);
update(m_file);
}
@@ -193,7 +193,7 @@ void CoverItem::dropEvent(QDropEvent *e)
update(m_file);
}
else if(KURLDrag::decode(e, urls)) {
- QString fileName;
+ TQString fileName;
if(KIO::NetAccess::download(urls.front(), fileName, this)) {
if(image.load(fileName)) {
@@ -215,13 +215,13 @@ void CoverItem::dropEvent(QDropEvent *e)
////////////////////////////////////////////////////////////////////////////////
TrackItem::TrackItem(NowPlaying *parent) :
- QWidget(parent, "TrackItem"),
+ TQWidget(parent, "TrackItem"),
NowPlayingItem(parent)
{
setFixedHeight(parent->height() - parent->layout()->margin() * 2);
- setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+ setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed);
- QVBoxLayout *layout = new QVBoxLayout(this);
+ TQVBoxLayout *layout = new TQVBoxLayout(this);
m_label = new LinkLabel(this);
m_label->setLinkUnderline(false);
@@ -230,17 +230,17 @@ TrackItem::TrackItem(NowPlaying *parent) :
layout->addWidget(m_label);
layout->addStretch();
- connect(m_label, SIGNAL(linkClicked(const QString &)), this,
- SLOT(slotOpenLink(const QString &)));
+ connect(m_label, TQT_SIGNAL(linkClicked(const TQString &)), this,
+ TQT_SLOT(slotOpenLink(const TQString &)));
}
void TrackItem::update(const FileHandle &file)
{
m_file = file;
- QTimer::singleShot(0, this, SLOT(slotUpdate()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotUpdate()));
}
-void TrackItem::slotOpenLink(const QString &link)
+void TrackItem::slotOpenLink(const TQString &link)
{
PlaylistCollection *collection = NowPlayingItem::parent()->collection();
@@ -256,21 +256,21 @@ void TrackItem::slotOpenLink(const QString &link)
void TrackItem::slotUpdate()
{
- QString title = QStyleSheet::escape(m_file.tag()->title());
- QString artist = QStyleSheet::escape(m_file.tag()->artist());
- QString album = QStyleSheet::escape(m_file.tag()->album());
- QString separator = (artist.isNull() || album.isNull()) ? QString::null : QString(" - ");
+ TQString title = TQStyleSheet::escape(m_file.tag()->title());
+ TQString artist = TQStyleSheet::escape(m_file.tag()->artist());
+ TQString album = TQStyleSheet::escape(m_file.tag()->album());
+ TQString separator = (artist.isNull() || album.isNull()) ? TQString::null : TQString(" - ");
// This block-o-nastiness makes the font smaller and smaller until it actually fits.
int size = 4;
- QString format =
+ TQString format =
"<font size=\"+%1\"><b>%2</b></font>"
"<br />"
"<font size=\"+%3\"><b><a href=\"artist\">%4</a>%5<a href=\"album\">%6</a></b>";
if(NowPlayingItem::parent()->collection()->showMoreActive())
- format.append(QString(" (<a href=\"clear\">%1</a>)").arg(i18n("back to playlist")));
+ format.append(TQString(" (<a href=\"clear\">%1</a>)").arg(i18n("back to playlist")));
format.append("</font>");
@@ -292,12 +292,12 @@ HistoryItem::HistoryItem(NowPlaying *parent) :
NowPlayingItem(parent)
{
setFixedHeight(parent->height() - parent->layout()->margin() * 2);
- setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
+ setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed);
setLinkUnderline(false);
- setText(QString("<b>%1</b>").arg(i18n("History")));
+ setText(TQString("<b>%1</b>").arg(i18n("History")));
- m_timer = new QTimer(this);
- connect(m_timer, SIGNAL(timeout()), this, SLOT(slotAddPlaying()));
+ m_timer = new TQTimer(this);
+ connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotAddPlaying()));
}
void HistoryItem::update(const FileHandle &file)
@@ -308,15 +308,15 @@ void HistoryItem::update(const FileHandle &file)
if(m_history.count() >= 10)
m_history.remove(m_history.fromLast());
- QString format = "<br /><a href=\"%1\"><font size=\"-1\">%2</font></a>";
- QString current = QString("<b>%1</b>").arg(i18n("History"));
- QString previous;
+ TQString format = "<br /><a href=\"%1\"><font size=\"-1\">%2</font></a>";
+ TQString current = TQString("<b>%1</b>").arg(i18n("History"));
+ TQString previous;
- for(QValueList<Item>::ConstIterator it = m_history.begin();
+ for(TQValueList<Item>::ConstIterator it = m_history.begin();
it != m_history.end(); ++it)
{
previous = current;
- current.append(format.arg((*it).anchor).arg(QStyleSheet::escape((*it).file.tag()->title())));
+ current.append(format.arg((*it).anchor).arg(TQStyleSheet::escape((*it).file.tag()->title())));
setText(current);
if(heightForWidth(width()) > imageSize) {
setText(previous);
@@ -329,9 +329,9 @@ void HistoryItem::update(const FileHandle &file)
m_timer->start(HistoryPlaylist::delay(), true);
}
-void HistoryItem::openLink(const QString &link)
+void HistoryItem::openLink(const TQString &link)
{
- for(QValueList<Item>::ConstIterator it = m_history.begin();
+ for(TQValueList<Item>::ConstIterator it = m_history.begin();
it != m_history.end(); ++it)
{
if((*it).anchor == link) {
diff --git a/juk/nowplaying.h b/juk/nowplaying.h
index 208eabc4..fb12197d 100644
--- a/juk/nowplaying.h
+++ b/juk/nowplaying.h
@@ -18,9 +18,9 @@
#include <kactivelabel.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qguardedptr.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqguardedptr.h>
#include "filehandle.h"
#include "playlist.h"
@@ -42,7 +42,7 @@ class NowPlaying : public QHBox
Q_OBJECT
public:
- NowPlaying(QWidget *parent, PlaylistCollection *collection,
+ NowPlaying(TQWidget *parent, PlaylistCollection *collection,
const char *name = 0);
void addItem(NowPlayingItem *item);
PlaylistCollection *collection() const;
@@ -64,7 +64,7 @@ private:
Observer m_observer;
PlaylistCollection *m_collection;
- QValueList<NowPlayingItem *> m_items;
+ TQValueList<NowPlayingItem *> m_items;
};
/**
@@ -87,24 +87,24 @@ private:
* itself if not.
*/
-class CoverItem : public QLabel, public NowPlayingItem
+class CoverItem : public TQLabel, public NowPlayingItem
{
public:
CoverItem(NowPlaying *parent);
virtual void update(const FileHandle &file);
- virtual void mouseReleaseEvent(QMouseEvent *event);
+ virtual void mouseReleaseEvent(TQMouseEvent *event);
protected:
- virtual void dragEnterEvent(QDragEnterEvent *e);
- virtual void dropEvent(QDropEvent *e);
+ virtual void dragEnterEvent(TQDragEnterEvent *e);
+ virtual void dropEvent(TQDropEvent *e);
- virtual void mousePressEvent(QMouseEvent *e);
- virtual void mouseMoveEvent(QMouseEvent *e);
+ virtual void mousePressEvent(TQMouseEvent *e);
+ virtual void mouseMoveEvent(TQMouseEvent *e);
private:
FileHandle m_file;
bool m_dragging;
- QPoint m_dragStart;
+ TQPoint m_dragStart;
};
/**
@@ -114,8 +114,8 @@ private:
class LinkLabel : public KActiveLabel
{
public:
- LinkLabel(QWidget *parent, const char *name = 0) : KActiveLabel(parent, name) {}
- virtual void openLink(const QString &) {}
+ LinkLabel(TQWidget *parent, const char *name = 0) : KActiveLabel(parent, name) {}
+ virtual void openLink(const TQString &) {}
};
/**
@@ -123,7 +123,7 @@ public:
* album and artist of the currently playing item.
*/
-class TrackItem : public QWidget, public NowPlayingItem
+class TrackItem : public TQWidget, public NowPlayingItem
{
Q_OBJECT
@@ -132,7 +132,7 @@ public:
virtual void update(const FileHandle &file);
private slots:
- void slotOpenLink(const QString &link);
+ void slotOpenLink(const TQString &link);
void slotUpdate();
private:
@@ -151,7 +151,7 @@ class HistoryItem : public LinkLabel, public NowPlayingItem
public:
HistoryItem(NowPlaying *parent);
virtual void update(const FileHandle &file);
- virtual void openLink(const QString &link);
+ virtual void openLink(const TQString &link);
private slots:
void slotAddPlaying();
@@ -160,17 +160,17 @@ private:
struct Item
{
Item() {}
- Item(const QString &a, const FileHandle &f, Playlist *p)
+ Item(const TQString &a, const FileHandle &f, Playlist *p)
: anchor(a), file(f), playlist(p) {}
- QString anchor;
+ TQString anchor;
FileHandle file;
- QGuardedPtr<Playlist> playlist;
+ TQGuardedPtr<Playlist> playlist;
};
- QValueList<Item> m_history;
+ TQValueList<Item> m_history;
LinkLabel *m_label;
- QTimer *m_timer;
+ TQTimer *m_timer;
FileHandle m_file;
};
diff --git a/juk/player.h b/juk/player.h
index a3bd471a..600e3db6 100644
--- a/juk/player.h
+++ b/juk/player.h
@@ -16,7 +16,7 @@
#ifndef PLAYER_H
#define PLAYER_H
-#include <qobject.h>
+#include <tqobject.h>
#include "filehandle.h"
@@ -43,7 +43,7 @@ public:
virtual void seekPosition(int position) = 0;
protected:
- Player() : QObject() {}
+ Player() : TQObject() {}
};
diff --git a/juk/playermanager.cpp b/juk/playermanager.cpp
index 9f784822..19647278 100644
--- a/juk/playermanager.cpp
+++ b/juk/playermanager.cpp
@@ -25,8 +25,8 @@
#include <kdebug.h>
#include <klocale.h>
-#include <qslider.h>
-#include <qtimer.h>
+#include <tqslider.h>
+#include <tqtimer.h>
#include <math.h>
@@ -186,30 +186,30 @@ int PlayerManager::position() const
return player()->position();
}
-QStringList PlayerManager::trackProperties()
+TQStringList PlayerManager::trackProperties()
{
return FileHandle::properties();
}
-QString PlayerManager::trackProperty(const QString &property) const
+TQString PlayerManager::trackProperty(const TQString &property) const
{
if(!playing() && !paused())
- return QString::null;
+ return TQString::null;
return m_file.property(property);
}
-QPixmap PlayerManager::trackCover(const QString &size) const
+TQPixmap PlayerManager::trackCover(const TQString &size) const
{
if(!playing() && !paused())
- return QPixmap();
+ return TQPixmap();
if(size.lower() == "small")
return m_file.coverInfo()->pixmap(CoverInfo::Thumbnail);
if(size.lower() == "large")
return m_file.coverInfo()->pixmap(CoverInfo::FullSize);
- return QPixmap();
+ return TQPixmap();
}
FileHandle PlayerManager::playingFile() const
@@ -217,12 +217,12 @@ FileHandle PlayerManager::playingFile() const
return m_file;
}
-QString PlayerManager::playingString() const
+TQString PlayerManager::playingString() const
{
if(!playing())
- return QString::null;
+ return TQString::null;
- QString str = m_file.tag()->artist() + " - " + m_file.tag()->title();
+ TQString str = m_file.tag()->artist() + " - " + m_file.tag()->title();
if(m_file.tag()->artist().isEmpty())
str = m_file.tag()->title();
@@ -239,11 +239,11 @@ void PlayerManager::setStatusLabel(StatusLabel *label)
m_statusLabel = label;
}
-KSelectAction *PlayerManager::playerSelectAction(QObject *parent) // static
+KSelectAction *PlayerManager::playerSelectAction(TQObject *parent) // static
{
KSelectAction *action = 0;
action = new KSelectAction(i18n("&Output To"), 0, parent, "outputSelect");
- QStringList l;
+ TQStringList l;
#if HAVE_ARTS
l << i18n("aRts");
@@ -317,7 +317,7 @@ void PlayerManager::play(const FileHandle &file)
emit signalPlay();
}
-void PlayerManager::play(const QString &file)
+void PlayerManager::play(const TQString &file)
{
CollectionListItem *item = CollectionList::instance()->lookup(file);
if(item) {
@@ -550,14 +550,14 @@ void PlayerManager::slotPollPlay()
m_noSeek = false;
}
-void PlayerManager::slotSetOutput(const QString &system)
+void PlayerManager::slotSetOutput(const TQString &system)
{
stop();
setOutput(system);
setup();
}
-void PlayerManager::setOutput(const QString &system)
+void PlayerManager::setOutput(const TQString &system)
{
delete m_player;
if(system == i18n("aRts"))
@@ -642,12 +642,12 @@ void PlayerManager::setup()
m_sliderAction = action<SliderAction>("trackPositionAction");
- connect(m_sliderAction, SIGNAL(signalPositionChanged(int)),
- this, SLOT(seekPosition(int)));
- connect(m_sliderAction->trackPositionSlider(), SIGNAL(valueChanged(int)),
- this, SLOT(slotUpdateTime(int)));
- connect(m_sliderAction, SIGNAL(signalVolumeChanged(int)),
- this, SLOT(slotSetVolume(int)));
+ connect(m_sliderAction, TQT_SIGNAL(signalPositionChanged(int)),
+ this, TQT_SLOT(seekPosition(int)));
+ connect(m_sliderAction->trackPositionSlider(), TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(slotUpdateTime(int)));
+ connect(m_sliderAction, TQT_SIGNAL(signalVolumeChanged(int)),
+ this, TQT_SLOT(slotSetVolume(int)));
// Call this method manually to avoid warnings.
@@ -655,7 +655,7 @@ void PlayerManager::setup()
if(outputAction) {
setOutput(static_cast<KSelectAction *>(outputAction)->currentText());
- connect(outputAction, SIGNAL(activated(const QString &)), this, SLOT(slotSetOutput(const QString &)));
+ connect(outputAction, TQT_SIGNAL(activated(const TQString &)), this, TQT_SLOT(slotSetOutput(const TQString &)));
}
else
m_player = createPlayer();
@@ -672,11 +672,11 @@ void PlayerManager::setup()
m_player->setVolume(volume);
- m_timer = new QTimer(this, "play timer");
- connect(m_timer, SIGNAL(timeout()), this, SLOT(slotPollPlay()));
+ m_timer = new TQTimer(this, "play timer");
+ connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotPollPlay()));
}
-QString PlayerManager::randomPlayMode() const
+TQString PlayerManager::randomPlayMode() const
{
if(action<KToggleAction>("randomPlay")->isChecked())
return "Random";
@@ -685,7 +685,7 @@ QString PlayerManager::randomPlayMode() const
return "NoRandom";
}
-void PlayerManager::setRandomPlayMode(const QString &randomMode)
+void PlayerManager::setRandomPlayMode(const TQString &randomMode)
{
if(randomMode.lower() == "random")
action<KToggleAction>("randomPlay")->setChecked(true);
diff --git a/juk/playermanager.h b/juk/playermanager.h
index 7d72d2d6..fecb6995 100644
--- a/juk/playermanager.h
+++ b/juk/playermanager.h
@@ -49,24 +49,24 @@ public:
int currentTime() const;
int position() const;
- QStringList trackProperties();
- QString trackProperty(const QString &property) const;
- QPixmap trackCover(const QString &size) const;
+ TQStringList trackProperties();
+ TQString trackProperty(const TQString &property) const;
+ TQPixmap trackCover(const TQString &size) const;
FileHandle playingFile() const;
- QString playingString() const;
+ TQString playingString() const;
void setPlaylistInterface(PlaylistInterface *interface);
void setStatusLabel(StatusLabel *label);
- QString randomPlayMode() const;
+ TQString randomPlayMode() const;
- static KSelectAction *playerSelectAction(QObject *parent);
+ static KSelectAction *playerSelectAction(TQObject *parent);
public slots:
void play(const FileHandle &file);
- void play(const QString &file);
+ void play(const TQString &file);
void play();
void pause();
void stop();
@@ -83,7 +83,7 @@ public slots:
void volumeDown();
void mute();
- void setRandomPlayMode(const QString &randomMode);
+ void setRandomPlayMode(const TQString &randomMode);
signals:
void signalPlay();
@@ -93,12 +93,12 @@ signals:
private:
Player *player() const;
void setup();
- void setOutput(const QString &);
+ void setOutput(const TQString &);
private slots:
void slotPollPlay();
void slotUpdateTime(int position);
- void slotSetOutput(const QString &);
+ void slotSetOutput(const TQString &);
void slotSetVolume(int volume);
private:
@@ -107,7 +107,7 @@ private:
PlaylistInterface *m_playlistInterface;
StatusLabel *m_statusLabel;
Player *m_player;
- QTimer *m_timer;
+ TQTimer *m_timer;
bool m_noSeek;
bool m_muted;
bool m_setup;
diff --git a/juk/playlist.cpp b/juk/playlist.cpp
index b090dca2..fb218881 100644
--- a/juk/playlist.cpp
+++ b/juk/playlist.cpp
@@ -30,14 +30,14 @@
#include <kio/job.h>
#include <dcopclient.h>
-#include <qheader.h>
-#include <qcursor.h>
-#include <qdir.h>
-#include <qeventloop.h>
-#include <qtooltip.h>
-#include <qwidgetstack.h>
-#include <qfile.h>
-#include <qhbox.h>
+#include <tqheader.h>
+#include <tqcursor.h>
+#include <tqdir.h>
+#include <tqeventloop.h>
+#include <tqtooltip.h>
+#include <tqwidgetstack.h>
+#include <tqfile.h>
+#include <tqhbox.h>
#include <id3v1genres.h>
@@ -83,17 +83,17 @@ static bool manualResize()
class PlaylistToolTip : public QToolTip
{
public:
- PlaylistToolTip(QWidget *parent, Playlist *playlist) :
- QToolTip(parent), m_playlist(playlist) {}
+ PlaylistToolTip(TQWidget *parent, Playlist *playlist) :
+ TQToolTip(parent), m_playlist(playlist) {}
- virtual void maybeTip(const QPoint &p)
+ virtual void maybeTip(const TQPoint &p)
{
PlaylistItem *item = static_cast<PlaylistItem *>(m_playlist->itemAt(p));
if(!item)
return;
- QPoint contentsPosition = m_playlist->viewportToContents(p);
+ TQPoint contentsPosition = m_playlist->viewportToContents(p);
int column = m_playlist->header()->sectionAt(contentsPosition.x());
@@ -102,7 +102,7 @@ public:
(column == m_playlist->columnOffset() + PlaylistItem::CoverColumn &&
item->file().coverInfo()->hasCover()))
{
- QRect r = m_playlist->itemRect(item);
+ TQRect r = m_playlist->itemRect(item);
int headerPosition = m_playlist->header()->sectionPos(column);
r.setLeft(headerPosition);
r.setRight(headerPosition + m_playlist->header()->sectionSize(column));
@@ -110,9 +110,9 @@ public:
if(column == m_playlist->columnOffset() + PlaylistItem::FileNameColumn)
tip(r, item->file().absFilePath());
else if(column == m_playlist->columnOffset() + PlaylistItem::CoverColumn) {
- QMimeSourceFactory *f = QMimeSourceFactory::defaultFactory();
+ TQMimeSourceFactory *f = TQMimeSourceFactory::defaultFactory();
f->setImage("coverThumb",
- QImage(item->file().coverInfo()->pixmap(CoverInfo::Thumbnail).convertToImage()));
+ TQImage(item->file().coverInfo()->pixmap(CoverInfo::Thumbnail).convertToImage()));
tip(r, "<center><img source=\"coverThumb\"/></center>");
}
else
@@ -160,8 +160,8 @@ private:
void writeConfig();
static SharedSettings *m_instance;
- QValueList<int> m_columnOrder;
- QValueVector<bool> m_columnsVisible;
+ TQValueList<int> m_columnOrder;
+ TQValueVector<bool> m_columnsVisible;
KGlobalSettings::Completion m_inlineCompletion;
};
@@ -214,7 +214,7 @@ void Playlist::SharedSettings::apply(Playlist *l) const
int offset = l->columnOffset();
int i = 0;
- for(QValueListConstIterator<int> it = m_columnOrder.begin(); it != m_columnOrder.end(); ++it)
+ for(TQValueListConstIterator<int> it = m_columnOrder.begin(); it != m_columnOrder.end(); ++it)
l->header()->moveSection(i++ + offset, *it + offset);
for(uint i = 0; i < m_columnsVisible.size(); i++) {
@@ -243,7 +243,7 @@ Playlist::SharedSettings::SharedSettings()
// save column order
m_columnOrder = config.readIntListEntry("ColumnOrder");
- QValueList<int> l = config.readIntListEntry("VisibleColumns");
+ TQValueList<int> l = config.readIntListEntry("VisibleColumns");
if(l.isEmpty()) {
@@ -268,7 +268,7 @@ Playlist::SharedSettings::SharedSettings()
m_columnsVisible.resize(l.size(), true);
uint i = 0;
- for(QValueList<int>::Iterator it = l.begin(); it != l.end(); ++it) {
+ for(TQValueList<int>::Iterator it = l.begin(); it != l.end(); ++it) {
if(! bool(*it))
m_columnsVisible[i] = bool(*it);
i++;
@@ -288,7 +288,7 @@ void Playlist::SharedSettings::writeConfig()
KConfigGroup config(KGlobal::config(), "PlaylistShared");
config.writeEntry("ColumnOrder", m_columnOrder);
- QValueList<int> l;
+ TQValueList<int> l;
for(uint i = 0; i < m_columnsVisible.size(); i++)
l.append(int(m_columnsVisible[i]));
@@ -305,11 +305,11 @@ void Playlist::SharedSettings::writeConfig()
////////////////////////////////////////////////////////////////////////////////
PlaylistItemList Playlist::m_history;
-QMap<int, PlaylistItem *> Playlist::m_backMenuItems;
+TQMap<int, PlaylistItem *> Playlist::m_backMenuItems;
int Playlist::m_leftColumn = 0;
-Playlist::Playlist(PlaylistCollection *collection, const QString &name,
- const QString &iconName) :
+Playlist::Playlist(PlaylistCollection *collection, const TQString &name,
+ const TQString &iconName) :
KListView(collection->playlistStack(), name.latin1()),
m_collection(collection),
m_fetcher(new WebImageFetcher(this)),
@@ -333,7 +333,7 @@ Playlist::Playlist(PlaylistCollection *collection, const QString &name,
}
Playlist::Playlist(PlaylistCollection *collection, const PlaylistItemList &items,
- const QString &name, const QString &iconName) :
+ const TQString &name, const TQString &iconName) :
KListView(collection->playlistStack(), name.latin1()),
m_collection(collection),
m_fetcher(new WebImageFetcher(this)),
@@ -357,8 +357,8 @@ Playlist::Playlist(PlaylistCollection *collection, const PlaylistItemList &items
createItems(items);
}
-Playlist::Playlist(PlaylistCollection *collection, const QFileInfo &playlistFile,
- const QString &iconName) :
+Playlist::Playlist(PlaylistCollection *collection, const TQFileInfo &playlistFile,
+ const TQString &iconName) :
KListView(collection->playlistStack()),
m_collection(collection),
m_fetcher(new WebImageFetcher(this)),
@@ -424,10 +424,10 @@ Playlist::~Playlist()
m_collection->removePlaylist(this);
}
-QString Playlist::name() const
+TQString Playlist::name() const
{
if(m_playlistName.isNull())
- return m_fileName.section(QDir::separator(), -1).section('.', 0, -2);
+ return m_fileName.section(TQDir::separator(), -1).section('.', 0, -2);
else
return m_playlistName;
}
@@ -469,7 +469,7 @@ int Playlist::time() const
void Playlist::playFirst()
{
TrackSequenceManager::instance()->setNextItem(static_cast<PlaylistItem *>(
- QListViewItemIterator(const_cast<Playlist *>(this), QListViewItemIterator::Visible).current()));
+ TQListViewItemIterator(const_cast<Playlist *>(this), TQListViewItemIterator::Visible).current()));
action("forward")->activate();
}
@@ -479,7 +479,7 @@ void Playlist::playNextAlbum()
if(!current)
return; // No next album if we're not already playing.
- QString currentAlbum = current->file().tag()->album();
+ TQString currentAlbum = current->file().tag()->album();
current = TrackSequenceManager::instance()->nextItem();
while(current && current->file().tag()->album() == currentAlbum)
@@ -526,7 +526,7 @@ void Playlist::playPrevious()
setPlaying(previous, false);
}
-void Playlist::setName(const QString &n)
+void Playlist::setName(const TQString &n)
{
m_collection->addNameToDict(n);
m_collection->removeNameFromDict(m_playlistName);
@@ -540,16 +540,16 @@ void Playlist::save()
if(m_fileName.isEmpty())
return saveAs();
- QFile file(m_fileName);
+ TQFile file(m_fileName);
if(!file.open(IO_WriteOnly))
return KMessageBox::error(this, i18n("Could not save to file %1.").arg(m_fileName));
- QTextStream stream(&file);
+ TQTextStream stream(&file);
- QStringList fileList = files();
+ TQStringList fileList = files();
- for(QStringList::Iterator it = fileList.begin(); it != fileList.end(); ++it)
+ for(TQStringList::Iterator it = fileList.begin(); it != fileList.end(); ++it)
stream << *it << endl;
file.close();
@@ -603,11 +603,11 @@ PlaylistItem *Playlist::playingItem() // static
return PlaylistItem::playingItems().isEmpty() ? 0 : PlaylistItem::playingItems().front();
}
-QStringList Playlist::files() const
+TQStringList Playlist::files() const
{
- QStringList list;
+ TQStringList list;
- for(QListViewItemIterator it(const_cast<Playlist *>(this)); it.current(); ++it)
+ for(TQListViewItemIterator it(const_cast<Playlist *>(this)); it.current(); ++it)
list.append(static_cast<PlaylistItem *>(*it)->file().absFilePath());
return list;
@@ -615,12 +615,12 @@ QStringList Playlist::files() const
PlaylistItemList Playlist::items()
{
- return items(QListViewItemIterator::IteratorFlag(0));
+ return items(TQListViewItemIterator::IteratorFlag(0));
}
PlaylistItemList Playlist::visibleItems()
{
- return items(QListViewItemIterator::Visible);
+ return items(TQListViewItemIterator::Visible);
}
PlaylistItemList Playlist::selectedItems()
@@ -634,8 +634,8 @@ PlaylistItemList Playlist::selectedItems()
// list.append(m_lastSelected);
// break;
default:
- list = items(QListViewItemIterator::IteratorFlag(QListViewItemIterator::Selected |
- QListViewItemIterator::Visible));
+ list = items(TQListViewItemIterator::IteratorFlag(TQListViewItemIterator::Selected |
+ TQListViewItemIterator::Visible));
break;
}
@@ -707,7 +707,7 @@ void Playlist::synchronizePlayingItems(const PlaylistList &sources, bool setMast
for(PlaylistList::ConstIterator it = sources.begin(); it != sources.end(); ++it) {
if((*it)->playing()) {
CollectionListItem *base = playingItem()->collectionItem();
- for(QListViewItemIterator itemIt(this); itemIt.current(); ++itemIt) {
+ for(TQListViewItemIterator itemIt(this); itemIt.current(); ++itemIt) {
PlaylistItem *item = static_cast<PlaylistItem *>(itemIt.current());
if(base == item->collectionItem()) {
item->setPlaying(true, setMaster);
@@ -800,7 +800,7 @@ void Playlist::slotRemoveCover()
return;
int button = KMessageBox::warningContinueCancel(this,
i18n("Are you sure you want to delete these covers?"),
- QString::null,
+ TQString::null,
i18n("&Delete Covers"));
if(button == KMessageBox::Continue)
refreshAlbums(items);
@@ -845,12 +845,12 @@ void Playlist::slotAddCover(bool retrieveLocal)
return;
}
- QPixmap newCover;
+ TQPixmap newCover;
if(retrieveLocal) {
KURL file = KFileDialog::getImageOpenURL(
":homedir", this, i18n("Select Cover Image File"));
- newCover = QPixmap(file.directory() + "/" + file.fileName());
+ newCover = TQPixmap(file.directory() + "/" + file.fileName());
}
else {
m_fetcher->setFile((*items.begin())->file());
@@ -861,8 +861,8 @@ void Playlist::slotAddCover(bool retrieveLocal)
if(newCover.isNull())
return;
- QString artist = items.front()->file().tag()->artist();
- QString album = items.front()->file().tag()->album();
+ TQString artist = items.front()->file().tag()->artist();
+ TQString album = items.front()->file().tag()->album();
coverKey newId = CoverManager::addCover(newCover, artist, album);
refreshAlbums(items, newId);
@@ -903,7 +903,7 @@ void Playlist::slotGuessTagInfo(TagGuesser::Type type)
void Playlist::slotReload()
{
- QFileInfo fileInfo(m_fileName);
+ TQFileInfo fileInfo(m_fileName);
if(!fileInfo.exists() || !fileInfo.isFile() || !fileInfo.isReadable())
return;
@@ -975,7 +975,7 @@ void Playlist::removeFromDisk(const PlaylistItemList &items)
{
if(isVisible() && !items.isEmpty()) {
- QStringList files;
+ TQStringList files;
for(PlaylistItemList::ConstIterator it = items.begin(); it != items.end(); ++it)
files.append((*it)->file().absFilePath());
@@ -985,15 +985,15 @@ void Playlist::removeFromDisk(const PlaylistItemList &items)
if(dialog.confirmDeleteList(files)) {
bool shouldDelete = dialog.shouldDelete();
- QStringList errorFiles;
+ TQStringList errorFiles;
for(PlaylistItemList::ConstIterator it = items.begin(); it != items.end(); ++it) {
if(playingItem() == *it)
action("forward")->activate();
- QString removePath = (*it)->file().absFilePath();
+ TQString removePath = (*it)->file().absFilePath();
if((!shouldDelete && KIO::NetAccess::synchronousRun(KIO::trash(removePath), this)) ||
- (shouldDelete && QFile::remove(removePath)))
+ (shouldDelete && TQFile::remove(removePath)))
{
CollectionList::instance()->clearItem((*it)->collectionItem());
}
@@ -1002,7 +1002,7 @@ void Playlist::removeFromDisk(const PlaylistItemList &items)
}
if(!errorFiles.isEmpty()) {
- QString errorMsg = shouldDelete ?
+ TQString errorMsg = shouldDelete ?
i18n("Could not delete these files") :
i18n("Could not move these files to the Trash");
KMessageBox::errorList(this, errorMsg, errorFiles);
@@ -1015,7 +1015,7 @@ void Playlist::removeFromDisk(const PlaylistItemList &items)
}
}
-QDragObject *Playlist::dragObject(QWidget *parent)
+TQDragObject *Playlist::dragObject(TQWidget *parent)
{
PlaylistItemList items = selectedItems();
KURL::List urls;
@@ -1031,7 +1031,7 @@ QDragObject *Playlist::dragObject(QWidget *parent)
return drag;
}
-void Playlist::contentsDragEnterEvent(QDragEnterEvent *e)
+void Playlist::contentsDragEnterEvent(TQDragEnterEvent *e)
{
KListView::contentsDragEnterEvent(e);
@@ -1056,12 +1056,12 @@ void Playlist::contentsDragEnterEvent(QDragEnterEvent *e)
return;
}
-bool Playlist::acceptDrag(QDropEvent *e) const
+bool Playlist::acceptDrag(TQDropEvent *e) const
{
return CoverDrag::canDecode(e) || KURLDrag::canDecode(e);
}
-bool Playlist::canDecode(QMimeSource *s)
+bool Playlist::canDecode(TQMimeSource *s)
{
KURL::List urls;
@@ -1071,7 +1071,7 @@ bool Playlist::canDecode(QMimeSource *s)
return KURLDrag::decode(s, urls) && !urls.isEmpty();
}
-void Playlist::decode(QMimeSource *s, PlaylistItem *item)
+void Playlist::decode(TQMimeSource *s, PlaylistItem *item)
{
KURL::List urls;
@@ -1082,7 +1082,7 @@ void Playlist::decode(QMimeSource *s, PlaylistItem *item)
if(!MediaFiles::isMediaFile(urls.front().path())) {
- QString file;
+ TQString file;
if(urls.front().isLocalFile())
file = urls.front().path();
@@ -1092,7 +1092,7 @@ void Playlist::decode(QMimeSource *s, PlaylistItem *item)
KMimeType::Ptr mimeType = KMimeType::findByPath(file);
if(item && mimeType->name().startsWith("image/")) {
- item->file().coverInfo()->setCover(QImage(file));
+ item->file().coverInfo()->setCover(TQImage(file));
refreshAlbum(item->file().tag()->artist(),
item->file().tag()->album());
}
@@ -1100,7 +1100,7 @@ void Playlist::decode(QMimeSource *s, PlaylistItem *item)
KIO::NetAccess::removeTempFile(file);
}
- QStringList fileList;
+ TQStringList fileList;
for(KURL::List::Iterator it = urls.begin(); it != urls.end(); ++it)
fileList += MediaFiles::convertURLsToLocal((*it).path(), this);
@@ -1108,13 +1108,13 @@ void Playlist::decode(QMimeSource *s, PlaylistItem *item)
addFiles(fileList, item);
}
-bool Playlist::eventFilter(QObject *watched, QEvent *e)
+bool Playlist::eventFilter(TQObject *watched, TQEvent *e)
{
if(watched == header()) {
switch(e->type()) {
- case QEvent::MouseMove:
+ case TQEvent::MouseMove:
{
- if((static_cast<QMouseEvent *>(e)->state() & LeftButton) == LeftButton &&
+ if((static_cast<TQMouseEvent *>(e)->state() & LeftButton) == LeftButton &&
!action<KToggleAction>("resizeColumnsManually")->isChecked())
{
m_columnWidthModeChanged = true;
@@ -1125,14 +1125,14 @@ bool Playlist::eventFilter(QObject *watched, QEvent *e)
break;
}
- case QEvent::MouseButtonPress:
+ case TQEvent::MouseButtonPress:
{
- if(static_cast<QMouseEvent *>(e)->button() == RightButton)
- m_headerMenu->popup(QCursor::pos());
+ if(static_cast<TQMouseEvent *>(e)->button() == RightButton)
+ m_headerMenu->popup(TQCursor::pos());
break;
}
- case QEvent::MouseButtonRelease:
+ case TQEvent::MouseButtonRelease:
{
if(m_columnWidthModeChanged) {
m_columnWidthModeChanged = false;
@@ -1140,7 +1140,7 @@ bool Playlist::eventFilter(QObject *watched, QEvent *e)
}
if(!manualResize() && m_widthsDirty)
- QTimer::singleShot(0, this, SLOT(slotUpdateColumnWidths()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotUpdateColumnWidths()));
break;
}
default:
@@ -1151,15 +1151,15 @@ bool Playlist::eventFilter(QObject *watched, QEvent *e)
return KListView::eventFilter(watched, e);
}
-void Playlist::keyPressEvent(QKeyEvent *event)
+void Playlist::keyPressEvent(TQKeyEvent *event)
{
if(event->key() == Key_Up) {
- QListViewItemIterator selected(this, QListViewItemIterator::IteratorFlag(
- QListViewItemIterator::Selected |
- QListViewItemIterator::Visible));
+ TQListViewItemIterator selected(this, TQListViewItemIterator::IteratorFlag(
+ TQListViewItemIterator::Selected |
+ TQListViewItemIterator::Visible));
if(selected.current()) {
- QListViewItemIterator visible(this, QListViewItemIterator::IteratorFlag(
- QListViewItemIterator::Visible));
+ TQListViewItemIterator visible(this, TQListViewItemIterator::IteratorFlag(
+ TQListViewItemIterator::Visible));
if(selected.current() == visible.current())
KApplication::postEvent(parent(), new FocusUpEvent);
}
@@ -1169,9 +1169,9 @@ void Playlist::keyPressEvent(QKeyEvent *event)
KListView::keyPressEvent(event);
}
-void Playlist::contentsDropEvent(QDropEvent *e)
+void Playlist::contentsDropEvent(TQDropEvent *e)
{
- QPoint vp = contentsToViewport(e->pos());
+ TQPoint vp = contentsToViewport(e->pos());
PlaylistItem *item = static_cast<PlaylistItem *>(itemAt(vp));
// First see if we're dropping a cover, if so we can get it out of the
@@ -1215,9 +1215,9 @@ void Playlist::contentsDropEvent(QDropEvent *e)
setSorting(columns() + 1);
- QPtrList<QListViewItem> items = KListView::selectedItems();
+ TQPtrList<TQListViewItem> items = KListView::selectedItems();
- for(QPtrListIterator<QListViewItem> it(items); it.current(); ++it) {
+ for(TQPtrListIterator<TQListViewItem> it(items); it.current(); ++it) {
if(!item) {
// Insert the item at the top of the list. This is a bit ugly,
@@ -1242,7 +1242,7 @@ void Playlist::contentsDropEvent(QDropEvent *e)
KListView::contentsDropEvent(e);
}
-void Playlist::contentsMouseDoubleClickEvent(QMouseEvent *e)
+void Playlist::contentsMouseDoubleClickEvent(TQMouseEvent *e)
{
// Filter out non left button double clicks, that way users don't have the
// weird experience of switching songs from a double right-click.
@@ -1251,7 +1251,7 @@ void Playlist::contentsMouseDoubleClickEvent(QMouseEvent *e)
KListView::contentsMouseDoubleClickEvent(e);
}
-void Playlist::showEvent(QShowEvent *e)
+void Playlist::showEvent(TQShowEvent *e)
{
if(m_applySharedSettings) {
SharedSettings::instance()->apply(this);
@@ -1265,21 +1265,21 @@ void Playlist::applySharedSettings()
m_applySharedSettings = true;
}
-void Playlist::read(QDataStream &s)
+void Playlist::read(TQDataStream &s)
{
- QString buffer;
+ TQString buffer;
s >> m_playlistName
>> m_fileName;
- QStringList files;
+ TQStringList files;
s >> files;
- QListViewItem *after = 0;
+ TQListViewItem *after = 0;
m_blockDataChanged = true;
- for(QStringList::ConstIterator it = files.begin(); it != files.end(); ++it)
+ for(TQStringList::ConstIterator it = files.begin(); it != files.end(); ++it)
after = createItem(FileHandle(*it), after, false);
m_blockDataChanged = false;
@@ -1288,7 +1288,7 @@ void Playlist::read(QDataStream &s)
m_collection->setupPlaylist(this, "midi");
}
-void Playlist::viewportPaintEvent(QPaintEvent *pe)
+void Playlist::viewportPaintEvent(TQPaintEvent *pe)
{
// If there are columns that need to be updated, well, update them.
@@ -1301,7 +1301,7 @@ void Playlist::viewportPaintEvent(QPaintEvent *pe)
KListView::viewportPaintEvent(pe);
}
-void Playlist::viewportResizeEvent(QResizeEvent *re)
+void Playlist::viewportResizeEvent(TQResizeEvent *re)
{
// If the width of the view has changed, manually update the column
// widths.
@@ -1312,10 +1312,10 @@ void Playlist::viewportResizeEvent(QResizeEvent *re)
KListView::viewportResizeEvent(re);
}
-void Playlist::insertItem(QListViewItem *item)
+void Playlist::insertItem(TQListViewItem *item)
{
// Because we're called from the PlaylistItem ctor, item may not be a
- // PlaylistItem yet (it would be QListViewItem when being inserted. But,
+ // PlaylistItem yet (it would be TQListViewItem when being inserted. But,
// it will be a PlaylistItem by the time it matters, but be careful if
// you need to use the PlaylistItem from here.
@@ -1323,7 +1323,7 @@ void Playlist::insertItem(QListViewItem *item)
KListView::insertItem(item);
}
-void Playlist::takeItem(QListViewItem *item)
+void Playlist::takeItem(TQListViewItem *item)
{
// See the warning in Playlist::insertItem.
@@ -1331,14 +1331,14 @@ void Playlist::takeItem(QListViewItem *item)
KListView::takeItem(item);
}
-void Playlist::addColumn(const QString &label)
+void Playlist::addColumn(const TQString &label)
{
slotWeightDirty(columns());
KListView::addColumn(label, 30);
}
PlaylistItem *Playlist::createItem(const FileHandle &file,
- QListViewItem *after, bool emitChanged)
+ TQListViewItem *after, bool emitChanged)
{
return createItem<PlaylistItem, CollectionListItem, CollectionList>(file, after, emitChanged);
}
@@ -1348,7 +1348,7 @@ void Playlist::createItems(const PlaylistItemList &siblings, PlaylistItem *after
createItems<CollectionListItem, PlaylistItem, PlaylistItem>(siblings, after);
}
-void Playlist::addFiles(const QStringList &files, PlaylistItem *after)
+void Playlist::addFiles(const TQStringList &files, PlaylistItem *after)
{
if(!after)
after = static_cast<PlaylistItem *>(lastItem());
@@ -1359,8 +1359,8 @@ void Playlist::addFiles(const QStringList &files, PlaylistItem *after)
FileHandleList queue;
- const QStringList::ConstIterator filesEnd = files.end();
- for(QStringList::ConstIterator it = files.begin(); it != filesEnd; ++it)
+ const TQStringList::ConstIterator filesEnd = files.end();
+ for(TQStringList::ConstIterator it = files.begin(); it != filesEnd; ++it)
addFile(*it, queue, true, &after);
addFileHelper(queue, &after, true);
@@ -1375,12 +1375,12 @@ void Playlist::addFiles(const QStringList &files, PlaylistItem *after)
void Playlist::refreshAlbums(const PlaylistItemList &items, coverKey id)
{
- QValueList< QPair<QString, QString> > albums;
+ TQValueList< QPair<TQString, TQString> > albums;
bool setAlbumCovers = items.count() == 1;
for(PlaylistItemList::ConstIterator it = items.begin(); it != items.end(); ++it) {
- QString artist = (*it)->file().tag()->artist();
- QString album = (*it)->file().tag()->album();
+ TQString artist = (*it)->file().tag()->artist();
+ TQString album = (*it)->file().tag()->album();
if(albums.find(qMakePair(artist, album)) == albums.end())
albums.append(qMakePair(artist, album));
@@ -1390,7 +1390,7 @@ void Playlist::refreshAlbums(const PlaylistItemList &items, coverKey id)
(*it)->file().coverInfo()->applyCoverToWholeAlbum(true);
}
- for(QValueList< QPair<QString, QString> >::ConstIterator it = albums.begin();
+ for(TQValueList< QPair<TQString, TQString> >::ConstIterator it = albums.begin();
it != albums.end(); ++it)
{
refreshAlbum((*it).first, (*it).second);
@@ -1406,7 +1406,7 @@ void Playlist::updatePlaying() const
}
}
-void Playlist::refreshAlbum(const QString &artist, const QString &album)
+void Playlist::refreshAlbum(const TQString &artist, const TQString &album)
{
ColumnList columns;
columns.append(PlaylistItem::ArtistColumn);
@@ -1535,7 +1535,7 @@ void Playlist::polish()
setRenameable(PlaylistItem::YearColumn, true);
setAllColumnsShowFocus(true);
- setSelectionMode(QListView::Extended);
+ setSelectionMode(TQListView::Extended);
setShowSortIndicator(true);
setDropVisualizer(true);
@@ -1559,25 +1559,25 @@ void Playlist::polish()
adjustColumn(i);
}
- connect(m_headerMenu, SIGNAL(activated(int)), this, SLOT(slotToggleColumnVisible(int)));
+ connect(m_headerMenu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotToggleColumnVisible(int)));
- connect(this, SIGNAL(contextMenuRequested(QListViewItem *, const QPoint &, int)),
- this, SLOT(slotShowRMBMenu(QListViewItem *, const QPoint &, int)));
- connect(this, SIGNAL(itemRenamed(QListViewItem *, const QString &, int)),
- this, SLOT(slotInlineEditDone(QListViewItem *, const QString &, int)));
- connect(this, SIGNAL(doubleClicked(QListViewItem *)),
- this, SLOT(slotPlayCurrent()));
- connect(this, SIGNAL(returnPressed(QListViewItem *)),
- this, SLOT(slotPlayCurrent()));
+ connect(this, TQT_SIGNAL(contextMenuRequested(TQListViewItem *, const TQPoint &, int)),
+ this, TQT_SLOT(slotShowRMBMenu(TQListViewItem *, const TQPoint &, int)));
+ connect(this, TQT_SIGNAL(itemRenamed(TQListViewItem *, const TQString &, int)),
+ this, TQT_SLOT(slotInlineEditDone(TQListViewItem *, const TQString &, int)));
+ connect(this, TQT_SIGNAL(doubleClicked(TQListViewItem *)),
+ this, TQT_SLOT(slotPlayCurrent()));
+ connect(this, TQT_SIGNAL(returnPressed(TQListViewItem *)),
+ this, TQT_SLOT(slotPlayCurrent()));
- connect(header(), SIGNAL(sizeChange(int, int, int)),
- this, SLOT(slotColumnSizeChanged(int, int, int)));
+ connect(header(), TQT_SIGNAL(sizeChange(int, int, int)),
+ this, TQT_SLOT(slotColumnSizeChanged(int, int, int)));
- connect(renameLineEdit(), SIGNAL(completionModeChanged(KGlobalSettings::Completion)),
- this, SLOT(slotInlineCompletionModeChanged(KGlobalSettings::Completion)));
+ connect(renameLineEdit(), TQT_SIGNAL(completionModeChanged(KGlobalSettings::Completion)),
+ this, TQT_SLOT(slotInlineCompletionModeChanged(KGlobalSettings::Completion)));
- connect(action("resizeColumnsManually"), SIGNAL(activated()),
- this, SLOT(slotColumnResizeModeChanged()));
+ connect(action("resizeColumnsManually"), TQT_SIGNAL(activated()),
+ this, TQT_SLOT(slotColumnResizeModeChanged()));
if(action<KToggleAction>("resizeColumnsManually")->isChecked())
setHScrollBarMode(Auto);
@@ -1651,24 +1651,24 @@ void Playlist::setup()
{
setItemMargin(3);
- connect(header(), SIGNAL(indexChange(int, int, int)), this, SLOT(slotColumnOrderChanged(int, int, int)));
+ connect(header(), TQT_SIGNAL(indexChange(int, int, int)), this, TQT_SLOT(slotColumnOrderChanged(int, int, int)));
- connect(m_fetcher, SIGNAL(signalCoverChanged(int)), this, SLOT(slotCoverChanged(int)));
+ connect(m_fetcher, TQT_SIGNAL(signalCoverChanged(int)), this, TQT_SLOT(slotCoverChanged(int)));
// Prevent list of selected items from changing while internet search is in
// progress.
- connect(this, SIGNAL(selectionChanged()), m_fetcher, SLOT(abortSearch()));
+ connect(this, TQT_SIGNAL(selectionChanged()), m_fetcher, TQT_SLOT(abortSearch()));
setSorting(1);
}
-void Playlist::loadFile(const QString &fileName, const QFileInfo &fileInfo)
+void Playlist::loadFile(const TQString &fileName, const TQFileInfo &fileInfo)
{
- QFile file(fileName);
+ TQFile file(fileName);
if(!file.open(IO_ReadOnly))
return;
- QTextStream stream(&file);
+ TQTextStream stream(&file);
// Turn off non-explicit sorting.
@@ -1681,12 +1681,12 @@ void Playlist::loadFile(const QString &fileName, const QFileInfo &fileInfo)
m_blockDataChanged = true;
while(!stream.atEnd()) {
- QString itemName = stream.readLine().stripWhiteSpace();
+ TQString itemName = stream.readLine().stripWhiteSpace();
- QFileInfo item(itemName);
+ TQFileInfo item(itemName);
if(item.isRelative())
- item.setFile(QDir::cleanDirPath(fileInfo.dirPath(true) + "/" + itemName));
+ item.setFile(TQDir::cleanDirPath(fileInfo.dirPath(true) + "/" + itemName));
if(item.exists() && item.isFile() && item.isReadable() &&
MediaFiles::isMediaFile(item.fileName()))
@@ -1724,7 +1724,7 @@ void Playlist::setPlaying(PlaylistItem *item, bool addToHistory)
}
TrackSequenceManager::instance()->setCurrent(item);
- QByteArray data;
+ TQByteArray data;
kapp->dcopClient()->emitDCOPSignal("Player", "trackChanged()", data);
if(!item)
@@ -1750,11 +1750,11 @@ int Playlist::leftMostVisibleColumn() const
return header()->mapToSection(i);
}
-PlaylistItemList Playlist::items(QListViewItemIterator::IteratorFlag flags)
+PlaylistItemList Playlist::items(TQListViewItemIterator::IteratorFlag flags)
{
PlaylistItemList list;
- for(QListViewItemIterator it(this, flags); it.current(); ++it)
+ for(TQListViewItemIterator it(this, flags); it.current(); ++it)
list.append(static_cast<PlaylistItem *>(it.current()));
return list;
@@ -1766,12 +1766,12 @@ void Playlist::calculateColumnWeights()
return;
PlaylistItemList l = items();
- QValueListConstIterator<int> columnIt;
+ TQValueListConstIterator<int> columnIt;
- QValueVector<double> averageWidth(columns(), 0);
+ TQValueVector<double> averageWidth(columns(), 0);
double itemCount = l.size();
- QValueVector<int> cachedWidth;
+ TQValueVector<int> cachedWidth;
// Here we're not using a real average, but averaging the squares of the
// column widths and then using the square root of that value. This gives
@@ -1796,7 +1796,7 @@ void Playlist::calculateColumnWeights()
m_weightDirty.clear();
}
-void Playlist::addFile(const QString &file, FileHandleList &files, bool importPlaylists,
+void Playlist::addFile(const TQString &file, FileHandleList &files, bool importPlaylists,
PlaylistItem **after)
{
if(hasItem(file) && !m_allowDuplicates)
@@ -1817,7 +1817,7 @@ void Playlist::addFile(const QString &file, FileHandleList &files, bool importPl
}
- const QFileInfo fileInfo = QDir::cleanDirPath(file);
+ const TQFileInfo fileInfo = TQDir::cleanDirPath(file);
if(!fileInfo.exists())
return;
@@ -1838,10 +1838,10 @@ void Playlist::addFile(const QString &file, FileHandleList &files, bool importPl
if(fileInfo.isDir()) {
- // Resorting to the POSIX API because QDir::listEntries() stats every
+ // Resorting to the POSIX API because TQDir::listEntries() stats every
// file and blocks while it's doing so.
- DIR *dir = ::opendir(QFile::encodeName(fileInfo.filePath()));
+ DIR *dir = ::opendir(TQFile::encodeName(fileInfo.filePath()));
if(dir) {
struct dirent *dirEntry;
@@ -1854,7 +1854,7 @@ void Playlist::addFile(const QString &file, FileHandleList &files, bool importPl
// explicitly asked for, but not those that we find in lower
// directories.
- addFile(fileInfo.filePath() + QDir::separator() + QFile::decodeName(dirEntry->d_name),
+ addFile(fileInfo.filePath() + TQDir::separator() + TQFile::decodeName(dirEntry->d_name),
files, m_collection->importPlaylists(), after);
}
}
@@ -1870,7 +1870,7 @@ void Playlist::addFile(const QString &file, FileHandleList &files, bool importPl
void Playlist::addFileHelper(FileHandleList &files, PlaylistItem **after, bool ignoreTimer)
{
- static QTime time = QTime::currentTime();
+ static TQTime time = TQTime::currentTime();
// Process new items every 10 seconds, when we've loaded 1000 items, or when
// it's been requested in the API.
@@ -1912,13 +1912,13 @@ void Playlist::slotUpdateColumnWidths()
// Make sure that the column weights have been initialized before trying to
// update the columns.
- QValueList<int> visibleColumns;
+ TQValueList<int> visibleColumns;
for(int i = 0; i < columns(); i++) {
if(isColumnVisible(i))
visibleColumns.append(i);
}
- QValueListConstIterator<int> it;
+ TQValueListConstIterator<int> it;
if(count() == 0) {
for(it = visibleColumns.begin(); it != visibleColumns.end(); ++it)
@@ -1933,13 +1933,13 @@ void Playlist::slotUpdateColumnWidths()
// First build a list of minimum widths based on the strings in the listview
// header. We won't let the width of the column go below this width.
- QValueVector<int> minimumWidth(columns(), 0);
+ TQValueVector<int> minimumWidth(columns(), 0);
int minimumWidthTotal = 0;
// Also build a list of either the minimum *or* the fixed width -- whichever is
// greater.
- QValueVector<int> minimumFixedWidth(columns(), 0);
+ TQValueVector<int> minimumFixedWidth(columns(), 0);
int minimumFixedWidthTotal = 0;
for(it = visibleColumns.begin(); it != visibleColumns.end(); ++it) {
@@ -1976,7 +1976,7 @@ void Playlist::slotUpdateColumnWidths()
// Computed a "weighted width" for each visible column. This would be the
// width if we didn't have to handle the cases of minimum and maximum widths.
- QValueVector<int> weightedWidth(columns(), 0);
+ TQValueVector<int> weightedWidth(columns(), 0);
for(it = visibleColumns.begin(); it != visibleColumns.end(); ++it)
weightedWidth[*it] = int(double(m_columnWeights[*it]) / totalWeight * visibleWidth() + 0.5);
@@ -1984,7 +1984,7 @@ void Playlist::slotUpdateColumnWidths()
// minimum width or zero if the minimum width is greater than the weighted
// width.
- QValueVector<int> extraWidth(columns(), 0);
+ TQValueVector<int> extraWidth(columns(), 0);
// This is used as an indicator if we have any columns where the weighted
// width is less than the minimum width. If this is false then we can
@@ -2061,7 +2061,7 @@ void Playlist::slotAddToUpcoming()
m_collection->upcomingPlaylist()->appendItems(selectedItems());
}
-void Playlist::slotShowRMBMenu(QListViewItem *item, const QPoint &point, int column)
+void Playlist::slotShowRMBMenu(TQListViewItem *item, const TQPoint &point, int column)
{
if(!item)
return;
@@ -2076,7 +2076,7 @@ void Playlist::slotShowRMBMenu(QListViewItem *item, const QPoint &point, int col
m_rmbMenu = new KPopupMenu(this);
m_rmbUpcomingID = m_rmbMenu->insertItem(SmallIcon("today"),
- i18n("Add to Play Queue"), this, SLOT(slotAddToUpcoming()));
+ i18n("Add to Play Queue"), this, TQT_SLOT(slotAddToUpcoming()));
m_rmbMenu->insertSeparator();
if(!readOnly()) {
@@ -2090,7 +2090,7 @@ void Playlist::slotShowRMBMenu(QListViewItem *item, const QPoint &point, int col
action("edit_copy")->plug(m_rmbMenu);
m_rmbEditID = m_rmbMenu->insertItem(
- i18n("Edit"), this, SLOT(slotRenameTag()));
+ i18n("Edit"), this, TQT_SLOT(slotRenameTag()));
action("refresh")->plug(m_rmbMenu);
action("removeItem")->plug(m_rmbMenu);
@@ -2105,7 +2105,7 @@ void Playlist::slotShowRMBMenu(QListViewItem *item, const QPoint &point, int col
m_rmbMenu->insertSeparator();
m_rmbMenu->insertItem(
- SmallIcon("folder_new"), i18n("Create Playlist From Selected Items..."), this, SLOT(slotCreateGroup()));
+ SmallIcon("folder_new"), i18n("Create Playlist From Selected Items..."), this, TQT_SLOT(slotCreateGroup()));
K3bExporter *exporter = new K3bExporter(this);
KAction *k3bAction = exporter->action();
@@ -2165,7 +2165,7 @@ void Playlist::slotRenameTag()
break;
case PlaylistItem::GenreColumn:
{
- QStringList genreList;
+ TQStringList genreList;
TagLib::StringList genres = TagLib::ID3v1::genreList();
for(TagLib::StringList::ConstIterator it = genres.begin(); it != genres.end(); ++it)
genreList.append(TStringToQString((*it)));
@@ -2182,7 +2182,7 @@ void Playlist::slotRenameTag()
rename(currentItem(), m_currentColumn);
}
-bool Playlist::editTag(PlaylistItem *item, const QString &text, int column)
+bool Playlist::editTag(PlaylistItem *item, const TQString &text, int column)
{
Tag *newTag = TagTransactionManager::duplicateTag(item->file().tag());
@@ -2222,9 +2222,9 @@ bool Playlist::editTag(PlaylistItem *item, const QString &text, int column)
return true;
}
-void Playlist::slotInlineEditDone(QListViewItem *, const QString &, int column)
+void Playlist::slotInlineEditDone(TQListViewItem *, const TQString &, int column)
{
- QString text = renameLineEdit()->text();
+ TQString text = renameLineEdit()->text();
bool changed = false;
PlaylistItemList l = selectedItems();
@@ -2239,7 +2239,7 @@ void Playlist::slotInlineEditDone(QListViewItem *, const QString &, int column)
(l.count() > 1 && KMessageBox::warningContinueCancel(
0,
i18n("This will edit multiple files. Are you sure?"),
- QString::null,
+ TQString::null,
i18n("Edit"),
"DontWarnMultipleTags") == KMessageBox::Cancel))
{
@@ -2292,7 +2292,7 @@ void Playlist::slotToggleColumnVisible(int column)
void Playlist::slotCreateGroup()
{
- QString name = m_collection->playlistNameDialog(i18n("Create New Playlist"));
+ TQString name = m_collection->playlistNameDialog(i18n("Create New Playlist"));
if(!name.isEmpty())
new Playlist(m_collection, selectedItems(), name);
@@ -2321,7 +2321,7 @@ void Playlist::slotInlineCompletionModeChanged(KGlobalSettings::Completion mode)
void Playlist::slotPlayCurrent()
{
- QListViewItemIterator it(this, QListViewItemIterator::Selected);
+ TQListViewItemIterator it(this, TQListViewItemIterator::Selected);
PlaylistItem *next = static_cast<PlaylistItem *>(it.current());
TrackSequenceManager::instance()->setNextItem(next);
action("forward")->activate();
@@ -2331,7 +2331,7 @@ void Playlist::slotPlayCurrent()
// helper functions
////////////////////////////////////////////////////////////////////////////////
-QDataStream &operator<<(QDataStream &s, const Playlist &p)
+TQDataStream &operator<<(TQDataStream &s, const Playlist &p)
{
s << p.name();
s << p.fileName();
@@ -2340,7 +2340,7 @@ QDataStream &operator<<(QDataStream &s, const Playlist &p)
return s;
}
-QDataStream &operator>>(QDataStream &s, Playlist &p)
+TQDataStream &operator>>(TQDataStream &s, Playlist &p)
{
p.read(s);
return s;
@@ -2348,7 +2348,7 @@ QDataStream &operator>>(QDataStream &s, Playlist &p)
bool processEvents()
{
- static QTime time = QTime::currentTime();
+ static TQTime time = TQTime::currentTime();
if(time.elapsed() > 100) {
time.restart();
diff --git a/juk/playlist.h b/juk/playlist.h
index 26c11ff9..a221d20e 100644
--- a/juk/playlist.h
+++ b/juk/playlist.h
@@ -21,8 +21,8 @@
#include <kdebug.h>
#include <kglobalsettings.h>
-#include <qvaluevector.h>
-#include <qfileinfo.h>
+#include <tqvaluevector.h>
+#include <tqfileinfo.h>
#include "covermanager.h"
#include "stringhash.h"
@@ -41,7 +41,7 @@ class WebImageFetcher;
class PlaylistToolTip;
class UpcomingPlaylist;
-typedef QValueList<PlaylistItem *> PlaylistItemList;
+typedef TQValueList<PlaylistItem *> PlaylistItemList;
class Playlist : public KListView, public PlaylistInterface
{
@@ -49,12 +49,12 @@ class Playlist : public KListView, public PlaylistInterface
public:
- Playlist(PlaylistCollection *collection, const QString &name = QString::null,
- const QString &iconName = "midi");
+ Playlist(PlaylistCollection *collection, const TQString &name = TQString::null,
+ const TQString &iconName = "midi");
Playlist(PlaylistCollection *collection, const PlaylistItemList &items,
- const QString &name = QString::null, const QString &iconName = "midi");
- Playlist(PlaylistCollection *collection, const QFileInfo &playlistFile,
- const QString &iconName = "midi");
+ const TQString &name = TQString::null, const TQString &iconName = "midi");
+ Playlist(PlaylistCollection *collection, const TQFileInfo &playlistFile,
+ const TQString &iconName = "midi");
/**
* This constructor should generally only be used either by the cache
@@ -68,7 +68,7 @@ public:
// The following group of functions implement the PlaylistInterface API.
- virtual QString name() const;
+ virtual TQString name() const;
virtual FileHandle currentFile() const;
virtual int count() const { return childCount(); }
virtual int time() const;
@@ -129,7 +129,7 @@ public:
/**
* All of the (media) files in the list.
*/
- QStringList files() const;
+ TQStringList files() const;
/**
* Returns a list of all of the items in the playlist.
@@ -162,7 +162,7 @@ public:
* both PlaylistItems and CollectionListItems.
*/
virtual PlaylistItem *createItem(const FileHandle &file,
- QListViewItem *after = 0,
+ TQListViewItem *after = 0,
bool emitChanged = true);
/**
@@ -174,7 +174,7 @@ public:
*/
template <class ItemType, class CollectionItemType, class CollectionListType>
ItemType *createItem(const FileHandle &file,
- QListViewItem *after = 0,
+ TQListViewItem *after = 0,
bool emitChanged = true);
virtual void createItems(const PlaylistItemList &siblings, PlaylistItem *after = 0);
@@ -188,19 +188,19 @@ public:
* items since it has the overhead of checking to see if the file is a playlist
* or directory first.
*/
- virtual void addFiles(const QStringList &files, PlaylistItem *after = 0);
+ virtual void addFiles(const TQStringList &files, PlaylistItem *after = 0);
/**
* Returns the file name associated with this playlist (an m3u file) or
- * QString::null if no such file exists.
+ * TQString::null if no such file exists.
*/
- QString fileName() const { return m_fileName; }
+ TQString fileName() const { return m_fileName; }
/**
* Sets the file name to be associated with this playlist; this file should
* have the "m3u" extension.
*/
- void setFileName(const QString &n) { m_fileName = n; }
+ void setFileName(const TQString &n) { m_fileName = n; }
/**
* Hides column \a c. If \a updateSearch is true then a signal that the
@@ -220,7 +220,7 @@ public:
/**
* This sets a name for the playlist that is \e different from the file name.
*/
- void setName(const QString &n);
+ void setName(const TQString &n);
/**
* Returns the KActionMenu that allows this to be embedded in menus outside
@@ -318,7 +318,7 @@ public:
*/
void applySharedSettings();
- void read(QDataStream &s);
+ void read(TQDataStream &s);
static void setShuttingDown() { m_shuttingDown = true; }
@@ -417,26 +417,26 @@ protected:
// the following are all reimplemented from base classes
- virtual bool eventFilter(QObject *watched, QEvent *e);
- virtual void keyPressEvent(QKeyEvent *e);
- virtual QDragObject *dragObject(QWidget *parent);
- virtual QDragObject *dragObject() { return dragObject(this); }
- virtual bool canDecode(QMimeSource *s);
- virtual void decode(QMimeSource *s, PlaylistItem *item = 0);
- virtual void contentsDropEvent(QDropEvent *e);
- virtual void contentsMouseDoubleClickEvent(QMouseEvent *e);
- virtual void contentsDragEnterEvent(QDragEnterEvent *e);
- virtual void showEvent(QShowEvent *e);
- virtual bool acceptDrag(QDropEvent *e) const;
- virtual void viewportPaintEvent(QPaintEvent *pe);
- virtual void viewportResizeEvent(QResizeEvent *re);
+ virtual bool eventFilter(TQObject *watched, TQEvent *e);
+ virtual void keyPressEvent(TQKeyEvent *e);
+ virtual TQDragObject *dragObject(TQWidget *parent);
+ virtual TQDragObject *dragObject() { return dragObject(this); }
+ virtual bool canDecode(TQMimeSource *s);
+ virtual void decode(TQMimeSource *s, PlaylistItem *item = 0);
+ virtual void contentsDropEvent(TQDropEvent *e);
+ virtual void contentsMouseDoubleClickEvent(TQMouseEvent *e);
+ virtual void contentsDragEnterEvent(TQDragEnterEvent *e);
+ virtual void showEvent(TQShowEvent *e);
+ virtual bool acceptDrag(TQDropEvent *e) const;
+ virtual void viewportPaintEvent(TQPaintEvent *pe);
+ virtual void viewportResizeEvent(TQResizeEvent *re);
- virtual void insertItem(QListViewItem *item);
- virtual void takeItem(QListViewItem *item);
+ virtual void insertItem(TQListViewItem *item);
+ virtual void takeItem(TQListViewItem *item);
- virtual bool hasItem(const QString &file) const { return m_members.contains(file); }
+ virtual bool hasItem(const TQString &file) const { return m_members.contains(file); }
- void addColumn(const QString &label);
+ void addColumn(const TQString &label);
/**
* Here I'm using delayed setup of some things that aren't quite intuitive.
@@ -470,7 +470,7 @@ protected:
* ItemType should be a PlaylistItem subclass.
*/
template <class CollectionItemType, class ItemType, class SiblingType>
- void createItems(const QValueList<SiblingType *> &siblings, ItemType *after = 0);
+ void createItems(const TQValueList<SiblingType *> &siblings, ItemType *after = 0);
protected slots:
void slotPopulateBackMenu() const;
@@ -482,7 +482,7 @@ signals:
* This is connected to the PlaylistBox::Item to let it know when the
* playlist's name has changed.
*/
- void signalNameChanged(const QString &name);
+ void signalNameChanged(const TQString &name);
/**
* This signal is emitted just before a playlist item is removed from the
@@ -513,13 +513,13 @@ private:
* little awkward API-wise, but keeps us from throwing away useful
* information.
*/
- void loadFile(const QString &fileName, const QFileInfo &fileInfo);
+ void loadFile(const TQString &fileName, const TQFileInfo &fileInfo);
/**
* Writes \a text to \a item in \a column. This is used by the inline tag
* editor. Returns false if the tag update failed.
*/
- bool editTag(PlaylistItem *item, const QString &text, int column);
+ bool editTag(PlaylistItem *item, const TQString &text, int column);
/**
* Returns the index of the left most visible column in the playlist.
@@ -536,14 +536,14 @@ private:
* \see visibleItems()
* \see selectedItems()
*/
- PlaylistItemList items(QListViewItemIterator::IteratorFlag flags);
+ PlaylistItemList items(TQListViewItemIterator::IteratorFlag flags);
/**
* Build the column "weights" for the weighted width mode.
*/
void calculateColumnWeights();
- void addFile(const QString &file, FileHandleList &files, bool importPlaylists,
+ void addFile(const TQString &file, FileHandleList &files, bool importPlaylists,
PlaylistItem **after);
void addFileHelper(FileHandleList &files, PlaylistItem **after,
bool ignoreTimer = false);
@@ -555,7 +555,7 @@ private:
*/
void refreshAlbums(const PlaylistItemList &items, coverKey id = CoverManager::NoMatch);
- void refreshAlbum(const QString &artist, const QString &album);
+ void refreshAlbum(const TQString &artist, const TQString &album);
/**
* Returns the number of PlaylistItems in @p items that can be assigned a
@@ -580,9 +580,9 @@ private slots:
/**
* Show the RMB menu. Matches the signature for the signal
- * QListView::contextMenuRequested().
+ * TQListView::contextMenuRequested().
*/
- void slotShowRMBMenu(QListViewItem *item, const QPoint &point, int column);
+ void slotShowRMBMenu(TQListViewItem *item, const TQPoint &point, int column);
/**
* This slot is called when the inline tag editor has completed its editing
@@ -590,7 +590,7 @@ private slots:
*
* \see editTag()
*/
- void slotInlineEditDone(QListViewItem *, const QString &, int column);
+ void slotInlineEditDone(TQListViewItem *, const TQString &, int column);
/**
* This starts the renaming process by displaying a line edit if the mouse is in
@@ -606,7 +606,7 @@ private slots:
/**
* Moves the column \a from to the position \a to. This matches the signature
- * for the signal QHeader::indexChange().
+ * for the signal TQHeader::indexChange().
*/
void slotColumnOrderChanged(int, int from, int to);
@@ -657,7 +657,7 @@ private:
bool m_applySharedSettings;
bool m_columnWidthModeChanged;
- QValueList<int> m_weightDirty;
+ TQValueList<int> m_weightDirty;
bool m_disableColumnWidthUpdates;
mutable int m_time;
@@ -667,8 +667,8 @@ private:
/**
* The average minimum widths of columns to be used in balancing calculations.
*/
- QValueVector<int> m_columnWeights;
- QValueVector<int> m_columnFixedWidths;
+ TQValueVector<int> m_columnWeights;
+ TQValueVector<int> m_columnFixedWidths;
bool m_widthsDirty;
static PlaylistItemList m_history;
@@ -683,14 +683,14 @@ private:
* we can know if something actually changed and as such if we need to save
* the tag.
*/
- QString m_editText;
+ TQString m_editText;
/**
* This is only defined if the playlist name is something other than the
* file name.
*/
- QString m_playlistName;
- QString m_fileName;
+ TQString m_playlistName;
+ TQString m_fileName;
KPopupMenu *m_rmbMenu;
KPopupMenu *m_headerMenu;
@@ -704,7 +704,7 @@ private:
static bool m_visibleChanged;
static bool m_shuttingDown;
static int m_leftColumn;
- static QMap<int, PlaylistItem *> m_backMenuItems;
+ static TQMap<int, PlaylistItem *> m_backMenuItems;
bool m_blockDataChanged;
};
@@ -714,17 +714,17 @@ bool processEvents();
class FocusUpEvent : public QCustomEvent
{
public:
- FocusUpEvent() : QCustomEvent(id) {}
+ FocusUpEvent() : TQCustomEvent(id) {}
static const int id = 999;
};
-QDataStream &operator<<(QDataStream &s, const Playlist &p);
-QDataStream &operator>>(QDataStream &s, Playlist &p);
+TQDataStream &operator<<(TQDataStream &s, const Playlist &p);
+TQDataStream &operator>>(TQDataStream &s, Playlist &p);
// template method implementations
template <class ItemType, class CollectionItemType, class CollectionListType>
-ItemType *Playlist::createItem(const FileHandle &file, QListViewItem *after,
+ItemType *Playlist::createItem(const FileHandle &file, TQListViewItem *after,
bool emitChanged)
{
CollectionItemType *item = CollectionListType::instance()->lookup(file.absFilePath());
@@ -773,12 +773,12 @@ ItemType *Playlist::createItem(SiblingType *sibling, ItemType *after)
}
template <class CollectionItemType, class ItemType, class SiblingType>
-void Playlist::createItems(const QValueList<SiblingType *> &siblings, ItemType *after)
+void Playlist::createItems(const TQValueList<SiblingType *> &siblings, ItemType *after)
{
if(siblings.isEmpty())
return;
- QValueListConstIterator<SiblingType *> it = siblings.begin();
+ TQValueListConstIterator<SiblingType *> it = siblings.begin();
for(; it != siblings.end(); ++it)
after = createItem(*it, after);
diff --git a/juk/playlistbox.cpp b/juk/playlistbox.cpp
index 092342a3..32e874b9 100644
--- a/juk/playlistbox.cpp
+++ b/juk/playlistbox.cpp
@@ -20,9 +20,9 @@
#include <kaction.h>
#include <kdebug.h>
-#include <qheader.h>
-#include <qpainter.h>
-#include <qtimer.h>
+#include <tqheader.h>
+#include <tqpainter.h>
+#include <tqtimer.h>
#include "playlistbox.h"
#include "playlist.h"
@@ -46,7 +46,7 @@ using namespace ActionCollection;
// PlaylistBox public methods
////////////////////////////////////////////////////////////////////////////////
-PlaylistBox::PlaylistBox(QWidget *parent, QWidgetStack *playlistStack,
+PlaylistBox::PlaylistBox(TQWidget *parent, TQWidgetStack *playlistStack,
const char *name) :
KListView(parent, name),
PlaylistCollection(playlistStack),
@@ -98,14 +98,14 @@ PlaylistBox::PlaylistBox(QWidget *parent, QWidgetStack *playlistStack,
m_viewModes.append(new TreeViewMode(this));
// m_viewModes.append(new CoverManagerMode(this));
- QStringList modeNames;
+ TQStringList modeNames;
- for(QValueListIterator<ViewMode *> it = m_viewModes.begin(); it != m_viewModes.end(); ++it)
+ for(TQValueListIterator<ViewMode *> it = m_viewModes.begin(); it != m_viewModes.end(); ++it)
modeNames.append((*it)->name());
viewModeAction->setItems(modeNames);
- QPopupMenu *p = viewModeAction->popupMenu();
+ TQPopupMenu *p = viewModeAction->popupMenu();
p->changeItem(0, SmallIconSet("view_detailed"), modeNames[0]);
p->changeItem(1, SmallIconSet("view_text"), modeNames[1]);
p->changeItem(2, SmallIconSet("view_tree"), modeNames[2]);
@@ -120,43 +120,43 @@ PlaylistBox::PlaylistBox(QWidget *parent, QWidgetStack *playlistStack,
raise(CollectionList::instance());
viewModeAction->plug(m_contextMenu);
- connect(viewModeAction, SIGNAL(activated(int)), this, SLOT(slotSetViewMode(int)));
+ connect(viewModeAction, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotSetViewMode(int)));
- connect(this, SIGNAL(selectionChanged()),
- this, SLOT(slotPlaylistChanged()));
+ connect(this, TQT_SIGNAL(selectionChanged()),
+ this, TQT_SLOT(slotPlaylistChanged()));
- connect(this, SIGNAL(doubleClicked(QListViewItem *)),
- this, SLOT(slotDoubleClicked()));
+ connect(this, TQT_SIGNAL(doubleClicked(TQListViewItem *)),
+ this, TQT_SLOT(slotDoubleClicked()));
- connect(this, SIGNAL(contextMenuRequested(QListViewItem *, const QPoint &, int)),
- this, SLOT(slotShowContextMenu(QListViewItem *, const QPoint &, int)));
+ connect(this, TQT_SIGNAL(contextMenuRequested(TQListViewItem *, const TQPoint &, int)),
+ this, TQT_SLOT(slotShowContextMenu(TQListViewItem *, const TQPoint &, int)));
TagTransactionManager *tagManager = TagTransactionManager::instance();
- connect(tagManager, SIGNAL(signalAboutToModifyTags()), SLOT(slotFreezePlaylists()));
- connect(tagManager, SIGNAL(signalDoneModifyingTags()), SLOT(slotUnfreezePlaylists()));
+ connect(tagManager, TQT_SIGNAL(signalAboutToModifyTags()), TQT_SLOT(slotFreezePlaylists()));
+ connect(tagManager, TQT_SIGNAL(signalDoneModifyingTags()), TQT_SLOT(slotUnfreezePlaylists()));
setupUpcomingPlaylist();
- connect(CollectionList::instance(), SIGNAL(signalNewTag(const QString &, unsigned)),
- this, SLOT(slotAddItem(const QString &, unsigned)));
- connect(CollectionList::instance(), SIGNAL(signalRemovedTag(const QString &, unsigned)),
- this, SLOT(slotRemoveItem(const QString &, unsigned)));
+ connect(CollectionList::instance(), TQT_SIGNAL(signalNewTag(const TQString &, unsigned)),
+ this, TQT_SLOT(slotAddItem(const TQString &, unsigned)));
+ connect(CollectionList::instance(), TQT_SIGNAL(signalRemovedTag(const TQString &, unsigned)),
+ this, TQT_SLOT(slotRemoveItem(const TQString &, unsigned)));
- QTimer::singleShot(0, object(), SLOT(slotScanFolders()));
+ TQTimer::singleShot(0, object(), TQT_SLOT(slotScanFolders()));
enableDirWatch(true);
// Auto-save playlists after 10 minutes
- QTimer::singleShot(600000, this, SLOT(slotSavePlaylists()));
+ TQTimer::singleShot(600000, this, TQT_SLOT(slotSavePlaylists()));
- m_showTimer = new QTimer(this);
- connect(m_showTimer, SIGNAL(timeout()), SLOT(slotShowDropTarget()));
+ m_showTimer = new TQTimer(this);
+ connect(m_showTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotShowDropTarget()));
}
PlaylistBox::~PlaylistBox()
{
PlaylistList l;
CollectionList *collection = CollectionList::instance();
- for(QListViewItem *i = firstChild(); i; i = i->nextSibling()) {
+ for(TQListViewItem *i = firstChild(); i; i = i->nextSibling()) {
Item *item = static_cast<Item *>(i);
if(item->playlist() && item->playlist() != collection)
l.append(item->playlist());
@@ -192,7 +192,7 @@ void PlaylistBox::duplicate()
if(!item || !item->playlist())
return;
- QString name = playlistNameDialog(i18n("Duplicate"), item->text(0));
+ TQString name = playlistNameDialog(i18n("Duplicate"), item->text(0));
if(name.isNull())
return;
@@ -225,15 +225,15 @@ void PlaylistBox::slotUnfreezePlaylists()
setDynamicListsFrozen(false);
}
-void PlaylistBox::setupPlaylist(Playlist *playlist, const QString &iconName)
+void PlaylistBox::setupPlaylist(Playlist *playlist, const TQString &iconName)
{
setupPlaylist(playlist, iconName, 0);
}
-void PlaylistBox::setupPlaylist(Playlist *playlist, const QString &iconName, Item *parentItem)
+void PlaylistBox::setupPlaylist(Playlist *playlist, const TQString &iconName, Item *parentItem)
{
- connect(playlist, SIGNAL(signalPlaylistItemsDropped(Playlist *)),
- SLOT(slotPlaylistItemsDropped(Playlist *)));
+ connect(playlist, TQT_SIGNAL(signalPlaylistItemsDropped(Playlist *)),
+ TQT_SLOT(slotPlaylistItemsDropped(Playlist *)));
PlaylistCollection::setupPlaylist(playlist, iconName);
@@ -274,13 +274,13 @@ void PlaylistBox::remove()
if(items.isEmpty())
return;
- QStringList files;
- QStringList names;
+ TQStringList files;
+ TQStringList names;
for(ItemList::ConstIterator it = items.begin(); it != items.end(); ++it) {
if(*it && (*it)->playlist() &&
!(*it)->playlist()->fileName().isEmpty() &&
- QFileInfo((*it)->playlist()->fileName()).exists())
+ TQFileInfo((*it)->playlist()->fileName()).exists())
{
files.append((*it)->playlist()->fileName());
}
@@ -289,12 +289,12 @@ void PlaylistBox::remove()
if(!files.isEmpty()) {
int remove = KMessageBox::warningYesNoCancelList(
- this, i18n("Do you want to delete these files from the disk as well?"), files, QString::null, KStdGuiItem::del(), i18n("Keep"));
+ this, i18n("Do you want to delete these files from the disk as well?"), files, TQString::null, KStdGuiItem::del(), i18n("Keep"));
if(remove == KMessageBox::Yes) {
- QStringList couldNotDelete;
- for(QStringList::ConstIterator it = files.begin(); it != files.end(); ++it) {
- if(!QFile::remove(*it))
+ TQStringList couldNotDelete;
+ for(TQStringList::ConstIterator it = files.begin(); it != files.end(); ++it) {
+ if(!TQFile::remove(*it))
couldNotDelete.append(*it);
}
@@ -352,7 +352,7 @@ void PlaylistBox::remove()
void PlaylistBox::setDynamicListsFrozen(bool frozen)
{
- for(QValueList<ViewMode *>::Iterator it = m_viewModes.begin();
+ for(TQValueList<ViewMode *>::Iterator it = m_viewModes.begin();
it != m_viewModes.end();
++it)
{
@@ -366,7 +366,7 @@ void PlaylistBox::slotSavePlaylists()
PlaylistList l;
CollectionList *collection = CollectionList::instance();
- for(QListViewItem *i = firstChild(); i; i = i->nextSibling()) {
+ for(TQListViewItem *i = firstChild(); i; i = i->nextSibling()) {
Item *item = static_cast<Item *>(i);
if(item->playlist() && item->playlist() != collection)
l.append(item->playlist());
@@ -375,7 +375,7 @@ void PlaylistBox::slotSavePlaylists()
Cache::savePlaylists(l);
CoverManager::saveCovers();
- QTimer::singleShot(600000, this, SLOT(slotSavePlaylists()));
+ TQTimer::singleShot(600000, this, TQT_SLOT(slotSavePlaylists()));
}
void PlaylistBox::slotShowDropTarget()
@@ -388,19 +388,19 @@ void PlaylistBox::slotShowDropTarget()
raise(m_dropItem->playlist());
}
-void PlaylistBox::slotAddItem(const QString &tag, unsigned column)
+void PlaylistBox::slotAddItem(const TQString &tag, unsigned column)
{
- for(QValueListIterator<ViewMode *> it = m_viewModes.begin(); it != m_viewModes.end(); ++it)
+ for(TQValueListIterator<ViewMode *> it = m_viewModes.begin(); it != m_viewModes.end(); ++it)
(*it)->addItems(tag, column);
}
-void PlaylistBox::slotRemoveItem(const QString &tag, unsigned column)
+void PlaylistBox::slotRemoveItem(const TQString &tag, unsigned column)
{
- for(QValueListIterator<ViewMode *> it = m_viewModes.begin(); it != m_viewModes.end(); ++it)
+ for(TQValueListIterator<ViewMode *> it = m_viewModes.begin(); it != m_viewModes.end(); ++it)
(*it)->removeItem(tag, column);
}
-void PlaylistBox::decode(QMimeSource *s, Item *item)
+void PlaylistBox::decode(TQMimeSource *s, Item *item)
{
if(!s || (item && item->playlist() && item->playlist()->readOnly()))
return;
@@ -408,7 +408,7 @@ void PlaylistBox::decode(QMimeSource *s, Item *item)
KURL::List urls;
if(KURLDrag::decode(s, urls) && !urls.isEmpty()) {
- QStringList files;
+ TQStringList files;
for(KURL::List::Iterator it = urls.begin(); it != urls.end(); ++it)
files.append((*it).path());
@@ -426,7 +426,7 @@ void PlaylistBox::decode(QMimeSource *s, Item *item)
if(item && item->playlist())
item->playlist()->addFiles(files);
else {
- QString name = playlistNameDialog();
+ TQString name = playlistNameDialog();
if(!name.isNull()) {
Playlist *p = new Playlist(this, name);
p->addFiles(files);
@@ -435,7 +435,7 @@ void PlaylistBox::decode(QMimeSource *s, Item *item)
}
}
-void PlaylistBox::contentsDropEvent(QDropEvent *e)
+void PlaylistBox::contentsDropEvent(TQDropEvent *e)
{
m_showTimer->stop();
@@ -449,7 +449,7 @@ void PlaylistBox::contentsDropEvent(QDropEvent *e)
}
}
-void PlaylistBox::contentsDragMoveEvent(QDragMoveEvent *e)
+void PlaylistBox::contentsDragMoveEvent(TQDragMoveEvent *e)
{
// If we can decode the input source, there is a non-null item at the "move"
// position, the playlist for that Item is non-null, is not the
@@ -512,7 +512,7 @@ void PlaylistBox::contentsDragMoveEvent(QDragMoveEvent *e)
}
}
-void PlaylistBox::contentsDragLeaveEvent(QDragLeaveEvent *e)
+void PlaylistBox::contentsDragLeaveEvent(TQDragLeaveEvent *e)
{
if(m_dropItem) {
Item *old = m_dropItem;
@@ -522,14 +522,14 @@ void PlaylistBox::contentsDragLeaveEvent(QDragLeaveEvent *e)
KListView::contentsDragLeaveEvent(e);
}
-void PlaylistBox::contentsMousePressEvent(QMouseEvent *e)
+void PlaylistBox::contentsMousePressEvent(TQMouseEvent *e)
{
if(e->button() == LeftButton)
m_doingMultiSelect = true;
KListView::contentsMousePressEvent(e);
}
-void PlaylistBox::contentsMouseReleaseEvent(QMouseEvent *e)
+void PlaylistBox::contentsMouseReleaseEvent(TQMouseEvent *e)
{
if(e->button() == LeftButton) {
m_doingMultiSelect = false;
@@ -538,14 +538,14 @@ void PlaylistBox::contentsMouseReleaseEvent(QMouseEvent *e)
KListView::contentsMouseReleaseEvent(e);
}
-void PlaylistBox::keyPressEvent(QKeyEvent *e)
+void PlaylistBox::keyPressEvent(TQKeyEvent *e)
{
if((e->key() == Key_Up || e->key() == Key_Down) && e->state() == ShiftButton)
m_doingMultiSelect = true;
KListView::keyPressEvent(e);
}
-void PlaylistBox::keyReleaseEvent(QKeyEvent *e)
+void PlaylistBox::keyReleaseEvent(TQKeyEvent *e)
{
if(m_doingMultiSelect && e->key() == Key_Shift) {
m_doingMultiSelect = false;
@@ -558,14 +558,14 @@ PlaylistBox::ItemList PlaylistBox::selectedItems() const
{
ItemList l;
- for(QListViewItemIterator it(const_cast<PlaylistBox *>(this),
- QListViewItemIterator::Selected); it.current(); ++it)
+ for(TQListViewItemIterator it(const_cast<PlaylistBox *>(this),
+ TQListViewItemIterator::Selected); it.current(); ++it)
l.append(static_cast<Item *>(*it));
return l;
}
-void PlaylistBox::setSingleItem(QListViewItem *item)
+void PlaylistBox::setSingleItem(TQListViewItem *item)
{
setSelectionModeExt(Single);
KListView::setCurrentItem(item);
@@ -644,7 +644,7 @@ void PlaylistBox::slotDoubleClicked()
action("play")->activate();
}
-void PlaylistBox::slotShowContextMenu(QListViewItem *, const QPoint &point, int)
+void PlaylistBox::slotShowContextMenu(TQListViewItem *, const TQPoint &point, int)
{
m_contextMenu->popup(point);
}
@@ -685,15 +685,15 @@ void PlaylistBox::setupUpcomingPlaylist()
PlaylistBox::Item *PlaylistBox::Item::m_collectionItem = 0;
-PlaylistBox::Item::Item(PlaylistBox *listBox, const QString &icon, const QString &text, Playlist *l)
- : QObject(listBox), KListViewItem(listBox, 0, text),
+PlaylistBox::Item::Item(PlaylistBox *listBox, const TQString &icon, const TQString &text, Playlist *l)
+ : TQObject(listBox), KListViewItem(listBox, 0, text),
m_playlist(l), m_text(text), m_iconName(icon), m_sortedFirst(false)
{
init();
}
-PlaylistBox::Item::Item(Item *parent, const QString &icon, const QString &text, Playlist *l)
- : QObject(parent->listView()), KListViewItem(parent, text),
+PlaylistBox::Item::Item(Item *parent, const TQString &icon, const TQString &text, Playlist *l)
+ : TQObject(parent->listView()), KListViewItem(parent, text),
m_playlist(l), m_text(text), m_iconName(icon), m_sortedFirst(false)
{
init();
@@ -704,7 +704,7 @@ PlaylistBox::Item::~Item()
}
-int PlaylistBox::Item::compare(QListViewItem *i, int col, bool) const
+int PlaylistBox::Item::compare(TQListViewItem *i, int col, bool) const
{
Item *otherItem = static_cast<Item *>(i);
PlaylistBox *playlistBox = static_cast<PlaylistBox *>(listView());
@@ -722,13 +722,13 @@ int PlaylistBox::Item::compare(QListViewItem *i, int col, bool) const
return text(col).lower().localeAwareCompare(i->text(col).lower());
}
-void PlaylistBox::Item::paintCell(QPainter *painter, const QColorGroup &colorGroup, int column, int width, int align)
+void PlaylistBox::Item::paintCell(TQPainter *painter, const TQColorGroup &colorGroup, int column, int width, int align)
{
PlaylistBox *playlistBox = static_cast<PlaylistBox *>(listView());
playlistBox->viewMode()->paintCell(this, painter, colorGroup, column, width, align);
}
-void PlaylistBox::Item::setText(int column, const QString &text)
+void PlaylistBox::Item::setText(int column, const TQString &text)
{
m_text = text;
KListViewItem::setText(column, text);
@@ -743,7 +743,7 @@ void PlaylistBox::Item::setup()
// PlaylistBox::Item protected slots
////////////////////////////////////////////////////////////////////////////////
-void PlaylistBox::Item::slotSetName(const QString &name)
+void PlaylistBox::Item::slotSetName(const TQString &name)
{
if(listView()) {
setText(0, name);
@@ -770,11 +770,11 @@ void PlaylistBox::Item::init()
list->addNameToDict(m_text);
if(m_playlist) {
- connect(m_playlist, SIGNAL(signalNameChanged(const QString &)),
- this, SLOT(slotSetName(const QString &)));
- connect(m_playlist, SIGNAL(destroyed()), this, SLOT(deleteLater()));
- connect(m_playlist, SIGNAL(signalEnableDirWatch(bool)),
- list->object(), SLOT(slotEnableDirWatch(bool)));
+ connect(m_playlist, TQT_SIGNAL(signalNameChanged(const TQString &)),
+ this, TQT_SLOT(slotSetName(const TQString &)));
+ connect(m_playlist, TQT_SIGNAL(destroyed()), this, TQT_SLOT(deleteLater()));
+ connect(m_playlist, TQT_SIGNAL(signalEnableDirWatch(bool)),
+ list->object(), TQT_SLOT(slotEnableDirWatch(bool)));
}
if(m_playlist == CollectionList::instance()) {
diff --git a/juk/playlistbox.h b/juk/playlistbox.h
index 412ebb86..482f4771 100644
--- a/juk/playlistbox.h
+++ b/juk/playlistbox.h
@@ -20,7 +20,7 @@
#include <klistview.h>
-#include <qptrdict.h>
+#include <tqptrdict.h>
class Playlist;
class PlaylistItem;
@@ -31,7 +31,7 @@ class SearchPlaylist;
class KPopupMenu;
class KSelectAction;
-typedef QValueList<Playlist *> PlaylistList;
+typedef TQValueList<Playlist *> PlaylistList;
/**
* This is the play list selection box that is by default on the right side of
@@ -44,11 +44,11 @@ class PlaylistBox : public KListView, public PlaylistCollection
public:
class Item;
- typedef QValueList<Item *> ItemList;
+ typedef TQValueList<Item *> ItemList;
friend class Item;
- PlaylistBox(QWidget *parent, QWidgetStack *playlistStack,
+ PlaylistBox(TQWidget *parent, TQWidgetStack *playlistStack,
const char *name = 0);
virtual ~PlaylistBox();
@@ -65,7 +65,7 @@ public:
Item *dropItem() const { return m_dropItem; }
- void setupPlaylist(Playlist *playlist, const QString &iconName, Item *parentItem = 0);
+ void setupPlaylist(Playlist *playlist, const TQString &iconName, Item *parentItem = 0);
public slots:
void paste();
@@ -75,7 +75,7 @@ public slots:
void slotUnfreezePlaylists();
protected:
- virtual void setupPlaylist(Playlist *playlist, const QString &iconName);
+ virtual void setupPlaylist(Playlist *playlist, const TQString &iconName);
virtual void removePlaylist(Playlist *playlist);
signals:
@@ -85,17 +85,17 @@ private:
void readConfig();
void saveConfig();
- virtual void decode(QMimeSource *s, Item *item);
- virtual void contentsDropEvent(QDropEvent *e);
- virtual void contentsDragMoveEvent(QDragMoveEvent *e);
- virtual void contentsDragLeaveEvent(QDragLeaveEvent *e);
- virtual void contentsMousePressEvent(QMouseEvent *e);
- virtual void contentsMouseReleaseEvent(QMouseEvent *e);
- virtual void keyPressEvent(QKeyEvent *e);
- virtual void keyReleaseEvent(QKeyEvent *e);
+ virtual void decode(TQMimeSource *s, Item *item);
+ virtual void contentsDropEvent(TQDropEvent *e);
+ virtual void contentsDragMoveEvent(TQDragMoveEvent *e);
+ virtual void contentsDragLeaveEvent(TQDragLeaveEvent *e);
+ virtual void contentsMousePressEvent(TQMouseEvent *e);
+ virtual void contentsMouseReleaseEvent(TQMouseEvent *e);
+ virtual void keyPressEvent(TQKeyEvent *e);
+ virtual void keyReleaseEvent(TQKeyEvent *e);
- QValueList<Item *> selectedItems() const;
- void setSingleItem(QListViewItem *item);
+ TQValueList<Item *> selectedItems() const;
+ void setSingleItem(TQListViewItem *item);
void setupItem(Item *item);
void setupUpcomingPlaylist();
@@ -104,36 +104,36 @@ private:
private slots:
/**
- * Catches QListBox::currentChanged(QListBoxItem *), does a cast and then re-emits
+ * Catches TQListBox::currentChanged(TQListBoxItem *), does a cast and then re-emits
* the signal as currentChanged(Item *).
*/
void slotPlaylistChanged();
void slotDoubleClicked();
- void slotShowContextMenu(QListViewItem *, const QPoint &point, int);
+ void slotShowContextMenu(TQListViewItem *, const TQPoint &point, int);
void slotSetViewMode(int index);
void slotSavePlaylists();
void slotShowDropTarget();
void slotPlaylistItemsDropped(Playlist *p);
- void slotAddItem(const QString &tag, unsigned column);
- void slotRemoveItem(const QString &tag, unsigned column);
+ void slotAddItem(const TQString &tag, unsigned column);
+ void slotRemoveItem(const TQString &tag, unsigned column);
private:
KPopupMenu *m_contextMenu;
- QPtrDict<Item> m_playlistDict;
+ TQPtrDict<Item> m_playlistDict;
int m_viewModeIndex;
- QValueList<ViewMode *> m_viewModes;
+ TQValueList<ViewMode *> m_viewModes;
KAction *m_k3bAction;
bool m_hasSelection;
bool m_doingMultiSelect;
Item *m_dropItem;
- QTimer *m_showTimer;
+ TQTimer *m_showTimer;
};
-class PlaylistBox::Item : public QObject, public KListViewItem
+class PlaylistBox::Item : public TQObject, public KListViewItem
{
friend class PlaylistBox;
friend class ViewMode;
@@ -142,7 +142,7 @@ class PlaylistBox::Item : public QObject, public KListViewItem
Q_OBJECT
- // moc won't let me create private QObject subclasses and Qt won't let me
+ // moc won't let me create private TQObject subclasses and Qt won't let me
// make the destructor protected, so here's the closest hack that will
// compile.
@@ -150,21 +150,21 @@ public:
virtual ~Item();
protected:
- Item(PlaylistBox *listBox, const QString &icon, const QString &text, Playlist *l = 0);
- Item(Item *parent, const QString &icon, const QString &text, Playlist *l = 0);
+ Item(PlaylistBox *listBox, const TQString &icon, const TQString &text, Playlist *l = 0);
+ Item(Item *parent, const TQString &icon, const TQString &text, Playlist *l = 0);
Playlist *playlist() const { return m_playlist; }
PlaylistBox *listView() const { return static_cast<PlaylistBox *>(KListViewItem::listView()); }
- QString iconName() const { return m_iconName; }
- QString text() const { return m_text; }
+ TQString iconName() const { return m_iconName; }
+ TQString text() const { return m_text; }
void setSortedFirst(bool first = true) { m_sortedFirst = first; }
- virtual int compare(QListViewItem *i, int col, bool) const;
- virtual void paintCell(QPainter *p, const QColorGroup &colorGroup, int column, int width, int align);
- virtual void paintFocus(QPainter *, const QColorGroup &, const QRect &) {}
- virtual void setText(int column, const QString &text);
+ virtual int compare(TQListViewItem *i, int col, bool) const;
+ virtual void paintCell(TQPainter *p, const TQColorGroup &colorGroup, int column, int width, int align);
+ virtual void paintFocus(TQPainter *, const TQColorGroup &, const TQRect &) {}
+ virtual void setText(int column, const TQString &text);
- virtual QString text(int column) const { return KListViewItem::text(column); }
+ virtual TQString text(int column) const { return KListViewItem::text(column); }
virtual void setup();
@@ -173,15 +173,15 @@ protected:
protected slots:
- void slotSetName(const QString &name);
+ void slotSetName(const TQString &name);
private:
// setup() was already taken.
void init();
Playlist *m_playlist;
- QString m_text;
- QString m_iconName;
+ TQString m_text;
+ TQString m_iconName;
bool m_sortedFirst;
static Item *m_collectionItem;
};
diff --git a/juk/playlistcollection.cpp b/juk/playlistcollection.cpp
index 548734c8..2c30c692 100644
--- a/juk/playlistcollection.cpp
+++ b/juk/playlistcollection.cpp
@@ -15,7 +15,7 @@
#include <kurl.h>
#include <config.h>
-#include <qobjectlist.h>
+#include <tqobjectlist.h>
#include <sys/types.h>
#include <dirent.h>
@@ -41,8 +41,8 @@
#include <kmessagebox.h>
#include <kfiledialog.h>
-#include <qwidgetstack.h>
-#include <qhbox.h>
+#include <tqwidgetstack.h>
+#include <tqhbox.h>
#define widget (kapp->mainWidget())
@@ -58,7 +58,7 @@ PlaylistCollection *PlaylistCollection::m_instance = 0;
// public methods
////////////////////////////////////////////////////////////////////////////////
-PlaylistCollection::PlaylistCollection(QWidgetStack *playlistStack) :
+PlaylistCollection::PlaylistCollection(TQWidgetStack *playlistStack) :
m_playlistStack(playlistStack),
m_historyPlaylist(0),
m_upcomingPlaylist(0),
@@ -91,7 +91,7 @@ PlaylistCollection::~PlaylistCollection()
Playlist::setShuttingDown();
}
-QString PlaylistCollection::name() const
+TQString PlaylistCollection::name() const
{
return currentPlaylist()->name();
}
@@ -151,12 +151,12 @@ bool PlaylistCollection::playing() const
return m_playing;
}
-QStringList PlaylistCollection::playlists() const
+TQStringList PlaylistCollection::playlists() const
{
- QStringList l;
+ TQStringList l;
- QObjectList *childList = m_playlistStack->queryList("Playlist");
- QObject *obj;
+ TQObjectList *childList = m_playlistStack->queryList("Playlist");
+ TQObject *obj;
for(obj = childList->first(); obj; obj = childList->next()) {
Playlist *p = static_cast<Playlist *>(obj);
l.append(p->name());
@@ -166,7 +166,7 @@ QStringList PlaylistCollection::playlists() const
return l;
}
-void PlaylistCollection::createPlaylist(const QString &name)
+void PlaylistCollection::createPlaylist(const TQString &name)
{
raise(new Playlist(this, name));
}
@@ -182,7 +182,7 @@ void PlaylistCollection::createDynamicPlaylist(const PlaylistList &playlists)
PlaylistCollection::raise(m_dynamicPlaylist);
}
-void PlaylistCollection::showMore(const QString &artist, const QString &album)
+void PlaylistCollection::showMore(const TQString &artist, const TQString &album)
{
PlaylistList playlists;
@@ -223,20 +223,20 @@ void PlaylistCollection::showMore(const QString &artist, const QString &album)
// so cache the value we want it to have now.
Playlist *belowShowMore = visiblePlaylist();
- PlaylistCollection::setupPlaylist(m_showMorePlaylist, QString::null);
+ PlaylistCollection::setupPlaylist(m_showMorePlaylist, TQString::null);
PlaylistCollection::raise(m_showMorePlaylist);
m_belowShowMorePlaylist = belowShowMore;
}
-void PlaylistCollection::removeTrack(const QString &playlist, const QStringList &files)
+void PlaylistCollection::removeTrack(const TQString &playlist, const TQStringList &files)
{
Playlist *p = playlistByName(playlist);
PlaylistItemList itemList;
if(!p)
return;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for(it = files.begin(); it != files.end(); ++it) {
CollectionListItem *item = CollectionList::instance()->lookup(*it);
@@ -250,50 +250,50 @@ void PlaylistCollection::removeTrack(const QString &playlist, const QStringList
p->clearItems(itemList);
}
-QString PlaylistCollection::playlist() const
+TQString PlaylistCollection::playlist() const
{
- return visiblePlaylist() ? visiblePlaylist()->name() : QString::null;
+ return visiblePlaylist() ? visiblePlaylist()->name() : TQString::null;
}
-QString PlaylistCollection::playingPlaylist() const
+TQString PlaylistCollection::playingPlaylist() const
{
- return currentPlaylist() && m_playing ? currentPlaylist()->name() : QString::null;
+ return currentPlaylist() && m_playing ? currentPlaylist()->name() : TQString::null;
}
-void PlaylistCollection::setPlaylist(const QString &playlist)
+void PlaylistCollection::setPlaylist(const TQString &playlist)
{
Playlist *p = playlistByName(playlist);
if(p)
raise(p);
}
-QStringList PlaylistCollection::playlistTracks(const QString &playlist) const
+TQStringList PlaylistCollection::playlistTracks(const TQString &playlist) const
{
Playlist *p = playlistByName(playlist);
if(p)
return p->files();
- return QStringList();
+ return TQStringList();
}
-QString PlaylistCollection::trackProperty(const QString &file, const QString &property) const
+TQString PlaylistCollection::trackProperty(const TQString &file, const TQString &property) const
{
CollectionList *l = CollectionList::instance();
CollectionListItem *item = l->lookup(file);
- return item ? item->file().property(property) : QString::null;
+ return item ? item->file().property(property) : TQString::null;
}
-QPixmap PlaylistCollection::trackCover(const QString &file, const QString &size) const
+TQPixmap PlaylistCollection::trackCover(const TQString &file, const TQString &size) const
{
if(size.lower() != "small" && size.lower() != "large")
- return QPixmap();
+ return TQPixmap();
CollectionList *l = CollectionList::instance();
CollectionListItem *item = l->lookup(file);
if(!item)
- return QPixmap();
+ return TQPixmap();
if(size.lower() == "small")
return item->file().coverInfo()->pixmap(CoverInfo::Thumbnail);
@@ -301,9 +301,9 @@ QPixmap PlaylistCollection::trackCover(const QString &file, const QString &size)
return item->file().coverInfo()->pixmap(CoverInfo::FullSize);
}
-void PlaylistCollection::open(const QStringList &l)
+void PlaylistCollection::open(const TQStringList &l)
{
- QStringList files = l;
+ TQStringList files = l;
if(files.isEmpty())
files = MediaFiles::openDialog(widget);
@@ -313,14 +313,14 @@ void PlaylistCollection::open(const QStringList &l)
bool justPlaylists = true;
- for(QStringList::ConstIterator it = l.begin(); it != l.end() && justPlaylists; ++it)
+ for(TQStringList::ConstIterator it = l.begin(); it != l.end() && justPlaylists; ++it)
justPlaylists = !MediaFiles::isPlaylistFile(*it);
if(visiblePlaylist() == CollectionList::instance() || justPlaylists ||
KMessageBox::questionYesNo(
widget,
i18n("Do you want to add these items to the current list or to the collection list?"),
- QString::null,
+ TQString::null,
KGuiItem(i18n("Current")),
KGuiItem(i18n("Collection"))) == KMessageBox::No)
{
@@ -332,7 +332,7 @@ void PlaylistCollection::open(const QStringList &l)
dataChanged();
}
-void PlaylistCollection::open(const QString &playlist, const QStringList &files)
+void PlaylistCollection::open(const TQString &playlist, const TQStringList &files)
{
Playlist *p = playlistByName(playlist);
@@ -346,21 +346,21 @@ void PlaylistCollection::addFolder()
DirectoryList l(m_folderList, m_importPlaylists, widget, "directoryList");
DirectoryList::Result result = l.exec();
- if(result.status == QDialog::Accepted) {
+ if(result.status == TQDialog::Accepted) {
m_dirLister.blockSignals(true);
const bool reload = m_importPlaylists != result.addPlaylists;
m_importPlaylists = result.addPlaylists;
- for(QStringList::Iterator it = result.addedDirs.begin();
+ for(TQStringList::Iterator it = result.addedDirs.begin();
it != result.addedDirs.end(); it++)
{
m_dirLister.openURL(*it, true);
m_folderList.append(*it);
}
- for(QStringList::Iterator it = result.removedDirs.begin();
+ for(TQStringList::Iterator it = result.removedDirs.begin();
it != result.removedDirs.end(); it++)
{
m_dirLister.stop(*it);
@@ -380,8 +380,8 @@ void PlaylistCollection::addFolder()
void PlaylistCollection::rename()
{
- QString old = visiblePlaylist()->name();
- QString name = playlistNameDialog(i18n("Rename"), old, false);
+ TQString old = visiblePlaylist()->name();
+ TQString name = playlistNameDialog(i18n("Rename"), old, false);
m_playlistNames.remove(old);
@@ -393,7 +393,7 @@ void PlaylistCollection::rename()
void PlaylistCollection::duplicate()
{
- QString name = playlistNameDialog(i18n("Duplicate"), visiblePlaylist()->name());
+ TQString name = playlistNameDialog(i18n("Duplicate"), visiblePlaylist()->name());
if(name.isNull())
return;
raise(new Playlist(this, visiblePlaylist()->items(), name));
@@ -486,14 +486,14 @@ void PlaylistCollection::scanFolders()
void PlaylistCollection::createPlaylist()
{
- QString name = playlistNameDialog();
+ TQString name = playlistNameDialog();
if(!name.isNull())
raise(new Playlist(this, name));
}
void PlaylistCollection::createSearchPlaylist()
{
- QString name = uniquePlaylistName(i18n("Search Playlist"));
+ TQString name = uniquePlaylistName(i18n("Search Playlist"));
AdvancedSearchDialog::Result r =
AdvancedSearchDialog(name, PlaylistSearch(), widget).exec();
@@ -504,12 +504,12 @@ void PlaylistCollection::createSearchPlaylist()
void PlaylistCollection::createFolderPlaylist()
{
- QString folder = KFileDialog::getExistingDirectory();
+ TQString folder = KFileDialog::getExistingDirectory();
if(folder.isEmpty())
return;
- QString name = uniquePlaylistName(folder.mid(folder.findRev('/') + 1));
+ TQString name = uniquePlaylistName(folder.mid(folder.findRev('/') + 1));
name = playlistNameDialog(i18n("Create Folder Playlist"), name);
if(!name.isNull())
@@ -588,7 +588,7 @@ void PlaylistCollection::setUpcomingPlaylistEnabled(bool enable)
}
}
-QObject *PlaylistCollection::object() const
+TQObject *PlaylistCollection::object() const
{
return m_actionHandler;
}
@@ -635,7 +635,7 @@ void PlaylistCollection::raiseDistraction()
m_belowDistraction = currentPlaylist();
if(!m_distraction) {
- m_distraction = new QHBox(m_playlistStack);
+ m_distraction = new TQHBox(m_playlistStack);
m_playlistStack->addWidget(m_distraction);
}
@@ -657,12 +657,12 @@ void PlaylistCollection::lowerDistraction()
// protected methods
////////////////////////////////////////////////////////////////////////////////
-QWidgetStack *PlaylistCollection::playlistStack() const
+TQWidgetStack *PlaylistCollection::playlistStack() const
{
return m_playlistStack;
}
-void PlaylistCollection::setupPlaylist(Playlist *playlist, const QString &)
+void PlaylistCollection::setupPlaylist(Playlist *playlist, const TQString &)
{
if(!playlist->fileName().isNull())
m_playlistFiles.insert(playlist->fileName());
@@ -670,8 +670,8 @@ void PlaylistCollection::setupPlaylist(Playlist *playlist, const QString &)
if(!playlist->name().isNull())
m_playlistNames.insert(playlist->name());
- QObject::connect(playlist, SIGNAL(selectionChanged()),
- object(), SIGNAL(signalSelectedItemsChanged()));
+ TQObject::connect(playlist, TQT_SIGNAL(selectionChanged()),
+ object(), TQT_SIGNAL(signalSelectedItemsChanged()));
}
bool PlaylistCollection::importPlaylists() const
@@ -679,7 +679,7 @@ bool PlaylistCollection::importPlaylists() const
return m_importPlaylists;
}
-bool PlaylistCollection::containsPlaylistFile(const QString &file) const
+bool PlaylistCollection::containsPlaylistFile(const TQString &file) const
{
return m_playlistFiles.contains(file);
}
@@ -706,36 +706,36 @@ void PlaylistCollection::clearShowMore(bool raisePlaylist)
void PlaylistCollection::enableDirWatch(bool enable)
{
- QObject *collection = CollectionList::instance();
+ TQObject *collection = CollectionList::instance();
m_dirLister.disconnect(object());
if(enable) {
- QObject::connect(&m_dirLister, SIGNAL(newItems(const KFileItemList &)),
- object(), SLOT(slotNewItems(const KFileItemList &)));
- QObject::connect(&m_dirLister, SIGNAL(refreshItems(const KFileItemList &)),
- collection, SLOT(slotRefreshItems(const KFileItemList &)));
- QObject::connect(&m_dirLister, SIGNAL(deleteItem(KFileItem *)),
- collection, SLOT(slotDeleteItem(KFileItem *)));
+ TQObject::connect(&m_dirLister, TQT_SIGNAL(newItems(const KFileItemList &)),
+ object(), TQT_SLOT(slotNewItems(const KFileItemList &)));
+ TQObject::connect(&m_dirLister, TQT_SIGNAL(refreshItems(const KFileItemList &)),
+ collection, TQT_SLOT(slotRefreshItems(const KFileItemList &)));
+ TQObject::connect(&m_dirLister, TQT_SIGNAL(deleteItem(KFileItem *)),
+ collection, TQT_SLOT(slotDeleteItem(KFileItem *)));
}
}
-QString PlaylistCollection::playlistNameDialog(const QString &caption,
- const QString &suggest,
+TQString PlaylistCollection::playlistNameDialog(const TQString &caption,
+ const TQString &suggest,
bool forceUnique) const
{
bool ok;
- QString name = KInputDialog::getText(
+ TQString name = KInputDialog::getText(
caption,
i18n("Please enter a name for this playlist:"),
forceUnique ? uniquePlaylistName(suggest) : suggest,
&ok);
- return ok ? uniquePlaylistName(name) : QString::null;
+ return ok ? uniquePlaylistName(name) : TQString::null;
}
-QString PlaylistCollection::uniquePlaylistName(const QString &suggest) const
+TQString PlaylistCollection::uniquePlaylistName(const TQString &suggest) const
{
if(suggest.isEmpty())
return uniquePlaylistName();
@@ -743,50 +743,50 @@ QString PlaylistCollection::uniquePlaylistName(const QString &suggest) const
if(!m_playlistNames.contains(suggest))
return suggest;
- QString base = suggest;
- base.remove(QRegExp("\\s\\([0-9]+\\)$"));
+ TQString base = suggest;
+ base.remove(TQRegExp("\\s\\([0-9]+\\)$"));
int count = 1;
- QString s = QString("%1 (%2)").arg(base).arg(count);
+ TQString s = TQString("%1 (%2)").arg(base).arg(count);
while(m_playlistNames.contains(s)) {
count++;
- s = QString("%1 (%2)").arg(base).arg(count);
+ s = TQString("%1 (%2)").arg(base).arg(count);
}
return s;
}
-void PlaylistCollection::addNameToDict(const QString &name)
+void PlaylistCollection::addNameToDict(const TQString &name)
{
m_playlistNames.insert(name);
}
-void PlaylistCollection::addFileToDict(const QString &file)
+void PlaylistCollection::addFileToDict(const TQString &file)
{
m_playlistFiles.insert(file);
}
-void PlaylistCollection::removeNameFromDict(const QString &name)
+void PlaylistCollection::removeNameFromDict(const TQString &name)
{
m_playlistNames.remove(name);
}
-void PlaylistCollection::removeFileFromDict(const QString &file)
+void PlaylistCollection::removeFileFromDict(const TQString &file)
{
m_playlistFiles.remove(file);
}
-void PlaylistCollection::dirChanged(const QString &path)
+void PlaylistCollection::dirChanged(const TQString &path)
{
CollectionList::instance()->addFiles(path);
}
-Playlist *PlaylistCollection::playlistByName(const QString &name) const
+Playlist *PlaylistCollection::playlistByName(const TQString &name) const
{
- QObjectList *l = m_playlistStack->queryList("Playlist");
+ TQObjectList *l = m_playlistStack->queryList("Playlist");
Playlist *list = 0;
- QObject *obj;
+ TQObject *obj;
for(obj = l->first(); obj; obj = l->next()) {
Playlist *p = static_cast<Playlist*>(obj);
@@ -816,7 +816,7 @@ void PlaylistCollection::readConfig()
m_importPlaylists = config.readBoolEntry("ImportPlaylists", true);
m_folderList = config.readPathListEntry("DirectoryList");
- for(QStringList::ConstIterator it = m_folderList.begin(); it != m_folderList.end(); ++it)
+ for(TQStringList::ConstIterator it = m_folderList.begin(); it != m_folderList.end(); ++it)
m_dirLister.openURL(*it, true);
}
@@ -833,7 +833,7 @@ void PlaylistCollection::saveConfig()
////////////////////////////////////////////////////////////////////////////////
PlaylistCollection::ActionHandler::ActionHandler(PlaylistCollection *collection) :
- QObject(0, "ActionHandler"),
+ TQObject(0, "ActionHandler"),
m_collection(collection)
{
KActionMenu *menu;
@@ -842,60 +842,60 @@ PlaylistCollection::ActionHandler::ActionHandler(PlaylistCollection *collection)
menu = new KActionMenu(i18n("&New"), "filenew", actions(), "file_new");
- menu->insert(createAction(i18n("&Empty Playlist..."), SLOT(slotCreatePlaylist()),
+ menu->insert(createAction(i18n("&Empty Playlist..."), TQT_SLOT(slotCreatePlaylist()),
"newPlaylist", "window_new", "CTRL+n"));
- menu->insert(createAction(i18n("&Search Playlist..."), SLOT(slotCreateSearchPlaylist()),
+ menu->insert(createAction(i18n("&Search Playlist..."), TQT_SLOT(slotCreateSearchPlaylist()),
"newSearchPlaylist", "find", "CTRL+f"));
- menu->insert(createAction(i18n("Playlist From &Folder..."), SLOT(slotCreateFolderPlaylist()),
+ menu->insert(createAction(i18n("Playlist From &Folder..."), TQT_SLOT(slotCreateFolderPlaylist()),
"newDirectoryPlaylist", "fileopen", "CTRL+d"));
// Guess tag info menu
#if HAVE_MUSICBRAINZ
- menu = new KActionMenu(i18n("&Guess Tag Information"), QString::null, actions(), "guessTag");
+ menu = new KActionMenu(i18n("&Guess Tag Information"), TQString::null, actions(), "guessTag");
menu->setIconSet(SmallIconSet("wizard"));
- menu->insert(createAction(i18n("From &File Name"), SLOT(slotGuessTagFromFile()),
+ menu->insert(createAction(i18n("From &File Name"), TQT_SLOT(slotGuessTagFromFile()),
"guessTagFile", "fileimport", "CTRL+g"));
- menu->insert(createAction(i18n("From &Internet"), SLOT(slotGuessTagFromInternet()),
+ menu->insert(createAction(i18n("From &Internet"), TQT_SLOT(slotGuessTagFromInternet()),
"guessTagInternet", "connect_established", "CTRL+i"));
#else
- createAction(i18n("Guess Tag Information From &File Name"), SLOT(slotGuessTagFromFile()),
+ createAction(i18n("Guess Tag Information From &File Name"), TQT_SLOT(slotGuessTagFromFile()),
"guessTag", "fileimport", "CTRL+f");
#endif
- createAction(i18n("Play First Track"),SLOT(slotPlayFirst()), "playFirst");
- createAction(i18n("Play Next Album"), SLOT(slotPlayNextAlbum()), "forwardAlbum", "next");
+ createAction(i18n("Play First Track"),TQT_SLOT(slotPlayFirst()), "playFirst");
+ createAction(i18n("Play Next Album"), TQT_SLOT(slotPlayNextAlbum()), "forwardAlbum", "next");
- createAction(i18n("Open..."), SLOT(slotOpen()), "file_open", "fileopen", "CTRL+o");
- createAction(i18n("Add &Folder..."), SLOT(slotAddFolder()), "openDirectory", "fileopen");
- createAction(i18n("&Rename..."), SLOT(slotRename()), "renamePlaylist", "lineedit");
- createAction(i18n("D&uplicate..."), SLOT(slotDuplicate()), "duplicatePlaylist", "editcopy");
- createAction(i18n("Save"), SLOT(slotSave()), "file_save", "filesave", "CTRL+s");
- createAction(i18n("Save As..."), SLOT(slotSaveAs()), "file_save_as", "filesaveas");
- createAction(i18n("R&emove"), SLOT(slotRemove()), "deleteItemPlaylist", "edittrash");
- createAction(i18n("Reload"), SLOT(slotReload()), "reloadPlaylist", "reload");
- createAction(i18n("Edit Search..."), SLOT(slotEditSearch()), "editSearch", "editclear");
+ createAction(i18n("Open..."), TQT_SLOT(slotOpen()), "file_open", "fileopen", "CTRL+o");
+ createAction(i18n("Add &Folder..."), TQT_SLOT(slotAddFolder()), "openDirectory", "fileopen");
+ createAction(i18n("&Rename..."), TQT_SLOT(slotRename()), "renamePlaylist", "lineedit");
+ createAction(i18n("D&uplicate..."), TQT_SLOT(slotDuplicate()), "duplicatePlaylist", "editcopy");
+ createAction(i18n("Save"), TQT_SLOT(slotSave()), "file_save", "filesave", "CTRL+s");
+ createAction(i18n("Save As..."), TQT_SLOT(slotSaveAs()), "file_save_as", "filesaveas");
+ createAction(i18n("R&emove"), TQT_SLOT(slotRemove()), "deleteItemPlaylist", "edittrash");
+ createAction(i18n("Reload"), TQT_SLOT(slotReload()), "reloadPlaylist", "reload");
+ createAction(i18n("Edit Search..."), TQT_SLOT(slotEditSearch()), "editSearch", "editclear");
- createAction(i18n("&Delete"), SLOT(slotRemoveItems()), "removeItem", "editdelete");
- createAction(i18n("Refresh"), SLOT(slotRefreshItems()), "refresh", "reload");
- createAction(i18n("&Rename File"), SLOT(slotRenameItems()), "renameFile", "filesaveas", "CTRL+r");
+ createAction(i18n("&Delete"), TQT_SLOT(slotRemoveItems()), "removeItem", "editdelete");
+ createAction(i18n("Refresh"), TQT_SLOT(slotRefreshItems()), "refresh", "reload");
+ createAction(i18n("&Rename File"), TQT_SLOT(slotRenameItems()), "renameFile", "filesaveas", "CTRL+r");
- menu = new KActionMenu(i18n("Cover Manager"), QString::null, actions(), "coverManager");
+ menu = new KActionMenu(i18n("Cover Manager"), TQString::null, actions(), "coverManager");
menu->setIconSet(SmallIconSet("image"));
menu->insert(createAction(i18n("&View Cover"),
- SLOT(slotViewCovers()), "viewCover", "viewmag"));
+ TQT_SLOT(slotViewCovers()), "viewCover", "viewmag"));
menu->insert(createAction(i18n("Get Cover From &File..."),
- SLOT(slotAddLocalCover()), "addCover", "fileimport", "CTRL+SHIFT+f"));
+ TQT_SLOT(slotAddLocalCover()), "addCover", "fileimport", "CTRL+SHIFT+f"));
// Do not rename googleCover for backward compatibility
menu->insert(createAction(i18n("Get Cover From &Internet..."),
- SLOT(slotAddInternetCover()), "googleCover", "connect_established", "CTRL+SHIFT+g"));
+ TQT_SLOT(slotAddInternetCover()), "googleCover", "connect_established", "CTRL+SHIFT+g"));
menu->insert(createAction(i18n("&Delete Cover"),
- SLOT(slotRemoveCovers()), "removeCover", "editdelete"));
+ TQT_SLOT(slotRemoveCovers()), "removeCover", "editdelete"));
menu->insert(createAction(i18n("Show Cover &Manager"),
- SLOT(slotShowCoverManager()), "showCoverManager"));
+ TQT_SLOT(slotShowCoverManager()), "showCoverManager"));
KToggleAction *historyAction =
new KToggleAction(i18n("Show &History"), "history", 0, actions(), "showHistory");
@@ -905,16 +905,16 @@ PlaylistCollection::ActionHandler::ActionHandler(PlaylistCollection *collection)
new KToggleAction(i18n("Show &Play Queue"), "today", 0, actions(), "showUpcoming");
upcomingAction->setCheckedState(i18n("Hide &Play Queue"));
- connect(action<KToggleAction>("showHistory"), SIGNAL(toggled(bool)),
- this, SLOT(slotSetHistoryPlaylistEnabled(bool)));
- connect(action<KToggleAction>("showUpcoming"), SIGNAL(toggled(bool)),
- this, SLOT(slotSetUpcomingPlaylistEnabled(bool)));
+ connect(action<KToggleAction>("showHistory"), TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotSetHistoryPlaylistEnabled(bool)));
+ connect(action<KToggleAction>("showUpcoming"), TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotSetUpcomingPlaylistEnabled(bool)));
}
-KAction *PlaylistCollection::ActionHandler::createAction(const QString &text,
+KAction *PlaylistCollection::ActionHandler::createAction(const TQString &text,
const char *slot,
const char *name,
- const QString &icon,
+ const TQString &icon,
const KShortcut &shortcut)
{
if(icon.isNull())
diff --git a/juk/playlistcollection.h b/juk/playlistcollection.h
index 1ee4dea2..ab35a7dc 100644
--- a/juk/playlistcollection.h
+++ b/juk/playlistcollection.h
@@ -23,7 +23,7 @@
#include <klocale.h>
#include <kdirlister.h>
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
class QWidgetStack;
class KAction;
@@ -34,8 +34,8 @@ class UpcomingPlaylist;
class SearchPlaylist;
class DynamicPlaylist;
-typedef QValueList<Playlist *> PlaylistList;
-typedef QValueList<PlaylistItem *> PlaylistItemList;
+typedef TQValueList<Playlist *> PlaylistList;
+typedef TQValueList<PlaylistItem *> PlaylistItemList;
class PlaylistCollection : public PlaylistInterface, CollectionIface
{
@@ -46,12 +46,12 @@ class PlaylistCollection : public PlaylistInterface, CollectionIface
static PlaylistCollection *m_instance;
public:
- PlaylistCollection(QWidgetStack *playlistStack);
+ PlaylistCollection(TQWidgetStack *playlistStack);
virtual ~PlaylistCollection();
static PlaylistCollection *instance() { return m_instance; }
- virtual QString name() const;
+ virtual TQString name() const;
virtual FileHandle currentFile() const;
virtual int count() const;
virtual int time() const;
@@ -63,22 +63,22 @@ public:
void playFirst();
void playNextAlbum();
- virtual QStringList playlists() const;
- virtual void createPlaylist(const QString &name);
+ virtual TQStringList playlists() const;
+ virtual void createPlaylist(const TQString &name);
virtual void createDynamicPlaylist(const PlaylistList &playlists);
- virtual void showMore(const QString &artist, const QString &album = QString::null);
- virtual void removeTrack(const QString &playlist, const QStringList &files);
+ virtual void showMore(const TQString &artist, const TQString &album = TQString::null);
+ virtual void removeTrack(const TQString &playlist, const TQStringList &files);
- virtual QString playlist() const;
- virtual QString playingPlaylist() const;
- virtual void setPlaylist(const QString &playlist);
+ virtual TQString playlist() const;
+ virtual TQString playingPlaylist() const;
+ virtual void setPlaylist(const TQString &playlist);
- virtual QStringList playlistTracks(const QString &playlist) const;
- virtual QString trackProperty(const QString &file, const QString &property) const;
- virtual QPixmap trackCover(const QString &file, const QString &size = "Small") const;
+ virtual TQStringList playlistTracks(const TQString &playlist) const;
+ virtual TQString trackProperty(const TQString &file, const TQString &property) const;
+ virtual TQPixmap trackCover(const TQString &file, const TQString &size = "Small") const;
- virtual void open(const QStringList &files = QStringList());
- virtual void open(const QString &playlist, const QStringList &files);
+ virtual void open(const TQStringList &files = TQStringList());
+ virtual void open(const TQString &playlist, const TQStringList &files);
virtual void addFolder();
virtual void rename();
virtual void duplicate();
@@ -120,12 +120,12 @@ public:
UpcomingPlaylist *upcomingPlaylist() const;
void setUpcomingPlaylistEnabled(bool enable);
- void dirChanged(const QString &path);
+ void dirChanged(const TQString &path);
/**
* Returns a pointer to the action handler.
*/
- QObject *object() const;
+ TQObject *object() const;
void newItems(const KFileItemList &list) const;
@@ -158,30 +158,30 @@ public:
class ActionHandler;
protected:
- virtual QWidgetStack *playlistStack() const;
- virtual void setupPlaylist(Playlist *playlist, const QString &iconName);
+ virtual TQWidgetStack *playlistStack() const;
+ virtual void setupPlaylist(Playlist *playlist, const TQString &iconName);
virtual void removePlaylist(Playlist *playlist) = 0;
bool importPlaylists() const;
- bool containsPlaylistFile(const QString &file) const;
+ bool containsPlaylistFile(const TQString &file) const;
- QString playlistNameDialog(const QString &caption = i18n("Create New Playlist"),
- const QString &suggest = QString::null,
+ TQString playlistNameDialog(const TQString &caption = i18n("Create New Playlist"),
+ const TQString &suggest = TQString::null,
bool forceUnique = true) const;
- QString uniquePlaylistName(const QString &suggest = i18n("Playlist")) const;
+ TQString uniquePlaylistName(const TQString &suggest = i18n("Playlist")) const;
- void addNameToDict(const QString &name);
- void addFileToDict(const QString &file);
- void removeNameFromDict(const QString &name);
- void removeFileFromDict(const QString &file);
+ void addNameToDict(const TQString &name);
+ void addFileToDict(const TQString &file);
+ void removeNameFromDict(const TQString &name);
+ void removeFileFromDict(const TQString &file);
- Playlist *playlistByName(const QString &name) const;
+ Playlist *playlistByName(const TQString &name) const;
private:
void readConfig();
void saveConfig();
- QWidgetStack *m_playlistStack;
+ TQWidgetStack *m_playlistStack;
HistoryPlaylist *m_historyPlaylist;
UpcomingPlaylist *m_upcomingPlaylist;
ActionHandler *m_actionHandler;
@@ -189,22 +189,22 @@ private:
KDirLister m_dirLister;
StringHash m_playlistNames;
StringHash m_playlistFiles;
- QStringList m_folderList;
+ TQStringList m_folderList;
bool m_importPlaylists;
bool m_searchEnabled;
bool m_playing;
- QGuardedPtr<SearchPlaylist> m_showMorePlaylist;
- QGuardedPtr<Playlist> m_belowShowMorePlaylist;
- QGuardedPtr<DynamicPlaylist> m_dynamicPlaylist;
- QGuardedPtr<Playlist> m_belowDistraction;
+ TQGuardedPtr<SearchPlaylist> m_showMorePlaylist;
+ TQGuardedPtr<Playlist> m_belowShowMorePlaylist;
+ TQGuardedPtr<DynamicPlaylist> m_dynamicPlaylist;
+ TQGuardedPtr<Playlist> m_belowDistraction;
- QWidget *m_distraction;
+ TQWidget *m_distraction;
};
/**
* This class is just used as a proxy to handle the signals coming from action
- * activations without requiring PlaylistCollection to be a QObject.
+ * activations without requiring PlaylistCollection to be a TQObject.
*/
class PlaylistCollection::ActionHandler : public QObject
@@ -214,10 +214,10 @@ public:
ActionHandler(PlaylistCollection *collection);
private:
- KAction *createAction(const QString &text,
+ KAction *createAction(const TQString &text,
const char *slot,
const char *name,
- const QString &icon = QString::null,
+ const TQString &icon = TQString::null,
const KShortcut &shortcut = KShortcut());
private slots:
void slotPlayFirst() { m_collection->playFirst(); }
@@ -255,7 +255,7 @@ private slots:
void slotSetUpcomingPlaylistEnabled(bool enable) { m_collection->setUpcomingPlaylistEnabled(enable); }
void slotShowCoverManager() { m_collection->showCoverManager(); }
void slotEnableDirWatch(bool enable) { m_collection->enableDirWatch(enable); }
- void slotDirChanged(const QString &path) { m_collection->dirChanged(path); }
+ void slotDirChanged(const TQString &path) { m_collection->dirChanged(path); }
void slotNewItems(const KFileItemList &list) { m_collection->newItems(list); }
diff --git a/juk/playlistexporter.h b/juk/playlistexporter.h
index 291648f5..de9f7fff 100644
--- a/juk/playlistexporter.h
+++ b/juk/playlistexporter.h
@@ -31,7 +31,7 @@ class KActionCollection;
class PlaylistExporter : public QObject
{
public:
- PlaylistExporter(QWidget *parent = 0) : QObject(parent) { }
+ PlaylistExporter(TQWidget *parent = 0) : TQObject(parent) { }
virtual ~PlaylistExporter() { }
/**
diff --git a/juk/playlistinterface.cpp b/juk/playlistinterface.cpp
index 9ec550a2..8c4da64a 100644
--- a/juk/playlistinterface.cpp
+++ b/juk/playlistinterface.cpp
@@ -20,7 +20,7 @@
void Watched::currentChanged()
{
- for(QValueList<PlaylistObserver *>::ConstIterator it = m_observers.begin();
+ for(TQValueList<PlaylistObserver *>::ConstIterator it = m_observers.begin();
it != m_observers.end();
++it)
{
@@ -30,7 +30,7 @@ void Watched::currentChanged()
void Watched::dataChanged()
{
- for(QValueList<PlaylistObserver *>::ConstIterator it = m_observers.begin();
+ for(TQValueList<PlaylistObserver *>::ConstIterator it = m_observers.begin();
it != m_observers.end();
++it)
{
@@ -50,7 +50,7 @@ void Watched::removeObserver(PlaylistObserver *observer)
Watched::~Watched()
{
- for(QValueList<PlaylistObserver *>::Iterator it = m_observers.begin();
+ for(TQValueList<PlaylistObserver *>::Iterator it = m_observers.begin();
it != m_observers.end();
++it)
{
diff --git a/juk/playlistinterface.h b/juk/playlistinterface.h
index af7427ce..deaa900f 100644
--- a/juk/playlistinterface.h
+++ b/juk/playlistinterface.h
@@ -47,7 +47,7 @@ protected:
virtual ~Watched();
private:
- QValueList<PlaylistObserver *> m_observers;
+ TQValueList<PlaylistObserver *> m_observers;
};
/**
@@ -58,7 +58,7 @@ private:
class PlaylistInterface : public Watched
{
public:
- virtual QString name() const = 0;
+ virtual TQString name() const = 0;
virtual FileHandle currentFile() const = 0;
virtual int time() const = 0;
virtual int count() const = 0;
diff --git a/juk/playlistitem.cpp b/juk/playlistitem.cpp
index a86737c0..bdb41395 100644
--- a/juk/playlistitem.cpp
+++ b/juk/playlistitem.cpp
@@ -70,9 +70,9 @@ void PlaylistItem::setFile(const FileHandle &file)
refresh();
}
-void PlaylistItem::setFile(const QString &file)
+void PlaylistItem::setFile(const TQString &file)
{
- QString oldPath = d->fileHandle.absFilePath();
+ TQString oldPath = d->fileHandle.absFilePath();
d->fileHandle.setFile(file);
m_collectionItem->updateCollectionDict(oldPath, d->fileHandle.absFilePath());
refresh();
@@ -83,10 +83,10 @@ FileHandle PlaylistItem::file() const
return d->fileHandle;
}
-const QPixmap *PlaylistItem::pixmap(int column) const
+const TQPixmap *PlaylistItem::pixmap(int column) const
{
- static QPixmap image(SmallIcon("image"));
- static QPixmap playing(UserIcon("playing"));
+ static TQPixmap image(SmallIcon("image"));
+ static TQPixmap playing(UserIcon("playing"));
int offset = playlist()->columnOffset();
@@ -100,10 +100,10 @@ const QPixmap *PlaylistItem::pixmap(int column) const
return KListViewItem::pixmap(column);
}
-QString PlaylistItem::text(int column) const
+TQString PlaylistItem::text(int column) const
{
if(!d->fileHandle.tag())
- return QString::null;
+ return TQString::null;
int offset = playlist()->columnOffset();
@@ -115,21 +115,21 @@ QString PlaylistItem::text(int column) const
case AlbumColumn:
return d->fileHandle.tag()->album();
case CoverColumn:
- return QString::null;
+ return TQString::null;
case TrackNumberColumn:
return d->fileHandle.tag()->track() > 0
- ? QString::number(d->fileHandle.tag()->track())
- : QString::null;
+ ? TQString::number(d->fileHandle.tag()->track())
+ : TQString::null;
case GenreColumn:
return d->fileHandle.tag()->genre();
case YearColumn:
return d->fileHandle.tag()->year() > 0
- ? QString::number(d->fileHandle.tag()->year())
- : QString::null;
+ ? TQString::number(d->fileHandle.tag()->year())
+ : TQString::null;
case LengthColumn:
return d->fileHandle.tag()->lengthString();
case BitrateColumn:
- return QString::number(d->fileHandle.tag()->bitrate());
+ return TQString::number(d->fileHandle.tag()->bitrate());
case CommentColumn:
return d->fileHandle.tag()->comment();
case FileNameColumn:
@@ -141,11 +141,11 @@ QString PlaylistItem::text(int column) const
}
}
-void PlaylistItem::setText(int column, const QString &text)
+void PlaylistItem::setText(int column, const TQString &text)
{
int offset = playlist()->columnOffset();
if(column - offset >= 0 && column + offset <= lastColumn()) {
- KListViewItem::setText(column, QString::null);
+ KListViewItem::setText(column, TQString::null);
return;
}
@@ -214,7 +214,7 @@ Playlist *PlaylistItem::playlist() const
return static_cast<Playlist *>(listView());
}
-QValueVector<int> PlaylistItem::cachedWidths() const
+TQValueVector<int> PlaylistItem::cachedWidths() const
{
return d->cachedWidths;
}
@@ -247,7 +247,7 @@ PlaylistItem::PlaylistItem(CollectionListItem *item, Playlist *parent) :
setup(item);
}
-PlaylistItem::PlaylistItem(CollectionListItem *item, Playlist *parent, QListViewItem *after) :
+PlaylistItem::PlaylistItem(CollectionListItem *item, Playlist *parent, TQListViewItem *after) :
KListViewItem(parent, after),
d(0),
m_watched(0)
@@ -267,27 +267,27 @@ PlaylistItem::PlaylistItem(CollectionList *parent) :
setDragEnabled(true);
}
-void PlaylistItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align)
+void PlaylistItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align)
{
if(!m_playingItems.contains(this))
return KListViewItem::paintCell(p, cg, column, width, align);
- QColorGroup colorGroup = cg;
+ TQColorGroup colorGroup = cg;
- QColor base = colorGroup.base();
- QColor selection = colorGroup.highlight();
+ TQColor base = colorGroup.base();
+ TQColor selection = colorGroup.highlight();
int r = (base.red() + selection.red()) / 2;
int b = (base.blue() + selection.blue()) / 2;
int g = (base.green() + selection.green()) / 2;
- QColor c(r, g, b);
+ TQColor c(r, g, b);
- colorGroup.setColor(QColorGroup::Base, c);
- QListViewItem::paintCell(p, colorGroup, column, width, align);
+ colorGroup.setColor(TQColorGroup::Base, c);
+ TQListViewItem::paintCell(p, colorGroup, column, width, align);
}
-int PlaylistItem::compare(QListViewItem *item, int column, bool ascending) const
+int PlaylistItem::compare(TQListViewItem *item, int column, bool ascending) const
{
// reimplemented from QListViewItem
@@ -332,8 +332,8 @@ int PlaylistItem::compare(const PlaylistItem *firstItem, const PlaylistItem *sec
return 0;
if(column < offset) {
- QString first = firstItem->text(column).lower();
- QString second = secondItem->text(column).lower();
+ TQString first = firstItem->text(column).lower();
+ TQString second = secondItem->text(column).lower();
return first.localeAwareCompare(second);
}
@@ -398,7 +398,7 @@ void PlaylistItem::setup(CollectionListItem *item)
// PlaylistItem::Pointer implementation
////////////////////////////////////////////////////////////////////////////////
-QMap<PlaylistItem *, QValueList<PlaylistItem::Pointer *> > PlaylistItem::Pointer::m_map; // static
+TQMap<PlaylistItem *, TQValueList<PlaylistItem::Pointer *> > PlaylistItem::Pointer::m_map; // static
PlaylistItem::Pointer::Pointer(PlaylistItem *item) :
m_item(item)
@@ -456,8 +456,8 @@ void PlaylistItem::Pointer::clear(PlaylistItem *item) // static
if(!item)
return;
- QValueList<Pointer *> l = m_map[item];
- for(QValueList<Pointer *>::Iterator it = l.begin(); it != l.end(); ++it)
+ TQValueList<Pointer *> l = m_map[item];
+ for(TQValueList<Pointer *>::Iterator it = l.begin(); it != l.end(); ++it)
(*it)->m_item = 0;
m_map.remove(item);
item->m_watched = false;
diff --git a/juk/playlistitem.h b/juk/playlistitem.h
index c969d736..9b9cfa80 100644
--- a/juk/playlistitem.h
+++ b/juk/playlistitem.h
@@ -20,8 +20,8 @@
#include <ksharedptr.h>
#include <kdebug.h>
-#include <qvaluevector.h>
-#include <qptrdict.h>
+#include <tqvaluevector.h>
+#include <tqptrdict.h>
#include "tagguesser.h"
#include "filehandle.h"
@@ -31,7 +31,7 @@ class PlaylistItem;
class CollectionListItem;
class CollectionList;
-typedef QValueList<PlaylistItem *> PlaylistItemList;
+typedef TQValueList<PlaylistItem *> PlaylistItemList;
/**
* Items for the Playlist and the baseclass for CollectionListItem.
@@ -48,7 +48,7 @@ class PlaylistItem : public KListViewItem
friend class UpcomingPlaylist;
friend class CollectionList;
friend class CollectionListItem;
- friend class QPtrDict<PlaylistItem>;
+ friend class TQPtrDict<PlaylistItem>;
friend class Pointer;
public:
@@ -86,19 +86,19 @@ public:
private:
PlaylistItem *m_item;
- static QMap<PlaylistItem *, QValueList<Pointer *> > m_map;
+ static TQMap<PlaylistItem *, TQValueList<Pointer *> > m_map;
};
friend class Pointer;
static int lastColumn() { return FullPathColumn; }
void setFile(const FileHandle &file);
- void setFile(const QString &file);
+ void setFile(const TQString &file);
FileHandle file() const;
- virtual const QPixmap *pixmap(int column) const;
- virtual QString text(int column) const;
- virtual void setText(int column, const QString &text);
+ virtual const TQPixmap *pixmap(int column) const;
+ virtual TQString text(int column) const;
+ virtual void setText(int column, const TQString &text);
void setPlaying(bool playing = true, bool master = true);
@@ -113,7 +113,7 @@ public:
* The widths of items are cached when they're updated for us in computations
* in the "weighted" listview column width mode.
*/
- QValueVector<int> cachedWidths() const;
+ TQValueVector<int> cachedWidths() const;
/**
* This just refreshes from the in memory data. This may seem pointless at
@@ -157,7 +157,7 @@ protected:
* subclss or friend class.
*/
PlaylistItem(CollectionListItem *item, Playlist *parent);
- PlaylistItem(CollectionListItem *item, Playlist *parent, QListViewItem *after);
+ PlaylistItem(CollectionListItem *item, Playlist *parent, TQListViewItem *after);
/**
* This is the constructor that shold be used by subclasses.
@@ -170,10 +170,10 @@ protected:
*/
virtual ~PlaylistItem();
- virtual void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align);
- virtual void paintFocus(QPainter *, const QColorGroup &, const QRect &) {}
+ virtual void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align);
+ virtual void paintFocus(TQPainter *, const TQColorGroup &, const TQRect &) {}
- virtual int compare(QListViewItem *item, int column, bool ascending) const;
+ virtual int compare(TQListViewItem *item, int column, bool ascending) const;
int compare(const PlaylistItem *firstItem, const PlaylistItem *secondItem, int column, bool ascending) const;
bool isValid() const;
@@ -181,12 +181,12 @@ protected:
struct Data : public KShared
{
Data() {}
- Data(const QFileInfo &info, const QString &path) : fileHandle(info, path) {}
- Data(const QString &path) : fileHandle(path) {}
+ Data(const TQFileInfo &info, const TQString &path) : fileHandle(info, path) {}
+ Data(const TQString &path) : fileHandle(path) {}
FileHandle fileHandle;
- QValueVector<QCString> local8Bit;
- QValueVector<int> cachedWidths;
+ TQValueVector<TQCString> local8Bit;
+ TQValueVector<int> cachedWidths;
};
KSharedPtr<Data> data() const { return d; }
diff --git a/juk/playlistsearch.cpp b/juk/playlistsearch.cpp
index a2109b26..940c13e8 100644
--- a/juk/playlistsearch.cpp
+++ b/juk/playlistsearch.cpp
@@ -61,7 +61,7 @@ void PlaylistSearch::search()
PlaylistList::Iterator playlistIt = m_playlists.begin();
for(; playlistIt != m_playlists.end(); ++playlistIt) {
if(!isEmpty()) {
- for(QListViewItemIterator it(*playlistIt); it.current(); ++it)
+ for(TQListViewItemIterator it(*playlistIt); it.current(); ++it)
checkItem(static_cast<PlaylistItem *>(*it));
}
else {
@@ -155,7 +155,7 @@ PlaylistSearch::Component::Component() :
}
-PlaylistSearch::Component::Component(const QString &query,
+PlaylistSearch::Component::Component(const TQString &query,
bool caseSensitive,
const ColumnList &columns,
MatchMode mode) :
@@ -169,7 +169,7 @@ PlaylistSearch::Component::Component(const QString &query,
}
-PlaylistSearch::Component::Component(const QRegExp &query, const ColumnList& columns) :
+PlaylistSearch::Component::Component(const TQRegExp &query, const ColumnList& columns) :
m_queryRe(query),
m_columns(columns),
m_mode(Exact),
@@ -220,7 +220,7 @@ bool PlaylistSearch::Component::matches(PlaylistItem *item) const
break;
case ContainsWord:
{
- QString s = item->text(*it);
+ TQString s = item->text(*it);
int i = s.find(m_query, 0, m_caseSensitive);
if(i >= 0) {
@@ -267,7 +267,7 @@ bool PlaylistSearch::Component::operator==(const Component &v) const
// helper functions
////////////////////////////////////////////////////////////////////////////////
-QDataStream &operator<<(QDataStream &s, const PlaylistSearch &search)
+TQDataStream &operator<<(TQDataStream &s, const PlaylistSearch &search)
{
s << search.components()
<< Q_INT32(search.searchMode());
@@ -275,7 +275,7 @@ QDataStream &operator<<(QDataStream &s, const PlaylistSearch &search)
return s;
}
-QDataStream &operator>>(QDataStream &s, PlaylistSearch &search)
+TQDataStream &operator>>(TQDataStream &s, PlaylistSearch &search)
{
search.clearPlaylists();
search.addPlaylist(CollectionList::instance());
@@ -294,7 +294,7 @@ QDataStream &operator>>(QDataStream &s, PlaylistSearch &search)
return s;
}
-QDataStream &operator<<(QDataStream &s, const PlaylistSearch::Component &c)
+TQDataStream &operator<<(TQDataStream &s, const PlaylistSearch::Component &c)
{
s << c.isPatternSearch()
<< (c.isPatternSearch() ? c.pattern().pattern() : c.query())
@@ -305,10 +305,10 @@ QDataStream &operator<<(QDataStream &s, const PlaylistSearch::Component &c)
return s;
}
-QDataStream &operator>>(QDataStream &s, PlaylistSearch::Component &c)
+TQDataStream &operator>>(TQDataStream &s, PlaylistSearch::Component &c)
{
bool patternSearch;
- QString pattern;
+ TQString pattern;
bool caseSensitive;
ColumnList columns;
Q_INT32 mode;
@@ -320,7 +320,7 @@ QDataStream &operator>>(QDataStream &s, PlaylistSearch::Component &c)
>> mode;
if(patternSearch)
- c = PlaylistSearch::Component(QRegExp(pattern), columns);
+ c = PlaylistSearch::Component(TQRegExp(pattern), columns);
else
c = PlaylistSearch::Component(pattern, caseSensitive, columns, PlaylistSearch::Component::MatchMode(mode));
diff --git a/juk/playlistsearch.h b/juk/playlistsearch.h
index 9b46a92c..7281ba13 100644
--- a/juk/playlistsearch.h
+++ b/juk/playlistsearch.h
@@ -16,21 +16,21 @@
#ifndef PLAYLISTSEARCH_H
#define PLAYLISTSEARCH_H
-#include <qregexp.h>
+#include <tqregexp.h>
class Playlist;
-typedef QValueList<Playlist *> PlaylistList;
+typedef TQValueList<Playlist *> PlaylistList;
class PlaylistItem;
-typedef QValueList<PlaylistItem *> PlaylistItemList;
+typedef TQValueList<PlaylistItem *> PlaylistItemList;
-typedef QValueList<int> ColumnList;
+typedef TQValueList<int> ColumnList;
class PlaylistSearch
{
public:
class Component;
- typedef QValueList<Component> ComponentList;
+ typedef TQValueList<Component> ComponentList;
enum SearchMode { MatchAny = 0, MatchAll = 1 };
@@ -90,14 +90,14 @@ public:
/**
* Create an empty search component. This is only provided for use by
- * QValueList and should not be used in any other context.
+ * TQValueList and should not be used in any other context.
*/
Component();
/**
* Create a query component. This defaults to searching all visible coulumns.
*/
- Component(const QString &query,
+ Component(const TQString &query,
bool caseSensitive = false,
const ColumnList &columns = ColumnList(),
MatchMode mode = Contains);
@@ -105,10 +105,10 @@ public:
/**
* Create a query component. This defaults to searching all visible coulumns.
*/
- Component(const QRegExp &query, const ColumnList &columns = ColumnList());
+ Component(const TQRegExp &query, const ColumnList &columns = ColumnList());
- QString query() const { return m_query; }
- QRegExp pattern() const { return m_queryRe; }
+ TQString query() const { return m_query; }
+ TQRegExp pattern() const { return m_queryRe; }
ColumnList columns() const { return m_columns; }
bool matches(PlaylistItem *item) const;
@@ -119,8 +119,8 @@ public:
bool operator==(const Component &v) const;
private:
- QString m_query;
- QRegExp m_queryRe;
+ TQString m_query;
+ TQRegExp m_queryRe;
mutable ColumnList m_columns;
MatchMode m_mode;
bool m_searchAllVisible;
@@ -134,7 +134,7 @@ private:
* search is just relevant to the collection list. This is all that is presently
* needed by JuK.
*/
-QDataStream &operator<<(QDataStream &s, const PlaylistSearch &search);
+TQDataStream &operator<<(TQDataStream &s, const PlaylistSearch &search);
/**
* Streams \a search from the stream \a s.
@@ -142,9 +142,9 @@ QDataStream &operator<<(QDataStream &s, const PlaylistSearch &search);
* search is just relevant to the collection list. This is all that is presently
* needed by JuK.
*/
-QDataStream &operator>>(QDataStream &s, PlaylistSearch &search);
+TQDataStream &operator>>(TQDataStream &s, PlaylistSearch &search);
-QDataStream &operator<<(QDataStream &s, const PlaylistSearch::Component &c);
-QDataStream &operator>>(QDataStream &s, PlaylistSearch::Component &c);
+TQDataStream &operator<<(TQDataStream &s, const PlaylistSearch::Component &c);
+TQDataStream &operator>>(TQDataStream &s, PlaylistSearch::Component &c);
#endif
diff --git a/juk/playlistsplitter.cpp b/juk/playlistsplitter.cpp
index 5bc33a69..3454ee3d 100644
--- a/juk/playlistsplitter.cpp
+++ b/juk/playlistsplitter.cpp
@@ -16,8 +16,8 @@
#include <kaction.h>
#include <kdebug.h>
-#include <qlayout.h>
-#include <qevent.h>
+#include <tqlayout.h>
+#include <tqevent.h>
#include "playlistsplitter.h"
#include "searchwidget.h"
@@ -34,8 +34,8 @@ using namespace ActionCollection;
// public methods
////////////////////////////////////////////////////////////////////////////////
-PlaylistSplitter::PlaylistSplitter(QWidget *parent, const char *name) :
- QSplitter(Qt::Horizontal, parent, name),
+PlaylistSplitter::PlaylistSplitter(TQWidget *parent, const char *name) :
+ TQSplitter(Qt::Horizontal, parent, name),
m_newVisible(0),
m_playlistBox(0),
m_searchWidget(0),
@@ -61,7 +61,7 @@ PlaylistSplitter::~PlaylistSplitter()
delete m_playlistBox;
}
-bool PlaylistSplitter::eventFilter(QObject *, QEvent *event)
+bool PlaylistSplitter::eventFilter(TQObject *, TQEvent *event)
{
if(event->type() == FocusUpEvent::id) {
m_searchWidget->setFocus();
@@ -89,20 +89,20 @@ void PlaylistSplitter::slotFocusCurrentPlaylist()
// Select the top visible (and matching) item.
- PlaylistItem *item = static_cast<PlaylistItem *>(playlist->itemAt(QPoint(0, 0)));
+ PlaylistItem *item = static_cast<PlaylistItem *>(playlist->itemAt(TQPoint(0, 0)));
if(!item)
return;
- // A little bit of a hack to make QListView repaint things properly. Switch
+ // A little bit of a hack to make TQListView repaint things properly. Switch
// to single selection mode, set the selection and then switch back.
- playlist->setSelectionMode(QListView::Single);
+ playlist->setSelectionMode(TQListView::Single);
playlist->markItemSelected(item, true);
playlist->setCurrentItem(item);
- playlist->setSelectionMode(QListView::Extended);
+ playlist->setSelectionMode(TQListView::Extended);
}
}
@@ -121,7 +121,7 @@ void PlaylistSplitter::setupActions()
new KToggleAction(i18n("Show &Search Bar"), "filefind", 0, actions(), "showSearch");
showSearch->setCheckedState(i18n("Hide &Search Bar"));
- new KAction(i18n("Edit Track Search"), "edit_clear", "F6", this, SLOT(setFocus()), actions(), "editTrackSearch");
+ new KAction(i18n("Edit Track Search"), "edit_clear", "F6", this, TQT_SLOT(setFocus()), actions(), "editTrackSearch");
}
void PlaylistSplitter::setupLayout()
@@ -130,53 +130,53 @@ void PlaylistSplitter::setupLayout()
// Create a splitter to go between the playlists and the editor.
- QSplitter *editorSplitter = new QSplitter(Qt::Vertical, this, "editorSplitter");
+ TQSplitter *editorSplitter = new TQSplitter(Qt::Vertical, this, "editorSplitter");
// Create the playlist and the editor.
- QWidget *top = new QWidget(editorSplitter);
- QVBoxLayout *topLayout = new QVBoxLayout(top);
+ TQWidget *top = new TQWidget(editorSplitter);
+ TQVBoxLayout *topLayout = new TQVBoxLayout(top);
- m_playlistStack = new QWidgetStack(top, "playlistStack");
+ m_playlistStack = new TQWidgetStack(top, "playlistStack");
m_playlistStack->installEventFilter(this);
- connect(m_playlistStack, SIGNAL(aboutToShow(QWidget *)), this, SLOT(slotPlaylistChanged(QWidget *)));
+ connect(m_playlistStack, TQT_SIGNAL(aboutToShow(TQWidget *)), this, TQT_SLOT(slotPlaylistChanged(TQWidget *)));
m_editor = new TagEditor(editorSplitter, "tagEditor");
// Make the editor as small as possible (or at least as small as recommended)
- editorSplitter->setResizeMode(m_editor, QSplitter::FollowSizeHint);
+ editorSplitter->setResizeMode(m_editor, TQSplitter::FollowSizeHint);
// Create the PlaylistBox
m_playlistBox = new PlaylistBox(this, m_playlistStack, "playlistBox");
- connect(m_playlistBox->object(), SIGNAL(signalSelectedItemsChanged()),
- this, SLOT(slotPlaylistSelectionChanged()));
- connect(m_playlistBox, SIGNAL(signalPlaylistDestroyed(Playlist *)),
- m_editor, SLOT(slotPlaylistDestroyed(Playlist *)));
+ connect(m_playlistBox->object(), TQT_SIGNAL(signalSelectedItemsChanged()),
+ this, TQT_SLOT(slotPlaylistSelectionChanged()));
+ connect(m_playlistBox, TQT_SIGNAL(signalPlaylistDestroyed(Playlist *)),
+ m_editor, TQT_SLOT(slotPlaylistDestroyed(Playlist *)));
moveToFirst(m_playlistBox);
- connect(CollectionList::instance(), SIGNAL(signalCollectionChanged()),
- m_editor, SLOT(slotUpdateCollection()));
+ connect(CollectionList::instance(), TQT_SIGNAL(signalCollectionChanged()),
+ m_editor, TQT_SLOT(slotUpdateCollection()));
NowPlaying *nowPlaying = new NowPlaying(top, m_playlistBox);
// Create the search widget -- this must be done after the CollectionList is created.
m_searchWidget = new SearchWidget(top, "searchWidget");
- connect(m_searchWidget, SIGNAL(signalQueryChanged()),
- this, SLOT(slotShowSearchResults()));
- connect(m_searchWidget, SIGNAL(signalDownPressed()),
- this, SLOT(slotFocusCurrentPlaylist()));
- connect(m_searchWidget, SIGNAL(signalAdvancedSearchClicked()),
- m_playlistBox->object(), SLOT(slotCreateSearchPlaylist()));
- connect(m_searchWidget, SIGNAL(signalShown(bool)),
- m_playlistBox->object(), SLOT(slotSetSearchEnabled(bool)));
- connect(action<KToggleAction>("showSearch"), SIGNAL(toggled(bool)),
- m_searchWidget, SLOT(setEnabled(bool)));
+ connect(m_searchWidget, TQT_SIGNAL(signalQueryChanged()),
+ this, TQT_SLOT(slotShowSearchResults()));
+ connect(m_searchWidget, TQT_SIGNAL(signalDownPressed()),
+ this, TQT_SLOT(slotFocusCurrentPlaylist()));
+ connect(m_searchWidget, TQT_SIGNAL(signalAdvancedSearchClicked()),
+ m_playlistBox->object(), TQT_SLOT(slotCreateSearchPlaylist()));
+ connect(m_searchWidget, TQT_SIGNAL(signalShown(bool)),
+ m_playlistBox->object(), TQT_SLOT(slotSetSearchEnabled(bool)));
+ connect(action<KToggleAction>("showSearch"), TQT_SIGNAL(toggled(bool)),
+ m_searchWidget, TQT_SLOT(setEnabled(bool)));
topLayout->addWidget(nowPlaying);
topLayout->addWidget(m_searchWidget);
@@ -190,7 +190,7 @@ void PlaylistSplitter::readConfig()
{
KConfigGroup config(KGlobal::config(), "Splitter");
- QValueList<int> splitterSizes = config.readIntListEntry("PlaylistSplitterSizes");
+ TQValueList<int> splitterSizes = config.readIntListEntry("PlaylistSplitterSizes");
if(splitterSizes.isEmpty()) {
splitterSizes.append(100);
splitterSizes.append(640);
@@ -222,7 +222,7 @@ void PlaylistSplitter::slotPlaylistSelectionChanged()
m_editor->slotSetItems(visiblePlaylist()->selectedItems());
}
-void PlaylistSplitter::slotPlaylistChanged(QWidget *w)
+void PlaylistSplitter::slotPlaylistChanged(TQWidget *w)
{
Playlist *p = dynamic_cast<Playlist *>(w);
diff --git a/juk/playlistsplitter.h b/juk/playlistsplitter.h
index 0734ee05..cc163640 100644
--- a/juk/playlistsplitter.h
+++ b/juk/playlistsplitter.h
@@ -18,7 +18,7 @@
#include <kfiledialog.h>
-#include <qwidgetstack.h>
+#include <tqwidgetstack.h>
#include "playlistbox.h"
@@ -31,7 +31,7 @@ class TagEditor;
/**
* This is the main layout class of JuK. It should contain a PlaylistBox and
- * a QWidgetStack of the Playlists.
+ * a TQWidgetStack of the Playlists.
*
* This class serves as a "mediator" (see "Design Patterns") between the JuK
* class and the playlist classes. Thus all access to the playlist classes from
@@ -43,12 +43,12 @@ class PlaylistSplitter : public QSplitter
Q_OBJECT
public:
- PlaylistSplitter(QWidget *parent, const char *name = 0);
+ PlaylistSplitter(TQWidget *parent, const char *name = 0);
virtual ~PlaylistSplitter();
PlaylistInterface *playlist() const { return m_playlistBox; }
- virtual bool eventFilter(QObject *watched, QEvent *event);
+ virtual bool eventFilter(TQObject *watched, TQEvent *event);
public slots:
virtual void setFocus();
@@ -58,7 +58,7 @@ private:
/**
* This returns a pointer to the first item in the playlist on the top
- * of the QWidgetStack of playlists.
+ * of the TQWidgetStack of playlists.
*/
Playlist *visiblePlaylist() const;
@@ -75,13 +75,13 @@ private slots:
*/
void slotShowSearchResults();
void slotPlaylistSelectionChanged();
- void slotPlaylistChanged(QWidget *w);
+ void slotPlaylistChanged(TQWidget *w);
private:
Playlist *m_newVisible;
PlaylistBox *m_playlistBox;
SearchWidget *m_searchWidget;
- QWidgetStack *m_playlistStack;
+ TQWidgetStack *m_playlistStack;
TagEditor *m_editor;
};
diff --git a/juk/searchplaylist.cpp b/juk/searchplaylist.cpp
index 2afd8549..ba1be917 100644
--- a/juk/searchplaylist.cpp
+++ b/juk/searchplaylist.cpp
@@ -15,7 +15,7 @@
#include <kdebug.h>
-#include <qptrdict.h>
+#include <tqptrdict.h>
#include "searchplaylist.h"
#include "playlistitem.h"
@@ -27,7 +27,7 @@
SearchPlaylist::SearchPlaylist(PlaylistCollection *collection,
const PlaylistSearch &search,
- const QString &name,
+ const TQString &name,
bool setupPlaylist,
bool synchronizePlaying) :
DynamicPlaylist(search.playlists(), collection, name, "find",
@@ -55,7 +55,7 @@ void SearchPlaylist::updateItems()
PlaylistItemList l = Playlist::items();
- QPtrDict<PlaylistItem> oldItems(503);
+ TQPtrDict<PlaylistItem> oldItems(503);
for(PlaylistItemList::ConstIterator it = l.begin(); it != l.end(); ++it)
oldItems.insert((*it)->collectionItem(), *it);
@@ -71,7 +71,7 @@ void SearchPlaylist::updateItems()
// kdDebug(65432) << k_funcinfo << "newItems.size() == " << newItems.size() << endl;
- for(QPtrDictIterator<PlaylistItem> it(oldItems); it.current(); ++it)
+ for(TQPtrDictIterator<PlaylistItem> it(oldItems); it.current(); ++it)
clearItem(it.current(), false);
if(!oldItems.isEmpty() && newItems.isEmpty())
@@ -90,7 +90,7 @@ void SearchPlaylist::updateItems()
// helper functions
////////////////////////////////////////////////////////////////////////////////
-QDataStream &operator<<(QDataStream &s, const SearchPlaylist &p)
+TQDataStream &operator<<(TQDataStream &s, const SearchPlaylist &p)
{
s << p.name()
<< p.playlistSearch();
@@ -98,9 +98,9 @@ QDataStream &operator<<(QDataStream &s, const SearchPlaylist &p)
return s;
}
-QDataStream &operator>>(QDataStream &s, SearchPlaylist &p)
+TQDataStream &operator>>(TQDataStream &s, SearchPlaylist &p)
{
- QString name;
+ TQString name;
PlaylistSearch search;
s >> name
diff --git a/juk/searchplaylist.h b/juk/searchplaylist.h
index 2acd1e5c..8152670a 100644
--- a/juk/searchplaylist.h
+++ b/juk/searchplaylist.h
@@ -24,7 +24,7 @@ class SearchPlaylist : public DynamicPlaylist
public:
SearchPlaylist(PlaylistCollection *collection,
const PlaylistSearch &search = PlaylistSearch(),
- const QString &name = QString::null,
+ const TQString &name = TQString::null,
bool setupPlaylist = true,
bool synchronizePlaying = false);
@@ -42,7 +42,7 @@ private:
PlaylistSearch m_search;
};
-QDataStream &operator<<(QDataStream &s, const SearchPlaylist &p);
-QDataStream &operator>>(QDataStream &s, SearchPlaylist &p);
+TQDataStream &operator<<(TQDataStream &s, const SearchPlaylist &p);
+TQDataStream &operator>>(TQDataStream &s, SearchPlaylist &p);
#endif
diff --git a/juk/searchwidget.cpp b/juk/searchwidget.cpp
index 83b7808e..a9b8d868 100644
--- a/juk/searchwidget.cpp
+++ b/juk/searchwidget.cpp
@@ -23,11 +23,11 @@
#include <kdebug.h>
#include <kaction.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qpushbutton.h>
-#include <qtoolbutton.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqtoolbutton.h>
#include "searchwidget.h"
#include "collectionlist.h"
@@ -39,8 +39,8 @@ using namespace ActionCollection;
// SearchLine public methods
////////////////////////////////////////////////////////////////////////////////
-SearchLine::SearchLine(QWidget *parent, bool simple, const char *name) :
- QHBox(parent, name),
+SearchLine::SearchLine(TQWidget *parent, bool simple, const char *name) :
+ TQHBox(parent, name),
m_simple(simple),
m_searchFieldsBox(0)
{
@@ -48,24 +48,24 @@ SearchLine::SearchLine(QWidget *parent, bool simple, const char *name) :
if(!m_simple) {
m_searchFieldsBox = new KComboBox(this, "searchFields");
- connect(m_searchFieldsBox, SIGNAL(activated(int)),
- this, SIGNAL(signalQueryChanged()));
+ connect(m_searchFieldsBox, TQT_SIGNAL(activated(int)),
+ this, TQT_SIGNAL(signalQueryChanged()));
}
m_lineEdit = new KLineEdit(this, "searchLineEdit");
m_lineEdit->installEventFilter(this);
- connect(m_lineEdit, SIGNAL(textChanged(const QString &)),
- this, SIGNAL(signalQueryChanged()));
- connect(m_lineEdit, SIGNAL(returnPressed()),
- this, SLOT(slotActivate()));
+ connect(m_lineEdit, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SIGNAL(signalQueryChanged()));
+ connect(m_lineEdit, TQT_SIGNAL(returnPressed()),
+ this, TQT_SLOT(slotActivate()));
if(!m_simple) {
m_caseSensitive = new KComboBox(this);
m_caseSensitive->insertItem(i18n("Normal Matching"), 0);
m_caseSensitive->insertItem(i18n("Case Sensitive"), 1);
m_caseSensitive->insertItem(i18n("Pattern Matching"), 2);
- connect(m_caseSensitive, SIGNAL(activated(int)),
- this, SIGNAL(signalQueryChanged()));
+ connect(m_caseSensitive, TQT_SIGNAL(activated(int)),
+ this, TQT_SIGNAL(signalQueryChanged()));
}
else
m_caseSensitive = 0;
@@ -75,15 +75,15 @@ SearchLine::SearchLine(QWidget *parent, bool simple, const char *name) :
PlaylistSearch::Component SearchLine::searchComponent() const
{
- QString query = m_lineEdit->text();
+ TQString query = m_lineEdit->text();
bool caseSensitive = m_caseSensitive && m_caseSensitive->currentItem() == CaseSensitive;
Playlist *playlist = CollectionList::instance();
- QValueList<int> searchedColumns;
+ TQValueList<int> searchedColumns;
if(!m_searchFieldsBox || m_searchFieldsBox->currentItem() == 0) {
- QValueListConstIterator<int> it = m_columnList.begin();
+ TQValueListConstIterator<int> it = m_columnList.begin();
for(; it != m_columnList.end(); ++it) {
if(playlist->isColumnVisible(*it))
searchedColumns.append(*it);
@@ -93,7 +93,7 @@ PlaylistSearch::Component SearchLine::searchComponent() const
searchedColumns.append(m_columnList[m_searchFieldsBox->currentItem() - 1]);
if(m_caseSensitive && m_caseSensitive->currentItem() == Pattern)
- return PlaylistSearch::Component(QRegExp(query), searchedColumns);
+ return PlaylistSearch::Component(TQRegExp(query), searchedColumns);
else
return PlaylistSearch::Component(query, caseSensitive, searchedColumns);
}
@@ -134,16 +134,16 @@ void SearchLine::setFocus()
m_lineEdit->setFocus();
}
-bool SearchLine::eventFilter(QObject *watched, QEvent *e)
+bool SearchLine::eventFilter(TQObject *watched, TQEvent *e)
{
- if(watched != m_lineEdit || e->type() != QEvent::KeyPress)
- return QHBox::eventFilter(watched, e);
+ if(watched != m_lineEdit || e->type() != TQEvent::KeyPress)
+ return TQHBox::eventFilter(watched, e);
- QKeyEvent *key = static_cast<QKeyEvent *>(e);
+ TQKeyEvent *key = static_cast<TQKeyEvent *>(e);
if(key->key() == Qt::Key_Down)
emit signalDownPressed();
- return QHBox::eventFilter(watched, e);
+ return TQHBox::eventFilter(watched, e);
}
void SearchLine::slotActivate()
@@ -154,16 +154,16 @@ void SearchLine::slotActivate()
void SearchLine::updateColumns()
{
- QString currentText;
+ TQString currentText;
if(m_searchFieldsBox) {
currentText = m_searchFieldsBox->currentText();
m_searchFieldsBox->clear();
}
- QStringList columnHeaders;
+ TQStringList columnHeaders;
- columnHeaders.append(QString("<%1>").arg(i18n("All Visible")));
+ columnHeaders.append(TQString("<%1>").arg(i18n("All Visible")));
Playlist *playlist = CollectionList::instance();
@@ -172,7 +172,7 @@ void SearchLine::updateColumns()
for(int i = 0; i < playlist->columns(); i++) {
m_columnList.append(i);
- QString text = playlist->columnText(i);
+ TQString text = playlist->columnText(i);
columnHeaders.append(text);
if(currentText == text)
selection = m_columnList.size() - 1;
@@ -188,7 +188,7 @@ void SearchLine::updateColumns()
// SearchWidget public methods
////////////////////////////////////////////////////////////////////////////////
-SearchWidget::SearchWidget(QWidget *parent, const char *name) : KToolBar(parent, name)
+SearchWidget::SearchWidget(TQWidget *parent, const char *name) : KToolBar(parent, name)
{
setupLayout();
updateColumns();
@@ -211,12 +211,12 @@ void SearchWidget::setSearch(const PlaylistSearch &search)
m_searchLine->setSearchComponent(*components.begin());
}
-QString SearchWidget::searchText() const
+TQString SearchWidget::searchText() const
{
return m_searchLine->searchComponent().query();
}
-void SearchWidget::setSearchText(const QString &text)
+void SearchWidget::setSearchText(const TQString &text)
{
m_searchLine->setSearchComponent(PlaylistSearch::Component(text));
}
@@ -263,29 +263,29 @@ void SearchWidget::setupLayout()
{
boxLayout()->setSpacing(5);
- QToolButton *clearSearchButton = new QToolButton(this);
+ TQToolButton *clearSearchButton = new TQToolButton(this);
clearSearchButton->setTextLabel(i18n("Clear Search"), true);
clearSearchButton->setIconSet(SmallIconSet("locationbar_erase"));
- QLabel *label = new QLabel(i18n("Search:"), this, "kde toolbar widget");
+ TQLabel *label = new TQLabel(i18n("Search:"), this, "kde toolbar widget");
m_searchLine = new SearchLine(this, true, "kde toolbar widget");
label->setBuddy(m_searchLine);
- connect(m_searchLine, SIGNAL(signalQueryChanged()), this, SIGNAL(signalQueryChanged()));
- connect(m_searchLine, SIGNAL(signalDownPressed()), this, SIGNAL(signalDownPressed()));
- connect(clearSearchButton, SIGNAL(pressed()), m_searchLine, SLOT(clear()));
+ connect(m_searchLine, TQT_SIGNAL(signalQueryChanged()), this, TQT_SIGNAL(signalQueryChanged()));
+ connect(m_searchLine, TQT_SIGNAL(signalDownPressed()), this, TQT_SIGNAL(signalDownPressed()));
+ connect(clearSearchButton, TQT_SIGNAL(pressed()), m_searchLine, TQT_SLOT(clear()));
setStretchableWidget(m_searchLine);
// I've decided that I think this is ugly, for now.
/*
- QToolButton *b = new QToolButton(this);
+ TQToolButton *b = new TQToolButton(this);
b->setTextLabel(i18n("Advanced Search"), true);
b->setIconSet(SmallIconSet("wizard"));
- connect(b, SIGNAL(clicked()), this, SIGNAL(signalAdvancedSearchClicked()));
+ connect(b, TQT_SIGNAL(clicked()), this, TQT_SIGNAL(signalAdvancedSearchClicked()));
*/
}
diff --git a/juk/searchwidget.h b/juk/searchwidget.h
index 37a44cb7..577fc1c0 100644
--- a/juk/searchwidget.h
+++ b/juk/searchwidget.h
@@ -21,7 +21,7 @@
#include <ktoolbar.h>
-#include <qhbox.h>
+#include <tqhbox.h>
#include "playlistsearch.h"
#include "jukIface.h"
@@ -39,7 +39,7 @@ class SearchLine : public QHBox
public:
enum Mode { Default = 0, CaseSensitive = 1, Pattern = 2 };
- SearchLine(QWidget *parent, bool simple = false, const char *name = 0);
+ SearchLine(TQWidget *parent, bool simple = false, const char *name = 0);
virtual ~SearchLine() {}
PlaylistSearch::Component searchComponent() const;
@@ -52,7 +52,7 @@ public slots:
virtual void setFocus();
protected:
- virtual bool eventFilter(QObject *watched, QEvent *e);
+ virtual bool eventFilter(TQObject *watched, TQEvent *e);
signals:
void signalQueryChanged();
@@ -66,7 +66,7 @@ private:
KLineEdit *m_lineEdit;
KComboBox *m_searchFieldsBox;
KComboBox *m_caseSensitive;
- QValueList<int> m_columnList;
+ TQValueList<int> m_columnList;
};
class SearchWidget : public KToolBar, public SearchIface
@@ -74,14 +74,14 @@ class SearchWidget : public KToolBar, public SearchIface
Q_OBJECT
public:
- SearchWidget(QWidget *parent, const char *name = 0);
+ SearchWidget(TQWidget *parent, const char *name = 0);
virtual ~SearchWidget();
PlaylistSearch search(const PlaylistList &playlists) const;
void setSearch(const PlaylistSearch &search);
- virtual QString searchText() const;
- virtual void setSearchText(const QString &text);
+ virtual TQString searchText() const;
+ virtual void setSearchText(const TQString &text);
public slots:
void clear();
@@ -105,7 +105,7 @@ private:
private:
SearchLine *m_searchLine;
- QStringList m_columnHeaders;
+ TQStringList m_columnHeaders;
};
#endif
diff --git a/juk/slideraction.cpp b/juk/slideraction.cpp
index eacb4242..22d8446b 100644
--- a/juk/slideraction.cpp
+++ b/juk/slideraction.cpp
@@ -18,10 +18,10 @@
#include <kiconloader.h>
#include <kdebug.h>
-#include <qtooltip.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qtimer.h>
+#include <tqtooltip.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqtimer.h>
#include "slideraction.h"
@@ -39,22 +39,22 @@
class TrackPositionSlider : public QSlider
{
public:
- TrackPositionSlider(QWidget *parent, const char *name) : QSlider(parent, name)
+ TrackPositionSlider(TQWidget *parent, const char *name) : TQSlider(parent, name)
{
setFocusPolicy(NoFocus);
}
protected:
- virtual void mousePressEvent(QMouseEvent *e)
+ virtual void mousePressEvent(TQMouseEvent *e)
{
if(e->button() == LeftButton) {
- QMouseEvent reverse(QEvent::MouseButtonPress, e->pos(), MidButton, e->state());
- QSlider::mousePressEvent(&reverse);
+ TQMouseEvent reverse(TQEvent::MouseButtonPress, e->pos(), MidButton, e->state());
+ TQSlider::mousePressEvent(&reverse);
emit sliderPressed();
}
else if(e->button() == MidButton) {
- QMouseEvent reverse(QEvent::MouseButtonPress, e->pos(), LeftButton, e->state());
- QSlider::mousePressEvent(&reverse);
+ TQMouseEvent reverse(TQEvent::MouseButtonPress, e->pos(), LeftButton, e->state());
+ TQSlider::mousePressEvent(&reverse);
}
}
};
@@ -63,23 +63,23 @@ protected:
// VolumeSlider implementation
////////////////////////////////////////////////////////////////////////////////
-VolumeSlider::VolumeSlider(Orientation o, QWidget *parent, const char *name) :
- QSlider(o, parent, name)
+VolumeSlider::VolumeSlider(Orientation o, TQWidget *parent, const char *name) :
+ TQSlider(o, parent, name)
{
- connect(this, SIGNAL(valueChanged(int)), this, SLOT(slotValueChanged(int)));
+ connect(this, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotValueChanged(int)));
}
-void VolumeSlider::wheelEvent(QWheelEvent *e)
+void VolumeSlider::wheelEvent(TQWheelEvent *e)
{
if(orientation() == Horizontal) {
- QWheelEvent transposed(e->pos(), -(e->delta()), e->state(), e->orientation());
- QSlider::wheelEvent(&transposed);
+ TQWheelEvent transposed(e->pos(), -(e->delta()), e->state(), e->orientation());
+ TQSlider::wheelEvent(&transposed);
}
else
- QSlider::wheelEvent(e);
+ TQSlider::wheelEvent(e);
}
-void VolumeSlider::focusInEvent(QFocusEvent *)
+void VolumeSlider::focusInEvent(TQFocusEvent *)
{
clearFocus();
}
@@ -108,7 +108,7 @@ void VolumeSlider::setOrientation(Orientation o)
blockSignals(true);
setValue(maxValue() - value());
blockSignals(false);
- QSlider::setOrientation(o);
+ TQSlider::setOrientation(o);
}
void VolumeSlider::slotValueChanged(int value)
@@ -126,7 +126,7 @@ void VolumeSlider::slotValueChanged(int value)
const int SliderAction::minPosition = 0;
const int SliderAction::maxPosition = 1000;
-SliderAction::SliderAction(const QString &text, QObject *parent, const char *name)
+SliderAction::SliderAction(const TQString &text, TQObject *parent, const char *name)
: KAction(text, 0, parent, name),
m_toolBar(0),
m_layout(0),
@@ -143,9 +143,9 @@ SliderAction::~SliderAction()
}
-int SliderAction::plug(QWidget *parent, int index)
+int SliderAction::plug(TQWidget *parent, int index)
{
- QWidget *w = createWidget(parent);
+ TQWidget *w = createWidget(parent);
if(!w)
return -1;
@@ -162,11 +162,11 @@ int SliderAction::plug(QWidget *parent, int index)
addContainer(m_toolBar, id);
- connect(m_toolBar, SIGNAL(destroyed()), this, SLOT(slotToolbarDestroyed()));
- connect(m_toolBar, SIGNAL(orientationChanged(Orientation)),
- this, SLOT(slotUpdateOrientation()));
- connect(m_toolBar, SIGNAL(placeChanged(QDockWindow::Place)),
- this, SLOT(slotUpdateOrientation()));
+ connect(m_toolBar, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotToolbarDestroyed()));
+ connect(m_toolBar, TQT_SIGNAL(orientationChanged(Orientation)),
+ this, TQT_SLOT(slotUpdateOrientation()));
+ connect(m_toolBar, TQT_SIGNAL(placeChanged(TQDockWindow::Place)),
+ this, TQT_SLOT(slotUpdateOrientation()));
slotUpdateOrientation();
return (containerCount() - 1);
@@ -178,7 +178,7 @@ int SliderAction::plug(QWidget *parent, int index)
}
-void SliderAction::unplug(QWidget *parent)
+void SliderAction::unplug(TQWidget *parent)
{
if (parent->inherits("KToolBar")) {
m_toolBar = static_cast<KToolBar *>(parent);
@@ -207,12 +207,12 @@ void SliderAction::slotUpdateOrientation()
if(m_toolBar->barPos() == KToolBar::Right || m_toolBar->barPos() == KToolBar::Left) {
m_trackPositionSlider->setOrientation(Vertical);
m_volumeSlider->setOrientation(Vertical);
- m_layout->setDirection(QBoxLayout::TopToBottom);
+ m_layout->setDirection(TQBoxLayout::TopToBottom);
}
else {
m_trackPositionSlider->setOrientation(Horizontal);
m_volumeSlider->setOrientation(Horizontal);
- m_layout->setDirection(QBoxLayout::LeftToRight);
+ m_layout->setDirection(TQBoxLayout::LeftToRight);
}
slotUpdateSize();
}
@@ -221,10 +221,10 @@ void SliderAction::slotUpdateOrientation()
// private members
////////////////////////////////////////////////////////////////////////////////
-QWidget *SliderAction::createWidget(QWidget *parent) // virtual -- used by base class
+TQWidget *SliderAction::createWidget(TQWidget *parent) // virtual -- used by base class
{
if(parent) {
- QWidget *base = new QWidget(parent);
+ TQWidget *base = new TQWidget(parent);
base->setBackgroundMode(parent->backgroundMode());
base->setName("kde toolbar widget");
@@ -240,38 +240,38 @@ QWidget *SliderAction::createWidget(QWidget *parent) // virtual -- used by base
else
orientation = Horizontal;
- m_layout = new QBoxLayout(base, QBoxLayout::TopToBottom, 5, 5);
+ m_layout = new TQBoxLayout(base, TQBoxLayout::TopToBottom, 5, 5);
- m_layout->addItem(new QSpacerItem(20, 1));
+ m_layout->addItem(new TQSpacerItem(20, 1));
- QLabel *trackPositionLabel = new QLabel(base);
+ TQLabel *trackPositionLabel = new TQLabel(base);
trackPositionLabel->setName("kde toolbar widget");
trackPositionLabel->setPixmap(SmallIcon("player_time"));
- QToolTip::add(trackPositionLabel, i18n("Track position"));
+ TQToolTip::add(trackPositionLabel, i18n("Track position"));
m_layout->addWidget(trackPositionLabel);
m_trackPositionSlider = new TrackPositionSlider(base, "trackPositionSlider");
m_trackPositionSlider->setMaxValue(maxPosition);
- QToolTip::add(m_trackPositionSlider, i18n("Track position"));
+ TQToolTip::add(m_trackPositionSlider, i18n("Track position"));
m_layout->addWidget(m_trackPositionSlider);
- connect(m_trackPositionSlider, SIGNAL(sliderPressed()), this, SLOT(slotSliderPressed()));
- connect(m_trackPositionSlider, SIGNAL(sliderReleased()), this, SLOT(slotSliderReleased()));
+ connect(m_trackPositionSlider, TQT_SIGNAL(sliderPressed()), this, TQT_SLOT(slotSliderPressed()));
+ connect(m_trackPositionSlider, TQT_SIGNAL(sliderReleased()), this, TQT_SLOT(slotSliderReleased()));
- m_layout->addItem(new QSpacerItem(10, 1));
+ m_layout->addItem(new TQSpacerItem(10, 1));
- QLabel *volumeLabel = new QLabel(base);
+ TQLabel *volumeLabel = new TQLabel(base);
volumeLabel->setName("kde toolbar widget");
volumeLabel->setPixmap(SmallIcon("player_volume"));
- QToolTip::add(volumeLabel, i18n("Volume"));
+ TQToolTip::add(volumeLabel, i18n("Volume"));
m_layout->addWidget(volumeLabel);
m_volumeSlider = new VolumeSlider(orientation, base, "volumeSlider");
m_volumeSlider->setMaxValue(100);
- QToolTip::add(m_volumeSlider, i18n("Volume"));
+ TQToolTip::add(m_volumeSlider, i18n("Volume"));
m_layout->addWidget(m_volumeSlider);
- connect(m_volumeSlider, SIGNAL(signalVolumeChanged(int)), SIGNAL(signalVolumeChanged(int)));
- connect(m_volumeSlider, SIGNAL(sliderPressed()), this, SLOT(slotVolumeSliderPressed()));
- connect(m_volumeSlider, SIGNAL(sliderReleased()), this, SLOT(slotVolumeSliderReleased()));
+ connect(m_volumeSlider, TQT_SIGNAL(signalVolumeChanged(int)), TQT_SIGNAL(signalVolumeChanged(int)));
+ connect(m_volumeSlider, TQT_SIGNAL(sliderPressed()), this, TQT_SLOT(slotVolumeSliderPressed()));
+ connect(m_volumeSlider, TQT_SIGNAL(sliderReleased()), this, TQT_SLOT(slotVolumeSliderReleased()));
m_volumeSlider->setName("kde toolbar widget");
m_trackPositionSlider->setName("kde toolbar widget");
@@ -279,7 +279,7 @@ QWidget *SliderAction::createWidget(QWidget *parent) // virtual -- used by base
m_layout->setStretchFactor(m_trackPositionSlider, 4);
m_layout->setStretchFactor(m_volumeSlider, 1);
- connect(parent, SIGNAL(modechange()), this, SLOT(slotUpdateSize()));
+ connect(parent, TQT_SIGNAL(modechange()), this, TQT_SLOT(slotUpdateSize()));
return base;
}
diff --git a/juk/slideraction.h b/juk/slideraction.h
index f312196c..ead3a93f 100644
--- a/juk/slideraction.h
+++ b/juk/slideraction.h
@@ -17,7 +17,7 @@
#define SLIDERACTION_H
#include <kaction.h>
-#include <qslider.h>
+#include <tqslider.h>
class QBoxLayout;
class QDockWindow;
@@ -27,7 +27,7 @@ class VolumeSlider : public QSlider
Q_OBJECT
public:
- VolumeSlider(Orientation o, QWidget *parent, const char *name);
+ VolumeSlider(Orientation o, TQWidget *parent, const char *name);
int volume() const;
void setVolume(int value);
@@ -38,8 +38,8 @@ signals:
void signalVolumeChanged(int value);
protected:
- virtual void wheelEvent(QWheelEvent *e);
- virtual void focusInEvent(QFocusEvent *);
+ virtual void wheelEvent(TQWheelEvent *e);
+ virtual void focusInEvent(TQFocusEvent *);
private slots:
void slotValueChanged(int value);
@@ -50,17 +50,17 @@ class SliderAction : public KAction
Q_OBJECT
public:
- SliderAction(const QString &text, QObject *parent, const char *name);
+ SliderAction(const TQString &text, TQObject *parent, const char *name);
virtual ~SliderAction();
VolumeSlider *volumeSlider() const { return m_volumeSlider; }
- QSlider *trackPositionSlider() const { return m_trackPositionSlider; }
+ TQSlider *trackPositionSlider() const { return m_trackPositionSlider; }
bool dragging() const { return m_dragging; }
bool volumeDragging() const { return m_volumeDragging; }
- virtual int plug(QWidget *parent, int index = -1);
- virtual void unplug(QWidget *widget);
+ virtual int plug(TQWidget *parent, int index = -1);
+ virtual void unplug(TQWidget *widget);
static const int minPosition;
static const int maxPosition;
@@ -73,7 +73,7 @@ signals:
void signalVolumeChanged(int volume);
private:
- QWidget *createWidget(QWidget *parent);
+ TQWidget *createWidget(TQWidget *parent);
private slots:
void slotUpdateSize();
@@ -85,8 +85,8 @@ private slots:
private:
KToolBar *m_toolBar;
- QBoxLayout *m_layout;
- QSlider *m_trackPositionSlider;
+ TQBoxLayout *m_layout;
+ TQSlider *m_trackPositionSlider;
VolumeSlider *m_volumeSlider;
bool m_dragging;
bool m_volumeDragging;
diff --git a/juk/sortedstringlist.cpp b/juk/sortedstringlist.cpp
index 87f2938d..0886a88d 100644
--- a/juk/sortedstringlist.cpp
+++ b/juk/sortedstringlist.cpp
@@ -20,10 +20,10 @@
class SortedStringList::Node
{
public:
- Node(const QString &value) : key(value), parent(0), left(0), right(0) {}
+ Node(const TQString &value) : key(value), parent(0), left(0), right(0) {}
~Node() {}
- QString key;
+ TQString key;
Node *parent;
Node *left;
Node *right;
@@ -39,12 +39,12 @@ SortedStringList::~SortedStringList()
}
-bool SortedStringList::insert(const QString &value)
+bool SortedStringList::insert(const TQString &value)
{
return BSTInsert(value);
}
-bool SortedStringList::contains(const QString &value) const
+bool SortedStringList::contains(const TQString &value) const
{
return find(value);
}
@@ -71,7 +71,7 @@ SortedStringList::Node *SortedStringList::treeSuccessor(Node *n) const
return p;
}
-bool SortedStringList::remove(const QString &value)
+bool SortedStringList::remove(const TQString &value)
{
Node *n = find(value);
@@ -111,9 +111,9 @@ bool SortedStringList::remove(const QString &value)
return true;
}
-QStringList SortedStringList::values() const
+TQStringList SortedStringList::values() const
{
- QStringList l;
+ TQStringList l;
traverse(m_root, l);
return l;
}
@@ -122,7 +122,7 @@ QStringList SortedStringList::values() const
// private methods
////////////////////////////////////////////////////////////////////////////////
-SortedStringList::Node *SortedStringList::find(const QString &value) const
+SortedStringList::Node *SortedStringList::find(const TQString &value) const
{
Node *n = m_root;
while(n && value != n->key) {
@@ -135,7 +135,7 @@ SortedStringList::Node *SortedStringList::find(const QString &value) const
return n;
}
-bool SortedStringList::BSTInsert(const QString &value)
+bool SortedStringList::BSTInsert(const TQString &value)
{
Node *previousNode = 0;
Node *node = m_root;
@@ -169,7 +169,7 @@ bool SortedStringList::BSTInsert(const QString &value)
return false;
}
-void SortedStringList::traverse(const Node *n, QStringList &list) const
+void SortedStringList::traverse(const Node *n, TQStringList &list) const
{
if(!n)
return;
diff --git a/juk/sortedstringlist.h b/juk/sortedstringlist.h
index 108a16c6..01386262 100644
--- a/juk/sortedstringlist.h
+++ b/juk/sortedstringlist.h
@@ -16,7 +16,7 @@
#ifndef SORTEDSTRINGLIST_H
#define SORTEDSTRINGLIST_H
-#include <qstringlist.h>
+#include <tqstringlist.h>
class SortedStringList
{
@@ -28,27 +28,27 @@ public:
* Insert the value. Returns true if the item was already in the list
* or false otherwise.
*/
- bool insert(const QString &value);
- bool contains(const QString &value) const;
- bool remove(const QString &value);
+ bool insert(const TQString &value);
+ bool contains(const TQString &value) const;
+ bool remove(const TQString &value);
/**
* Returns a sorted list of the values.
* Warning, this method is expensive and shouldn't be used except when
* necessary.
*/
- QStringList values() const;
+ TQStringList values() const;
private:
class Node;
- Node *find(const QString &value) const;
+ Node *find(const TQString &value) const;
/**
* The insertion implementation. Returns true if the item was already
* present in the list.
*/
- bool BSTInsert(const QString &value);
- void traverse(const Node *n, QStringList &list) const;
+ bool BSTInsert(const TQString &value);
+ void traverse(const Node *n, TQStringList &list) const;
Node *treeMinimum(Node *n) const;
Node *treeSuccessor(Node *n) const;
diff --git a/juk/splashscreen.cpp b/juk/splashscreen.cpp
index 5f91a070..b8b69c87 100644
--- a/juk/splashscreen.cpp
+++ b/juk/splashscreen.cpp
@@ -19,7 +19,7 @@
#include <kstandarddirs.h>
#include <kdebug.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include "splashscreen.h"
@@ -27,10 +27,10 @@ SplashScreen *SplashScreen::splash = 0;
bool SplashScreen::done = false;
int SplashScreen::count = 0;
-static QString loadedText(int i)
+static TQString loadedText(int i)
{
- static QString loading = i18n("Loading").upper();
- return loading + ": " + QString::number(i);;
+ static TQString loading = i18n("Loading").upper();
+ return loading + ": " + TQString::number(i);;
}
////////////////////////////////////////////////////////////////////////////////
@@ -70,18 +70,18 @@ void SplashScreen::update()
// protected members
////////////////////////////////////////////////////////////////////////////////
-SplashScreen::SplashScreen() : QLabel(0 , "splashScreen", Qt::WStyle_Splash)
+SplashScreen::SplashScreen() : TQLabel(0 , "splashScreen", Qt::WStyle_Splash)
{
- QPixmap background = UserIcon("splash");
+ TQPixmap background = UserIcon("splash");
resize(background.size());
setPaletteBackgroundPixmap(background);
setMargin(7);
setAlignment(AlignLeft | AlignBottom);
- setPaletteForegroundColor(QColor(107, 158, 194));
+ setPaletteForegroundColor(TQColor(107, 158, 194));
- QFont f = font();
+ TQFont f = font();
f.setPixelSize(10);
setFont(f);
diff --git a/juk/splashscreen.h b/juk/splashscreen.h
index 407ed509..eff0eec9 100644
--- a/juk/splashscreen.h
+++ b/juk/splashscreen.h
@@ -16,7 +16,7 @@
#ifndef SPLASHSCREEN_H
#define SPLASHSCREEN_H
-#include <qlabel.h>
+#include <tqlabel.h>
/**
* Well, all of this session restoration sure is fun, but it's starting to take
diff --git a/juk/statuslabel.cpp b/juk/statuslabel.cpp
index fa8dfb38..81f066ea 100644
--- a/juk/statuslabel.cpp
+++ b/juk/statuslabel.cpp
@@ -20,8 +20,8 @@
#include <klocale.h>
#include <kdebug.h>
-#include <qtooltip.h>
-#include <qlayout.h>
+#include <tqtooltip.h>
+#include <tqlayout.h>
#include "statuslabel.h"
#include "filehandle.h"
@@ -35,57 +35,57 @@ using namespace ActionCollection;
// public methods
////////////////////////////////////////////////////////////////////////////////
-StatusLabel::StatusLabel(PlaylistInterface *playlist, QWidget *parent, const char *name) :
- QHBox(parent, name),
+StatusLabel::StatusLabel(PlaylistInterface *playlist, TQWidget *parent, const char *name) :
+ TQHBox(parent, name),
PlaylistObserver(playlist),
m_showTimeRemaining(false)
{
- QFrame *trackAndPlaylist = new QFrame(this);
+ TQFrame *trackAndPlaylist = new TQFrame(this);
trackAndPlaylist->setFrameStyle(Box | Sunken);
- trackAndPlaylist->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ trackAndPlaylist->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
// Make sure that we have enough of a margin to suffice for the borders,
// hence the "lineWidth() * 2"
- QHBoxLayout *trackAndPlaylistLayout = new QHBoxLayout(trackAndPlaylist,
+ TQHBoxLayout *trackAndPlaylistLayout = new TQHBoxLayout(trackAndPlaylist,
trackAndPlaylist->lineWidth() * 2,
5, "trackAndPlaylistLayout");
trackAndPlaylistLayout->addSpacing(5);
m_playlistLabel = new KSqueezedTextLabel(trackAndPlaylist, "playlistLabel");
trackAndPlaylistLayout->addWidget(m_playlistLabel);
- m_playlistLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ m_playlistLabel->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
m_playlistLabel->setTextFormat(PlainText);
m_playlistLabel->setAlignment(AlignLeft | AlignVCenter);
m_trackLabel = new KSqueezedTextLabel(trackAndPlaylist, "trackLabel");
trackAndPlaylistLayout->addWidget(m_trackLabel);
m_trackLabel->setAlignment(AlignRight | AlignVCenter);
- m_trackLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ m_trackLabel->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
m_trackLabel->setTextFormat(PlainText);
trackAndPlaylistLayout->addSpacing(5);
- m_itemTimeLabel = new QLabel(this);
- QFontMetrics fontMetrics(font());
+ m_itemTimeLabel = new TQLabel(this);
+ TQFontMetrics fontMetrics(font());
m_itemTimeLabel->setAlignment(AlignCenter);
m_itemTimeLabel->setMinimumWidth(fontMetrics.boundingRect("000:00 / 000:00").width());
- m_itemTimeLabel->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Expanding);
+ m_itemTimeLabel->setSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding);
m_itemTimeLabel->setFrameStyle(Box | Sunken);
m_itemTimeLabel->installEventFilter(this);
setItemTotalTime(0);
setItemCurrentTime(0);
- QHBox *jumpBox = new QHBox(this);
+ TQHBox *jumpBox = new TQHBox(this);
jumpBox->setFrameStyle(Box | Sunken);
- jumpBox->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Minimum);
+ jumpBox->setSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::Minimum);
- QPushButton *jumpButton = new QPushButton(jumpBox);
+ TQPushButton *jumpButton = new TQPushButton(jumpBox);
jumpButton->setPixmap(SmallIcon("up"));
jumpButton->setFlat(true);
- QToolTip::add(jumpButton, i18n("Jump to the currently playing item"));
- connect(jumpButton, SIGNAL(clicked()), action("showPlaying"), SLOT(activate()));
+ TQToolTip::add(jumpButton, i18n("Jump to the currently playing item"));
+ connect(jumpButton, TQT_SIGNAL(clicked()), action("showPlaying"), TQT_SLOT(activate()));
installEventFilter(this);
@@ -102,10 +102,10 @@ void StatusLabel::updateCurrent()
if(playlist()->playing()) {
FileHandle file = playlist()->currentFile();
- QString mid = file.tag()->artist().isEmpty() || file.tag()->title().isEmpty()
- ? QString::null : QString(" - ");
+ TQString mid = file.tag()->artist().isEmpty() || file.tag()->title().isEmpty()
+ ? TQString::null : TQString(" - ");
- QString text = file.tag()->artist() + mid + file.tag()->title();
+ TQString text = file.tag()->artist() + mid + file.tag()->title();
m_trackLabel->setText(text);
m_playlistLabel->setText(playlist()->name().simplifyWhiteSpace());
@@ -127,7 +127,7 @@ void StatusLabel::updateData()
int minutes = time / 60 % 60;
int seconds = time % 60;
- QString timeString;
+ TQString timeString;
if(days > 0) {
timeString = i18n("1 day", "%n days", days);
@@ -135,9 +135,9 @@ void StatusLabel::updateData()
}
if(days > 0 || hours > 0)
- timeString.append(QString().sprintf("%1d:%02d:%02d", hours, minutes, seconds));
+ timeString.append(TQString().sprintf("%1d:%02d:%02d", hours, minutes, seconds));
else
- timeString.append(QString().sprintf("%1d:%02d", minutes, seconds));
+ timeString.append(TQString().sprintf("%1d:%02d", minutes, seconds));
m_playlistLabel->setText(playlist()->name());
m_trackLabel->setText(i18n("1 item", "%n items", playlist()->count()) + " - " + timeString);
@@ -165,18 +165,18 @@ void StatusLabel::updateTime()
int totalMinutes = int(m_itemTotalTime / 60);
int totalSeconds = m_itemTotalTime % 60;
- QString timeString = formatTime(minutes, seconds) + " / " +
+ TQString timeString = formatTime(minutes, seconds) + " / " +
formatTime(totalMinutes, totalSeconds);
m_itemTimeLabel->setText(timeString);
}
-bool StatusLabel::eventFilter(QObject *o, QEvent *e)
+bool StatusLabel::eventFilter(TQObject *o, TQEvent *e)
{
if(!o || !e)
return false;
- QMouseEvent *mouseEvent = static_cast<QMouseEvent *>(e);
- if(e->type() == QEvent::MouseButtonRelease &&
+ TQMouseEvent *mouseEvent = static_cast<TQMouseEvent *>(e);
+ if(e->type() == TQEvent::MouseButtonRelease &&
mouseEvent->button() == LeftButton)
{
if(o == m_itemTimeLabel) {
@@ -191,12 +191,12 @@ bool StatusLabel::eventFilter(QObject *o, QEvent *e)
return false;
}
-QString StatusLabel::formatTime(int minutes, int seconds) // static
+TQString StatusLabel::formatTime(int minutes, int seconds) // static
{
- QString m = QString::number(minutes);
+ TQString m = TQString::number(minutes);
if(m.length() == 1)
m = "0" + m;
- QString s = QString::number(seconds);
+ TQString s = TQString::number(seconds);
if(s.length() == 1)
s = "0" + s;
return m + ":" + s;
diff --git a/juk/statuslabel.h b/juk/statuslabel.h
index 6c733f21..ba519590 100644
--- a/juk/statuslabel.h
+++ b/juk/statuslabel.h
@@ -18,19 +18,19 @@
#include "playlistinterface.h"
-#include <qhbox.h>
+#include <tqhbox.h>
class QLabel;
class KSqueezedTextLabel;
class FileHandle;
-class StatusLabel : public QHBox, public PlaylistObserver
+class StatusLabel : public TQHBox, public PlaylistObserver
{
Q_OBJECT
public:
- StatusLabel(PlaylistInterface *playlist, QWidget *parent = 0, const char *name = 0);
+ StatusLabel(PlaylistInterface *playlist, TQWidget *parent = 0, const char *name = 0);
virtual ~StatusLabel();
virtual void updateCurrent();
@@ -48,9 +48,9 @@ signals:
private:
void updateTime();
- virtual bool eventFilter(QObject *o, QEvent *e);
+ virtual bool eventFilter(TQObject *o, TQEvent *e);
- static QString formatTime(int minutes, int seconds);
+ static TQString formatTime(int minutes, int seconds);
int m_itemTotalTime;
int m_itemCurrentTime;
@@ -58,7 +58,7 @@ private:
KSqueezedTextLabel *m_playlistLabel;
KSqueezedTextLabel *m_trackLabel;
- QLabel *m_itemTimeLabel;
+ TQLabel *m_itemTimeLabel;
};
#endif
diff --git a/juk/stringhash.h b/juk/stringhash.h
index 75992eec..0d3c43bb 100644
--- a/juk/stringhash.h
+++ b/juk/stringhash.h
@@ -16,7 +16,7 @@
#ifndef STRINGHASH_H
#define STRINGHASH_H
-#include <qptrvector.h>
+#include <tqptrvector.h>
#include "filehandle.h"
@@ -49,7 +49,7 @@ public:
*/
bool remove(T value);
- QValueList<T> values() const;
+ TQValueList<T> values() const;
int hash(T key) const;
@@ -108,7 +108,7 @@ protected:
void deleteNode(Node *n);
- QPtrVector<Node> m_table;
+ TQPtrVector<Node> m_table;
static const int m_tableSize = 5003;
};
@@ -116,12 +116,12 @@ protected:
// helper functions
////////////////////////////////////////////////////////////////////////////////
-inline char hashStringAccess(const QString &in, int index)
+inline char hashStringAccess(const TQString &in, int index)
{
return in.unicode()[index].cell();
}
-inline char hashStringAccess(const QCString &in, int index)
+inline char hashStringAccess(const TQCString &in, int index)
{
return in[index];
}
@@ -152,11 +152,11 @@ inline int hashString(const StringType &s)
// StringHash
-template<> inline int Hash<QString>::hash(QString key) const
+template<> inline int Hash<TQString>::hash(TQString key) const
{
return hashString(key) % tableSize();
}
-typedef Hash<QString> StringHash;
+typedef Hash<TQString> StringHash;
// PtrHash
@@ -178,7 +178,7 @@ class FileHandleHash : public Hash<FileHandle>
public:
FileHandleHash() : Hash<FileHandle>() {}
- FileHandle value(const QString &key) const
+ FileHandle value(const TQString &key) const
{
int h = hashString(key) % tableSize();
Node *i = m_table[h];
@@ -268,9 +268,9 @@ bool Hash<T>::remove(T value)
}
template <class T>
-QValueList<T> Hash<T>::values() const
+TQValueList<T> Hash<T>::values() const
{
- QValueList<T> l;
+ TQValueList<T> l;
Node *n;
diff --git a/juk/stringshare.cpp b/juk/stringshare.cpp
index ddd6a1ba..195fd64f 100644
--- a/juk/stringshare.cpp
+++ b/juk/stringshare.cpp
@@ -31,8 +31,8 @@ StringShare::Data* StringShare::s_data = 0;
struct StringShare::Data
{
- QString qstringHash [SIZE];
- QCString qcstringHash[SIZE];
+ TQString qstringHash [SIZE];
+ TQCString qcstringHash[SIZE];
};
StringShare::Data* StringShare::data()
@@ -42,7 +42,7 @@ StringShare::Data* StringShare::data()
return s_data;
}
-QString StringShare::tryShare(const QString& in)
+TQString StringShare::tryShare(const TQString& in)
{
int index = hashString(in) % SIZE;
@@ -57,7 +57,7 @@ QString StringShare::tryShare(const QString& in)
}
}
-QCString StringShare::tryShare(const QCString& in)
+TQCString StringShare::tryShare(const TQCString& in)
{
int index = hashString(in) % SIZE;
diff --git a/juk/stringshare.h b/juk/stringshare.h
index 743b2c1e..3a53d038 100644
--- a/juk/stringshare.h
+++ b/juk/stringshare.h
@@ -16,7 +16,7 @@
#ifndef STRING_SHARE_H
#define STRING_SHARE_H
-#include <qstring.h>
+#include <tqstring.h>
/**
This class attempts to normalize repeated occurances of strings to use
@@ -26,8 +26,8 @@ class StringShare
{
struct Data;
public:
- static QString tryShare(const QString& in);
- static QCString tryShare(const QCString& in);
+ static TQString tryShare(const TQString& in);
+ static TQCString tryShare(const TQCString& in);
private:
static Data* data();
diff --git a/juk/systemtray.cpp b/juk/systemtray.cpp
index 1691bc91..40cdd082 100644
--- a/juk/systemtray.cpp
+++ b/juk/systemtray.cpp
@@ -24,15 +24,15 @@
#include <kglobalsettings.h>
#include <kdebug.h>
-#include <qvbox.h>
-#include <qtimer.h>
-#include <qcolor.h>
-#include <qpushbutton.h>
-#include <qtooltip.h>
-#include <qpainter.h>
-#include <qvaluevector.h>
-#include <qstylesheet.h>
-#include <qpalette.h>
+#include <tqvbox.h>
+#include <tqtimer.h>
+#include <tqcolor.h>
+#include <tqpushbutton.h>
+#include <tqtooltip.h>
+#include <tqpainter.h>
+#include <tqvaluevector.h>
+#include <tqstylesheet.h>
+#include <tqpalette.h>
#include <netwm.h>
@@ -45,59 +45,59 @@
using namespace ActionCollection;
-static bool copyImage(QImage &dest, QImage &src, int x, int y);
+static bool copyImage(TQImage &dest, TQImage &src, int x, int y);
class FlickerFreeLabel : public QLabel
{
public:
- FlickerFreeLabel(const QString &text, QWidget *parent, const char *name = 0) :
- QLabel(text, parent, name)
+ FlickerFreeLabel(const TQString &text, TQWidget *parent, const char *name = 0) :
+ TQLabel(text, parent, name)
{
m_textColor = paletteForegroundColor();
m_bgColor = parentWidget()->paletteBackgroundColor();
setBackgroundMode(NoBackground);
}
- QColor textColor() const
+ TQColor textColor() const
{
return m_textColor;
}
- QColor backgroundColor() const
+ TQColor backgroundColor() const
{
return m_bgColor;
}
protected:
- virtual void drawContents(QPainter *p)
+ virtual void drawContents(TQPainter *p)
{
// We want to intercept the drawContents call and draw on a pixmap
// instead of the window to keep flicker to an absolute minimum.
// Since Qt doesn't refresh the background, we need to do so
// ourselves.
- QPixmap pix(size());
- QPainter pixPainter(&pix);
+ TQPixmap pix(size());
+ TQPainter pixPainter(&pix);
pixPainter.fillRect(rect(), m_bgColor);
- QLabel::drawContents(&pixPainter);
+ TQLabel::drawContents(&pixPainter);
- bitBlt(p->device(), QPoint(0, 0), &pix, rect(), CopyROP);
+ bitBlt(p->device(), TQPoint(0, 0), &pix, rect(), CopyROP);
}
private:
- QColor m_textColor;
- QColor m_bgColor;
+ TQColor m_textColor;
+ TQColor m_bgColor;
};
-PassiveInfo::PassiveInfo(QWidget *parent, const char *name) :
- KPassivePopup(parent, name), m_timer(new QTimer), m_justDie(false)
+PassiveInfo::PassiveInfo(TQWidget *parent, const char *name) :
+ KPassivePopup(parent, name), m_timer(new TQTimer), m_justDie(false)
{
// I'm so sick and tired of KPassivePopup screwing this up
// that I'll just handle the timeout myself, thank you very much.
KPassivePopup::setTimeout(0);
- connect(m_timer, SIGNAL(timeout()), SLOT(timerExpired()));
+ connect(m_timer, TQT_SIGNAL(timeout()), TQT_SLOT(timerExpired()));
}
void PassiveInfo::setTimeout(int delay)
@@ -121,13 +121,13 @@ void PassiveInfo::timerExpired()
emit timeExpired();
}
-void PassiveInfo::enterEvent(QEvent *)
+void PassiveInfo::enterEvent(TQEvent *)
{
m_timer->stop();
emit mouseEntered();
}
-void PassiveInfo::leaveEvent(QEvent *)
+void PassiveInfo::leaveEvent(TQEvent *)
{
m_justDie = true;
m_timer->start(50);
@@ -137,7 +137,7 @@ void PassiveInfo::leaveEvent(QEvent *)
// public methods
////////////////////////////////////////////////////////////////////////////////
-SystemTray::SystemTray(QWidget *parent, const char *name) : KSystemTray(parent, name),
+SystemTray::SystemTray(TQWidget *parent, const char *name) : KSystemTray(parent, name),
m_popup(0),
m_fadeTimer(0),
m_fade(true)
@@ -163,13 +163,13 @@ SystemTray::SystemTray(QWidget *parent, const char *name) : KSystemTray(parent,
// bindings dialog.
new KAction(i18n("Redisplay Popup"), KShortcut(), this,
- SLOT(slotPlay()), actions(), "showPopup");
+ TQT_SLOT(slotPlay()), actions(), "showPopup");
KPopupMenu *cm = contextMenu();
- connect(PlayerManager::instance(), SIGNAL(signalPlay()), this, SLOT(slotPlay()));
- connect(PlayerManager::instance(), SIGNAL(signalPause()), this, SLOT(slotPause()));
- connect(PlayerManager::instance(), SIGNAL(signalStop()), this, SLOT(slotStop()));
+ connect(PlayerManager::instance(), TQT_SIGNAL(signalPlay()), this, TQT_SLOT(slotPlay()));
+ connect(PlayerManager::instance(), TQT_SIGNAL(signalPause()), this, TQT_SLOT(slotPause()));
+ connect(PlayerManager::instance(), TQT_SIGNAL(signalStop()), this, TQT_SLOT(slotStop()));
action("play")->plug(cm);
action("pause")->plug(cm);
@@ -189,8 +189,8 @@ SystemTray::SystemTray(QWidget *parent, const char *name) : KSystemTray(parent,
action("togglePopups")->plug(cm);
- m_fadeTimer = new QTimer(this, "systrayFadeTimer");
- connect(m_fadeTimer, SIGNAL(timeout()), SLOT(slotNextStep()));
+ m_fadeTimer = new TQTimer(this, "systrayFadeTimer");
+ connect(m_fadeTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotNextStep()));
if(PlayerManager::instance()->playing())
slotPlay();
@@ -212,7 +212,7 @@ void SystemTray::slotPlay()
if(!PlayerManager::instance()->playing())
return;
- QPixmap cover = PlayerManager::instance()->playingFile().coverInfo()->pixmap(CoverInfo::Thumbnail);
+ TQPixmap cover = PlayerManager::instance()->playingFile().coverInfo()->pixmap(CoverInfo::Thumbnail);
setPixmap(m_playPix);
setToolTip(PlayerManager::instance()->playingString(), cover);
@@ -253,7 +253,7 @@ void SystemTray::slotPopupDestroyed()
void SystemTray::slotNextStep()
{
- QColor result;
+ TQColor result;
++m_step;
@@ -278,8 +278,8 @@ void SystemTray::slotFadeOut()
m_startColor = m_labels[0]->textColor();
m_endColor = m_labels[0]->backgroundColor();
- connect(this, SIGNAL(fadeDone()), m_popup, SLOT(hide()));
- connect(m_popup, SIGNAL(mouseEntered()), this, SLOT(slotMouseInPopup()));
+ connect(this, TQT_SIGNAL(fadeDone()), m_popup, TQT_SLOT(hide()));
+ connect(m_popup, TQT_SIGNAL(mouseEntered()), this, TQT_SLOT(slotMouseInPopup()));
m_fadeTimer->start(1500 / STEPS);
}
@@ -289,7 +289,7 @@ void SystemTray::slotFadeOut()
void SystemTray::slotMouseInPopup()
{
m_endColor = m_labels[0]->textColor();
- disconnect(SIGNAL(fadeDone()));
+ disconnect(TQT_SIGNAL(fadeDone()));
m_step = STEPS - 1; // Simulate end of fade to solid text
slotNextStep();
@@ -299,9 +299,9 @@ void SystemTray::slotMouseInPopup()
// private methods
////////////////////////////////////////////////////////////////////////////////
-QVBox *SystemTray::createPopupLayout(QWidget *parent, const FileHandle &file)
+TQVBox *SystemTray::createPopupLayout(TQWidget *parent, const FileHandle &file)
{
- QVBox *infoBox = 0;
+ TQVBox *infoBox = 0;
if(buttonsToLeft()) {
@@ -310,7 +310,7 @@ QVBox *SystemTray::createPopupLayout(QWidget *parent, const FileHandle &file)
createButtonBox(parent);
addSeparatorLine(parent);
- infoBox = new QVBox(parent);
+ infoBox = new TQVBox(parent);
// Another line, and the cover, if there's a cover, and if
// it's selected to be shown
@@ -329,7 +329,7 @@ QVBox *SystemTray::createPopupLayout(QWidget *parent, const FileHandle &file)
addSeparatorLine(parent);
}
- infoBox = new QVBox(parent);
+ infoBox = new TQVBox(parent);
addSeparatorLine(parent);
createButtonBox(parent);
@@ -360,13 +360,13 @@ void SystemTray::createPopup()
m_step = 0;
m_popup = new PassiveInfo(this);
- connect(m_popup, SIGNAL(destroyed()), SLOT(slotPopupDestroyed()));
- connect(m_popup, SIGNAL(timeExpired()), SLOT(slotFadeOut()));
+ connect(m_popup, TQT_SIGNAL(destroyed()), TQT_SLOT(slotPopupDestroyed()));
+ connect(m_popup, TQT_SIGNAL(timeExpired()), TQT_SLOT(slotFadeOut()));
- QHBox *box = new QHBox(m_popup, "popupMainLayout");
+ TQHBox *box = new TQHBox(m_popup, "popupMainLayout");
box->setSpacing(15); // Add space between text and buttons
- QVBox *infoBox = createPopupLayout(box, playingFile);
+ TQVBox *infoBox = createPopupLayout(box, playingFile);
for(unsigned i = 0; i < m_labels.capacity(); ++i) {
m_labels[i] = new FlickerFreeLabel(" ", infoBox);
@@ -384,17 +384,17 @@ void SystemTray::createPopup()
int labelCount = 0;
- QString title = QStyleSheet::escape(playingInfo->title());
- m_labels[labelCount++]->setText(QString("<qt><nobr><h2>%1</h2></nobr><qt>").arg(title));
+ TQString title = TQStyleSheet::escape(playingInfo->title());
+ m_labels[labelCount++]->setText(TQString("<qt><nobr><h2>%1</h2></nobr><qt>").arg(title));
if(!playingInfo->artist().isEmpty())
m_labels[labelCount++]->setText(playingInfo->artist());
if(!playingInfo->album().isEmpty()) {
- QString album = QStyleSheet::escape(playingInfo->album());
- QString s = playingInfo->year() > 0
- ? QString("<qt><nobr>%1 (%2)</nobr></qt>").arg(album).arg(playingInfo->year())
- : QString("<qt><nobr>%1</nobr></qt>").arg(album);
+ TQString album = TQStyleSheet::escape(playingInfo->album());
+ TQString s = playingInfo->year() > 0
+ ? TQString("<qt><nobr>%1 (%2)</nobr></qt>").arg(album).arg(playingInfo->year())
+ : TQString("<qt><nobr>%1</nobr></qt>").arg(album);
m_labels[labelCount++]->setText(s);
}
@@ -417,20 +417,20 @@ bool SystemTray::buttonsToLeft() const
NETRect frame, win;
ni.kdeGeometry(frame, win);
- QRect bounds = KGlobalSettings::desktopGeometry(QPoint(win.pos.x, win.pos.y));
+ TQRect bounds = KGlobalSettings::desktopGeometry(TQPoint(win.pos.x, win.pos.y));
// This seems to accurately guess what side of the icon that
// KPassivePopup will popup on.
return(win.pos.x < bounds.center().x());
}
-QPixmap SystemTray::createPixmap(const QString &pixName)
+TQPixmap SystemTray::createPixmap(const TQString &pixName)
{
- QPixmap bgPix = m_appPix;
- QPixmap fgPix = SmallIcon(pixName);
+ TQPixmap bgPix = m_appPix;
+ TQPixmap fgPix = SmallIcon(pixName);
- QImage bgImage = bgPix.convertToImage(); // Probably 22x22
- QImage fgImage = fgPix.convertToImage(); // Should be 16x16
+ TQImage bgImage = bgPix.convertToImage(); // Probably 22x22
+ TQImage fgImage = fgPix.convertToImage(); // Should be 16x16
KIconEffect::semiTransparent(bgImage);
copyImage(bgImage, fgImage, (bgImage.width() - fgImage.width()) / 2,
@@ -440,19 +440,19 @@ QPixmap SystemTray::createPixmap(const QString &pixName)
return bgPix;
}
-void SystemTray::createButtonBox(QWidget *parent)
+void SystemTray::createButtonBox(TQWidget *parent)
{
- QVBox *buttonBox = new QVBox(parent);
+ TQVBox *buttonBox = new TQVBox(parent);
buttonBox->setSpacing(3);
- QPushButton *forwardButton = new QPushButton(m_forwardPix, 0, buttonBox, "popup_forward");
+ TQPushButton *forwardButton = new TQPushButton(m_forwardPix, 0, buttonBox, "popup_forward");
forwardButton->setFlat(true);
- connect(forwardButton, SIGNAL(clicked()), SLOT(slotForward()));
+ connect(forwardButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotForward()));
- QPushButton *backButton = new QPushButton(m_backPix, 0, buttonBox, "popup_back");
+ TQPushButton *backButton = new TQPushButton(m_backPix, 0, buttonBox, "popup_back");
backButton->setFlat(true);
- connect(backButton, SIGNAL(clicked()), SLOT(slotBack()));
+ connect(backButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotBack()));
}
/**
@@ -472,10 +472,10 @@ void SystemTray::slotForward()
m_fade = false;
}
-void SystemTray::addSeparatorLine(QWidget *parent)
+void SystemTray::addSeparatorLine(TQWidget *parent)
{
- QFrame *line = new QFrame(parent);
- line->setFrameShape(QFrame::VLine);
+ TQFrame *line = new TQFrame(parent);
+ line->setFrameShape(TQFrame::VLine);
// Cover art takes up 80 pixels, make sure we take up at least 80 pixels
// even if we don't show the cover art for consistency.
@@ -483,18 +483,18 @@ void SystemTray::addSeparatorLine(QWidget *parent)
line->setMinimumHeight(80);
}
-void SystemTray::addCoverButton(QWidget *parent, const QPixmap &cover)
+void SystemTray::addCoverButton(TQWidget *parent, const TQPixmap &cover)
{
- QPushButton *coverButton = new QPushButton(parent);
+ TQPushButton *coverButton = new TQPushButton(parent);
coverButton->setPixmap(cover);
coverButton->setFixedSize(cover.size());
coverButton->setFlat(true);
- connect(coverButton, SIGNAL(clicked()), this, SLOT(slotPopupLargeCover()));
+ connect(coverButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotPopupLargeCover()));
}
-QColor SystemTray::interpolateColor(int step, int steps)
+TQColor SystemTray::interpolateColor(int step, int steps)
{
if(step < 0)
return m_startColor;
@@ -504,41 +504,41 @@ QColor SystemTray::interpolateColor(int step, int steps)
// TODO: Perhaps the algorithm here could be better? For example, it might
// make sense to go rather quickly from start to end and then slow down
// the progression.
- return QColor(
+ return TQColor(
(step * m_endColor.red() + (steps - step) * m_startColor.red()) / steps,
(step * m_endColor.green() + (steps - step) * m_startColor.green()) / steps,
(step * m_endColor.blue() + (steps - step) * m_startColor.blue()) / steps
);
}
-void SystemTray::setToolTip(const QString &tip, const QPixmap &cover)
+void SystemTray::setToolTip(const TQString &tip, const TQPixmap &cover)
{
- QToolTip::remove(this);
+ TQToolTip::remove(this);
if(tip.isNull())
- QToolTip::add(this, i18n("JuK"));
+ TQToolTip::add(this, i18n("JuK"));
else {
- QPixmap myCover = cover;
+ TQPixmap myCover = cover;
if(cover.isNull())
myCover = DesktopIcon("juk");
- QImage coverImage = myCover.convertToImage();
+ TQImage coverImage = myCover.convertToImage();
if(coverImage.size().width() > 32 || coverImage.size().height() > 32)
coverImage = coverImage.smoothScale(32, 32);
- QMimeSourceFactory::defaultFactory()->setImage("tipCover", coverImage);
+ TQMimeSourceFactory::defaultFactory()->setImage("tipCover", coverImage);
- QString html = i18n("%1 is Cover Art, %2 is the playing track, %3 is the appname",
+ TQString html = i18n("%1 is Cover Art, %2 is the playing track, %3 is the appname",
"<center><table cellspacing=\"2\"><tr><td valign=\"middle\">%1</td>"
"<td valign=\"middle\">%2</td></tr></table><em>%3</em></center>");
html = html.arg("<img valign=\"middle\" src=\"tipCover\"");
- html = html.arg(QString("<nobr>%1</nobr>").arg(tip), i18n("JuK"));
+ html = html.arg(TQString("<nobr>%1</nobr>").arg(tip), i18n("JuK"));
- QToolTip::add(this, html);
+ TQToolTip::add(this, html);
}
}
-void SystemTray::wheelEvent(QWheelEvent *e)
+void SystemTray::wheelEvent(TQWheelEvent *e)
{
if(e->orientation() == Horizontal)
return;
@@ -568,7 +568,7 @@ void SystemTray::wheelEvent(QWheelEvent *e)
/*
* Reimplemented this in order to use the middle mouse button
*/
-void SystemTray::mousePressEvent(QMouseEvent *e)
+void SystemTray::mousePressEvent(TQMouseEvent *e)
{
switch(e->button()) {
case LeftButton:
@@ -590,10 +590,10 @@ void SystemTray::mousePressEvent(QMouseEvent *e)
/*
* This function copies the entirety of src into dest, starting in
* dest at x and y. This function exists because I was unable to find
- * a function like it in either QImage or kdefx
+ * a function like it in either TQImage or kdefx
*/
-static bool copyImage(QImage &dest, QImage &src, int x, int y)
+static bool copyImage(TQImage &dest, TQImage &src, int x, int y)
{
if(dest.depth() != src.depth())
return false;
@@ -605,7 +605,7 @@ static bool copyImage(QImage &dest, QImage &src, int x, int y)
// We want to use KIconEffect::overlay to do this, since it handles
// alpha, but the images need to be the same size. We can handle that.
- QImage large_src(dest);
+ TQImage large_src(dest);
// It would perhaps be better to create large_src based on a size, but
// this is the easiest way to make a new image with the same depth, size,
diff --git a/juk/systemtray.h b/juk/systemtray.h
index 8dd66a62..34e638c8 100644
--- a/juk/systemtray.h
+++ b/juk/systemtray.h
@@ -21,8 +21,8 @@
#include <ksystemtray.h>
#include <kpassivepopup.h>
-#include <qvaluevector.h>
-#include <qcolor.h>
+#include <tqvaluevector.h>
+#include <tqcolor.h>
class FlickerFreeLabel;
class QTimer;
@@ -39,7 +39,7 @@ class PassiveInfo : public KPassivePopup
{
Q_OBJECT
public:
- PassiveInfo(QWidget *parent = 0, const char *name = 0);
+ PassiveInfo(TQWidget *parent = 0, const char *name = 0);
public slots:
void setTimeout(int delay);
@@ -50,14 +50,14 @@ signals:
void timeExpired();
protected:
- virtual void enterEvent(QEvent *);
- virtual void leaveEvent(QEvent *);
+ virtual void enterEvent(TQEvent *);
+ virtual void leaveEvent(TQEvent *);
private slots:
void timerExpired();
private:
- QTimer *m_timer;
+ TQTimer *m_timer;
bool m_justDie;
};
@@ -66,7 +66,7 @@ class SystemTray : public KSystemTray
Q_OBJECT
public:
- SystemTray(QWidget *parent = 0, const char *name = 0);
+ SystemTray(TQWidget *parent = 0, const char *name = 0);
virtual ~SystemTray();
signals:
@@ -76,30 +76,30 @@ signals:
private:
static const int STEPS = 20; ///< Number of intermediate steps for fading.
- virtual void wheelEvent(QWheelEvent *e);
+ virtual void wheelEvent(TQWheelEvent *e);
void createPopup();
- void setToolTip(const QString &tip = QString::null, const QPixmap &cover = QPixmap());
- void mousePressEvent(QMouseEvent *e);
- QPixmap createPixmap(const QString &pixName);
+ void setToolTip(const TQString &tip = TQString::null, const TQPixmap &cover = TQPixmap());
+ void mousePressEvent(TQMouseEvent *e);
+ TQPixmap createPixmap(const TQString &pixName);
// Returns true if the popup will need to have its buttons on the left
// (because the JuK icon is on the left side of the screen.
bool buttonsToLeft() const;
- void createButtonBox(QWidget *parent);
+ void createButtonBox(TQWidget *parent);
- // Creates the widget layout for the popup, returning the QVBox that
+ // Creates the widget layout for the popup, returning the TQVBox that
// holds the text labels. Uses buttonsToLeft() to figure out which
// order to create them in. @p file is used to grab the cover.
- QVBox *createPopupLayout(QWidget *parent, const FileHandle &file);
+ TQVBox *createPopupLayout(TQWidget *parent, const FileHandle &file);
- void addSeparatorLine(QWidget *parent);
- void addCoverButton(QWidget *parent, const QPixmap &cover);
+ void addSeparatorLine(TQWidget *parent);
+ void addCoverButton(TQWidget *parent, const TQPixmap &cover);
// Interpolates from start color to end color. If @p step == 0, then
// m_startColor is returned, while @p step == @steps returns
// m_endColor.
- QColor interpolateColor(int step, int steps = STEPS);
+ TQColor interpolateColor(int step, int steps = STEPS);
private slots:
void slotPlay();
@@ -115,17 +115,17 @@ private slots:
void slotMouseInPopup(); ///< Forces the text back to its normal color.
private:
- QPixmap m_playPix;
- QPixmap m_pausePix;
- QPixmap m_currentPix;
- QPixmap m_backPix;
- QPixmap m_forwardPix;
- QPixmap m_appPix;
- QColor m_startColor, m_endColor;
+ TQPixmap m_playPix;
+ TQPixmap m_pausePix;
+ TQPixmap m_currentPix;
+ TQPixmap m_backPix;
+ TQPixmap m_forwardPix;
+ TQPixmap m_appPix;
+ TQColor m_startColor, m_endColor;
PassiveInfo *m_popup;
- QValueVector<FlickerFreeLabel *> m_labels;
- QTimer *m_fadeTimer;
+ TQValueVector<FlickerFreeLabel *> m_labels;
+ TQTimer *m_fadeTimer;
int m_step;
bool m_fade;
};
diff --git a/juk/tag.cpp b/juk/tag.cpp
index 972b9284..802567dd 100644
--- a/juk/tag.cpp
+++ b/juk/tag.cpp
@@ -15,8 +15,8 @@
#include <kdebug.h>
-#include <qregexp.h>
-#include <qfile.h>
+#include <tqregexp.h>
+#include <tqfile.h>
#include <taglib/tag.h>
#include <taglib/mpegfile.h>
@@ -46,7 +46,7 @@
////////////////////////////////////////////////////////////////////////////////
-Tag::Tag(const QString &fileName) :
+Tag::Tag(const TQString &fileName) :
m_fileName(fileName),
m_track(0),
m_year(0),
@@ -59,33 +59,33 @@ Tag::Tag(const QString &fileName) :
qDebug("Reading tag for %s", fileName.local8Bit().data());
if(MediaFiles::isMP3(fileName)) {
- TagLib::MPEG::File file(QFile::encodeName(fileName).data());
+ TagLib::MPEG::File file(TQFile::encodeName(fileName).data());
if(file.isValid())
setup(&file);
}
else if(MediaFiles::isFLAC(fileName)) {
- TagLib::FLAC::File file(QFile::encodeName(fileName).data());
+ TagLib::FLAC::File file(TQFile::encodeName(fileName).data());
if(file.isValid())
setup(&file);
}
#ifdef TAGLIB_1_3
else if(MediaFiles::isMPC(fileName)) {
kdDebug(65432) << "Trying to resolve Musepack file" << endl;
- TagLib::MPC::File file(QFile::encodeName(fileName).data());
+ TagLib::MPC::File file(TQFile::encodeName(fileName).data());
if(file.isValid())
setup(&file);
}
#endif
#ifdef TAGLIB_1_2
else if(MediaFiles::isOggFLAC(fileName)) {
- TagLib::Ogg::FLAC::File file(QFile::encodeName(fileName).data());
+ TagLib::Ogg::FLAC::File file(TQFile::encodeName(fileName).data());
if(file.isValid())
setup(&file);
}
#endif
else if(MediaFiles::isVorbis(fileName)) {
- TagLib::Vorbis::File file(QFile::encodeName(fileName).data());
+ TagLib::Vorbis::File file(TQFile::encodeName(fileName).data());
if(file.isValid())
setup(&file);
}
@@ -104,19 +104,19 @@ bool Tag::save()
TagLib::File *file = 0;
if(MediaFiles::isMP3(m_fileName))
- file = new TagLib::MPEG::File(QFile::encodeName(m_fileName).data());
+ file = new TagLib::MPEG::File(TQFile::encodeName(m_fileName).data());
else if(MediaFiles::isFLAC(m_fileName))
- file = new TagLib::FLAC::File(QFile::encodeName(m_fileName).data());
+ file = new TagLib::FLAC::File(TQFile::encodeName(m_fileName).data());
#ifdef TAGLIB_1_3
else if(MediaFiles::isMPC(m_fileName))
- file = new TagLib::MPC::File(QFile::encodeName(m_fileName).data());
+ file = new TagLib::MPC::File(TQFile::encodeName(m_fileName).data());
#endif
#ifdef TAGLIB_1_2
else if(MediaFiles::isOggFLAC(m_fileName))
- file = new TagLib::Ogg::FLAC::File(QFile::encodeName(m_fileName).data());
+ file = new TagLib::Ogg::FLAC::File(TQFile::encodeName(m_fileName).data());
#endif
else if(MediaFiles::isVorbis(m_fileName))
- file = new TagLib::Vorbis::File(QFile::encodeName(m_fileName).data());
+ file = new TagLib::Vorbis::File(TQFile::encodeName(m_fileName).data());
if(file && file->isValid() && file->tag() && !file->readOnly()) {
file->tag()->setTitle(QStringToTString(m_title));
@@ -169,9 +169,9 @@ CacheDataStream &Tag::read(CacheDataStream &s)
break;
}
default: {
- static QString dummyString;
+ static TQString dummyString;
static int dummyInt;
- QString bitrateString;
+ TQString bitrateString;
s >> dummyInt
>> m_title
@@ -214,7 +214,7 @@ CacheDataStream &Tag::read(CacheDataStream &s)
// private methods
////////////////////////////////////////////////////////////////////////////////
-Tag::Tag(const QString &fileName, bool) :
+Tag::Tag(const TQString &fileName, bool) :
m_fileName(fileName),
m_track(0),
m_year(0),
@@ -242,7 +242,7 @@ void Tag::setup(TagLib::File *file)
const int seconds = m_seconds % 60;
const int minutes = (m_seconds - seconds) / 60;
- m_lengthString = QString::number(minutes) + (seconds >= 10 ? ":" : ":0") + QString::number(seconds);
+ m_lengthString = TQString::number(minutes) + (seconds >= 10 ? ":" : ":0") + TQString::number(seconds);
if(m_title.isEmpty()) {
int i = m_fileName.findRev('/');
@@ -257,7 +257,7 @@ void Tag::setup(TagLib::File *file)
// related functions
////////////////////////////////////////////////////////////////////////////////
-QDataStream &operator<<(QDataStream &s, const Tag &t)
+TQDataStream &operator<<(TQDataStream &s, const Tag &t)
{
s << t.title()
<< t.artist()
diff --git a/juk/tag.h b/juk/tag.h
index 66c01d1e..c37e9b3c 100644
--- a/juk/tag.h
+++ b/juk/tag.h
@@ -16,7 +16,7 @@
#ifndef TAG_H
#define TAG_H
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
namespace TagLib { class File; }
@@ -31,33 +31,33 @@ class Tag
{
friend class FileHandle;
public:
- Tag(const QString &fileName);
+ Tag(const TQString &fileName);
/**
* Create an empty tag. Used in FileHandle for cache restoration.
*/
- Tag(const QString &fileName, bool);
+ Tag(const TQString &fileName, bool);
bool save();
- QString title() const { return m_title; }
- QString artist() const { return m_artist; }
- QString album() const { return m_album; }
- QString genre() const { return m_genre; }
+ TQString title() const { return m_title; }
+ TQString artist() const { return m_artist; }
+ TQString album() const { return m_album; }
+ TQString genre() const { return m_genre; }
int track() const { return m_track; }
int year() const { return m_year; }
- QString comment() const { return m_comment; }
+ TQString comment() const { return m_comment; }
- QString fileName() const { return m_fileName; }
+ TQString fileName() const { return m_fileName; }
- void setTitle(const QString &value) { m_title = value; }
- void setArtist(const QString &value) { m_artist = value; }
- void setAlbum(const QString &value) { m_album = value; }
- void setGenre(const QString &value) { m_genre = value; }
+ void setTitle(const TQString &value) { m_title = value; }
+ void setArtist(const TQString &value) { m_artist = value; }
+ void setAlbum(const TQString &value) { m_album = value; }
+ void setGenre(const TQString &value) { m_genre = value; }
void setTrack(int value) { m_track = value; }
void setYear(int value) { m_year = value; }
- void setComment(const QString &value) { m_comment = value; }
+ void setComment(const TQString &value) { m_comment = value; }
- void setFileName(const QString &value) { m_fileName = value; }
+ void setFileName(const TQString &value) { m_fileName = value; }
int seconds() const { return m_seconds; }
int bitrate() const { return m_bitrate; }
@@ -68,28 +68,28 @@ public:
* As a convenience, since producing a length string from a number of second
* isn't a one liner, provide the lenght in string form.
*/
- QString lengthString() const { return m_lengthString; }
+ TQString lengthString() const { return m_lengthString; }
CacheDataStream &read(CacheDataStream &s);
private:
void setup(TagLib::File *file);
- QString m_fileName;
- QString m_title;
- QString m_artist;
- QString m_album;
- QString m_genre;
- QString m_comment;
+ TQString m_fileName;
+ TQString m_title;
+ TQString m_artist;
+ TQString m_album;
+ TQString m_genre;
+ TQString m_comment;
int m_track;
int m_year;
int m_seconds;
int m_bitrate;
- QDateTime m_modificationTime;
- QString m_lengthString;
+ TQDateTime m_modificationTime;
+ TQString m_lengthString;
bool m_isValid;
};
-QDataStream &operator<<(QDataStream &s, const Tag &t);
+TQDataStream &operator<<(TQDataStream &s, const Tag &t);
CacheDataStream &operator>>(CacheDataStream &s, Tag &t);
#endif
diff --git a/juk/tageditor.cpp b/juk/tageditor.cpp
index a9bc764d..449f4392 100644
--- a/juk/tageditor.cpp
+++ b/juk/tageditor.cpp
@@ -31,14 +31,14 @@
#include <kiconloader.h>
#include <kactionclasses.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qdir.h>
-#include <qvalidator.h>
-#include <qtooltip.h>
-#include <qeventloop.h>
-#include <qdict.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqdir.h>
+#include <tqvalidator.h>
+#include <tqtooltip.h>
+#include <tqeventloop.h>
+#include <tqdict.h>
#include <id3v1genres.h>
@@ -49,15 +49,15 @@ using namespace ActionCollection;
class FileNameValidator : public QValidator
{
public:
- FileNameValidator(QObject *parent, const char *name = 0) :
- QValidator(parent, name) {}
+ FileNameValidator(TQObject *parent, const char *name = 0) :
+ TQValidator(parent, name) {}
- virtual void fixup(QString &s) const
+ virtual void fixup(TQString &s) const
{
s.remove('/');
}
- virtual State validate(QString &s, int &) const
+ virtual State validate(TQString &s, int &) const
{
if(s.find('/') != -1)
return Invalid;
@@ -68,10 +68,10 @@ public:
class FileBoxToolTip : public QToolTip
{
public:
- FileBoxToolTip(TagEditor *editor, QWidget *widget) :
- QToolTip(widget), m_editor(editor) {}
+ FileBoxToolTip(TagEditor *editor, TQWidget *widget) :
+ TQToolTip(widget), m_editor(editor) {}
protected:
- virtual void maybeTip(const QPoint &)
+ virtual void maybeTip(const TQPoint &)
{
tip(parentWidget()->rect(), m_editor->items().first()->file().absFilePath());
}
@@ -82,19 +82,19 @@ private:
class FixedHLayout : public QHBoxLayout
{
public:
- FixedHLayout(QWidget *parent, int margin = 0, int spacing = -1, const char *name = 0) :
- QHBoxLayout(parent, margin, spacing, name),
+ FixedHLayout(TQWidget *parent, int margin = 0, int spacing = -1, const char *name = 0) :
+ TQHBoxLayout(parent, margin, spacing, name),
m_width(-1) {}
- FixedHLayout(QLayout *parentLayout, int spacing = -1, const char *name = 0) :
- QHBoxLayout(parentLayout, spacing, name),
+ FixedHLayout(TQLayout *parentLayout, int spacing = -1, const char *name = 0) :
+ TQHBoxLayout(parentLayout, spacing, name),
m_width(-1) {}
void setWidth(int w = -1)
{
- m_width = w == -1 ? QHBoxLayout::minimumSize().width() : w;
+ m_width = w == -1 ? TQHBoxLayout::minimumSize().width() : w;
}
- virtual QSize minimumSize() const
+ virtual TQSize minimumSize() const
{
- QSize s = QHBoxLayout::minimumSize();
+ TQSize s = TQHBoxLayout::minimumSize();
s.setWidth(m_width);
return s;
}
@@ -127,8 +127,8 @@ private:
// public members
////////////////////////////////////////////////////////////////////////////////
-TagEditor::TagEditor(QWidget *parent, const char *name) :
- QWidget(parent, name),
+TagEditor::TagEditor(TQWidget *parent, const char *name) :
+ TQWidget(parent, name),
m_currentPlaylist(0),
m_observer(0),
m_performingSave(false)
@@ -172,8 +172,8 @@ void TagEditor::slotSetItems(const PlaylistItemList &list)
saveChangesPrompt();
if(m_currentPlaylist) {
- disconnect(m_currentPlaylist, SIGNAL(signalAboutToRemove(PlaylistItem *)),
- this, SLOT(slotItemRemoved(PlaylistItem *)));
+ disconnect(m_currentPlaylist, TQT_SIGNAL(signalAboutToRemove(PlaylistItem *)),
+ this, TQT_SLOT(slotItemRemoved(PlaylistItem *)));
}
if(hadPlaylist && !m_currentPlaylist || !itemPlaylist) {
@@ -189,9 +189,9 @@ void TagEditor::slotSetItems(const PlaylistItemList &list)
}
if(m_currentPlaylist) {
- connect(m_currentPlaylist, SIGNAL(signalAboutToRemove(PlaylistItem *)),
- this, SLOT(slotItemRemoved(PlaylistItem *)));
- connect(m_currentPlaylist, SIGNAL(destroyed()), this, SLOT(slotPlaylistRemoved()));
+ connect(m_currentPlaylist, TQT_SIGNAL(signalAboutToRemove(PlaylistItem *)),
+ this, TQT_SLOT(slotItemRemoved(PlaylistItem *)));
+ connect(m_currentPlaylist, TQT_SIGNAL(destroyed()), this, TQT_SLOT(slotPlaylistRemoved()));
}
if(isVisible())
@@ -221,7 +221,7 @@ void TagEditor::slotRefresh()
Tag *tag = item->file().tag();
- QFileInfo fi(item->file().absFilePath());
+ TQFileInfo fi(item->file().absFilePath());
if(!fi.isWritable() && m_items.count() == 1)
setEnabled(false);
@@ -231,7 +231,7 @@ void TagEditor::slotRefresh()
m_fileNameBox->setText(item->file().fileInfo().fileName());
new FileBoxToolTip(this, m_fileNameBox);
- m_bitrateBox->setText(QString::number(tag->bitrate()));
+ m_bitrateBox->setText(TQString::number(tag->bitrate()));
m_lengthBox->setText(tag->lengthString());
if(m_genreList.findIndex(tag->genre()) >= 0)
@@ -255,7 +255,7 @@ void TagEditor::slotRefresh()
if(it != m_items.end()) {
- QValueListIterator<QWidget *> hideIt = m_hideList.begin();
+ TQValueListIterator<TQWidget *> hideIt = m_hideList.begin();
for(; hideIt != m_hideList.end(); ++hideIt)
(*hideIt)->hide();
@@ -335,7 +335,7 @@ void TagEditor::slotRefresh()
else {
// Clean up in the case that we are only handling one item.
- QValueListIterator<QWidget *> showIt = m_hideList.begin();
+ TQValueListIterator<TQWidget *> showIt = m_hideList.begin();
for(; showIt != m_hideList.end(); ++showIt)
(*showIt)->show();
@@ -379,13 +379,13 @@ void TagEditor::updateCollection()
if(!list)
return;
- QStringList artistList = list->uniqueSet(CollectionList::Artists);
+ TQStringList artistList = list->uniqueSet(CollectionList::Artists);
artistList.sort();
m_artistNameBox->listBox()->clear();
m_artistNameBox->listBox()->insertStringList(artistList);
m_artistNameBox->completionObject()->setItems(artistList);
- QStringList albumList = list->uniqueSet(CollectionList::Albums);
+ TQStringList albumList = list->uniqueSet(CollectionList::Albums);
albumList.sort();
m_albumNameBox->listBox()->clear();
m_albumNameBox->listBox()->insertStringList(albumList);
@@ -397,7 +397,7 @@ void TagEditor::updateCollection()
m_genreList = list->uniqueSet(CollectionList::Genres);
- for(QStringList::ConstIterator it = m_genreList.begin(); it != m_genreList.end(); ++it)
+ for(TQStringList::ConstIterator it = m_genreList.begin(); it != m_genreList.end(); ++it)
genreHash.insert(*it);
TagLib::StringList genres = TagLib::ID3v1::genreList();
@@ -409,7 +409,7 @@ void TagEditor::updateCollection()
m_genreList.sort();
m_genreBox->listBox()->clear();
- m_genreBox->listBox()->insertItem(QString::null);
+ m_genreBox->listBox()->insertItem(TQString::null);
m_genreBox->listBox()->insertStringList(m_genreList);
m_genreBox->completionObject()->setItems(m_genreList);
}
@@ -440,12 +440,12 @@ void TagEditor::readConfig()
m_genreList.sort();
m_genreBox->clear();
- m_genreBox->insertItem(QString::null);
+ m_genreBox->insertItem(TQString::null);
m_genreBox->insertStringList(m_genreList);
m_genreBox->completionObject()->setItems(m_genreList);
}
-void TagEditor::readCompletionMode(KConfigBase *config, KComboBox *box, const QString &key)
+void TagEditor::readCompletionMode(KConfigBase *config, KComboBox *box, const TQString &key)
{
KGlobalSettings::Completion mode =
KGlobalSettings::Completion(config->readNumEntry(key, KGlobalSettings::CompletionAuto));
@@ -471,9 +471,9 @@ void TagEditor::setupActions()
{
KToggleAction *show = new KToggleAction(i18n("Show &Tag Editor"), "edit", 0, actions(), "showEditor");
show->setCheckedState(i18n("Hide &Tag Editor"));
- connect(show, SIGNAL(toggled(bool)), this, SLOT(setShown(bool)));
+ connect(show, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setShown(bool)));
- new KAction(i18n("&Save"), "filesave", "CTRL+t", this, SLOT(slotSave()), actions(), "saveItem");
+ new KAction(i18n("&Save"), "filesave", "CTRL+t", this, TQT_SLOT(slotSave()), actions(), "saveItem");
}
void TagEditor::setupLayout()
@@ -481,13 +481,13 @@ void TagEditor::setupLayout()
static const int horizontalSpacing = 12;
static const int verticalSpacing = 2;
- QHBoxLayout *layout = new QHBoxLayout(this, 6, horizontalSpacing);
+ TQHBoxLayout *layout = new TQHBoxLayout(this, 6, horizontalSpacing);
//////////////////////////////////////////////////////////////////////////////
// define two columns of the bottem layout
//////////////////////////////////////////////////////////////////////////////
- QVBoxLayout *leftColumnLayout = new QVBoxLayout(layout, verticalSpacing);
- QVBoxLayout *rightColumnLayout = new QVBoxLayout(layout, verticalSpacing);
+ TQVBoxLayout *leftColumnLayout = new TQVBoxLayout(layout, verticalSpacing);
+ TQVBoxLayout *rightColumnLayout = new TQVBoxLayout(layout, verticalSpacing);
layout->setStretchFactor(leftColumnLayout, 2);
layout->setStretchFactor(rightColumnLayout, 3);
@@ -512,23 +512,23 @@ void TagEditor::setupLayout()
addItem(i18n("&Genre:"), m_genreBox, leftColumnLayout, "knotify");
// this fills the space at the bottem of the left column
- leftColumnLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Minimum,
- QSizePolicy::Expanding));
+ leftColumnLayout->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Minimum,
+ TQSizePolicy::Expanding));
}
//////////////////////////////////////////////////////////////////////////////
// put stuff in the right column
//////////////////////////////////////////////////////////////////////////////
{ // just for organization
- QHBoxLayout *fileNameLayout = new QHBoxLayout(rightColumnLayout,
+ TQHBoxLayout *fileNameLayout = new TQHBoxLayout(rightColumnLayout,
horizontalSpacing);
m_fileNameBox = new KLineEdit(this, "fileNameBox");
m_fileNameBox->setValidator(new FileNameValidator(m_fileNameBox));
- QLabel *fileNameIcon = new QLabel(this);
+ TQLabel *fileNameIcon = new TQLabel(this);
fileNameIcon->setPixmap(SmallIcon("sound"));
- QWidget *fileNameLabel = addHidden(new QLabel(m_fileNameBox, i18n("&File name:"), this));
+ TQWidget *fileNameLabel = addHidden(new TQLabel(m_fileNameBox, i18n("&File name:"), this));
fileNameLayout->addWidget(addHidden(fileNameIcon));
fileNameLayout->addWidget(fileNameLabel);
@@ -545,17 +545,17 @@ void TagEditor::setupLayout()
addItem(i18n("T&rack:"), m_trackSpin, trackRowLayout);
m_trackSpin->installEventFilter(this);
- trackRowLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding,
- QSizePolicy::Minimum));
+ trackRowLayout->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Expanding,
+ TQSizePolicy::Minimum));
m_yearSpin = new KIntSpinBox(0, 9999, 1, 0, 10, this, "yearSpin");
addItem(i18n("&Year:"), m_yearSpin, trackRowLayout);
m_yearSpin->installEventFilter(this);
- trackRowLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding,
- QSizePolicy::Minimum));
+ trackRowLayout->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Expanding,
+ TQSizePolicy::Minimum));
- trackRowLayout->addWidget(addHidden(new QLabel(i18n("Length:"), this)));
+ trackRowLayout->addWidget(addHidden(new TQLabel(i18n("Length:"), this)));
m_lengthBox = new KLineEdit(this, "lengthBox");
// addItem(i18n("Length:"), m_lengthBox, trackRowLayout);
m_lengthBox->setMinimumWidth(fontMetrics().width("00:00") + trackRowLayout->spacing());
@@ -564,10 +564,10 @@ void TagEditor::setupLayout()
m_lengthBox->setReadOnly(true);
trackRowLayout->addWidget(addHidden(m_lengthBox));
- trackRowLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding,
- QSizePolicy::Minimum));
+ trackRowLayout->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Expanding,
+ TQSizePolicy::Minimum));
- trackRowLayout->addWidget(addHidden(new QLabel(i18n("Bitrate:"), this)));
+ trackRowLayout->addWidget(addHidden(new TQLabel(i18n("Bitrate:"), this)));
m_bitrateBox = new KLineEdit(this, "bitrateBox");
// addItem(i18n("Bitrate:"), m_bitrateBox, trackRowLayout);
m_bitrateBox->setMinimumWidth(fontMetrics().width("000") + trackRowLayout->spacing());
@@ -586,32 +586,32 @@ void TagEditor::setupLayout()
}
- connect(m_artistNameBox, SIGNAL(textChanged(const QString&)),
- this, SLOT(slotDataChanged()));
+ connect(m_artistNameBox, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(slotDataChanged()));
- connect(m_trackNameBox, SIGNAL(textChanged(const QString&)),
- this, SLOT(slotDataChanged()));
+ connect(m_trackNameBox, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(slotDataChanged()));
- connect(m_albumNameBox, SIGNAL(textChanged(const QString&)),
- this, SLOT(slotDataChanged()));
+ connect(m_albumNameBox, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(slotDataChanged()));
- connect(m_genreBox, SIGNAL(activated(int)),
- this, SLOT(slotDataChanged()));
+ connect(m_genreBox, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotDataChanged()));
- connect(m_genreBox, SIGNAL(textChanged(const QString&)),
- this, SLOT(slotDataChanged()));
+ connect(m_genreBox, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(slotDataChanged()));
- connect(m_fileNameBox, SIGNAL(textChanged(const QString&)),
- this, SLOT(slotDataChanged()));
+ connect(m_fileNameBox, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(slotDataChanged()));
- connect(m_yearSpin, SIGNAL(valueChanged(int)),
- this, SLOT(slotDataChanged()));
+ connect(m_yearSpin, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(slotDataChanged()));
- connect(m_trackSpin, SIGNAL(valueChanged(int)),
- this, SLOT(slotDataChanged()));
+ connect(m_trackSpin, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(slotDataChanged()));
- connect(m_commentBox, SIGNAL(textChanged()),
- this, SLOT(slotDataChanged()));
+ connect(m_commentBox, TQT_SIGNAL(textChanged()),
+ this, TQT_SLOT(slotDataChanged()));
}
void TagEditor::save(const PlaylistItemList &list)
@@ -634,7 +634,7 @@ void TagEditor::save(const PlaylistItemList &list)
// playlists will try to modify the file we edit if the tag changes
// due to our alterations here.
- kapp->eventLoop()->processEvents(QEventLoop::ExcludeUserInput);
+ kapp->eventLoop()->processEvents(TQEventLoop::ExcludeUserInput);
PlaylistItem *item = *it;
@@ -644,7 +644,7 @@ void TagEditor::save(const PlaylistItemList &list)
++it;
- QString fileName = item->file().fileInfo().dirPath() + QDir::separator() +
+ TQString fileName = item->file().fileInfo().dirPath() + TQDir::separator() +
m_fileNameBox->text();
if(list.count() > 1)
fileName = item->file().fileInfo().absFilePath();
@@ -694,7 +694,7 @@ void TagEditor::saveChangesPrompt()
if(!isVisible() || !m_dataChanged || m_items.isEmpty())
return;
- QStringList files;
+ TQStringList files;
for(PlaylistItemList::Iterator it = m_items.begin(); it != m_items.end(); ++it)
files.append((*it)->file().absFilePath());
@@ -711,30 +711,30 @@ void TagEditor::saveChangesPrompt()
}
}
-void TagEditor::addItem(const QString &text, QWidget *item, QBoxLayout *layout, const QString &iconName)
+void TagEditor::addItem(const TQString &text, TQWidget *item, TQBoxLayout *layout, const TQString &iconName)
{
if(!item || !layout)
return;
- QLabel *label = new QLabel(item, text, this);
- QLabel *iconLabel = new QLabel(item, 0, this);
+ TQLabel *label = new TQLabel(item, text, this);
+ TQLabel *iconLabel = new TQLabel(item, 0, this);
if(!iconName.isNull())
iconLabel->setPixmap(SmallIcon(iconName));
- QCheckBox *enableBox = new QCheckBox(i18n("Enable"), this);
+ TQCheckBox *enableBox = new TQCheckBox(i18n("Enable"), this);
enableBox->setChecked(true);
label->setMinimumHeight(enableBox->height());
- if(layout->direction() == QBoxLayout::LeftToRight) {
+ if(layout->direction() == TQBoxLayout::LeftToRight) {
layout->addWidget(iconLabel);
layout->addWidget(label);
layout->addWidget(item);
layout->addWidget(enableBox);
}
else {
- QHBoxLayout *l = new QHBoxLayout(layout);
+ TQHBoxLayout *l = new TQHBoxLayout(layout);
l->addWidget(iconLabel);
l->addWidget(label);
@@ -750,24 +750,24 @@ void TagEditor::addItem(const QString &text, QWidget *item, QBoxLayout *layout,
enableBox->hide();
- connect(enableBox, SIGNAL(toggled(bool)), item, SLOT(setEnabled(bool)));
+ connect(enableBox, TQT_SIGNAL(toggled(bool)), item, TQT_SLOT(setEnabled(bool)));
m_enableBoxes.insert(item, enableBox);
}
-void TagEditor::showEvent(QShowEvent *e)
+void TagEditor::showEvent(TQShowEvent *e)
{
if(m_collectionChanged) {
updateCollection();
slotRefresh();
}
- QWidget::showEvent(e);
+ TQWidget::showEvent(e);
}
-bool TagEditor::eventFilter(QObject *watched, QEvent *e)
+bool TagEditor::eventFilter(TQObject *watched, TQEvent *e)
{
- QKeyEvent *ke = static_cast<QKeyEvent*>(e);
- if(watched->inherits("QSpinBox") && e->type() == QEvent::KeyRelease && ke->state() == 0)
+ TQKeyEvent *ke = static_cast<TQKeyEvent*>(e);
+ if(watched->inherits("TQSpinBox") && e->type() == TQEvent::KeyRelease && ke->state() == 0)
slotDataChanged();
return false;
diff --git a/juk/tageditor.h b/juk/tageditor.h
index e9d9b1bf..1820a179 100644
--- a/juk/tageditor.h
+++ b/juk/tageditor.h
@@ -16,7 +16,7 @@
#ifndef TAGEDITOR_H
#define TAGEDITOR_H
-#include <qwidget.h>
+#include <tqwidget.h>
class KComboBox;
class KLineEdit;
@@ -30,7 +30,7 @@ class QBoxLayout;
class Playlist;
class PlaylistItem;
-typedef QValueList<PlaylistItem *> PlaylistItemList;
+typedef TQValueList<PlaylistItem *> PlaylistItemList;
class CollectionObserver;
@@ -39,7 +39,7 @@ class TagEditor : public QWidget
Q_OBJECT
public:
- TagEditor(QWidget *parent = 0, const char *name = 0);
+ TagEditor(TQWidget *parent = 0, const char *name = 0);
virtual ~TagEditor();
PlaylistItemList items() const { return m_items; }
void setupObservers();
@@ -61,7 +61,7 @@ private:
void setupActions();
void setupLayout();
void readConfig();
- void readCompletionMode(KConfigBase *config, KComboBox *box, const QString &key);
+ void readCompletionMode(KConfigBase *config, KComboBox *box, const TQString &key);
void saveConfig();
void save(const PlaylistItemList &list);
void saveChangesPrompt();
@@ -69,15 +69,15 @@ private:
* Adds an item to JuK's tagging layout. This handles the creation and
* placement of the "enable" box as well.
*/
- void addItem(const QString &text, QWidget *item, QBoxLayout *layout, const QString &iconName = QString::null);
+ void addItem(const TQString &text, TQWidget *item, TQBoxLayout *layout, const TQString &iconName = TQString::null);
/**
* Adds a widget to m_hideList and returns that widget.
*/
- QWidget *addHidden(QWidget *w) { m_hideList.append(w); return w; }
+ TQWidget *addHidden(TQWidget *w) { m_hideList.append(w); return w; }
- virtual void showEvent(QShowEvent *e);
- virtual bool eventFilter(QObject *watched, QEvent *e);
+ virtual void showEvent(TQShowEvent *e);
+ virtual bool eventFilter(TQObject *watched, TQEvent *e);
private slots:
void slotDataChanged(bool c = true);
@@ -85,10 +85,10 @@ private slots:
void slotPlaylistRemoved() { m_currentPlaylist = 0; }
private:
- typedef QMap<QWidget *, QCheckBox *> BoxMap;
+ typedef TQMap<TQWidget *, TQCheckBox *> BoxMap;
BoxMap m_enableBoxes;
- QStringList m_genreList;
+ TQStringList m_genreList;
KComboBox *m_artistNameBox;
KLineEdit *m_trackNameBox;
@@ -101,7 +101,7 @@ private:
KLineEdit *m_bitrateBox;
KEdit *m_commentBox;
- QValueList<QWidget *> m_hideList;
+ TQValueList<TQWidget *> m_hideList;
PlaylistItemList m_items;
Playlist *m_currentPlaylist;
diff --git a/juk/tagguesser.cpp b/juk/tagguesser.cpp
index 41795155..b540aaf1 100644
--- a/juk/tagguesser.cpp
+++ b/juk/tagguesser.cpp
@@ -14,7 +14,7 @@
#include <kglobal.h>
#include <kmacroexpander.h>
-FileNameScheme::FileNameScheme(const QString &s)
+FileNameScheme::FileNameScheme(const TQString &s)
: m_regExp(),
m_titleField(-1),
m_artistField(-1),
@@ -44,54 +44,54 @@ FileNameScheme::FileNameScheme(const QString &s)
m_regExp.setPattern(composeRegExp(s));
}
-bool FileNameScheme::matches(const QString &fileName) const
+bool FileNameScheme::matches(const TQString &fileName) const
{
/* Strip extension ('.mp3') because '.' may be part of a title, and thus
* does not work as a separator.
*/
- QString stripped = fileName;
+ TQString stripped = fileName;
stripped.truncate(stripped.findRev('.'));
return m_regExp.exactMatch(stripped);
}
-QString FileNameScheme::title() const
+TQString FileNameScheme::title() const
{
if(m_titleField == -1)
- return QString::null;
+ return TQString::null;
return m_regExp.capturedTexts()[ m_titleField ];
}
-QString FileNameScheme::artist() const
+TQString FileNameScheme::artist() const
{
if(m_artistField == -1)
- return QString::null;
+ return TQString::null;
return m_regExp.capturedTexts()[ m_artistField ];
}
-QString FileNameScheme::album() const
+TQString FileNameScheme::album() const
{
if(m_albumField == -1)
- return QString::null;
+ return TQString::null;
return m_regExp.capturedTexts()[ m_albumField ];
}
-QString FileNameScheme::track() const
+TQString FileNameScheme::track() const
{
if(m_trackField == -1)
- return QString::null;
+ return TQString::null;
return m_regExp.capturedTexts()[ m_trackField ];
}
-QString FileNameScheme::comment() const
+TQString FileNameScheme::comment() const
{
if(m_commentField == -1)
- return QString::null;
+ return TQString::null;
return m_regExp.capturedTexts()[ m_commentField ];
}
-QString FileNameScheme::composeRegExp(const QString &s) const
+TQString FileNameScheme::composeRegExp(const TQString &s) const
{
- QMap<QChar, QString> substitutions;
+ TQMap<TQChar, TQString> substitutions;
KConfigGroup config(KGlobal::config(), "TagGuesser");
@@ -101,7 +101,7 @@ QString FileNameScheme::composeRegExp(const QString &s) const
substitutions[ 'T' ] = config.readEntry("Track regexp", "(\\d+)");
substitutions[ 'c' ] = config.readEntry("Comment regexp", "([\\w\\s_]+)");
- QString regExp = QRegExp::escape(s.simplifyWhiteSpace());
+ TQString regExp = TQRegExp::escape(s.simplifyWhiteSpace());
regExp = ".*" + regExp;
regExp.replace(' ', "\\s+");
regExp = KMacroExpander::expandMacros(regExp, substitutions);
@@ -109,9 +109,9 @@ QString FileNameScheme::composeRegExp(const QString &s) const
return regExp;
}
-QStringList TagGuesser::schemeStrings()
+TQStringList TagGuesser::schemeStrings()
{
- QStringList schemes;
+ TQStringList schemes;
KConfigGroup config(KGlobal::config(), "TagGuesser");
schemes = config.readListEntry("Filename schemes");
@@ -148,7 +148,7 @@ QStringList TagGuesser::schemeStrings()
return schemes;
}
-void TagGuesser::setSchemeStrings(const QStringList &schemes)
+void TagGuesser::setSchemeStrings(const TQStringList &schemes)
{
KConfig *cfg = kapp->config();
{
@@ -163,7 +163,7 @@ TagGuesser::TagGuesser()
loadSchemes();
}
-TagGuesser::TagGuesser(const QString &absFileName)
+TagGuesser::TagGuesser(const TQString &absFileName)
{
loadSchemes();
guess(absFileName);
@@ -171,16 +171,16 @@ TagGuesser::TagGuesser(const QString &absFileName)
void TagGuesser::loadSchemes()
{
- const QStringList schemes = schemeStrings();
- QStringList::ConstIterator it = schemes.begin();
- QStringList::ConstIterator end = schemes.end();
+ const TQStringList schemes = schemeStrings();
+ TQStringList::ConstIterator it = schemes.begin();
+ TQStringList::ConstIterator end = schemes.end();
for ( ; it != end; ++it )
m_schemes += FileNameScheme( *it );
}
-void TagGuesser::guess(const QString &absFileName)
+void TagGuesser::guess(const TQString &absFileName)
{
- m_title = m_artist = m_album = m_track = m_comment = QString::null;
+ m_title = m_artist = m_album = m_track = m_comment = TQString::null;
FileNameScheme::List::ConstIterator it = m_schemes.begin();
FileNameScheme::List::ConstIterator end = m_schemes.end();
@@ -197,15 +197,15 @@ void TagGuesser::guess(const QString &absFileName)
}
}
-QString TagGuesser::capitalizeWords(const QString &s)
+TQString TagGuesser::capitalizeWords(const TQString &s)
{
if(s.isEmpty())
return s;
- QString result = s;
+ TQString result = s;
result[ 0 ] = result[ 0 ].upper();
- const QRegExp wordRegExp("\\s\\w");
+ const TQRegExp wordRegExp("\\s\\w");
int i = result.find( wordRegExp );
while ( i > -1 ) {
result[ i + 1 ] = result[ i + 1 ].upper();
diff --git a/juk/tagguesser.h b/juk/tagguesser.h
index eb040a4b..136ae742 100644
--- a/juk/tagguesser.h
+++ b/juk/tagguesser.h
@@ -9,28 +9,28 @@
#ifndef TAGGUESSER_H
#define TAGGUESSER_H
-#include <qregexp.h>
+#include <tqregexp.h>
class FileNameScheme
{
public:
- typedef QValueList<FileNameScheme> List;
+ typedef TQValueList<FileNameScheme> List;
FileNameScheme() { }
- FileNameScheme(const QString &s);
+ FileNameScheme(const TQString &s);
- bool matches(const QString &s) const;
+ bool matches(const TQString &s) const;
- QString title() const;
- QString artist() const;
- QString album() const;
- QString track() const;
- QString comment() const;
+ TQString title() const;
+ TQString artist() const;
+ TQString album() const;
+ TQString track() const;
+ TQString comment() const;
private:
- QString composeRegExp(const QString &s) const;
+ TQString composeRegExp(const TQString &s) const;
- mutable QRegExp m_regExp;
+ mutable TQRegExp m_regExp;
int m_titleField;
int m_artistField;
int m_albumField;
@@ -44,30 +44,30 @@ class TagGuesser
enum Type { FileName = 0, MusicBrainz = 1 };
- static QStringList schemeStrings();
- static void setSchemeStrings(const QStringList &schemes);
+ static TQStringList schemeStrings();
+ static void setSchemeStrings(const TQStringList &schemes);
TagGuesser();
- TagGuesser(const QString &absFileName);
+ TagGuesser(const TQString &absFileName);
- void guess(const QString &absFileName);
+ void guess(const TQString &absFileName);
- QString title() const { return m_title; }
- QString artist() const { return m_artist; }
- QString album() const { return m_album; }
- QString track() const { return m_track; }
- QString comment() const { return m_comment; }
+ TQString title() const { return m_title; }
+ TQString artist() const { return m_artist; }
+ TQString album() const { return m_album; }
+ TQString track() const { return m_track; }
+ TQString comment() const { return m_comment; }
private:
void loadSchemes();
- QString capitalizeWords(const QString &s);
+ TQString capitalizeWords(const TQString &s);
FileNameScheme::List m_schemes;
- QString m_title;
- QString m_artist;
- QString m_album;
- QString m_track;
- QString m_comment;
+ TQString m_title;
+ TQString m_artist;
+ TQString m_album;
+ TQString m_track;
+ TQString m_comment;
};
#endif // TAGGUESSER_H
diff --git a/juk/tagguesserconfigdlg.cpp b/juk/tagguesserconfigdlg.cpp
index f3af1f43..7caea019 100644
--- a/juk/tagguesserconfigdlg.cpp
+++ b/juk/tagguesserconfigdlg.cpp
@@ -17,10 +17,10 @@
#include <klineedit.h>
#include <kapplication.h>
-#include <qtoolbutton.h>
-#include <qevent.h>
+#include <tqtoolbutton.h>
+#include <tqevent.h>
-TagGuesserConfigDlg::TagGuesserConfigDlg(QWidget *parent, const char *name)
+TagGuesserConfigDlg::TagGuesserConfigDlg(TQWidget *parent, const char *name)
: KDialogBase(parent, name, true, i18n("Tag Guesser Configuration"),
Ok | Cancel, Ok, true)
{
@@ -29,27 +29,27 @@ TagGuesserConfigDlg::TagGuesserConfigDlg(QWidget *parent, const char *name)
m_child->lvSchemes->setItemsRenameable(true);
m_child->lvSchemes->setSorting(-1);
- m_child->lvSchemes->setDefaultRenameAction(QListView::Accept);
+ m_child->lvSchemes->setDefaultRenameAction(TQListView::Accept);
m_child->bMoveUp->setIconSet(BarIconSet("1uparrow"));
m_child->bMoveDown->setIconSet(BarIconSet("1downarrow"));
- const QStringList schemes = TagGuesser::schemeStrings();
- QStringList::ConstIterator it = schemes.begin();
- QStringList::ConstIterator end = schemes.end();
+ const TQStringList schemes = TagGuesser::schemeStrings();
+ TQStringList::ConstIterator it = schemes.begin();
+ TQStringList::ConstIterator end = schemes.end();
for (; it != end; ++it) {
KListViewItem *item = new KListViewItem(m_child->lvSchemes, *it);
item->moveItem(m_child->lvSchemes->lastItem());
}
- connect(m_child->lvSchemes, SIGNAL(currentChanged(QListViewItem *)),
- this, SLOT(slotCurrentChanged(QListViewItem *)));
- connect(m_child->lvSchemes, SIGNAL(doubleClicked(QListViewItem *, const QPoint &, int)),
- this, SLOT(slotRenameItem(QListViewItem *, const QPoint &, int)));
- connect(m_child->bMoveUp, SIGNAL(clicked()), this, SLOT(slotMoveUpClicked()));
- connect(m_child->bMoveDown, SIGNAL(clicked()), this, SLOT(slotMoveDownClicked()));
- connect(m_child->bAdd, SIGNAL(clicked()), this, SLOT(slotAddClicked()));
- connect(m_child->bModify, SIGNAL(clicked()), this, SLOT(slotModifyClicked()));
- connect(m_child->bRemove, SIGNAL(clicked()), this, SLOT(slotRemoveClicked()));
+ connect(m_child->lvSchemes, TQT_SIGNAL(currentChanged(TQListViewItem *)),
+ this, TQT_SLOT(slotCurrentChanged(TQListViewItem *)));
+ connect(m_child->lvSchemes, TQT_SIGNAL(doubleClicked(TQListViewItem *, const TQPoint &, int)),
+ this, TQT_SLOT(slotRenameItem(TQListViewItem *, const TQPoint &, int)));
+ connect(m_child->bMoveUp, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotMoveUpClicked()));
+ connect(m_child->bMoveDown, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotMoveDownClicked()));
+ connect(m_child->bAdd, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddClicked()));
+ connect(m_child->bModify, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotModifyClicked()));
+ connect(m_child->bRemove, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotRemoveClicked()));
m_child->lvSchemes->setSelected(m_child->lvSchemes->firstChild(), true);
slotCurrentChanged(m_child->lvSchemes->currentItem());
@@ -60,18 +60,18 @@ TagGuesserConfigDlg::TagGuesserConfigDlg(QWidget *parent, const char *name)
void TagGuesserConfigDlg::accept()
{
if(m_child->lvSchemes->renameLineEdit()) {
- QKeyEvent returnKeyPress(QEvent::KeyPress, Key_Return, 0, 0);
+ TQKeyEvent returnKeyPress(TQEvent::KeyPress, Key_Return, 0, 0);
KApplication::sendEvent(m_child->lvSchemes->renameLineEdit(), &returnKeyPress);
}
- QStringList schemes;
- for (QListViewItem *it = m_child->lvSchemes->firstChild(); it; it = it->nextSibling())
+ TQStringList schemes;
+ for (TQListViewItem *it = m_child->lvSchemes->firstChild(); it; it = it->nextSibling())
schemes += it->text(0);
TagGuesser::setSchemeStrings(schemes);
KDialogBase::accept();
}
-void TagGuesserConfigDlg::slotCurrentChanged(QListViewItem *item)
+void TagGuesserConfigDlg::slotCurrentChanged(TQListViewItem *item)
{
m_child->bMoveUp->setEnabled(item != 0 && item->itemAbove() != 0);
m_child->bMoveDown->setEnabled(item != 0 && item->itemBelow() != 0);
@@ -79,14 +79,14 @@ void TagGuesserConfigDlg::slotCurrentChanged(QListViewItem *item)
m_child->bRemove->setEnabled(item != 0);
}
-void TagGuesserConfigDlg::slotRenameItem(QListViewItem *item, const QPoint &, int c)
+void TagGuesserConfigDlg::slotRenameItem(TQListViewItem *item, const TQPoint &, int c)
{
m_child->lvSchemes->rename(item, c);
}
void TagGuesserConfigDlg::slotMoveUpClicked()
{
- QListViewItem *item = m_child->lvSchemes->currentItem();
+ TQListViewItem *item = m_child->lvSchemes->currentItem();
if(item->itemAbove() == m_child->lvSchemes->firstChild())
item->itemAbove()->moveItem(item);
else
@@ -97,7 +97,7 @@ void TagGuesserConfigDlg::slotMoveUpClicked()
void TagGuesserConfigDlg::slotMoveDownClicked()
{
- QListViewItem *item = m_child->lvSchemes->currentItem();
+ TQListViewItem *item = m_child->lvSchemes->currentItem();
item->moveItem(item->itemBelow());
m_child->lvSchemes->ensureItemVisible(item);
slotCurrentChanged(item);
diff --git a/juk/tagguesserconfigdlg.h b/juk/tagguesserconfigdlg.h
index 353e743a..f704eeeb 100644
--- a/juk/tagguesserconfigdlg.h
+++ b/juk/tagguesserconfigdlg.h
@@ -18,14 +18,14 @@ class TagGuesserConfigDlg : public KDialogBase
{
Q_OBJECT
public:
- TagGuesserConfigDlg(QWidget *parent, const char *name = 0);
+ TagGuesserConfigDlg(TQWidget *parent, const char *name = 0);
protected slots:
virtual void accept();
private slots:
- void slotCurrentChanged(QListViewItem *item);
- void slotRenameItem(QListViewItem *item, const QPoint &p, int c);
+ void slotCurrentChanged(TQListViewItem *item);
+ void slotRenameItem(TQListViewItem *item, const TQPoint &p, int c);
void slotMoveUpClicked();
void slotMoveDownClicked();
void slotAddClicked();
diff --git a/juk/tagguessertest.cpp b/juk/tagguessertest.cpp
index f726e01b..b94f9639 100644
--- a/juk/tagguessertest.cpp
+++ b/juk/tagguessertest.cpp
@@ -25,7 +25,7 @@
#include <kaboutdata.h>
#include <kcmdlineargs.h>
#include <kapplication.h>
-#include <qdir.h>
+#include <tqdir.h>
#include <iostream>
#include <stdlib.h>
@@ -33,9 +33,9 @@
using std::cout;
using std::endl;
-void check( const QString &filename, const QString &title,
- const QString &artist, const QString &track,
- const QString &comment, const QString &album = QString::null )
+void check( const TQString &filename, const TQString &title,
+ const TQString &artist, const TQString &track,
+ const TQString &comment, const TQString &album = TQString::null )
{
cout << "Checking " << filename.latin1() << "...";
TagGuesser guesser( filename );
@@ -72,57 +72,57 @@ int main( int argc, char **argv )
check( "/home/frerich/Chemical Brothers - (01) - Block rockin' beats (Live).mp3",
"Block Rockin' Beats", "Chemical Brothers", "01", "Live" );
check( "/home/frerich/Chemical Brothers - (01) - Block rockin' beats.mp3",
- "Block Rockin' Beats", "Chemical Brothers", "01", QString::null );
+ "Block Rockin' Beats", "Chemical Brothers", "01", TQString::null );
check( "/home/frerich/Chemical Brothers - [01] - Block rockin' beats [Live].mp3",
"Block Rockin' Beats", "Chemical Brothers", "01", "Live" );
check( "/home/frerich/Chemical Brothers - [01] - Block rockin' beats (Live).mp3",
"Block Rockin' Beats", "Chemical Brothers", "01", "Live" );
check( "/home/frerich/Chemical Brothers - [01] - Block rockin' beats.mp3",
- "Block Rockin' Beats", "Chemical Brothers", "01", QString::null );
+ "Block Rockin' Beats", "Chemical Brothers", "01", TQString::null );
check( "/home/frerich/Chemical Brothers - 01 - Block rockin' beats [Live].mp3",
"Block Rockin' Beats", "Chemical Brothers", "01", "Live" );
check( "/home/frerich/Chemical Brothers - 01 - Block rockin' beats (Live).mp3",
"Block Rockin' Beats", "Chemical Brothers", "01", "Live" );
check( "/home/frerich/Chemical Brothers - 01 - Block rockin' beats.mp3",
- "Block Rockin' Beats", "Chemical Brothers", "01", QString::null );
+ "Block Rockin' Beats", "Chemical Brothers", "01", TQString::null );
check( "/home/frerich/(01) Chemical Brothers - Block rockin' beats [Live].mp3",
"Block Rockin' Beats", "Chemical Brothers", "01", "Live" );
check( "/home/frerich/(01) Chemical Brothers - Block rockin' beats (Live).mp3",
"Block Rockin' Beats", "Chemical Brothers", "01", "Live" );
check( "/home/frerich/(01) Chemical Brothers - Block rockin' beats.mp3",
- "Block Rockin' Beats", "Chemical Brothers", "01", QString::null );
+ "Block Rockin' Beats", "Chemical Brothers", "01", TQString::null );
check( "/home/frerich/[01] Chemical Brothers - Block rockin' beats [Live].mp3",
"Block Rockin' Beats", "Chemical Brothers", "01", "Live" );
check( "/home/frerich/[01] Chemical Brothers - Block rockin' beats (Live).mp3",
"Block Rockin' Beats", "Chemical Brothers", "01", "Live" );
check( "/home/frerich/[01] Chemical Brothers - Block rockin' beats.mp3",
- "Block Rockin' Beats", "Chemical Brothers", "01", QString::null );
+ "Block Rockin' Beats", "Chemical Brothers", "01", TQString::null );
check( "/home/frerich/01 Chemical Brothers - Block rockin' beats [Live].mp3",
"Block Rockin' Beats", "Chemical Brothers", "01", "Live" );
check( "/home/frerich/01 Chemical Brothers - Block rockin' beats (Live).mp3",
"Block Rockin' Beats", "Chemical Brothers", "01", "Live" );
check( "/home/frerich/01 Chemical Brothers - Block rockin' beats.mp3",
- "Block Rockin' Beats", "Chemical Brothers", "01", QString::null );
+ "Block Rockin' Beats", "Chemical Brothers", "01", TQString::null );
check( "/home/frerich/(Chemical Brothers) Block rockin' beats [Live].mp3",
- "Block Rockin' Beats", "Chemical Brothers", QString::null, "Live" );
+ "Block Rockin' Beats", "Chemical Brothers", TQString::null, "Live" );
check( "/home/frerich/(Chemical Brothers) Block rockin' beats (Live).mp3",
- "Block Rockin' Beats", "Chemical Brothers", QString::null, "Live" );
+ "Block Rockin' Beats", "Chemical Brothers", TQString::null, "Live" );
check( "/home/frerich/(Chemical Brothers) Block rockin' beats.mp3",
- "Block Rockin' Beats", "Chemical Brothers", QString::null, QString::null );
+ "Block Rockin' Beats", "Chemical Brothers", TQString::null, TQString::null );
check( "/home/frerich/Chemical Brothers - Block rockin' beats [Live].mp3",
- "Block Rockin' Beats", "Chemical Brothers", QString::null, "Live" );
+ "Block Rockin' Beats", "Chemical Brothers", TQString::null, "Live" );
check( "/home/frerich/Chemical Brothers - Block rockin' beats (Live).mp3",
- "Block Rockin' Beats", "Chemical Brothers", QString::null, "Live" );
+ "Block Rockin' Beats", "Chemical Brothers", TQString::null, "Live" );
check( "/home/frerich/Chemical Brothers - Block rockin' beats.mp3",
- "Block Rockin' Beats", "Chemical Brothers", QString::null, QString::null );
+ "Block Rockin' Beats", "Chemical Brothers", TQString::null, TQString::null );
check( "/home/frerich/mp3/Chemical Brothers/Dig your own hole/[01] Block rockin' beats.mp3",
- "Block Rockin' Beats", "Chemical Brothers", "01", QString::null, "Dig Your Own Hole");
- check( QDir::homeDirPath() + "/[01] Randy - Religion, religion.mp3",
- "Religion, Religion", "Randy", "01", QString::null, QString::null );
- check( QDir::homeDirPath() + "/(3) Mr. Doe - Punk.mp3",
- "Punk", "Mr. Doe", "3", QString::null, QString::null );
+ "Block Rockin' Beats", "Chemical Brothers", "01", TQString::null, "Dig Your Own Hole");
+ check( TQDir::homeDirPath() + "/[01] Randy - Religion, religion.mp3",
+ "Religion, Religion", "Randy", "01", TQString::null, TQString::null );
+ check( TQDir::homeDirPath() + "/(3) Mr. Doe - Punk.mp3",
+ "Punk", "Mr. Doe", "3", TQString::null, TQString::null );
check( "c:\\music\\mp3s\\(3) Mr. Doe - Punk.mp3",
- "Punk", "Mr. Doe", "3", QString::null, QString::null );
+ "Punk", "Mr. Doe", "3", TQString::null, TQString::null );
cout << "All OK" << endl;
return 0;
}
diff --git a/juk/tagrenameroptions.cpp b/juk/tagrenameroptions.cpp
index 4f7ceba8..50f7036d 100644
--- a/juk/tagrenameroptions.cpp
+++ b/juk/tagrenameroptions.cpp
@@ -63,18 +63,18 @@ TagRenamerOptions::TagRenamerOptions(const CategoryID &category)
// Make sure we don't use translated strings for the config file keys.
- QString typeKey = tagTypeText(category.category, false);
+ TQString typeKey = tagTypeText(category.category, false);
KConfigGroup config(KGlobal::config(), "FileRenamer");
if(categoryNum > 0)
- typeKey.append(QString::number(categoryNum));
+ typeKey.append(TQString::number(categoryNum));
- setSuffix(config.readEntry(QString("%1Suffix").arg(typeKey)));
- setPrefix(config.readEntry(QString("%1Prefix").arg(typeKey)));
+ setSuffix(config.readEntry(TQString("%1Suffix").arg(typeKey)));
+ setPrefix(config.readEntry(TQString("%1Prefix").arg(typeKey)));
// Default the emptyAction to ignoring the empty tag.
- const QString emptyAction = config.readEntry(QString("%1EmptyAction").arg(typeKey)).lower();
+ const TQString emptyAction = config.readEntry(TQString("%1EmptyAction").arg(typeKey)).lower();
setEmptyAction(IgnoreEmptyTag);
if(emptyAction == "forceemptyinclude")
@@ -82,12 +82,12 @@ TagRenamerOptions::TagRenamerOptions(const CategoryID &category)
else if(emptyAction == "usereplacementvalue")
setEmptyAction(UseReplacementValue);
- setEmptyText(config.readEntry(QString("%1EmptyText").arg(typeKey)));
- setTrackWidth(config.readUnsignedNumEntry(QString("%1TrackWidth").arg(typeKey)));
- setDisabled(config.readBoolEntry(QString("%1Disabled").arg(typeKey), disabled));
+ setEmptyText(config.readEntry(TQString("%1EmptyText").arg(typeKey)));
+ setTrackWidth(config.readUnsignedNumEntry(TQString("%1TrackWidth").arg(typeKey)));
+ setDisabled(config.readBoolEntry(TQString("%1Disabled").arg(typeKey), disabled));
}
-QString TagRenamerOptions::tagTypeText(TagType type, bool translate)
+TQString TagRenamerOptions::tagTypeText(TagType type, bool translate)
{
// These must be declared in the same order that they are defined in
// the TagType enum in test.h. We can dynamically translate these strings,
@@ -111,16 +111,16 @@ void TagRenamerOptions::saveConfig(unsigned categoryNum) const
{
// Make sure we don't use translated strings for the config file keys.
- QString typeKey = tagTypeText(false);
+ TQString typeKey = tagTypeText(false);
if(categoryNum > 0)
- typeKey.append(QString::number(categoryNum));
+ typeKey.append(TQString::number(categoryNum));
KConfigGroup config(KGlobal::config(), "FileRenamer");
- config.writeEntry(QString("%1Suffix").arg(typeKey), suffix());
- config.writeEntry(QString("%1Prefix").arg(typeKey), prefix());
+ config.writeEntry(TQString("%1Suffix").arg(typeKey), suffix());
+ config.writeEntry(TQString("%1Prefix").arg(typeKey), prefix());
- QString emptyStr;
+ TQString emptyStr;
switch(emptyAction()) {
case ForceEmptyInclude:
@@ -136,17 +136,17 @@ void TagRenamerOptions::saveConfig(unsigned categoryNum) const
break;
}
- config.writeEntry(QString("%1EmptyAction").arg(typeKey), emptyStr);
- config.writeEntry(QString("%1EmptyText").arg(typeKey), emptyText());
- config.writeEntry(QString("%1Disabled").arg(typeKey), disabled());
+ config.writeEntry(TQString("%1EmptyAction").arg(typeKey), emptyStr);
+ config.writeEntry(TQString("%1EmptyText").arg(typeKey), emptyText());
+ config.writeEntry(TQString("%1Disabled").arg(typeKey), disabled());
if(category() == Track)
- config.writeEntry(QString("%1TrackWidth").arg(typeKey), trackWidth());
+ config.writeEntry(TQString("%1TrackWidth").arg(typeKey), trackWidth());
config.sync();
}
-TagType TagRenamerOptions::tagFromCategoryText(const QString &text, bool translate)
+TagType TagRenamerOptions::tagFromCategoryText(const TQString &text, bool translate)
{
for(unsigned i = StartTag; i < NumTypes; ++i)
if(tagTypeText(static_cast<TagType>(i), translate) == text)
diff --git a/juk/tagrenameroptions.h b/juk/tagrenameroptions.h
index b62e9bf4..4c979fa0 100644
--- a/juk/tagrenameroptions.h
+++ b/juk/tagrenameroptions.h
@@ -96,17 +96,17 @@ public:
TagRenamerOptions(const CategoryID &category);
TagRenamerOptions(const TagRenamerOptions &other);
- QString prefix() const { return m_prefix; }
- QString suffix() const { return m_suffix; }
- QString emptyText() const { return m_emptyText; }
+ TQString prefix() const { return m_prefix; }
+ TQString suffix() const { return m_suffix; }
+ TQString emptyText() const { return m_emptyText; }
EmptyActions emptyAction() const { return m_emptyAction; }
unsigned trackWidth() const { return m_trackWidth; }
bool disabled() const { return m_disabled; }
TagType category() const { return m_category; }
- void setPrefix(const QString &prefix) { m_prefix = prefix; }
- void setSuffix(const QString &suffix) { m_suffix = suffix; }
- void setEmptyText(const QString &emptyText) { m_emptyText = emptyText; }
+ void setPrefix(const TQString &prefix) { m_prefix = prefix; }
+ void setSuffix(const TQString &suffix) { m_suffix = suffix; }
+ void setEmptyText(const TQString &emptyText) { m_emptyText = emptyText; }
void setEmptyAction(EmptyActions action) { m_emptyAction = action; }
void setTrackWidth(unsigned width) { m_trackWidth = width; }
void setDisabled(bool disabled) { m_disabled = disabled; }
@@ -119,9 +119,9 @@ public:
* @param translate if true, the string is translated (if possible).
* @return text representation of category.
*/
- static QString tagTypeText(TagType category, bool translate = true);
+ static TQString tagTypeText(TagType category, bool translate = true);
- QString tagTypeText(bool translate = true) const
+ TQString tagTypeText(bool translate = true) const
{
return tagTypeText(category(), translate);
}
@@ -134,7 +134,7 @@ public:
* @param translated If true, @p text is translated, if false, it is the untranslated
* version.
*/
- static TagType tagFromCategoryText(const QString &text, bool translate = true);
+ static TagType tagFromCategoryText(const TQString &text, bool translate = true);
/**
* This saves the options to the global KConfig object.
@@ -151,15 +151,15 @@ private:
// Member variables
- QString m_prefix;
- QString m_suffix;
+ TQString m_prefix;
+ TQString m_suffix;
/// Defines the action to take when the tag is empty.
EmptyActions m_emptyAction;
/// If m_emptyAction is UseReplacementValue, this holds the text of the value
/// to use.
- QString m_emptyText;
+ TQString m_emptyText;
/// Used only for the Track type. Defines the minimum track width when
/// expanding the track token.
diff --git a/juk/tagtransactionmanager.cpp b/juk/tagtransactionmanager.cpp
index e6c8adef..cc8b1c80 100644
--- a/juk/tagtransactionmanager.cpp
+++ b/juk/tagtransactionmanager.cpp
@@ -19,8 +19,8 @@
#include <kaction.h>
#include <kapplication.h>
-#include <qfileinfo.h>
-#include <qdir.h>
+#include <tqfileinfo.h>
+#include <tqdir.h>
#include "tagtransactionmanager.h"
#include "playlistitem.h"
@@ -83,11 +83,11 @@ void TagTransactionManager::changeTagOnItem(PlaylistItem *item, Tag *newTag)
m_list.append(TagTransactionAtom(item->collectionItem(), newTag));
}
-Tag *TagTransactionManager::duplicateTag(const Tag *tag, const QString &fileName)
+Tag *TagTransactionManager::duplicateTag(const Tag *tag, const TQString &fileName)
{
Q_ASSERT(tag);
- QString name = fileName.isNull() ? tag->fileName() : fileName;
+ TQString name = fileName.isNull() ? tag->fileName() : fileName;
Tag *newTag = new Tag(*tag);
newTag->setFileName(name);
@@ -123,24 +123,24 @@ bool TagTransactionManager::undo()
return result;
}
-TagTransactionManager::TagTransactionManager(QWidget *parent) : QObject(parent, "tagmanager")
+TagTransactionManager::TagTransactionManager(TQWidget *parent) : TQObject(parent, "tagmanager")
{
m_manager = this;
}
-bool TagTransactionManager::renameFile(const QFileInfo &from, const QFileInfo &to) const
+bool TagTransactionManager::renameFile(const TQFileInfo &from, const TQFileInfo &to) const
{
- if(!QFileInfo(to.dirPath()).isWritable() || !from.exists())
+ if(!TQFileInfo(to.dirPath()).isWritable() || !from.exists())
return false;
if(!to.exists() ||
KMessageBox::warningContinueCancel(
- static_cast<QWidget *>(parent()),
+ static_cast<TQWidget *>(parent()),
i18n("This file already exists.\nDo you want to replace it?"),
i18n("File Exists"),i18n("Replace")) == KMessageBox::Continue)
{
kdDebug(65432) << "Renaming " << from.absFilePath() << " to " << to.absFilePath() << endl;
- QDir currentDir;
+ TQDir currentDir;
return currentDir.rename(from.absFilePath(), to.absFilePath());
}
@@ -150,7 +150,7 @@ bool TagTransactionManager::renameFile(const QFileInfo &from, const QFileInfo &t
bool TagTransactionManager::processChangeList(bool undo)
{
TagAlterationList::ConstIterator it, end;
- QStringList errorItems;
+ TQStringList errorItems;
it = undo ? m_undoList.begin() : m_list.begin();
end = undo ? m_undoList.end() : m_list.end();
@@ -161,11 +161,11 @@ bool TagTransactionManager::processChangeList(bool undo)
PlaylistItem *item = (*it).item();
Tag *tag = (*it).tag();
- QFileInfo newFile(tag->fileName());
+ TQFileInfo newFile(tag->fileName());
if(item->file().fileInfo().fileName() != newFile.fileName()) {
if(!renameFile(item->file().fileInfo(), newFile)) {
- errorItems.append(item->text(1) + QString(" - ") + item->text(0));
+ errorItems.append(item->text(1) + TQString(" - ") + item->text(0));
continue;
}
}
@@ -182,7 +182,7 @@ bool TagTransactionManager::processChangeList(bool undo)
}
else {
Tag *errorTag = item->file().tag();
- QString str = errorTag->artist() + " - " + errorTag->title();
+ TQString str = errorTag->artist() + " - " + errorTag->title();
if(errorTag->artist().isEmpty())
str = errorTag->title();
@@ -200,7 +200,7 @@ bool TagTransactionManager::processChangeList(bool undo)
action("edit_undo")->setEnabled(false);
if(!errorItems.isEmpty())
- KMessageBox::errorList(static_cast<QWidget *>(parent()),
+ KMessageBox::errorList(static_cast<TQWidget *>(parent()),
i18n("The following files were unable to be changed."),
errorItems,
i18n("Error"));
diff --git a/juk/tagtransactionmanager.h b/juk/tagtransactionmanager.h
index ce39393f..85bfc0b7 100644
--- a/juk/tagtransactionmanager.h
+++ b/juk/tagtransactionmanager.h
@@ -33,7 +33,7 @@ class TagTransactionAtom
{
public:
/**
- * Default constructor, for use by QValueList.
+ * Default constructor, for use by TQValueList.
*/
TagTransactionAtom();
@@ -63,7 +63,7 @@ class TagTransactionAtom
/**
* Assignment operator. This operator takes ownership of the m_tag pointer,
* so the object being assigned from no longer has access to the tag. This
- * function exists mainly for the benefit of QValueList.
+ * function exists mainly for the benefit of TQValueList.
*
* @param other The TagTransactionAtom to copy from.
* @return The TagTransactionAtom being assigned to.
@@ -89,7 +89,7 @@ class TagTransactionAtom
mutable Tag *m_tag;
};
-typedef QValueList<TagTransactionAtom> TagAlterationList;
+typedef TQValueList<TagTransactionAtom> TagAlterationList;
/**
* This class manages alterations of a group of PlaylistItem's FileHandles. What this
@@ -111,9 +111,9 @@ class TagTransactionManager : public QObject
/**
* Constructs a TagTransactionManager, owned by @p parent.
*
- * @param parent The parent QWidget.
+ * @param parent The parent TQWidget.
*/
- TagTransactionManager(QWidget *parent = 0);
+ TagTransactionManager(TQWidget *parent = 0);
/**
* Returns the global TagTransactionManager instance.
@@ -137,13 +137,13 @@ class TagTransactionManager : public QObject
* object doesn't have a decent copy constructor.
*
* @param tag The Tag to duplicate.
- * @param fileName The filename to assign to the tag. If QString::null
+ * @param fileName The filename to assign to the tag. If TQString::null
* (the default) is passed, the filename of the existing tag is
* used.
* @bug Tag should have a correct copy ctor and assignment operator.
* @return The duplicate Tag.
*/
- static Tag *duplicateTag(const Tag *tag, const QString &fileName = QString::null);
+ static Tag *duplicateTag(const Tag *tag, const TQString &fileName = TQString::null);
/**
* Commits the changes to the PlaylistItems. It is important that the
@@ -188,11 +188,11 @@ class TagTransactionManager : public QObject
* Renames the file identified by @p from to have the name given by @p to,
* prompting the user to confirm if necessary.
*
- * @param from QFileInfo with the filename of the original file.
- * @param to QFileInfo with the new filename.
+ * @param from TQFileInfo with the filename of the original file.
+ * @param to TQFileInfo with the new filename.
* @return true if no errors occurred, false otherwise.
*/
- bool renameFile(const QFileInfo &from, const QFileInfo &to) const;
+ bool renameFile(const TQFileInfo &from, const TQFileInfo &to) const;
/**
* Used internally by commit() and undo(). Performs the work of updating
diff --git a/juk/trackpickerdialog.cpp b/juk/trackpickerdialog.cpp
index 44cf8f7a..407ffea2 100644
--- a/juk/trackpickerdialog.cpp
+++ b/juk/trackpickerdialog.cpp
@@ -17,7 +17,7 @@
#if HAVE_MUSICBRAINZ
-#include <qlabel.h>
+#include <tqlabel.h>
#include <klistview.h>
#include <klocale.h>
@@ -25,7 +25,7 @@
#include "trackpickerdialog.h"
#include "trackpickerdialogbase.h"
-#define NUMBER(x) (x == 0 ? QString::null : QString::number(x))
+#define NUMBER(x) (x == 0 ? TQString::null : TQString::number(x))
class TrackPickerItem : public KListViewItem
{
@@ -45,9 +45,9 @@ private:
// public methods
////////////////////////////////////////////////////////////////////////////////
-TrackPickerDialog::TrackPickerDialog(const QString &name,
+TrackPickerDialog::TrackPickerDialog(const TQString &name,
const KTRMResultList &results,
- QWidget *parent) :
+ TQWidget *parent) :
KDialogBase(parent, name.latin1(), true, i18n("Internet Tag Guesser"), Ok | Cancel, Ok, true)
{
m_base = new TrackPickerDialogBase(this);
@@ -61,8 +61,8 @@ TrackPickerDialog::TrackPickerDialog(const QString &name,
m_base->trackList->setSelected(m_base->trackList->firstChild(), true);
- connect(m_base->trackList, SIGNAL(doubleClicked(QListViewItem *, const QPoint &, int)),
- this, SLOT(accept()));
+ connect(m_base->trackList, TQT_SIGNAL(doubleClicked(TQListViewItem *, const TQPoint &, int)),
+ this, TQT_SLOT(accept()));
setMinimumWidth(kMax(400, width()));
}
diff --git a/juk/trackpickerdialog.h b/juk/trackpickerdialog.h
index 623944d8..06450efa 100644
--- a/juk/trackpickerdialog.h
+++ b/juk/trackpickerdialog.h
@@ -31,9 +31,9 @@ class TrackPickerDialog : public KDialogBase
Q_OBJECT
public:
- TrackPickerDialog(const QString &name,
+ TrackPickerDialog(const TQString &name,
const KTRMResultList &results,
- QWidget *parent = 0);
+ TQWidget *parent = 0);
virtual ~TrackPickerDialog();
diff --git a/juk/tracksequenceiterator.cpp b/juk/tracksequenceiterator.cpp
index 2c71008a..d53a3a17 100644
--- a/juk/tracksequenceiterator.cpp
+++ b/juk/tracksequenceiterator.cpp
@@ -179,9 +179,9 @@ void DefaultSequenceIterator::prepareToPlay(Playlist *playlist)
refillRandomList();
}
else {
- QListViewItemIterator it(playlist, QListViewItemIterator::Visible | QListViewItemIterator::Selected);
+ TQListViewItemIterator it(playlist, TQListViewItemIterator::Visible | TQListViewItemIterator::Selected);
if(!it.current())
- it = QListViewItemIterator(playlist, QListViewItemIterator::Visible);
+ it = TQListViewItemIterator(playlist, TQListViewItemIterator::Visible);
setCurrent(static_cast<PlaylistItem *>(it.current()));
}
diff --git a/juk/tracksequencemanager.cpp b/juk/tracksequencemanager.cpp
index 7e05f825..828c61d5 100644
--- a/juk/tracksequencemanager.cpp
+++ b/juk/tracksequencemanager.cpp
@@ -121,8 +121,8 @@ void TrackSequenceManager::setCurrentPlaylist(Playlist *list)
m_playlist->disconnect(this);
m_playlist = list;
- connect(m_playlist, SIGNAL(signalAboutToRemove(PlaylistItem *)),
- this, SLOT(slotItemAboutToDie(PlaylistItem *)));
+ connect(m_playlist, TQT_SIGNAL(signalAboutToRemove(PlaylistItem *)),
+ this, TQT_SLOT(slotItemAboutToDie(PlaylistItem *)));
}
void TrackSequenceManager::setCurrent(PlaylistItem *item)
@@ -148,14 +148,14 @@ void TrackSequenceManager::initialize()
return;
// Make sure we don't use m_playNextItem if it's invalid.
- connect(collection, SIGNAL(signalAboutToRemove(PlaylistItem *)),
- this, SLOT(slotItemAboutToDie(PlaylistItem *)));
+ connect(collection, TQT_SIGNAL(signalAboutToRemove(PlaylistItem *)),
+ this, TQT_SLOT(slotItemAboutToDie(PlaylistItem *)));
m_initialized = true;
}
TrackSequenceManager::TrackSequenceManager() :
- QObject(),
+ TQObject(),
m_playlist(0),
m_playNextItem(0),
m_popupMenu(0),
diff --git a/juk/tracksequencemanager.h b/juk/tracksequencemanager.h
index 3aa186cd..a83cd508 100644
--- a/juk/tracksequencemanager.h
+++ b/juk/tracksequencemanager.h
@@ -16,7 +16,7 @@
#ifndef _TRACKSEQUENCEMANAGER_H
#define _TRACKSEQUENCEMANAGER_H
-#include <qobject.h>
+#include <tqobject.h>
class KPopupMenu;
class TrackSequenceIterator;
diff --git a/juk/treeviewitemplaylist.cpp b/juk/treeviewitemplaylist.cpp
index 9096979a..22872760 100644
--- a/juk/treeviewitemplaylist.cpp
+++ b/juk/treeviewitemplaylist.cpp
@@ -18,8 +18,8 @@
#include <kmessagebox.h>
#include <klocale.h>
-#include <qstringlist.h>
-#include <qlistview.h>
+#include <tqstringlist.h>
+#include <tqlistview.h>
#include "collectionlist.h"
#include "treeviewitemplaylist.h"
@@ -30,21 +30,21 @@
TreeViewItemPlaylist::TreeViewItemPlaylist(PlaylistCollection *collection,
const PlaylistSearch &search,
- const QString &name) :
+ const TQString &name) :
SearchPlaylist(collection, search, name, false)
{
PlaylistSearch::Component component = *(search.components().begin());
m_columnType = static_cast<PlaylistItem::ColumnType>(*(component.columns().begin()));
}
-void TreeViewItemPlaylist::retag(const QStringList &files, Playlist *)
+void TreeViewItemPlaylist::retag(const TQStringList &files, Playlist *)
{
CollectionList *collection = CollectionList::instance();
if(files.isEmpty())
return;
- QString changedTag = i18n("artist");
+ TQString changedTag = i18n("artist");
if(m_columnType == PlaylistItem::GenreColumn)
changedTag = i18n("genre");
else if(m_columnType == PlaylistItem::AlbumColumn)
@@ -62,7 +62,7 @@ void TreeViewItemPlaylist::retag(const QStringList &files, Playlist *)
return;
}
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for(it = files.begin(); it != files.end(); ++it) {
CollectionListItem *item = collection->lookup(*it);
if(!item)
diff --git a/juk/treeviewitemplaylist.h b/juk/treeviewitemplaylist.h
index 6b0e13c2..7458172b 100644
--- a/juk/treeviewitemplaylist.h
+++ b/juk/treeviewitemplaylist.h
@@ -28,10 +28,10 @@ class TreeViewItemPlaylist : public SearchPlaylist
public:
TreeViewItemPlaylist(PlaylistCollection *collection,
const PlaylistSearch &search = PlaylistSearch(),
- const QString &name = QString::null);
+ const TQString &name = TQString::null);
virtual bool searchIsEditable() const { return false; }
- void retag(const QStringList &files, Playlist *donorPlaylist);
+ void retag(const TQStringList &files, Playlist *donorPlaylist);
signals:
void signalTagsChanged();
diff --git a/juk/upcomingplaylist.cpp b/juk/upcomingplaylist.cpp
index a9cdbcb7..f31e3144 100644
--- a/juk/upcomingplaylist.cpp
+++ b/juk/upcomingplaylist.cpp
@@ -113,12 +113,12 @@ void UpcomingPlaylist::clearItem(PlaylistItem *item, bool emitChanged)
Playlist::clearItem(item, emitChanged);
}
-void UpcomingPlaylist::addFiles(const QStringList &files, PlaylistItem *after)
+void UpcomingPlaylist::addFiles(const TQStringList &files, PlaylistItem *after)
{
CollectionList::instance()->addFiles(files, after);
PlaylistItemList l;
- for(QStringList::ConstIterator it = files.begin(); it != files.end(); ++it) {
+ for(TQStringList::ConstIterator it = files.begin(); it != files.end(); ++it) {
FileHandle f(*it);
PlaylistItem *i = CollectionList::instance()->lookup(f.absFilePath());
if(i)
@@ -128,7 +128,7 @@ void UpcomingPlaylist::addFiles(const QStringList &files, PlaylistItem *after)
appendItems(l);
}
-QMap< PlaylistItem::Pointer, QGuardedPtr<Playlist> > &UpcomingPlaylist::playlistIndex()
+TQMap< PlaylistItem::Pointer, TQGuardedPtr<Playlist> > &UpcomingPlaylist::playlistIndex()
{
return m_playlistIndex;
}
@@ -246,7 +246,7 @@ void UpcomingPlaylist::UpcomingSequenceIterator::prepareToPlay(Playlist *)
setCurrent(m_playlist->firstChild());
}
-QDataStream &operator<<(QDataStream &s, const UpcomingPlaylist &p)
+TQDataStream &operator<<(TQDataStream &s, const UpcomingPlaylist &p)
{
PlaylistItemList l = const_cast<UpcomingPlaylist *>(&p)->items();
@@ -258,9 +258,9 @@ QDataStream &operator<<(QDataStream &s, const UpcomingPlaylist &p)
return s;
}
-QDataStream &operator>>(QDataStream &s, UpcomingPlaylist &p)
+TQDataStream &operator>>(TQDataStream &s, UpcomingPlaylist &p)
{
- QString fileName;
+ TQString fileName;
PlaylistItem *newItem = 0;
Q_INT32 count;
diff --git a/juk/upcomingplaylist.h b/juk/upcomingplaylist.h
index ee0570f9..4bd7b712 100644
--- a/juk/upcomingplaylist.h
+++ b/juk/upcomingplaylist.h
@@ -17,7 +17,7 @@
#define _UPCOMINGPLAYLIST_H
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#include "playlist.h"
#include "tracksequenceiterator.h"
@@ -90,14 +90,14 @@ public:
*/
virtual void clearItem(PlaylistItem *item, bool emitChanged = true);
- virtual void addFiles(const QStringList &files, PlaylistItem *after = 0);
+ virtual void addFiles(const TQStringList &files, PlaylistItem *after = 0);
/**
* Returns a reference to the index between items in the list and the
* playlist that they came from. This is used to remap the currently
* playing item to the source playlist.
*/
- QMap<PlaylistItem::Pointer, QGuardedPtr<Playlist> > &playlistIndex();
+ TQMap<PlaylistItem::Pointer, TQGuardedPtr<Playlist> > &playlistIndex();
bool active() const { return m_active; }
@@ -125,7 +125,7 @@ private:
bool m_active;
TrackSequenceIterator *m_oldIterator;
int m_defaultSize;
- QMap<PlaylistItem::Pointer, QGuardedPtr<Playlist> > m_playlistIndex;
+ TQMap<PlaylistItem::Pointer, TQGuardedPtr<Playlist> > m_playlistIndex;
};
/**
@@ -205,8 +205,8 @@ private:
UpcomingPlaylist *m_playlist;
};
-QDataStream &operator<<(QDataStream &s, const UpcomingPlaylist &p);
-QDataStream &operator>>(QDataStream &s, UpcomingPlaylist &p);
+TQDataStream &operator<<(TQDataStream &s, const UpcomingPlaylist &p);
+TQDataStream &operator>>(TQDataStream &s, UpcomingPlaylist &p);
#endif /* _UPCOMINGPLAYLIST_H */
diff --git a/juk/viewmode.cpp b/juk/viewmode.cpp
index 4bd4b9d8..6c46278b 100644
--- a/juk/viewmode.cpp
+++ b/juk/viewmode.cpp
@@ -17,11 +17,11 @@
#include <kstandarddirs.h>
#include <kdebug.h>
-#include <qpixmap.h>
-#include <qpainter.h>
-#include <qfile.h>
-#include <qdir.h>
-#include <qdatastream.h>
+#include <tqpixmap.h>
+#include <tqpainter.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqdatastream.h>
#include "viewmode.h"
#include "playlistbox.h"
@@ -34,7 +34,7 @@
////////////////////////////////////////////////////////////////////////////////
ViewMode::ViewMode(PlaylistBox *b) :
- QObject(b),
+ TQObject(b),
m_playlistBox(b),
m_visible(false),
m_needsRefresh(false)
@@ -48,8 +48,8 @@ ViewMode::~ViewMode()
}
void ViewMode::paintCell(PlaylistBox::Item *item,
- QPainter *painter,
- const QColorGroup &colorGroup,
+ TQPainter *painter,
+ const TQColorGroup &colorGroup,
int column, int width, int)
{
if(width < item->pixmap(column)->width())
@@ -58,28 +58,28 @@ void ViewMode::paintCell(PlaylistBox::Item *item,
if(m_needsRefresh)
updateHeights();
- QFontMetrics fm = painter->fontMetrics();
+ TQFontMetrics fm = painter->fontMetrics();
int y = item->listView()->itemMargin() + border;
- const QPixmap *pm = item->pixmap(column);
+ const TQPixmap *pm = item->pixmap(column);
if(item->isSelected()) {
painter->eraseRect(0, 0, width, item->height());
- QPen oldPen = painter->pen();
- QPen newPen = oldPen;
+ TQPen oldPen = painter->pen();
+ TQPen newPen = oldPen;
newPen.setWidth(5);
newPen.setJoinStyle(RoundJoin);
- newPen.setColor(QColorGroup::Highlight);
+ newPen.setColor(TQColorGroup::Highlight);
painter->setPen(newPen);
painter->drawRect(border, border, width - border * 2, item->height() - border * 2 + 1);
painter->setPen(oldPen);
painter->fillRect(border, border, width - border * 2, item->height() - border * 2 + 1,
- colorGroup.brush(QColorGroup::Highlight));
+ colorGroup.brush(TQColorGroup::Highlight));
painter->setPen(colorGroup.highlightedText());
}
else
@@ -91,7 +91,7 @@ void ViewMode::paintCell(PlaylistBox::Item *item,
painter->drawPixmap(x, y, *pm);
}
y += pm->height() + fm.height() - fm.descent();
- for(QStringList::Iterator it = m_lines[item].begin(); it != m_lines[item].end(); ++it) {
+ for(TQStringList::Iterator it = m_lines[item].begin(); it != m_lines[item].end(); ++it) {
int x = (width - fm.width(*it)) / 2;
x = QMAX(x, item->listView()->itemMargin());
painter->drawText(x, y, *it);
@@ -102,18 +102,18 @@ void ViewMode::paintCell(PlaylistBox::Item *item,
paintDropIndicator(painter, width, item->height());
}
-bool ViewMode::eventFilter(QObject *watched, QEvent *e)
+bool ViewMode::eventFilter(TQObject *watched, TQEvent *e)
{
- if(m_visible && watched == m_playlistBox->viewport() && e->type() == QEvent::Resize) {
- QResizeEvent *re = static_cast<QResizeEvent *>(e);
+ if(m_visible && watched == m_playlistBox->viewport() && e->type() == TQEvent::Resize) {
+ TQResizeEvent *re = static_cast<TQResizeEvent *>(e);
if(re->size().width() != re->oldSize().width())
m_needsRefresh = true;
}
- if(e->type() == QEvent::Hide)
+ if(e->type() == TQEvent::Hide)
m_needsRefresh = true;
- return QObject::eventFilter(watched, e);
+ return TQObject::eventFilter(watched, e);
}
void ViewMode::setShown(bool shown)
@@ -127,7 +127,7 @@ void ViewMode::setShown(bool shown)
void ViewMode::updateIcons(int size)
{
- for(QListViewItemIterator it(m_playlistBox); it.current(); ++it) {
+ for(TQListViewItemIterator it(m_playlistBox); it.current(); ++it) {
PlaylistBox::Item *i = static_cast<PlaylistBox::Item *>(*it);
i->setPixmap(0, SmallIcon(i->iconName(), size));
}
@@ -138,7 +138,7 @@ void ViewMode::setupItem(PlaylistBox::Item *item) const
const PlaylistBox *box = item->listView();
const int width = box->width() - box->verticalScrollBar()->width() - border * 2;
const int baseHeight = 2 * box->itemMargin() + 32 + border * 2;
- const QFontMetrics fm = box->fontMetrics();
+ const TQFontMetrics fm = box->fontMetrics();
item->setHeight(baseHeight + (fm.height() - fm.descent()) * lines(item, fm, width).count());
}
@@ -147,9 +147,9 @@ void ViewMode::updateHeights()
const int width = m_playlistBox->width() - m_playlistBox->verticalScrollBar()->width() - border * 2;
const int baseHeight = 2 * m_playlistBox->itemMargin() + 32 + border * 2;
- const QFontMetrics fm = m_playlistBox->fontMetrics();
+ const TQFontMetrics fm = m_playlistBox->fontMetrics();
- for(QListViewItemIterator it(m_playlistBox); it.current(); ++it) {
+ for(TQListViewItemIterator it(m_playlistBox); it.current(); ++it) {
PlaylistBox::Item *i = static_cast<PlaylistBox::Item *>(it.current());
m_lines[i] = lines(i, fm, width);
const int height = baseHeight + (fm.height() - fm.descent()) * m_lines[i].count();
@@ -159,13 +159,13 @@ void ViewMode::updateHeights()
m_needsRefresh = false;
}
-void ViewMode::paintDropIndicator(QPainter *painter, int width, int height) // static
+void ViewMode::paintDropIndicator(TQPainter *painter, int width, int height) // static
{
static const int border = 1;
static const int lineWidth = 2;
- QPen oldPen = painter->pen();
- QPen newPen = oldPen;
+ TQPen oldPen = painter->pen();
+ TQPen newPen = oldPen;
newPen.setWidth(lineWidth);
newPen.setStyle(DotLine);
@@ -175,19 +175,19 @@ void ViewMode::paintDropIndicator(QPainter *painter, int width, int height) // s
painter->setPen(oldPen);
}
-QStringList ViewMode::lines(const PlaylistBox::Item *item,
- const QFontMetrics &fm,
+TQStringList ViewMode::lines(const PlaylistBox::Item *item,
+ const TQFontMetrics &fm,
int width)
{
// Here 32 is a bit arbitrary, but that's the width of the icons in this
// mode and seems to a reasonable lower bound.
if(width < 32)
- return QStringList();
+ return TQStringList();
- QString line = item->text();
+ TQString line = item->text();
- QStringList l;
+ TQStringList l;
while(!line.isEmpty()) {
int textLength = line.length();
@@ -195,7 +195,7 @@ QStringList ViewMode::lines(const PlaylistBox::Item *item,
fm.width(line.mid(0, textLength).stripWhiteSpace()) +
item->listView()->itemMargin() * 2 > width)
{
- int i = line.findRev(QRegExp( "\\W"), textLength - 1);
+ int i = line.findRev(TQRegExp( "\\W"), textLength - 1);
if(i > 0)
textLength = i;
else
@@ -223,8 +223,8 @@ CompactViewMode::~CompactViewMode()
}
void CompactViewMode::paintCell(PlaylistBox::Item *item,
- QPainter *painter,
- const QColorGroup &colorGroup,
+ TQPainter *painter,
+ const TQColorGroup &colorGroup,
int column, int width, int align)
{
item->KListViewItem::paintCell(painter, colorGroup, column, width, align);
@@ -244,7 +244,7 @@ void CompactViewMode::setShown(bool shown)
void CompactViewMode::updateHeights()
{
- for(QListViewItemIterator it(playlistBox()); it.current(); ++it)
+ for(TQListViewItemIterator it(playlistBox()); it.current(); ++it)
it.current()->setup();
}
@@ -278,7 +278,7 @@ void TreeViewMode::setShown(bool show)
if(collectionItem && m_searchCategories.isEmpty())
setupDynamicPlaylists();
else {
- for(QDictIterator<PlaylistBox::Item> it(m_searchCategories); it.current(); ++it)
+ for(TQDictIterator<PlaylistBox::Item> it(m_searchCategories); it.current(); ++it)
it.current()->setVisible(true);
}
@@ -291,17 +291,17 @@ void TreeViewMode::setShown(bool show)
}
}
else {
- for(QDictIterator<PlaylistBox::Item> it(m_searchCategories); it.current(); ++it)
+ for(TQDictIterator<PlaylistBox::Item> it(m_searchCategories); it.current(); ++it)
it.current()->setVisible(false);
}
}
-void TreeViewMode::removeItem(const QString &item, unsigned column)
+void TreeViewMode::removeItem(const TQString &item, unsigned column)
{
if(!m_setup)
return;
- QString itemKey;
+ TQString itemKey;
if(column == PlaylistItem::ArtistColumn)
itemKey = "artists" + item;
else if(column == PlaylistItem::GenreColumn)
@@ -328,12 +328,12 @@ void TreeViewMode::removeItem(const QString &item, unsigned column)
emit signalPlaylistDestroyed(itemPlaylist);
}
-void TreeViewMode::addItems(const QStringList &items, unsigned column)
+void TreeViewMode::addItems(const TQStringList &items, unsigned column)
{
if(!m_setup)
return;
- QString searchCategory;
+ TQString searchCategory;
if(column == PlaylistItem::ArtistColumn)
searchCategory = "artists";
else if(column == PlaylistItem::GenreColumn)
@@ -345,7 +345,7 @@ void TreeViewMode::addItems(const QStringList &items, unsigned column)
return;
}
- QValueList<int> columns;
+ TQValueList<int> columns;
columns.append(column);
PlaylistSearch::Component::MatchMode mode = PlaylistSearch::Component::ContainsWord;
@@ -356,10 +356,10 @@ void TreeViewMode::addItems(const QStringList &items, unsigned column)
PlaylistList playlists;
playlists.append(CollectionList::instance());
- QString itemKey, item;
+ TQString itemKey, item;
PlaylistBox::Item *itemParent = m_searchCategories[searchCategory];
- for(QStringList::ConstIterator it = items.begin(); it != items.end(); ++it) {
+ for(TQStringList::ConstIterator it = items.begin(); it != items.end(); ++it) {
item = *it;
itemKey = searchCategory + item;
@@ -384,10 +384,10 @@ void TreeViewMode::setDynamicListsFrozen(bool frozen)
if(frozen)
return;
- QStringList categories;
+ TQStringList categories;
categories << "artists" << "albums" << "genres";
- for(QStringList::ConstIterator it = m_pendingItemsToRemove.begin();
+ for(TQStringList::ConstIterator it = m_pendingItemsToRemove.begin();
it != m_pendingItemsToRemove.end();
++it)
{
diff --git a/juk/viewmode.h b/juk/viewmode.h
index dcb5574c..9ec3e0db 100644
--- a/juk/viewmode.h
+++ b/juk/viewmode.h
@@ -17,7 +17,7 @@
#define VIEWMODE_H
-#include <qdict.h>
+#include <tqdict.h>
#include "playlistbox.h"
@@ -34,15 +34,15 @@ public:
ViewMode(PlaylistBox *b);
virtual ~ViewMode();
- virtual QString name() const { return i18n("Default"); }
+ virtual TQString name() const { return i18n("Default"); }
virtual void setShown(bool shown);
virtual void paintCell(PlaylistBox::Item *item,
- QPainter *painter,
- const QColorGroup &colorGroup,
+ TQPainter *painter,
+ const TQColorGroup &colorGroup,
int column, int width, int align);
- virtual bool eventFilter(QObject *watched, QEvent *e);
+ virtual bool eventFilter(TQObject *watched, TQEvent *e);
void queueRefresh() { m_needsRefresh = true; }
virtual void setupItem(PlaylistBox::Item *item) const;
@@ -58,7 +58,7 @@ public:
* Used for dynamic view modes. This function will be called when \p items
* are added to \p column (even if the view mode hasn't been shown yet).
*/
- virtual void addItems(const QStringList &items, unsigned column)
+ virtual void addItems(const TQStringList &items, unsigned column)
{
(void) items;
(void) column;
@@ -68,7 +68,7 @@ public:
* Used for dynamic view modes. This function will be called when \p item
* is removed from \p column (even if the view mode hasn't been shown yet).
*/
- virtual void removeItem(const QString &item, unsigned column)
+ virtual void removeItem(const TQString &item, unsigned column)
{
(void) item;
(void) column;
@@ -80,15 +80,15 @@ protected:
void setVisible(bool v) { m_visible = v; }
void updateIcons(int size);
virtual void updateHeights();
- static void paintDropIndicator(QPainter *painter, int width, int height);
+ static void paintDropIndicator(TQPainter *painter, int width, int height);
private:
- static QStringList lines(const PlaylistBox::Item *item, const QFontMetrics &fm, int width);
+ static TQStringList lines(const PlaylistBox::Item *item, const TQFontMetrics &fm, int width);
PlaylistBox *m_playlistBox;
bool m_visible;
bool m_needsRefresh;
- QMap<PlaylistBox::Item *, QStringList> m_lines;
+ TQMap<PlaylistBox::Item *, TQStringList> m_lines;
static const int border = 4;
};
@@ -100,12 +100,12 @@ public:
CompactViewMode(PlaylistBox *b);
virtual ~CompactViewMode();
- virtual QString name() const { return i18n("Compact"); }
+ virtual TQString name() const { return i18n("Compact"); }
virtual void setShown(bool shown);
virtual void paintCell(PlaylistBox::Item *item,
- QPainter *painter,
- const QColorGroup &colorGroup,
+ TQPainter *painter,
+ const TQColorGroup &colorGroup,
int column, int width, int align);
virtual void setupItem(PlaylistBox::Item *item) const { item->KListViewItem::setup(); }
@@ -125,21 +125,21 @@ public:
TreeViewMode(PlaylistBox *l);
virtual ~TreeViewMode();
- virtual QString name() const { return i18n("Tree"); }
+ virtual TQString name() const { return i18n("Tree"); }
virtual void setShown(bool shown);
virtual void setupDynamicPlaylists();
virtual void setDynamicListsFrozen(bool frozen);
- virtual void removeItem(const QString &item, unsigned column);
- virtual void addItems(const QStringList &items, unsigned column);
+ virtual void removeItem(const TQString &item, unsigned column);
+ virtual void addItems(const TQStringList &items, unsigned column);
signals:
void signalPlaylistDestroyed(Playlist*);
private:
- QDict<PlaylistBox::Item> m_searchCategories;
- QDict<TreeViewItemPlaylist> m_treeViewItems;
- QStringList m_pendingItemsToRemove;
+ TQDict<PlaylistBox::Item> m_searchCategories;
+ TQDict<TreeViewItemPlaylist> m_treeViewItems;
+ TQStringList m_pendingItemsToRemove;
bool m_dynamicListsFrozen;
bool m_setup;
};
@@ -152,7 +152,7 @@ class CoverManagerMode : public ViewMode
public:
CoverManagerMode(PlaylistBox *b);
- virtual QString name() const { return i18n("Cover Manager"); }
+ virtual TQString name() const { return i18n("Cover Manager"); }
//virtual void setShown(bool shown);
};
diff --git a/juk/webimagefetcher.cpp b/juk/webimagefetcher.cpp
index 3e806bff..1e5bec83 100644
--- a/juk/webimagefetcher.cpp
+++ b/juk/webimagefetcher.cpp
@@ -12,9 +12,9 @@
* *
***************************************************************************/
-#include <qhttp.h>
-#include <qdom.h>
-#include <qwaitcondition.h>
+#include <tqhttp.h>
+#include <tqdom.h>
+#include <tqwaitcondition.h>
#include <kapplication.h>
#include <kstatusbar.h>
@@ -33,22 +33,22 @@ WebImage::WebImage()
{
}
-WebImage::WebImage(const QString &imageURL, const QString &thumbURL,
+WebImage::WebImage(const TQString &imageURL, const TQString &thumbURL,
int width, int height) :
m_imageURL(imageURL),
m_thumbURL(thumbURL),
- m_size(QString("\n%1 x %2").arg(width).arg(height))
+ m_size(TQString("\n%1 x %2").arg(width).arg(height))
{
}
-WebImageFetcher::WebImageFetcher(QObject *parent)
- : QObject(parent),
- m_connection(new QHttp(this)),
+WebImageFetcher::WebImageFetcher(TQObject *parent)
+ : TQObject(parent),
+ m_connection(new TQHttp(this)),
m_connectionId(-1),
m_dialog(0)
{
- connect(m_connection, SIGNAL(requestFinished(int,bool)), SLOT(slotWebRequestFinished(int,bool)));
+ connect(m_connection, TQT_SIGNAL(requestFinished(int,bool)), TQT_SLOT(slotWebRequestFinished(int,bool)));
}
WebImageFetcher::~WebImageFetcher()
@@ -59,7 +59,7 @@ WebImageFetcher::~WebImageFetcher()
void WebImageFetcher::setFile(const FileHandle &file)
{
m_file = file;
- m_searchString = QString(file.tag()->artist() + ' ' + file.tag()->album());
+ m_searchString = TQString(file.tag()->artist() + ' ' + file.tag()->album());
if(m_dialog)
m_dialog->setFile(file);
@@ -103,9 +103,9 @@ void WebImageFetcher::slotWebRequestFinished(int id, bool error)
return;
}
- QDomDocument results("ResultSet");
+ TQDomDocument results("ResultSet");
- QString errorStr;
+ TQString errorStr;
int errorCol, errorLine;
if(!results.setContent(m_connection->readAll(), &errorStr, &errorLine, &errorCol)) {
kdError(65432) << "Unable to create XML document from Yahoo results.\n";
@@ -113,7 +113,7 @@ void WebImageFetcher::slotWebRequestFinished(int id, bool error)
return;
}
- QDomNode n = results.documentElement();
+ TQDomNode n = results.documentElement();
bool hasNoResults = false;
@@ -122,7 +122,7 @@ void WebImageFetcher::slotWebRequestFinished(int id, bool error)
hasNoResults = true;
}
else {
- QDomElement result = n.toElement();
+ TQDomElement result = n.toElement();
if(result.attribute("totalResultsReturned").toInt() == 0)
kdDebug(65432) << "Search returned " << result.attribute("totalResultsAvailable") << " results.\n";
@@ -144,10 +144,10 @@ void WebImageFetcher::slotWebRequestFinished(int id, bool error)
n = n.firstChild();
while(!n.isNull()) {
- QDomNode resultUrl = n.namedItem("Url");
- QDomNode thumbnail = n.namedItem("Thumbnail");
- QDomNode height = n.namedItem("Height");
- QDomNode width = n.namedItem("Width");
+ TQDomNode resultUrl = n.namedItem("Url");
+ TQDomNode thumbnail = n.namedItem("Thumbnail");
+ TQDomNode height = n.namedItem("Height");
+ TQDomNode width = n.namedItem("Width");
// We have the necessary info, move to next node before we forget.
n = n.nextSibling();
@@ -173,8 +173,8 @@ void WebImageFetcher::slotWebRequestFinished(int id, bool error)
m_dialog = new WebImageFetcherDialog(m_imageList, m_file, 0);
m_dialog->setModal(true);
- connect(m_dialog, SIGNAL(coverSelected()), SLOT(slotCoverChosen()));
- connect(m_dialog, SIGNAL(newSearchRequested()), SLOT(slotNewSearch()));
+ connect(m_dialog, TQT_SIGNAL(coverSelected()), TQT_SLOT(slotCoverChosen()));
+ connect(m_dialog, TQT_SIGNAL(newSearchRequested()), TQT_SLOT(slotNewSearch()));
}
m_dialog->refreshScreen(m_imageList);
@@ -183,7 +183,7 @@ void WebImageFetcher::slotWebRequestFinished(int id, bool error)
void WebImageFetcher::slotCoverChosen()
{
- QPixmap pixmap = m_dialog->result();
+ TQPixmap pixmap = m_dialog->result();
if(pixmap.isNull()) {
kdError(65432) << "Selected pixmap is null for some reason.\n";
return;
@@ -210,7 +210,7 @@ void WebImageFetcher::displayWaitMessage()
void WebImageFetcher::requestNewSearchTerms(bool noResults)
{
bool ok;
- QString search = KInputDialog::getText(i18n("Cover Downloader"),
+ TQString search = KInputDialog::getText(i18n("Cover Downloader"),
noResults ?
i18n("No matching images found, please enter new search terms:") :
i18n("Enter new search terms:"),
diff --git a/juk/webimagefetcher.h b/juk/webimagefetcher.h
index 796e205e..9706e6ad 100644
--- a/juk/webimagefetcher.h
+++ b/juk/webimagefetcher.h
@@ -19,9 +19,9 @@
#include <kdialogbase.h>
-#include <qpixmap.h>
-#include <qstringlist.h>
-#include <qregexp.h>
+#include <tqpixmap.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
#include "filehandle.h"
@@ -36,28 +36,28 @@ class WebImage
public:
WebImage();
- WebImage(const QString &imageURL,
- const QString &thumbURL,
+ WebImage(const TQString &imageURL,
+ const TQString &thumbURL,
int width, int height);
- QString imageURL() const { return m_imageURL; }
- QString thumbURL() const { return m_thumbURL; }
- QString size() const { return m_size; }
+ TQString imageURL() const { return m_imageURL; }
+ TQString thumbURL() const { return m_thumbURL; }
+ TQString size() const { return m_size; }
private:
- QString m_imageURL;
- QString m_thumbURL;
- QString m_size;
+ TQString m_imageURL;
+ TQString m_thumbURL;
+ TQString m_size;
};
-typedef QValueList<WebImage> WebImageList;
+typedef TQValueList<WebImage> WebImageList;
class WebImageFetcher : public QObject
{
Q_OBJECT
public:
- WebImageFetcher(QObject *parent);
+ WebImageFetcher(TQObject *parent);
~WebImageFetcher();
void setFile(const FileHandle &file);
@@ -82,11 +82,11 @@ private slots:
private:
FileHandle m_file;
- QString m_searchString;
- QString m_loadedQuery;
+ TQString m_searchString;
+ TQString m_loadedQuery;
WebImageList m_imageList;
uint m_selectedIndex;
- QHttp *m_connection;
+ TQHttp *m_connection;
int m_connectionId;
WebImageFetcherDialog *m_dialog;
};
diff --git a/juk/webimagefetcherdialog.cpp b/juk/webimagefetcherdialog.cpp
index cc14ed61..5e9e0d0c 100644
--- a/juk/webimagefetcherdialog.cpp
+++ b/juk/webimagefetcherdialog.cpp
@@ -24,39 +24,39 @@
#include <kiconloader.h>
#include <kurllabel.h>
-#include <qvbox.h>
-#include <qlayout.h>
-#include <qimage.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qeventloop.h>
+#include <tqvbox.h>
+#include <tqlayout.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqeventloop.h>
#include "webimagefetcherdialog.h"
#include "tag.h"
WebImageFetcherDialog::WebImageFetcherDialog(const WebImageList &imageList,
const FileHandle &file,
- QWidget *parent) :
- KDialogBase(parent, "internet_image_fetcher", true, QString::null,
+ TQWidget *parent) :
+ KDialogBase(parent, "internet_image_fetcher", true, TQString::null,
Ok | Cancel | User1 , NoDefault, true),
- m_pixmap(QPixmap()),
+ m_pixmap(TQPixmap()),
m_imageList(imageList),
m_file(file)
{
disableResize();
- QWidget *mainBox = new QWidget(this);
- QBoxLayout *mainLayout = new QVBoxLayout(mainBox);
+ TQWidget *mainBox = new TQWidget(this);
+ TQBoxLayout *mainLayout = new TQVBoxLayout(mainBox);
m_iconWidget = new KIconView(mainBox);
- m_iconWidget->setResizeMode(QIconView::Adjust);
+ m_iconWidget->setResizeMode(TQIconView::Adjust);
m_iconWidget->setSpacing(10);
m_iconWidget->setFixedSize(500,550);
m_iconWidget->arrangeItemsInGrid();
m_iconWidget->setItemsMovable(false);
mainLayout->addWidget(m_iconWidget);
- connect(m_iconWidget, SIGNAL(executed(QIconViewItem *)),
- this, SLOT(slotOk()));
+ connect(m_iconWidget, TQT_SIGNAL(executed(TQIconViewItem *)),
+ this, TQT_SLOT(slotOk()));
// Before changing the code below be sure to check the attribution terms
// of the Yahoo Image Search API.
@@ -66,10 +66,10 @@ WebImageFetcherDialog::WebImageFetcherDialog(const WebImageList &imageList,
logoLabel->setPixmap(UserIcon("yahoo_credit"));
logoLabel->setMargin(15); // Allow large margin per attribution terms.
logoLabel->setUseTips(true); // Show URL in tooltip.
- connect(logoLabel, SIGNAL(leftClickedURL(const QString &)),
- SLOT(showCreditURL(const QString &)));
+ connect(logoLabel, TQT_SIGNAL(leftClickedURL(const TQString &)),
+ TQT_SLOT(showCreditURL(const TQString &)));
- QBoxLayout *creditLayout = new QHBoxLayout(mainLayout);
+ TQBoxLayout *creditLayout = new TQHBoxLayout(mainLayout);
creditLayout->addStretch(); // Left spacer
creditLayout->addWidget(logoLabel);
creditLayout->addStretch(); // Right spacer
@@ -82,7 +82,7 @@ WebImageFetcherDialog::~WebImageFetcherDialog()
{
}
-void WebImageFetcherDialog::showCreditURL(const QString &url)
+void WebImageFetcherDialog::showCreditURL(const TQString &url)
{
// Don't use static member since I'm sure that someday knowing my luck
// Yahoo will change their mimetype they serve.
@@ -91,7 +91,7 @@ void WebImageFetcherDialog::showCreditURL(const QString &url)
void WebImageFetcherDialog::setLayout()
{
- setCaption(QString("%1 - %2 (%3)")
+ setCaption(TQString("%1 - %2 (%3)")
.arg(m_file.tag()->artist())
.arg(m_file.tag()->album())
.arg(m_imageList.size()));
@@ -138,7 +138,7 @@ void WebImageFetcherDialog::slotOk()
KMessageBox::sorry(this,
i18n("The cover you have selected is unavailable. Please select another."),
i18n("Cover Unavailable"));
- QPixmap blankPix;
+ TQPixmap blankPix;
blankPix.resize(80, 80);
blankPix.fill();
m_iconWidget->currentItem()->setPixmap(blankPix, true, true);
@@ -151,45 +151,45 @@ void WebImageFetcherDialog::slotOk()
void WebImageFetcherDialog::slotCancel()
{
- m_pixmap = QPixmap();
+ m_pixmap = TQPixmap();
reject();
}
void WebImageFetcherDialog::slotUser1()
{
- m_pixmap = QPixmap();
+ m_pixmap = TQPixmap();
accept();
emit newSearchRequested();
}
-QPixmap WebImageFetcherDialog::fetchedImage(uint index) const
+TQPixmap WebImageFetcherDialog::fetchedImage(uint index) const
{
- return (index > m_imageList.count()) ? QPixmap() : pixmapFromURL(m_imageList[index].imageURL());
+ return (index > m_imageList.count()) ? TQPixmap() : pixmapFromURL(m_imageList[index].imageURL());
}
-QPixmap WebImageFetcherDialog::pixmapFromURL(const KURL &url) const
+TQPixmap WebImageFetcherDialog::pixmapFromURL(const KURL &url) const
{
- QString file;
+ TQString file;
if(KIO::NetAccess::download(url, file, 0)) {
- QPixmap pixmap = QPixmap(file);
+ TQPixmap pixmap = TQPixmap(file);
KIO::NetAccess::removeTempFile(file);
return pixmap;
}
KIO::NetAccess::removeTempFile(file);
- return QPixmap();
+ return TQPixmap();
}
////////////////////////////////////////////////////////////////////////////////
// CoverIconViewItem
////////////////////////////////////////////////////////////////////////////////
-CoverIconViewItem::CoverIconViewItem(QIconView *parent, const WebImage &image) :
- QObject(parent), KIconViewItem(parent, parent->lastItem(), image.size()), m_job(0)
+CoverIconViewItem::CoverIconViewItem(TQIconView *parent, const WebImage &image) :
+ TQObject(parent), KIconViewItem(parent, parent->lastItem(), image.size()), m_job(0)
{
// Set up the iconViewItem
- QPixmap mainMap;
+ TQPixmap mainMap;
mainMap.resize(80, 80);
mainMap.fill();
setPixmap(mainMap, true, true);
@@ -197,9 +197,9 @@ CoverIconViewItem::CoverIconViewItem(QIconView *parent, const WebImage &image) :
// Start downloading the image.
m_job = KIO::get(image.thumbURL(), false, false);
- connect(m_job, SIGNAL(result(KIO::Job *)), this, SLOT(imageResult(KIO::Job *)));
- connect(m_job, SIGNAL(data(KIO::Job *, const QByteArray &)),
- this, SLOT(imageData(KIO::Job *, const QByteArray &)));
+ connect(m_job, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(imageResult(KIO::Job *)));
+ connect(m_job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
+ this, TQT_SLOT(imageData(KIO::Job *, const TQByteArray &)));
}
CoverIconViewItem::~CoverIconViewItem()
@@ -209,16 +209,16 @@ CoverIconViewItem::~CoverIconViewItem()
// Drain results issued by KIO before being deleted,
// and before deleting the job.
- kapp->eventLoop()->processEvents(QEventLoop::ExcludeUserInput);
+ kapp->eventLoop()->processEvents(TQEventLoop::ExcludeUserInput);
delete m_job;
}
}
-void CoverIconViewItem::imageData(KIO::Job *, const QByteArray &data)
+void CoverIconViewItem::imageData(KIO::Job *, const TQByteArray &data)
{
int currentSize = m_buffer.size();
- m_buffer.resize(currentSize + data.size(), QGArray::SpeedOptim);
+ m_buffer.resize(currentSize + data.size(), TQGArray::SpeedOptim);
memcpy(&(m_buffer.data()[currentSize]), data.data(), data.size());
}
@@ -227,8 +227,8 @@ void CoverIconViewItem::imageResult(KIO::Job *job)
if(job->error())
return;
- QPixmap iconImage(m_buffer);
- iconImage = QImage(iconImage.convertToImage()).smoothScale(80, 80, QImage::ScaleMin);
+ TQPixmap iconImage(m_buffer);
+ iconImage = TQImage(iconImage.convertToImage()).smoothScale(80, 80, TQImage::ScaleMin);
setPixmap(iconImage, true, true);
}
diff --git a/juk/webimagefetcherdialog.h b/juk/webimagefetcherdialog.h
index a4424a2f..d418a947 100644
--- a/juk/webimagefetcherdialog.h
+++ b/juk/webimagefetcherdialog.h
@@ -31,11 +31,11 @@ class WebImageFetcherDialog : public KDialogBase
public:
WebImageFetcherDialog(const WebImageList &urlList,
const FileHandle &file,
- QWidget *parent = 0);
+ TQWidget *parent = 0);
virtual ~WebImageFetcherDialog();
- QPixmap result() const { return m_pixmap; }
+ TQPixmap result() const { return m_pixmap; }
void setLayout();
void setImageList(const WebImageList &urlList);
@@ -53,13 +53,13 @@ protected slots:
void slotOk();
void slotCancel();
void slotUser1();
- void showCreditURL(const QString &url);
+ void showCreditURL(const TQString &url);
private:
- QPixmap fetchedImage(uint index) const;
- QPixmap pixmapFromURL(const KURL &url) const;
+ TQPixmap fetchedImage(uint index) const;
+ TQPixmap pixmapFromURL(const KURL &url) const;
- QPixmap m_pixmap;
+ TQPixmap m_pixmap;
WebImageList m_imageList;
KIconView *m_iconWidget;
FileHandle m_file;
@@ -70,21 +70,21 @@ namespace KIO
class TransferJob;
}
-class CoverIconViewItem : public QObject, public KIconViewItem
+class CoverIconViewItem : public TQObject, public KIconViewItem
{
Q_OBJECT
public:
- CoverIconViewItem(QIconView *parent, const WebImage &image);
+ CoverIconViewItem(TQIconView *parent, const WebImage &image);
~CoverIconViewItem();
private slots:
- void imageData(KIO::Job *job, const QByteArray &data);
+ void imageData(KIO::Job *job, const TQByteArray &data);
void imageResult(KIO::Job* job);
private:
- QByteArray m_buffer;
- QGuardedPtr<KIO::TransferJob> m_job;
+ TQByteArray m_buffer;
+ TQGuardedPtr<KIO::TransferJob> m_job;
};
#endif