summaryrefslogtreecommitdiffstats
path: root/noatun/modules/splitplaylist
diff options
context:
space:
mode:
Diffstat (limited to 'noatun/modules/splitplaylist')
-rw-r--r--noatun/modules/splitplaylist/find.cpp12
-rw-r--r--noatun/modules/splitplaylist/find.h3
-rw-r--r--noatun/modules/splitplaylist/playlist.cpp8
-rw-r--r--noatun/modules/splitplaylist/playlist.h1
-rw-r--r--noatun/modules/splitplaylist/view.cpp82
-rw-r--r--noatun/modules/splitplaylist/view.h12
6 files changed, 61 insertions, 57 deletions
diff --git a/noatun/modules/splitplaylist/find.cpp b/noatun/modules/splitplaylist/find.cpp
index 5d378a79..99eaa8ed 100644
--- a/noatun/modules/splitplaylist/find.cpp
+++ b/noatun/modules/splitplaylist/find.cpp
@@ -5,14 +5,14 @@
#include <tqcheckbox.h>
#include <klocale.h>
-Finder::Finder(TQWidget *parent) : KDialogBase(parent, 0, false, i18n("Find"), Close | User1, User1, false, KGuiItem(i18n("&Find"),"find"))
+Finder::Finder(TQWidget *tqparent) : KDialogBase(tqparent, 0, false, i18n("Find"), Close | User1, User1, false, KGuiItem(i18n("&Find"),"tqfind"))
{
TQWidget *mainWidget = new TQWidget(this);
mainWidget->setMinimumWidth(320);
setMainWidget(mainWidget);
- TQGridLayout *layout=new TQGridLayout(mainWidget);
- layout->setSpacing(KDialog::spacingHint());
+ TQGridLayout *tqlayout=new TQGridLayout(mainWidget);
+ tqlayout->setSpacing(KDialog::spacingHint());
mText=new KHistoryCombo(mainWidget);
mText->setMaxCount(10);
@@ -22,9 +22,9 @@ Finder::Finder(TQWidget *parent) : KDialogBase(parent, 0, false, i18n("Find"), C
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);
+ tqlayout->addMultiCellWidget(mText, 0, 0, 0, 1);
+ tqlayout->addWidget(mRegexp, 1, 0);
+ tqlayout->addWidget(mBackwards, 1, 1);
connect(this, TQT_SIGNAL(user1Clicked()), TQT_SLOT(clicked()));
diff --git a/noatun/modules/splitplaylist/find.h b/noatun/modules/splitplaylist/find.h
index 8c0d461e..47a53f99 100644
--- a/noatun/modules/splitplaylist/find.h
+++ b/noatun/modules/splitplaylist/find.h
@@ -10,8 +10,9 @@ class TQPushButton;
class Finder : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- Finder(TQWidget *parent);
+ Finder(TQWidget *tqparent);
bool regexp() const;
bool isForward() const;
diff --git a/noatun/modules/splitplaylist/playlist.cpp b/noatun/modules/splitplaylist/playlist.cpp
index d0ded140..d7ddd1bf 100644
--- a/noatun/modules/splitplaylist/playlist.cpp
+++ b/noatun/modules/splitplaylist/playlist.cpp
@@ -217,14 +217,14 @@ void SplitPlaylist::setCurrent(const PlaylistItem &i, bool emitC)
if (now)
now->setPixmap(0, TQPixmap());
- TQRect rect(view->listView()->itemRect(static_cast<SafeListViewItem*>(current().data())));
+ TQRect rect(view->listView()->tqitemRect(static_cast<SafeListViewItem*>(current().data())));
rect.setWidth(view->listView()->viewport()->width());
currentItem=i;
- view->listView()->viewport()->repaint(rect,true);
+ view->listView()->viewport()->tqrepaint(rect,true);
view->listView()->ensureItemVisible(static_cast<SafeListViewItem*>(current().data()));
- TQRect currentRect= view->listView()->itemRect(static_cast<SafeListViewItem*>(current().data()));
- view->listView()->viewport()->repaint(currentRect);
+ TQRect currentRect= view->listView()->tqitemRect(static_cast<SafeListViewItem*>(current().data()));
+ view->listView()->viewport()->tqrepaint(currentRect);
now=static_cast<SafeListViewItem*>(current().data());
if(now)
diff --git a/noatun/modules/splitplaylist/playlist.h b/noatun/modules/splitplaylist/playlist.h
index 6f9b5ae6..13a309bf 100644
--- a/noatun/modules/splitplaylist/playlist.h
+++ b/noatun/modules/splitplaylist/playlist.h
@@ -28,6 +28,7 @@ class TQListViewItem;
class SplitPlaylist : public Playlist, public Plugin
{
Q_OBJECT
+ TQ_OBJECT
friend class SafeListViewItem;
friend class List;
public:
diff --git a/noatun/modules/splitplaylist/view.cpp b/noatun/modules/splitplaylist/view.cpp
index 8df38afd..f1874f3a 100644
--- a/noatun/modules/splitplaylist/view.cpp
+++ b/noatun/modules/splitplaylist/view.cpp
@@ -43,13 +43,13 @@
#define SPL SplitPlaylist::SPL()
-SafeListViewItem::SafeListViewItem(TQListView *parent, TQListViewItem *after, const KURL &text)
- : TQCheckListItem(parent,0, TQCheckListItem::CheckBox), PlaylistItemData(), removed(false)
+SafeListViewItem::SafeListViewItem(TQListView *tqparent, TQListViewItem *after, const KURL &text)
+ : TQCheckListItem(tqparent,0, TQCheckListItem::CheckBox), PlaylistItemData(), removed(false)
{
addRef();
setUrl(text);
- static_cast<KListView*>(parent)->moveItem(this, 0, after);
+ static_cast<KListView*>(TQT_TQWIDGET(tqparent))->moveItem(this, 0, after);
setOn(true);
// is this really needed, it makes the listview too wide for me :(
@@ -65,8 +65,8 @@ SafeListViewItem::SafeListViewItem(TQListView *parent, TQListViewItem *after, co
PlaylistItemData::added();
}
-SafeListViewItem::SafeListViewItem(TQListView *parent, TQListViewItem *after, const TQMap<TQString,TQString> &props)
- : TQCheckListItem(parent, 0, TQCheckListItem::CheckBox), removed(false)
+SafeListViewItem::SafeListViewItem(TQListView *tqparent, TQListViewItem *after, const TQMap<TQString,TQString> &props)
+ : TQCheckListItem(tqparent, 0, TQCheckListItem::CheckBox), removed(false)
{
addRef();
@@ -91,7 +91,7 @@ SafeListViewItem::SafeListViewItem(TQListView *parent, TQListViewItem *after, co
}
}
- static_cast<KListView*>(parent)->moveItem(this, 0, after);
+ static_cast<KListView*>(TQT_TQWIDGET(tqparent))->moveItem(this, 0, after);
modified();
if (!streamable() && enqueue(url()))
@@ -288,7 +288,7 @@ void SafeListViewItem::stateChange(bool s)
TQPtrList<TQListViewItem> list=SPL->view->listView()->selectedItems();
// but not if I'm not selected
- if (list.containsRef(this))
+ if (list.tqcontainsRef(this))
for (TQListViewItem *i=list.first(); i != 0; i=list.next())
static_cast<TQCheckListItem*>(i)->setOn(s);
else
@@ -344,8 +344,8 @@ void SafeListViewItem::remove()
PlaylistItemData::removed();
}
-List::List(View *parent)
- : KListView(parent), recursiveAddAfter(0), listJob(0)
+List::List(View *tqparent)
+ : KListView(tqparent), recursiveAddAfter(0), listJob(0)
{
addColumn(i18n("File"));
addColumn(i18n("Time"));
@@ -355,10 +355,10 @@ List::List(View *parent)
setDragEnabled(true);
setItemsMovable(true);
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()));
+ connect(TQT_TQOBJECT(this), TQT_SIGNAL(dropped(TQDropEvent*, TQListViewItem*)), TQT_SLOT(dropEvent(TQDropEvent*, TQListViewItem*)));
+ connect(TQT_TQOBJECT(this), TQT_SIGNAL(moved()), TQT_SLOT(move()));
+ connect(TQT_TQOBJECT(this), TQT_SIGNAL(aboutToMove()), tqparent, TQT_SLOT(setNoSorting()));
+ connect(TQT_TQOBJECT(this), TQT_SIGNAL(deleteCurrentItem()), tqparent, TQT_SLOT(deleteSelected()));
}
List::~List()
@@ -377,7 +377,7 @@ bool List::acceptDrag(TQDropEvent *event) const
void List::dropEvent(TQDropEvent *event, TQListViewItem *after)
{
- static_cast<View*>(parent())->setNoSorting();
+ static_cast<View*>(TQT_TQWIDGET(tqparent()))->setNoSorting();
KURL::List textlist;
if (!KURLDrag::decode(event, textlist)) return;
event->acceptAction();
@@ -467,7 +467,7 @@ bool View::saveToURL(const KURL &url)
}
else
{
- KMessageBox::error( this, i18n("Could not write to %1.").arg(url.prettyURL()) );
+ KMessageBox::error( this, i18n("Could not write to %1.").tqarg(url.prettyURL()) );
return false;
}
}
@@ -638,25 +638,25 @@ View::View(SplitPlaylist *)
{
list=new List(this);
setCentralWidget(list);
- connect(list, TQT_SIGNAL(modified(void)), this, TQT_SLOT(setModified(void)) );
+ connect(list, TQT_SIGNAL(modified(void)), TQT_TQOBJECT(this), TQT_SLOT(setModified(void)) );
// connect the click on the header with sorting
connect(list->header(),TQT_SIGNAL(clicked(int)),this,TQT_SLOT(headerClicked(int)) );
- 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");
+ mOpen=new KAction(i18n("Add &Files..."), "queue", 0, TQT_TQOBJECT(this), TQT_SLOT(addFiles()), actionCollection(), "add_files");
+ (void) new KAction(i18n("Add Fol&ders..."), "folder", 0, TQT_TQOBJECT(this), TQT_SLOT(addDirectory()), actionCollection(), "add_dir");
+ mDelete=new KAction(i18n("Delete"), "editdelete", Key_Delete, TQT_TQOBJECT(this), TQT_SLOT(deleteSelected()), actionCollection(), "delete");
- mClose=KStdAction::close(this, TQT_SLOT(close()), actionCollection());
- mFind=KStdAction::find(this, TQT_SLOT(find()), actionCollection());
+ mClose=KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection());
+ mFind=KStdAction::find(TQT_TQOBJECT(this), TQT_SLOT(tqfind()), 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) KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(configureToolBars()), actionCollection());
+ mOpenNew=KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(openNew()), actionCollection());
+ mOpenpl=KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(open()), actionCollection());
+ mSave=KStdAction::save(TQT_TQOBJECT(this), TQT_SLOT(save()), actionCollection());
+ mSaveAs=KStdAction::saveAs(TQT_TQOBJECT(this), TQT_SLOT(saveAs()), actionCollection());
- (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");
+ (void) new KAction(i18n("Shuffle"), "misc", 0, TQT_TQOBJECT(SPL), TQT_SLOT( randomize() ), actionCollection(), "shuffle");
+ (void) new KAction(i18n("Clear"), "editclear", 0, TQT_TQOBJECT(list), TQT_SLOT( clear() ), actionCollection(), "clear");
createGUI("splui.rc");
@@ -666,7 +666,7 @@ View::View(SplitPlaylist *)
list->setFocus();
}
-void View::find()
+void View::tqfind()
{
mFinder->show();
connect(mFinder, TQT_SIGNAL(search(Finder*)), TQT_SLOT(findIt(Finder*)));
@@ -675,15 +675,15 @@ void View::find()
static bool testWord(TQListViewItem *i, const TQString &finder)
{
PlaylistItemData *item=static_cast<SafeListViewItem*>(i);
- if (item->title().find(finder, 0, false) >=0)
+ if (item->title().tqfind(finder, 0, false) >=0)
return true;
- if (item->file().find(finder, 0, false) >=0)
+ if (item->file().tqfind(finder, 0, false) >=0)
return true;
- if (item->url().path().find(finder.local8Bit(), 0, false) >=0)
+ if (item->url().path().tqfind(finder.local8Bit().data(), 0, false) >=0)
return true;
- if (item->lengthString().find(finder, 0, false) >=0)
+ if (item->lengthString().tqfind(finder, 0, false) >=0)
return true;
- if (item->mimetype().find(finder.local8Bit(), 0, false) >=0)
+ if (item->mimetype().tqfind(finder.local8Bit().data(), 0, false) >=0)
return true;
return false;
}
@@ -691,15 +691,15 @@ static bool testWord(TQListViewItem *i, const TQString &finder)
static bool testWord(TQListViewItem *i, const TQRegExp &finder)
{
PlaylistItemData *item=static_cast<SafeListViewItem*>(i);
- if (item->title().find(finder) >=0)
+ if (item->title().tqfind(finder) >=0)
return true;
- if (item->file().find(finder) >=0)
+ if (item->file().tqfind(finder) >=0)
return true;
- if (item->url().path().find(finder) >=0)
+ if (item->url().path().tqfind(finder) >=0)
return true;
- if (item->lengthString().find(finder) >=0)
+ if (item->lengthString().tqfind(finder) >=0)
return true;
- if (item->mimetype().find(finder) >=0)
+ if (item->mimetype().tqfind(finder) >=0)
return true;
return false;
}
@@ -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?"),TQString::null,KStdGuiItem::cont(),KStdGuiItem::cancel()) == KMessageBox::Yes)
+ if (KMessageBox::questionYesNo(this, i18n("End of playlist reached. Continue searching from beginning?"),TQString(),KStdGuiItem::cont(),KStdGuiItem::cancel()) == KMessageBox::Yes)
search=list->firstChild();
}
else
{
- if (KMessageBox::questionYesNo(this, i18n("Beginning of playlist reached. Continue searching from end?"),TQString::null,KStdGuiItem::cont(),KStdGuiItem::cancel()) == KMessageBox::Yes)
+ if (KMessageBox::questionYesNo(this, i18n("Beginning of playlist reached. Continue searching from end?"),TQString(),KStdGuiItem::cont(),KStdGuiItem::cancel()) == KMessageBox::Yes)
search=list->lastChild();
}
}
diff --git a/noatun/modules/splitplaylist/view.h b/noatun/modules/splitplaylist/view.h
index 785608fd..293276ca 100644
--- a/noatun/modules/splitplaylist/view.h
+++ b/noatun/modules/splitplaylist/view.h
@@ -16,13 +16,13 @@ namespace KIO { class ListJob; }
class SafeListViewItem
- : public QCheckListItem
+ : public TQCheckListItem
, public PlaylistItemData
, public DownloadItem
{
public:
- SafeListViewItem(TQListView *parent, TQListViewItem *after, const KURL &text);
- SafeListViewItem(TQListView *parent, TQListViewItem *after, const TQMap<TQString,TQString> &properties);
+ SafeListViewItem(TQListView *tqparent, TQListViewItem *after, const KURL &text);
+ SafeListViewItem(TQListView *tqparent, TQListViewItem *after, const TQMap<TQString,TQString> &properties);
virtual ~SafeListViewItem();
virtual TQString property(const TQString &, const TQString & = 0) const;
@@ -58,9 +58,10 @@ private:
class List : public KListView
{
Q_OBJECT
+ TQ_OBJECT
friend class View;
public:
- List(View *parent);
+ List(View *tqparent);
virtual ~List();
TQListViewItem *openGlobal(const KURL&, TQListViewItem * =0);
TQListViewItem *importGlobal(const KURL&, TQListViewItem * =0);
@@ -105,6 +106,7 @@ class KToolBar;
class View : public KMainWindow
{
Q_OBJECT
+ TQ_OBJECT
public:
View(SplitPlaylist *mother);
// load the SM playlist
@@ -125,7 +127,7 @@ public slots:
void openNew();
void setSorting(bool on, int column = 0);
void setNoSorting() { setSorting(false); }
- void headerClicked(int column);void find();
+ void headerClicked(int column);void tqfind();
void findIt(Finder *);