summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Małek <michalm@jabster.pl>2014-08-07 09:32:41 (GMT)
committerMichał Małek <michalm@jabster.pl>2014-08-07 09:32:55 (GMT)
commitc586a7ab60c65720d23c3304ea827210da450944 (patch)
tree3d434d815a0f58c9c39cf71d04ef797020f45158
parent73cc9990f2982d0259eba5b7b3ce65cc8d4037c3 (diff)
Ported leftovers from KDE3 to Qt5
-rw-r--r--libkcddb/cdinfodialog.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/libkcddb/cdinfodialog.cpp b/libkcddb/cdinfodialog.cpp
index 8b58e30..c9c2f1a 100644
--- a/libkcddb/cdinfodialog.cpp
+++ b/libkcddb/cdinfodialog.cpp
@@ -81,7 +81,7 @@ class CDInfoDialog::Private
d->ui->m_trackList->setModel(m_trackModel);
// We want control over the visibility of this column. See artistChanged().
-// d->ui->m_trackList->setColumnWidthMode(Private::TRACK_ARTIST, Q3ListView::Manual);
+ d->ui->m_trackList->header()->setSectionResizeMode(Private::TRACK_ARTIST, QHeaderView::Interactive);
// TODO: ensure we get our translations
// KGlobal::locale()->insertCatalog( QLatin1String( "libkcddb" ));
@@ -105,23 +105,21 @@ class CDInfoDialog::Private
{
delete d->ui;
delete d;
-
}
void CDInfoDialog::slotNextTrack()
{
-/* QTreeWidgetItem *item = d->ui->m_trackList->itemBelow(d->ui->m_trackList->currentItem());
- if (item)
+ QModelIndex index = d->ui->m_trackList->indexBelow(d->ui->m_trackList->currentIndex());
+ if (index.isValid())
{
-
- d->ui->m_trackList->setCurrentItem(item);*/
-// d->ui->m_trackList->ensureItemVisible(item);
-// }
+ d->ui->m_trackList->setCurrentIndex(index);
+ d->ui->m_trackList->scrollTo(index, QTreeView::EnsureVisible);
+ }
}
void CDInfoDialog::slotTrackDoubleClicked(const QModelIndex &index)
{
-// d->ui->m_trackList->editItem(item);
+ d->ui->m_trackList->edit(index);
}
void CDInfoDialog::setInfo( const KCDDB::CDInfo &info, const KCDDB::TrackOffsetList &trackStartFrames )