diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 06:00:15 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-11 06:00:15 +0000 |
commit | b1057f437bf65300831a0ccb45b920787c6b318d (patch) | |
tree | f8a73db06ca1180d0da0ba6dfbe786197b4f4bc3 /juk/playlistbox.cpp | |
parent | 4ddfca384ced9ad654213aef9dc2c3973720b980 (diff) | |
download | tdemultimedia-b1057f437bf65300831a0ccb45b920787c6b318d.tar.gz tdemultimedia-b1057f437bf65300831a0ccb45b920787c6b318d.zip |
TQt4 port kdemultimedia
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1236079 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'juk/playlistbox.cpp')
-rw-r--r-- | juk/playlistbox.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/juk/playlistbox.cpp b/juk/playlistbox.cpp index 32e874b9..a0d8b5c8 100644 --- a/juk/playlistbox.cpp +++ b/juk/playlistbox.cpp @@ -46,9 +46,9 @@ using namespace ActionCollection; // PlaylistBox public methods //////////////////////////////////////////////////////////////////////////////// -PlaylistBox::PlaylistBox(TQWidget *parent, TQWidgetStack *playlistStack, +PlaylistBox::PlaylistBox(TQWidget *tqparent, TQWidgetStack *playlistStack, const char *name) : - KListView(parent, name), + KListView(tqparent, name), PlaylistCollection(playlistStack), m_viewModeIndex(0), m_hasSelection(false), @@ -91,7 +91,7 @@ PlaylistBox::PlaylistBox(TQWidget *parent, TQWidgetStack *playlistStack, // add the view modes stuff KSelectAction *viewModeAction = - new KSelectAction(i18n("View Modes"), "view_choose", KShortcut(), actions(), "viewModeMenu"); + new KSelectAction(i18n("View Modes"), "view_choose", KShortcut(), ActionCollection::actions(), "viewModeMenu"); m_viewModes.append(new ViewMode(this)); m_viewModes.append(new CompactViewMode(this)); @@ -171,7 +171,7 @@ void PlaylistBox::raise(Playlist *playlist) if(!playlist) return; - Item *i = m_playlistDict.find(playlist); + Item *i = m_playlistDict.tqfind(playlist); if(i) { clearSelection(); @@ -208,7 +208,7 @@ void PlaylistBox::duplicate() void PlaylistBox::paste() { Item *i = static_cast<Item *>(currentItem()); - decode(kapp->clipboard()->data(), i); + decode(kapp->tqclipboard()->data(), i); } //////////////////////////////////////////////////////////////////////////////// @@ -230,15 +230,15 @@ void PlaylistBox::setupPlaylist(Playlist *playlist, const TQString &iconName) setupPlaylist(playlist, iconName, 0); } -void PlaylistBox::setupPlaylist(Playlist *playlist, const TQString &iconName, Item *parentItem) +void PlaylistBox::setupPlaylist(Playlist *playlist, const TQString &iconName, Item *tqparentItem) { connect(playlist, TQT_SIGNAL(signalPlaylistItemsDropped(Playlist *)), TQT_SLOT(slotPlaylistItemsDropped(Playlist *))); PlaylistCollection::setupPlaylist(playlist, iconName); - if(parentItem) - new Item(parentItem, iconName, playlist->name(), playlist); + if(tqparentItem) + new Item(tqparentItem, iconName, playlist->name(), playlist); else new Item(this, iconName, playlist->name(), playlist); } @@ -289,7 +289,7 @@ 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, TQString::null, KStdGuiItem::del(), i18n("Keep")); + this, i18n("Do you want to delete these files from the disk as well?"), files, TQString(), KStdGuiItem::del(), i18n("Keep")); if(remove == KMessageBox::Yes) { TQStringList couldNotDelete; @@ -445,7 +445,7 @@ void PlaylistBox::contentsDropEvent(TQDropEvent *e) if(m_dropItem) { Item *old = m_dropItem; m_dropItem = 0; - old->repaint(); + old->tqrepaint(); } } @@ -493,14 +493,14 @@ void PlaylistBox::contentsDragMoveEvent(TQDragMoveEvent *e) if(e->isAccepted()) { m_dropItem = target; - target->repaint(); + target->tqrepaint(); m_showTimer->start(1500, true); } else m_dropItem = 0; if(old) - old->repaint(); + old->tqrepaint(); } } else { @@ -517,21 +517,21 @@ void PlaylistBox::contentsDragLeaveEvent(TQDragLeaveEvent *e) if(m_dropItem) { Item *old = m_dropItem; m_dropItem = 0; - old->repaint(); + old->tqrepaint(); } KListView::contentsDragLeaveEvent(e); } void PlaylistBox::contentsMousePressEvent(TQMouseEvent *e) { - if(e->button() == LeftButton) + if(e->button() == Qt::LeftButton) m_doingMultiSelect = true; KListView::contentsMousePressEvent(e); } void PlaylistBox::contentsMouseReleaseEvent(TQMouseEvent *e) { - if(e->button() == LeftButton) { + if(e->button() == Qt::LeftButton) { m_doingMultiSelect = false; slotPlaylistChanged(); } @@ -692,8 +692,8 @@ PlaylistBox::Item::Item(PlaylistBox *listBox, const TQString &icon, const TQStri init(); } -PlaylistBox::Item::Item(Item *parent, const TQString &icon, const TQString &text, Playlist *l) - : TQObject(parent->listView()), KListViewItem(parent, text), +PlaylistBox::Item::Item(Item *tqparent, const TQString &icon, const TQString &text, Playlist *l) + : TQObject(tqparent->listView()), KListViewItem(tqparent, text), m_playlist(l), m_text(text), m_iconName(icon), m_sortedFirst(false) { init(); @@ -722,10 +722,10 @@ int PlaylistBox::Item::compare(TQListViewItem *i, int col, bool) const return text(col).lower().localeAwareCompare(i->text(col).lower()); } -void PlaylistBox::Item::paintCell(TQPainter *painter, const TQColorGroup &colorGroup, int column, int width, int align) +void PlaylistBox::Item::paintCell(TQPainter *painter, const TQColorGroup &tqcolorGroup, int column, int width, int align) { PlaylistBox *playlistBox = static_cast<PlaylistBox *>(listView()); - playlistBox->viewMode()->paintCell(this, painter, colorGroup, column, width, align); + playlistBox->viewMode()->paintCell(this, painter, tqcolorGroup, column, width, align); } void PlaylistBox::Item::setText(int column, const TQString &text) |