summaryrefslogtreecommitdiffstats
path: root/noatun/modules/splitplaylist
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:43:15 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:43:15 +0000
commite654398e46e37abf457b2b1122ab898d2c51c49f (patch)
treed39ee6440f3c3663c3ead84a2d4cc2d034667e96 /noatun/modules/splitplaylist
parente4f29b18e19394b9352f52a6c0d0d0e3932cf511 (diff)
downloadtdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.tar.gz
tdemultimedia-e654398e46e37abf457b2b1122ab898d2c51c49f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1157644 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'noatun/modules/splitplaylist')
-rw-r--r--noatun/modules/splitplaylist/find.cpp26
-rw-r--r--noatun/modules/splitplaylist/find.h8
-rw-r--r--noatun/modules/splitplaylist/playlist.cpp20
-rw-r--r--noatun/modules/splitplaylist/playlist.h8
-rw-r--r--noatun/modules/splitplaylist/view.cpp210
-rw-r--r--noatun/modules/splitplaylist/view.h58
6 files changed, 165 insertions, 165 deletions
diff --git a/noatun/modules/splitplaylist/find.cpp b/noatun/modules/splitplaylist/find.cpp
index b6e196d9..5d378a79 100644
--- a/noatun/modules/splitplaylist/find.cpp
+++ b/noatun/modules/splitplaylist/find.cpp
@@ -1,17 +1,17 @@
#include "find.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kcombobox.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
#include <klocale.h>
-Finder::Finder(QWidget *parent) : KDialogBase(parent, 0, false, i18n("Find"), Close | User1, User1, false, KGuiItem(i18n("&Find"),"find"))
+Finder::Finder(TQWidget *parent) : KDialogBase(parent, 0, false, i18n("Find"), Close | User1, User1, false, KGuiItem(i18n("&Find"),"find"))
{
- QWidget *mainWidget = new QWidget(this);
+ TQWidget *mainWidget = new TQWidget(this);
mainWidget->setMinimumWidth(320);
setMainWidget(mainWidget);
- QGridLayout *layout=new QGridLayout(mainWidget);
+ TQGridLayout *layout=new TQGridLayout(mainWidget);
layout->setSpacing(KDialog::spacingHint());
mText=new KHistoryCombo(mainWidget);
@@ -19,22 +19,22 @@ Finder::Finder(QWidget *parent) : KDialogBase(parent, 0, false, i18n("Find"), Cl
mText->setFocus();
- mRegexp=new QCheckBox(i18n("&Regular expression"), mainWidget);
- mBackwards=new QCheckBox(i18n("Find &backwards"), mainWidget);
+ mRegexp=new TQCheckBox(i18n("&Regular expression"), mainWidget);
+ mBackwards=new TQCheckBox(i18n("Find &backwards"), mainWidget);
layout->addMultiCellWidget(mText, 0, 0, 0, 1);
layout->addWidget(mRegexp, 1, 0);
layout->addWidget(mBackwards, 1, 1);
- connect(this, SIGNAL(user1Clicked()), SLOT(clicked()));
+ connect(this, TQT_SIGNAL(user1Clicked()), TQT_SLOT(clicked()));
- connect(mText, SIGNAL(activated(int)), SLOT(clicked()));
- connect(mText, SIGNAL(textChanged(const QString &)), SLOT(textChanged(const QString &)));
+ connect(mText, TQT_SIGNAL(activated(int)), TQT_SLOT(clicked()));
+ connect(mText, TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(textChanged(const TQString &)));
enableButton(User1, false);
}
-void Finder::textChanged(const QString &text) {
+void Finder::textChanged(const TQString &text) {
enableButton(User1, !text.isEmpty());
}
@@ -54,7 +54,7 @@ void Finder::clicked()
emit search(this);
}
-QString Finder::string() const
+TQString Finder::string() const
{
return mText->currentText();
}
diff --git a/noatun/modules/splitplaylist/find.h b/noatun/modules/splitplaylist/find.h
index a4791339..752bc8dd 100644
--- a/noatun/modules/splitplaylist/find.h
+++ b/noatun/modules/splitplaylist/find.h
@@ -11,22 +11,22 @@ class Finder : public KDialogBase
{
Q_OBJECT
public:
- Finder(QWidget *parent);
+ Finder(TQWidget *parent);
bool regexp() const;
bool isForward() const;
- QString string() const;
+ TQString string() const;
signals:
void search(Finder *);
public slots:
- void textChanged(const QString &);
+ void textChanged(const TQString &);
void clicked();
private:
KHistoryCombo *mText;
- QCheckBox *mRegexp, *mBackwards;
+ TQCheckBox *mRegexp, *mBackwards;
};
#endif
diff --git a/noatun/modules/splitplaylist/playlist.cpp b/noatun/modules/splitplaylist/playlist.cpp
index 57d6fb48..d0ded140 100644
--- a/noatun/modules/splitplaylist/playlist.cpp
+++ b/noatun/modules/splitplaylist/playlist.cpp
@@ -20,9 +20,9 @@ SplitPlaylist::SplitPlaylist()
void SplitPlaylist::init()
{
view=new View(this); // 195
- connect(view->listView(), SIGNAL(executed(QListViewItem*)), SLOT(listItemSelected(QListViewItem*)));
- connect(view, SIGNAL(shown()), SIGNAL(listShown()));
- connect(view, SIGNAL(hidden()), SIGNAL(listHidden()));
+ connect(view->listView(), TQT_SIGNAL(executed(TQListViewItem*)), TQT_SLOT(listItemSelected(TQListViewItem*)));
+ connect(view, TQT_SIGNAL(shown()), TQT_SIGNAL(listShown()));
+ connect(view, TQT_SIGNAL(hidden()), TQT_SIGNAL(listHidden()));
view->init(); // 1000
}
@@ -112,7 +112,7 @@ PlaylistItem SplitPlaylist::previous()
List *list = view->listView();
// check if the item still exists (hackitude: 50%)
bool found=false;
- for (QListViewItem *i = list->firstChild(); i; i = i->nextSibling())
+ for (TQListViewItem *i = list->firstChild(); i; i = i->nextSibling())
{
if (i == static_cast<SafeListViewItem*>(randomPrevious.data()))
{
@@ -215,15 +215,15 @@ void SplitPlaylist::setCurrent(const PlaylistItem &i, bool emitC)
// remove the old icon
SafeListViewItem *now=static_cast<SafeListViewItem*>(current().data());
if (now)
- now->setPixmap(0, QPixmap());
+ now->setPixmap(0, TQPixmap());
- QRect rect(view->listView()->itemRect(static_cast<SafeListViewItem*>(current().data())));
+ TQRect rect(view->listView()->itemRect(static_cast<SafeListViewItem*>(current().data())));
rect.setWidth(view->listView()->viewport()->width());
currentItem=i;
view->listView()->viewport()->repaint(rect,true);
view->listView()->ensureItemVisible(static_cast<SafeListViewItem*>(current().data()));
- QRect currentRect= view->listView()->itemRect(static_cast<SafeListViewItem*>(current().data()));
+ TQRect currentRect= view->listView()->itemRect(static_cast<SafeListViewItem*>(current().data()));
view->listView()->viewport()->repaint(currentRect);
now=static_cast<SafeListViewItem*>(current().data());
@@ -240,7 +240,7 @@ void SplitPlaylist::remove(const PlaylistItem &)
// delete i;
}
-void SplitPlaylist::listItemSelected(QListViewItem *i)
+void SplitPlaylist::listItemSelected(TQListViewItem *i)
{
setCurrent(PlaylistItem(static_cast<SafeListViewItem*>(i)), false);
emit playCurrent();
@@ -253,8 +253,8 @@ void SplitPlaylist::randomize()
view->setSorting(false);
List *lview = view->listView();
// eeeeevil :)
- QPtrList<void> list;
- QPtrList<QListViewItem> items;
+ TQPtrList<void> list;
+ TQPtrList<TQListViewItem> items;
for(int i = 0; i < lview->childCount(); i++)
{
list.append( (void*) i );
diff --git a/noatun/modules/splitplaylist/playlist.h b/noatun/modules/splitplaylist/playlist.h
index 04cb648d..204d97c2 100644
--- a/noatun/modules/splitplaylist/playlist.h
+++ b/noatun/modules/splitplaylist/playlist.h
@@ -10,8 +10,8 @@ class PlaylistItem
PlaylistItem(const KURL &u=0);
virtual ~PlaylistItem();
- QString title() const;
- virtual void setTitle(const QString &t);
+ TQString title() const;
+ virtual void setTitle(const TQString &t);
KURL url() const;
virtual void setUrl(const KURL &u);
@@ -77,7 +77,7 @@ public slots:
void setCurrent(const PlaylistItem &, bool emitC);
void setCurrent(const PlaylistItem &);
- void listItemSelected(QListViewItem*);
+ void listItemSelected(TQListViewItem*);
void randomize();
@@ -90,7 +90,7 @@ signals:
private:
bool mExiting; // HACK HACK HACK HACK!!!
View *view;
-// QRect currentRect;
+// TQRect currentRect;
static SplitPlaylist *Self;
};
diff --git a/noatun/modules/splitplaylist/view.cpp b/noatun/modules/splitplaylist/view.cpp
index 7f5584f9..8df38afd 100644
--- a/noatun/modules/splitplaylist/view.cpp
+++ b/noatun/modules/splitplaylist/view.cpp
@@ -10,13 +10,13 @@
// Abandon All Hope, Ye Who Enter Here
-#include <qdragobject.h>
-#include <qheader.h>
-#include <qlayout.h>
-#include <qmap.h>
-#include <qregexp.h>
-#include <qtextstream.h>
-#include <qpainter.h>
+#include <tqdragobject.h>
+#include <tqheader.h>
+#include <tqlayout.h>
+#include <tqmap.h>
+#include <tqregexp.h>
+#include <tqtextstream.h>
+#include <tqpainter.h>
#include <kaction.h>
#include <kdebug.h>
@@ -43,8 +43,8 @@
#define SPL SplitPlaylist::SPL()
-SafeListViewItem::SafeListViewItem(QListView *parent, QListViewItem *after, const KURL &text)
- : QCheckListItem(parent,0, QCheckListItem::CheckBox), PlaylistItemData(), removed(false)
+SafeListViewItem::SafeListViewItem(TQListView *parent, TQListViewItem *after, const KURL &text)
+ : TQCheckListItem(parent,0, TQCheckListItem::CheckBox), PlaylistItemData(), removed(false)
{
addRef();
setUrl(text);
@@ -65,8 +65,8 @@ SafeListViewItem::SafeListViewItem(QListView *parent, QListViewItem *after, cons
PlaylistItemData::added();
}
-SafeListViewItem::SafeListViewItem(QListView *parent, QListViewItem *after, const QMap<QString,QString> &props)
- : QCheckListItem(parent, 0, QCheckListItem::CheckBox), removed(false)
+SafeListViewItem::SafeListViewItem(TQListView *parent, TQListViewItem *after, const TQMap<TQString,TQString> &props)
+ : TQCheckListItem(parent, 0, TQCheckListItem::CheckBox), removed(false)
{
addRef();
@@ -75,10 +75,10 @@ SafeListViewItem::SafeListViewItem(QListView *parent, QListViewItem *after, cons
// A version of setProperty that assumes a key is unique,
// and doesn't call modified for every new key.
// Ugly, but this function is a very hot path on playlist loading
- for (QMap<QString,QString>::ConstIterator i=props.begin(); i!=props.end(); ++i )
+ for (TQMap<TQString,TQString>::ConstIterator i=props.begin(); i!=props.end(); ++i )
{
- QString n = i.key();
- QString val = i.data();
+ TQString n = i.key();
+ TQString val = i.data();
if (n=="enabled")
{
@@ -109,12 +109,12 @@ SafeListViewItem::~SafeListViewItem()
remove();
}
-QString SafeListViewItem::file() const
+TQString SafeListViewItem::file() const
{
return localFilename();
}
-static void pad(QString &str)
+static void pad(TQString &str)
{
int len=str.length();
int at = 0;
@@ -123,11 +123,11 @@ static void pad(QString &str)
static const int paddingsize=12;
// not static for reason
- const QChar chars[paddingsize] =
+ const TQChar chars[paddingsize] =
{
- QChar('0'), QChar('0'), QChar('0'), QChar('0'),
- QChar('0'), QChar('0'), QChar('0'), QChar('0'),
- QChar('0'), QChar('0'), QChar('0'), QChar('0')
+ TQChar('0'), TQChar('0'), TQChar('0'), TQChar('0'),
+ TQChar('0'), TQChar('0'), TQChar('0'), TQChar('0'),
+ TQChar('0'), TQChar('0'), TQChar('0'), TQChar('0')
};
for (int i=0; i < len; i++)
@@ -155,19 +155,19 @@ static void pad(QString &str)
}
}
-int SafeListViewItem::compare(QListViewItem * i, int col, bool) const
+int SafeListViewItem::compare(TQListViewItem * i, int col, bool) const
{
- QString text1 = text(col);
- QString text2 = i->text(col);
+ TQString text1 = text(col);
+ TQString text2 = i->text(col);
pad(text1);
pad(text2);
return text1.compare(text2);
}
-QString SafeListViewItem::property(const QString &n, const QString &def) const
+TQString SafeListViewItem::property(const TQString &n, const TQString &def) const
{
- for (QValueList<Property>::ConstIterator i=mProperties.begin(); i != mProperties.end(); ++i)
+ for (TQValueList<Property>::ConstIterator i=mProperties.begin(); i != mProperties.end(); ++i)
{
if ((*i).key==n)
return (*i).value;
@@ -180,7 +180,7 @@ QString SafeListViewItem::property(const QString &n, const QString &def) const
return def;
}
-void SafeListViewItem::setProperty(const QString &n, const QString &val)
+void SafeListViewItem::setProperty(const TQString &n, const TQString &val)
{
if (n=="enabled")
{
@@ -201,7 +201,7 @@ void SafeListViewItem::setProperty(const QString &n, const QString &val)
modified();
}
-void SafeListViewItem::clearProperty(const QString &n)
+void SafeListViewItem::clearProperty(const TQString &n)
{
if (n=="enabled")
{
@@ -210,7 +210,7 @@ void SafeListViewItem::clearProperty(const QString &n)
return;
}
- for (QValueList<Property>::Iterator i=mProperties.begin(); i != mProperties.end(); ++i)
+ for (TQValueList<Property>::Iterator i=mProperties.begin(); i != mProperties.end(); ++i)
{
if ((*i).key==n)
{
@@ -221,18 +221,18 @@ void SafeListViewItem::clearProperty(const QString &n)
}
}
-QStringList SafeListViewItem::properties() const
+TQStringList SafeListViewItem::properties() const
{
- QStringList list;
- for (QValueList<Property>::ConstIterator i=mProperties.begin(); i != mProperties.end(); ++i)
+ TQStringList list;
+ for (TQValueList<Property>::ConstIterator i=mProperties.begin(); i != mProperties.end(); ++i)
list += (*i).key;
list += "enabled";
return list;
}
-bool SafeListViewItem::isProperty(const QString &n) const
+bool SafeListViewItem::isProperty(const TQString &n) const
{
- for (QValueList<Property>::ConstIterator i=mProperties.begin(); i != mProperties.end(); ++i)
+ for (TQValueList<Property>::ConstIterator i=mProperties.begin(); i != mProperties.end(); ++i)
{
if ((*i).key==n)
return true;
@@ -243,7 +243,7 @@ bool SafeListViewItem::isProperty(const QString &n) const
void SafeListViewItem::downloaded(int percent)
{
if (!removed)
- setText(1, QString::number(percent)+'%');
+ setText(1, TQString::number(percent)+'%');
}
void SafeListViewItem::downloadTimeout()
@@ -285,25 +285,25 @@ void SafeListViewItem::stateChange(bool s)
// if you uncheck this, uncheck thet others that
// are selected too
- QPtrList<QListViewItem> list=SPL->view->listView()->selectedItems();
+ TQPtrList<TQListViewItem> list=SPL->view->listView()->selectedItems();
// but not if I'm not selected
if (list.containsRef(this))
- for (QListViewItem *i=list.first(); i != 0; i=list.next())
- static_cast<QCheckListItem*>(i)->setOn(s);
+ for (TQListViewItem *i=list.first(); i != 0; i=list.next())
+ static_cast<TQCheckListItem*>(i)->setOn(s);
else
- QCheckListItem::stateChange(s);
+ TQCheckListItem::stateChange(s);
}
-void SafeListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align)
+void SafeListViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align)
{
- QCheckListItem::paintCell(p, cg, column, width, align);
+ TQCheckListItem::paintCell(p, cg, column, width, align);
if (SPL->current() == this)
{
p->save();
p->setRasterOp(XorROP);
- p->fillRect(0, 0, width, height(), QColor(255,255,255));
+ p->fillRect(0, 0, width, height(), TQColor(255,255,255));
p->restore();
}
@@ -354,11 +354,11 @@ List::List(View *parent)
setDropVisualizer(true);
setDragEnabled(true);
setItemsMovable(true);
- setSelectionMode(QListView::Extended);
- connect(this, SIGNAL(dropped(QDropEvent*, QListViewItem*)), SLOT(dropEvent(QDropEvent*, QListViewItem*)));
- connect(this, SIGNAL(moved()), SLOT(move()));
- connect(this, SIGNAL(aboutToMove()), parent, SLOT(setNoSorting()));
- connect(this, SIGNAL(deleteCurrentItem()), parent, SLOT(deleteSelected()));
+ setSelectionMode(TQListView::Extended);
+ connect(this, TQT_SIGNAL(dropped(TQDropEvent*, TQListViewItem*)), TQT_SLOT(dropEvent(TQDropEvent*, TQListViewItem*)));
+ connect(this, TQT_SIGNAL(moved()), TQT_SLOT(move()));
+ connect(this, TQT_SIGNAL(aboutToMove()), parent, TQT_SLOT(setNoSorting()));
+ connect(this, TQT_SIGNAL(deleteCurrentItem()), parent, TQT_SLOT(deleteSelected()));
}
List::~List()
@@ -370,12 +370,12 @@ void List::move()
emit modified();
}
-bool List::acceptDrag(QDropEvent *event) const
+bool List::acceptDrag(TQDropEvent *event) const
{
return KURLDrag::canDecode(event) || KListView::acceptDrag(event);
}
-void List::dropEvent(QDropEvent *event, QListViewItem *after)
+void List::dropEvent(TQDropEvent *event, TQListViewItem *after)
{
static_cast<View*>(parent())->setNoSorting();
KURL::List textlist;
@@ -390,7 +390,7 @@ void List::dropEvent(QDropEvent *event, QListViewItem *after)
emit modified();
}
-void List::keyPressEvent(QKeyEvent *e)
+void List::keyPressEvent(TQKeyEvent *e)
{
if (e->key()==Key_Enter || e->key()==Key_Return)
{
@@ -425,18 +425,18 @@ class NoatunSaver : public PlaylistSaver
List *mList;
SafeListViewItem *after, *mFirst;
public:
- NoatunSaver(List *l, QListViewItem *after=0)
+ NoatunSaver(List *l, TQListViewItem *after=0)
: mList(l)
{
this->after = static_cast<SafeListViewItem*>(after);
mFirst = 0;
}
- QListViewItem *getAfter() { return after; }
- QListViewItem *getFirst() { return mFirst; }
+ TQListViewItem *getAfter() { return after; }
+ TQListViewItem *getFirst() { return mFirst; }
protected:
- virtual void readItem(const QMap<QString,QString> &properties)
+ virtual void readItem(const TQMap<TQString,TQString> &properties)
{
after = new SafeListViewItem(mList, after, properties);
if (mFirst==0)
@@ -474,10 +474,10 @@ bool View::saveToURL(const KURL &url)
void View::exportTo(const KURL &url)
{
- QString local(napp->tempSaveName(url.path()));
- QFile saver(local);
+ TQString local(napp->tempSaveName(url.path()));
+ TQFile saver(local);
saver.open(IO_ReadWrite | IO_Truncate);
- QTextStream t(&saver);
+ TQTextStream t(&saver);
// navigate the list
for (SafeListViewItem *i=static_cast<SafeListViewItem*>(listView()->firstChild());
i != 0; i=static_cast<SafeListViewItem*>(i->itemBelow()))
@@ -495,7 +495,7 @@ void View::exportTo(const KURL &url)
saver.remove();
}
-QListViewItem *List::openGlobal(const KURL &u, QListViewItem *after)
+TQListViewItem *List::openGlobal(const KURL &u, TQListViewItem *after)
{
clear();
NoatunSaver saver(this, after);
@@ -505,7 +505,7 @@ QListViewItem *List::openGlobal(const KURL &u, QListViewItem *after)
}
// for m3u files
-QListViewItem *List::importGlobal(const KURL &u, QListViewItem *after)
+TQListViewItem *List::importGlobal(const KURL &u, TQListViewItem *after)
{
NoatunSaver saver(this, after);
if (!saver.metalist(u))
@@ -524,7 +524,7 @@ QListViewItem *List::importGlobal(const KURL &u, QListViewItem *after)
return saver.getAfter();
}
-QListViewItem *List::addFile(const KURL& url, bool play, QListViewItem *after)
+TQListViewItem *List::addFile(const KURL& url, bool play, TQListViewItem *after)
{
// when a new item is added, we don't want to sort anymore
SPL->view->setNoSorting();
@@ -536,7 +536,7 @@ QListViewItem *List::addFile(const KURL& url, bool play, QListViewItem *after)
)
{
// a playlist is requested
- QListViewItem *i = importGlobal(url, after);
+ TQListViewItem *i = importGlobal(url, after);
if (play)
SPL->listItemSelected(i);
return i;
@@ -552,7 +552,7 @@ QListViewItem *List::addFile(const KURL& url, bool play, QListViewItem *after)
}
else
{
- QListViewItem *i = new SafeListViewItem(this, after, url);
+ TQListViewItem *i = new SafeListViewItem(this, after, url);
if (play)
SPL->listItemSelected(i);
return i;
@@ -569,22 +569,22 @@ void List::addNextPendingDirectory()
currentJobURL= *pendingIt;
listJob= KIO::listRecursive(currentJobURL, false,false);
connect(
- listJob, SIGNAL(entries(KIO::Job*, const KIO::UDSEntryList&)),
- SLOT(slotEntries(KIO::Job*, const KIO::UDSEntryList&))
+ listJob, TQT_SIGNAL(entries(KIO::Job*, const KIO::UDSEntryList&)),
+ TQT_SLOT(slotEntries(KIO::Job*, const KIO::UDSEntryList&))
);
connect(
- listJob, SIGNAL(result(KIO::Job *)),
- SLOT(slotResult(KIO::Job *))
+ listJob, TQT_SIGNAL(result(KIO::Job *)),
+ TQT_SLOT(slotResult(KIO::Job *))
);
connect(
- listJob, SIGNAL(redirection(KIO::Job *, const KURL &)),
- SLOT(slotRedirection(KIO::Job *, const KURL &))
+ listJob, TQT_SIGNAL(redirection(KIO::Job *, const KURL &)),
+ TQT_SLOT(slotRedirection(KIO::Job *, const KURL &))
);
pendingAddDirectories.remove(pendingIt);
}
}
-void List::addDirectoryRecursive(const KURL &dir, QListViewItem *after)
+void List::addDirectoryRecursive(const KURL &dir, TQListViewItem *after)
{
if (!after) after=lastItem();
recursiveAddAfter= after;
@@ -602,7 +602,7 @@ void List::slotResult(KIO::Job *job)
void List::slotEntries(KIO::Job *, const KIO::UDSEntryList &entries)
{
- QMap<QString,KURL> __list; // temp list to sort entries
+ TQMap<TQString,KURL> __list; // temp list to sort entries
KIO::UDSEntryListConstIterator it = entries.begin();
KIO::UDSEntryListConstIterator end = entries.end();
@@ -619,7 +619,7 @@ void List::slotEntries(KIO::Job *, const KIO::UDSEntryList &entries)
if (!file.isDir())
__list.insert(file.url().path(), file.url());
}
- QMap<QString,KURL>::Iterator __it;
+ TQMap<TQString,KURL>::Iterator __it;
for( __it = __list.begin(); __it != __list.end(); ++__it )
{
recursiveAddAfter= addFile(__it.data(), false, recursiveAddAfter);
@@ -638,25 +638,25 @@ View::View(SplitPlaylist *)
{
list=new List(this);
setCentralWidget(list);
- connect(list, SIGNAL(modified(void)), this, SLOT(setModified(void)) );
+ connect(list, TQT_SIGNAL(modified(void)), this, TQT_SLOT(setModified(void)) );
// connect the click on the header with sorting
- connect(list->header(),SIGNAL(clicked(int)),this,SLOT(headerClicked(int)) );
+ connect(list->header(),TQT_SIGNAL(clicked(int)),this,TQT_SLOT(headerClicked(int)) );
- mOpen=new KAction(i18n("Add &Files..."), "queue", 0, this, SLOT(addFiles()), actionCollection(), "add_files");
- (void) new KAction(i18n("Add Fol&ders..."), "folder", 0, this, SLOT(addDirectory()), actionCollection(), "add_dir");
- mDelete=new KAction(i18n("Delete"), "editdelete", Key_Delete, this, SLOT(deleteSelected()), actionCollection(), "delete");
+ mOpen=new KAction(i18n("Add &Files..."), "queue", 0, this, TQT_SLOT(addFiles()), actionCollection(), "add_files");
+ (void) new KAction(i18n("Add Fol&ders..."), "folder", 0, this, TQT_SLOT(addDirectory()), actionCollection(), "add_dir");
+ mDelete=new KAction(i18n("Delete"), "editdelete", Key_Delete, this, TQT_SLOT(deleteSelected()), actionCollection(), "delete");
- mClose=KStdAction::close(this, SLOT(close()), actionCollection());
- mFind=KStdAction::find(this, SLOT(find()), actionCollection());
+ mClose=KStdAction::close(this, TQT_SLOT(close()), actionCollection());
+ mFind=KStdAction::find(this, TQT_SLOT(find()), actionCollection());
- (void) KStdAction::configureToolbars(this, SLOT(configureToolBars()), actionCollection());
- mOpenNew=KStdAction::openNew(this, SLOT(openNew()), actionCollection());
- mOpenpl=KStdAction::open(this, SLOT(open()), actionCollection());
- mSave=KStdAction::save(this, SLOT(save()), actionCollection());
- mSaveAs=KStdAction::saveAs(this, SLOT(saveAs()), actionCollection());
+ (void) KStdAction::configureToolbars(this, TQT_SLOT(configureToolBars()), actionCollection());
+ mOpenNew=KStdAction::openNew(this, TQT_SLOT(openNew()), actionCollection());
+ mOpenpl=KStdAction::open(this, TQT_SLOT(open()), actionCollection());
+ mSave=KStdAction::save(this, TQT_SLOT(save()), actionCollection());
+ mSaveAs=KStdAction::saveAs(this, TQT_SLOT(saveAs()), actionCollection());
- (void) new KAction(i18n("Shuffle"), "misc", 0, SPL, SLOT( randomize() ), actionCollection(), "shuffle");
- (void) new KAction(i18n("Clear"), "editclear", 0, list, SLOT( clear() ), actionCollection(), "clear");
+ (void) new KAction(i18n("Shuffle"), "misc", 0, SPL, TQT_SLOT( randomize() ), actionCollection(), "shuffle");
+ (void) new KAction(i18n("Clear"), "editclear", 0, list, TQT_SLOT( clear() ), actionCollection(), "clear");
createGUI("splui.rc");
@@ -669,10 +669,10 @@ View::View(SplitPlaylist *)
void View::find()
{
mFinder->show();
- connect(mFinder, SIGNAL(search(Finder*)), SLOT(findIt(Finder*)));
+ connect(mFinder, TQT_SIGNAL(search(Finder*)), TQT_SLOT(findIt(Finder*)));
}
-static bool testWord(QListViewItem *i, const QString &finder)
+static bool testWord(TQListViewItem *i, const TQString &finder)
{
PlaylistItemData *item=static_cast<SafeListViewItem*>(i);
if (item->title().find(finder, 0, false) >=0)
@@ -688,7 +688,7 @@ static bool testWord(QListViewItem *i, const QString &finder)
return false;
}
-static bool testWord(QListViewItem *i, const QRegExp &finder)
+static bool testWord(TQListViewItem *i, const TQRegExp &finder)
{
PlaylistItemData *item=static_cast<SafeListViewItem*>(i);
if (item->title().find(finder) >=0)
@@ -706,7 +706,7 @@ static bool testWord(QListViewItem *i, const QRegExp &finder)
void View::findIt(Finder *f)
{
- QListViewItem *search=list->currentItem();
+ TQListViewItem *search=list->currentItem();
if (list->currentItem())
{
@@ -728,7 +728,7 @@ void View::findIt(Finder *f)
{
if (f->regexp())
{
- if (testWord(search, QRegExp(f->string(), false)))
+ if (testWord(search, TQRegExp(f->string(), false)))
break;
}
else
@@ -746,12 +746,12 @@ void View::findIt(Finder *f)
{
if (f->isForward())
{
- if (KMessageBox::questionYesNo(this, i18n("End of playlist reached. Continue searching from beginning?"),QString::null,KStdGuiItem::cont(),KStdGuiItem::cancel()) == KMessageBox::Yes)
+ if (KMessageBox::questionYesNo(this, i18n("End of playlist reached. Continue searching from beginning?"),TQString::null,KStdGuiItem::cont(),KStdGuiItem::cancel()) == KMessageBox::Yes)
search=list->firstChild();
}
else
{
- if (KMessageBox::questionYesNo(this, i18n("Beginning of playlist reached. Continue searching from end?"),QString::null,KStdGuiItem::cont(),KStdGuiItem::cancel()) == KMessageBox::Yes)
+ if (KMessageBox::questionYesNo(this, i18n("Beginning of playlist reached. Continue searching from end?"),TQString::null,KStdGuiItem::cont(),KStdGuiItem::cancel()) == KMessageBox::Yes)
search=list->lastChild();
}
}
@@ -760,8 +760,8 @@ void View::findIt(Finder *f)
if (search)
{
{ // select none
- QPtrList<QListViewItem> sel=list->selectedItems();
- for (QListViewItem *i=sel.first(); i!=0; i=sel.next())
+ TQPtrList<TQListViewItem> sel=list->selectedItems();
+ for (TQListViewItem *i=sel.first(); i!=0; i=sel.next())
list->setSelected(i, false);
}
list->setSelected(search, true);
@@ -781,7 +781,7 @@ View::~View()
void View::init()
{
// see if we are importing an old-style list
- bool importing= ! QFile(napp->dirs()->saveLocation("data", "noatun/") + "splitplaylist.xml").exists();
+ bool importing= ! TQFile(napp->dirs()->saveLocation("data", "noatun/") + "splitplaylist.xml").exists();
if (importing)
{
@@ -802,7 +802,7 @@ void View::init()
// this has to come after openGlobal, since openGlobal emits modified()
setModified(config.readBoolEntry("modified", false));
- QString path = config.readPathEntry("file");
+ TQString path = config.readPathEntry("file");
// don't call setPath with an empty path, that would make the url "valid"
if ( !path.isEmpty() )
mPlaylistFile.setPath(path);
@@ -860,18 +860,18 @@ void List::clear()
{
SPL->setCurrent(0);
- QListView::clear();
+ TQListView::clear();
}
void View::deleteSelected()
{
- QPtrList<QListViewItem> items(list->selectedItems());
+ TQPtrList<TQListViewItem> items(list->selectedItems());
bool stopped=false;
// noatun shouldn't play files for now
- QListViewItem *afterLast=0;
+ TQListViewItem *afterLast=0;
- for (QPtrListIterator<QListViewItem> it(items); it.current(); ++it)
+ for (TQPtrListIterator<TQListViewItem> it(items); it.current(); ++it)
{
SafeListViewItem *i = static_cast<SafeListViewItem*>(*it);
if (!stopped && SPL->current() == i)
@@ -895,7 +895,7 @@ void View::addFiles()
{
KURL::List files=KFileDialog::getOpenURLs(":mediadir", napp->mimeTypes(), this, i18n("Select File to Play"));
- QListViewItem *last = list->lastItem();
+ TQListViewItem *last = list->lastItem();
for(KURL::List::Iterator it=files.begin(); it!=files.end(); ++it)
last = addFile(KURL(*it), false);
@@ -904,7 +904,7 @@ void View::addFiles()
void View::addDirectory()
{
- QString file=KFileDialog::getExistingDirectory(0, this, i18n("Select Folder"));
+ TQString file=KFileDialog::getExistingDirectory(0, this, i18n("Select Folder"));
if (!file) return;
KURL url;
@@ -914,17 +914,17 @@ void View::addDirectory()
setModified(true);
}
-void View::closeEvent(QCloseEvent*)
+void View::closeEvent(TQCloseEvent*)
{
hide();
}
-void View::showEvent(QShowEvent *)
+void View::showEvent(TQShowEvent *)
{
emit shown();
}
-void View::hideEvent(QHideEvent *)
+void View::hideEvent(TQHideEvent *)
{
emit hidden();
}
@@ -964,7 +964,7 @@ void View::configureToolBars()
{
saveMainWindowSettings(KGlobal::config(), "SPL Window");
KEditToolbar dlg(actionCollection(), "splui.rc");
- connect(&dlg, SIGNAL(newToolbarConfig()), SLOT(newToolBarConfig()));
+ connect(&dlg, TQT_SIGNAL(newToolbarConfig()), TQT_SLOT(newToolBarConfig()));
dlg.exec();
}
diff --git a/noatun/modules/splitplaylist/view.h b/noatun/modules/splitplaylist/view.h
index 18dc917a..785608fd 100644
--- a/noatun/modules/splitplaylist/view.h
+++ b/noatun/modules/splitplaylist/view.h
@@ -1,12 +1,12 @@
#ifndef VIEW_H
#define VIEW_H
-#include <qevent.h>
-#include <qptrlist.h>
+#include <tqevent.h>
+#include <tqptrlist.h>
#include <klistview.h>
#include <kmainwindow.h>
-#include <qrect.h>
-#include <qdict.h>
+#include <tqrect.h>
+#include <tqdict.h>
#include <kio/global.h>
#include <noatun/downloader.h>
@@ -21,19 +21,19 @@ class SafeListViewItem
, public DownloadItem
{
public:
- SafeListViewItem(QListView *parent, QListViewItem *after, const KURL &text);
- SafeListViewItem(QListView *parent, QListViewItem *after, const QMap<QString,QString> &properties);
+ SafeListViewItem(TQListView *parent, TQListViewItem *after, const KURL &text);
+ SafeListViewItem(TQListView *parent, TQListViewItem *after, const TQMap<TQString,TQString> &properties);
virtual ~SafeListViewItem();
- virtual QString property(const QString &, const QString & = 0) const;
- virtual void setProperty(const QString &, const QString &);
- virtual void clearProperty(const QString &);
- virtual QStringList properties() const;
- virtual bool isProperty(const QString &) const;
+ virtual TQString property(const TQString &, const TQString & = 0) const;
+ virtual void setProperty(const TQString &, const TQString &);
+ virtual void clearProperty(const TQString &);
+ virtual TQStringList properties() const;
+ virtual bool isProperty(const TQString &) const;
- virtual QString file() const;
+ virtual TQString file() const;
- int compare(QListViewItem * i, int col, bool ascending) const;
+ int compare(TQListViewItem * i, int col, bool ascending) const;
virtual void remove();
protected:
@@ -43,15 +43,15 @@ protected:
virtual void modified();
virtual void stateChange(bool s);
- void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align);
+ void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align);
private:
struct Property
{
- QString key;
- QString value;
+ TQString key;
+ TQString value;
};
- QValueList<Property> mProperties;
+ TQValueList<Property> mProperties;
bool removed;
};
@@ -62,10 +62,10 @@ friend class View;
public:
List(View *parent);
virtual ~List();
- QListViewItem *openGlobal(const KURL&, QListViewItem * =0);
- QListViewItem *importGlobal(const KURL&, QListViewItem * =0);
- QListViewItem *addFile(const KURL&, bool play=false, QListViewItem * =0);
- void addDirectoryRecursive(const KURL &dir, QListViewItem *after= 0);
+ TQListViewItem *openGlobal(const KURL&, TQListViewItem * =0);
+ TQListViewItem *importGlobal(const KURL&, TQListViewItem * =0);
+ TQListViewItem *addFile(const KURL&, bool play=false, TQListViewItem * =0);
+ void addDirectoryRecursive(const KURL &dir, TQListViewItem *after= 0);
public slots:
virtual void clear();
@@ -75,15 +75,15 @@ signals:
void deleteCurrentItem();
protected:
- virtual bool acceptDrag(QDropEvent *event) const;
- virtual void keyPressEvent(QKeyEvent *e);
+ virtual bool acceptDrag(TQDropEvent *event) const;
+ virtual void keyPressEvent(TQKeyEvent *e);
protected slots:
- virtual void dropEvent(QDropEvent *event, QListViewItem *after);
+ virtual void dropEvent(TQDropEvent *event, TQListViewItem *after);
void move();
protected:
- QListViewItem *recursiveAddAfter;
+ TQListViewItem *recursiveAddAfter;
protected slots:
// used when adding directories via KIO::listRecursive
@@ -111,7 +111,7 @@ public:
void init();
virtual ~View();
List *listView() const { return list; }
- QListViewItem *addFile(const KURL &u, bool play=false)
+ TQListViewItem *addFile(const KURL &u, bool play=false)
{ return list->addFile(u, play, list->lastItem()); }
@@ -143,9 +143,9 @@ protected:
void exportTo(const KURL &);
void setModified(bool);
- virtual void closeEvent(QCloseEvent*e);
- virtual void showEvent(QShowEvent *);
- virtual void hideEvent(QHideEvent *);
+ virtual void closeEvent(TQCloseEvent*e);
+ virtual void showEvent(TQShowEvent *);
+ virtual void hideEvent(TQHideEvent *);
signals:
void hidden();