From 940c092f32d40263ad6b24f948eaf4c48b01e99a Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 1 Feb 2013 15:13:25 -0600 Subject: Rename a number of classes to enhance compatibility with KDE4 --- juk/playlist.cpp | 60 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'juk/playlist.cpp') diff --git a/juk/playlist.cpp b/juk/playlist.cpp index 1f33b4be..94d41a04 100644 --- a/juk/playlist.cpp +++ b/juk/playlist.cpp @@ -73,7 +73,7 @@ using namespace ActionCollection; static bool manualResize() { - return action("resizeColumnsManually")->isChecked(); + return action("resizeColumnsManually")->isChecked(); } /** @@ -238,7 +238,7 @@ Playlist::SharedSettings::SharedSettings() TDEConfigGroup config(TDEGlobal::config(), "PlaylistShared"); bool resizeColumnsManually = config.readBoolEntry("ResizeColumnsManually", false); - action("resizeColumnsManually")->setChecked(resizeColumnsManually); + action("resizeColumnsManually")->setChecked(resizeColumnsManually); // save column order m_columnOrder = config.readIntListEntry("ColumnOrder"); @@ -310,7 +310,7 @@ int Playlist::m_leftColumn = 0; Playlist::Playlist(PlaylistCollection *collection, const TQString &name, const TQString &iconName) : - KListView(collection->playlistStack(), name.latin1()), + TDEListView(collection->playlistStack(), name.latin1()), m_collection(collection), m_fetcher(new WebImageFetcher(TQT_TQOBJECT(this))), m_selectedCount(0), @@ -334,7 +334,7 @@ Playlist::Playlist(PlaylistCollection *collection, const TQString &name, Playlist::Playlist(PlaylistCollection *collection, const PlaylistItemList &items, const TQString &name, const TQString &iconName) : - KListView(collection->playlistStack(), name.latin1()), + TDEListView(collection->playlistStack(), name.latin1()), m_collection(collection), m_fetcher(new WebImageFetcher(TQT_TQOBJECT(this))), m_selectedCount(0), @@ -359,7 +359,7 @@ Playlist::Playlist(PlaylistCollection *collection, const PlaylistItemList &items Playlist::Playlist(PlaylistCollection *collection, const TQFileInfo &playlistFile, const TQString &iconName) : - KListView(collection->playlistStack()), + TDEListView(collection->playlistStack()), m_collection(collection), m_fetcher(new WebImageFetcher(TQT_TQOBJECT(this))), m_selectedCount(0), @@ -383,7 +383,7 @@ Playlist::Playlist(PlaylistCollection *collection, const TQFileInfo &playlistFil } Playlist::Playlist(PlaylistCollection *collection, bool delaySetup) : - KListView(collection->playlistStack()), + TDEListView(collection->playlistStack()), m_collection(collection), m_fetcher(new WebImageFetcher(TQT_TQOBJECT(this))), m_selectedCount(0), @@ -506,7 +506,7 @@ void Playlist::playPrevious() if(!playingItem()) return; - bool random = action("randomPlay") && action("randomPlay")->isChecked(); + bool random = action("randomPlay") && action("randomPlay")->isChecked(); PlaylistItem *previous = 0; @@ -644,7 +644,7 @@ PlaylistItemList Playlist::selectedItems() PlaylistItem *Playlist::firstChild() const { - return static_cast(KListView::firstChild()); + return static_cast(TDEListView::firstChild()); } void Playlist::updateLeftColumn() @@ -1033,7 +1033,7 @@ TQDragObject *Playlist::dragObject(TQWidget *parent) void Playlist::contentsDragEnterEvent(TQDragEnterEvent *e) { - KListView::contentsDragEnterEvent(e); + TDEListView::contentsDragEnterEvent(e); if(CoverDrag::canDecode(e)) { setDropHighlighter(true); @@ -1115,11 +1115,11 @@ bool Playlist::eventFilter(TQObject *watched, TQEvent *e) case TQEvent::MouseMove: { if((TQT_TQMOUSEEVENT(e)->state() & Qt::LeftButton) == Qt::LeftButton && - !action("resizeColumnsManually")->isChecked()) + !action("resizeColumnsManually")->isChecked()) { m_columnWidthModeChanged = true; - action("resizeColumnsManually")->setChecked(true); + action("resizeColumnsManually")->setChecked(true); slotColumnResizeModeChanged(); } @@ -1148,7 +1148,7 @@ bool Playlist::eventFilter(TQObject *watched, TQEvent *e) } } - return KListView::eventFilter(watched, e); + return TDEListView::eventFilter(watched, e); } void Playlist::keyPressEvent(TQKeyEvent *event) @@ -1166,7 +1166,7 @@ void Playlist::keyPressEvent(TQKeyEvent *event) } - KListView::keyPressEvent(event); + TDEListView::keyPressEvent(event); } void Playlist::contentsDropEvent(TQDropEvent *e) @@ -1215,7 +1215,7 @@ void Playlist::contentsDropEvent(TQDropEvent *e) setSorting(columns() + 1); - TQPtrList items = KListView::selectedItems(); + TQPtrList items = TDEListView::selectedItems(); for(TQPtrListIterator it(items); it.current(); ++it) { if(!item) { @@ -1239,7 +1239,7 @@ void Playlist::contentsDropEvent(TQDropEvent *e) dataChanged(); emit signalPlaylistItemsDropped(this); - KListView::contentsDropEvent(e); + TDEListView::contentsDropEvent(e); } void Playlist::contentsMouseDoubleClickEvent(TQMouseEvent *e) @@ -1248,7 +1248,7 @@ void Playlist::contentsMouseDoubleClickEvent(TQMouseEvent *e) // weird experience of switching songs from a double right-click. if(e->button() == Qt::LeftButton) - KListView::contentsMouseDoubleClickEvent(e); + TDEListView::contentsMouseDoubleClickEvent(e); } void Playlist::showEvent(TQShowEvent *e) @@ -1257,7 +1257,7 @@ void Playlist::showEvent(TQShowEvent *e) SharedSettings::instance()->apply(this); m_applySharedSettings = false; } - KListView::showEvent(e); + TDEListView::showEvent(e); } void Playlist::applySharedSettings() @@ -1298,7 +1298,7 @@ void Playlist::viewportPaintEvent(TQPaintEvent *pe) slotUpdateColumnWidths(); } - KListView::viewportPaintEvent(pe); + TDEListView::viewportPaintEvent(pe); } void Playlist::viewportResizeEvent(TQResizeEvent *re) @@ -1309,7 +1309,7 @@ void Playlist::viewportResizeEvent(TQResizeEvent *re) if(re->size().width() != re->oldSize().width() && !manualResize()) slotUpdateColumnWidths(); - KListView::viewportResizeEvent(re); + TDEListView::viewportResizeEvent(re); } void Playlist::insertItem(TQListViewItem *item) @@ -1320,7 +1320,7 @@ void Playlist::insertItem(TQListViewItem *item) // you need to use the PlaylistItem from here. m_addTime.append(static_cast(item)); - KListView::insertItem(item); + TDEListView::insertItem(item); } void Playlist::takeItem(TQListViewItem *item) @@ -1328,13 +1328,13 @@ void Playlist::takeItem(TQListViewItem *item) // See the warning in Playlist::insertItem. m_subtractTime.append(static_cast(item)); - KListView::takeItem(item); + TDEListView::takeItem(item); } void Playlist::addColumn(const TQString &label) { slotWeightDirty(columns()); - KListView::addColumn(label, 30); + TDEListView::addColumn(label, 30); } PlaylistItem *Playlist::createItem(const FileHandle &file, @@ -1507,7 +1507,7 @@ bool Playlist::isColumnVisible(int c) const void Playlist::polish() { - KListView::polish(); + TDEListView::polish(); if(m_polished) return; @@ -1545,7 +1545,7 @@ void Playlist::polish() // setup header RMB menu ////////////////////////////////////////////////// - m_columnVisibleAction = new KActionMenu(i18n("&Show Columns"), TQT_TQOBJECT(this), "showColumns"); + m_columnVisibleAction = new TDEActionMenu(i18n("&Show Columns"), TQT_TQOBJECT(this), "showColumns"); m_headerMenu = m_columnVisibleAction->popupMenu(); m_headerMenu->insertTitle(i18n("Show")); @@ -1579,7 +1579,7 @@ void Playlist::polish() connect(action("resizeColumnsManually"), TQT_SIGNAL(activated()), this, TQT_SLOT(slotColumnResizeModeChanged())); - if(action("resizeColumnsManually")->isChecked()) + if(action("resizeColumnsManually")->isChecked()) setHScrollBarMode(Auto); else setHScrollBarMode(AlwaysOff); @@ -1619,7 +1619,7 @@ void Playlist::slotPopulateBackMenu() const if(!playingItem()) return; - KPopupMenu *menu = action("back")->popupMenu(); + TDEPopupMenu *menu = action("back")->popupMenu(); menu->clear(); m_backMenuItems.clear(); @@ -1733,7 +1733,7 @@ void Playlist::setPlaying(PlaylistItem *item, bool addToHistory) item->setPlaying(true); bool enableBack = !m_history.isEmpty(); - action("back")->popupMenu()->setEnabled(enableBack); + action("back")->popupMenu()->setEnabled(enableBack); } bool Playlist::playing() const @@ -2071,9 +2071,9 @@ void Playlist::slotShowRMBMenu(TQListViewItem *item, const TQPoint &point, int c if(!m_rmbMenu) { // A bit of a hack to get a pointer to the action collection. - // Probably more of these actions should be ported over to using KActions. + // Probably more of these actions should be ported over to using TDEActions. - m_rmbMenu = new KPopupMenu(this); + m_rmbMenu = new TDEPopupMenu(this); m_rmbUpcomingID = m_rmbMenu->insertItem(SmallIcon("today"), i18n("Add to Play Queue"), this, TQT_SLOT(slotAddToUpcoming())); @@ -2108,7 +2108,7 @@ void Playlist::slotShowRMBMenu(TQListViewItem *item, const TQPoint &point, int c SmallIcon("folder_new"), i18n("Create Playlist From Selected Items..."), this, TQT_SLOT(slotCreateGroup())); K3bExporter *exporter = new K3bExporter(this); - KAction *k3bAction = exporter->action(); + TDEAction *k3bAction = exporter->action(); if(k3bAction) k3bAction->plug(m_rmbMenu); } -- cgit v1.2.1