summaryrefslogtreecommitdiffstats
path: root/noatun/modules/splitplaylist/view.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'noatun/modules/splitplaylist/view.cpp')
-rw-r--r--noatun/modules/splitplaylist/view.cpp82
1 files changed, 41 insertions, 41 deletions
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();
}
}