use QAbstractTableLayout as a base for playlist instead

parent ccd0852e
......@@ -168,7 +168,7 @@ int Playlist::m_leftColumn = 0;
Playlist::Playlist(PlaylistCollection *collection, const QString &name,
const QString &iconName) :
QAbstractListModel(/*collection->playlistStack()*/0),
QAbstractTableModel(/*collection->playlistStack()*/0),
m_collection(collection),
m_fetcher(new WebImageFetcher(this)),
m_selectedCount(0),
......@@ -190,7 +190,7 @@ Playlist::Playlist(PlaylistCollection *collection, const QString &name,
Playlist::Playlist(PlaylistCollection *collection, const PlaylistItemList &items,
const QString &name, const QString &iconName) :
QAbstractListModel(/*collection->playlistStack()*/0),
QAbstractTableModel(/*collection->playlistStack()*/0),
m_collection(collection),
m_fetcher(new WebImageFetcher(this)),
m_selectedCount(0),
......@@ -213,7 +213,7 @@ Playlist::Playlist(PlaylistCollection *collection, const PlaylistItemList &items
Playlist::Playlist(PlaylistCollection *collection, const QFileInfo &playlistFile,
const QString &iconName) :
QAbstractListModel(/*collection->playlistStack()*/0),
QAbstractTableModel(/*collection->playlistStack()*/0),
m_collection(collection),
m_fetcher(new WebImageFetcher(this)),
m_selectedCount(0),
......@@ -235,7 +235,7 @@ Playlist::Playlist(PlaylistCollection *collection, const QFileInfo &playlistFile
}
Playlist::Playlist(PlaylistCollection *collection, bool delaySetup, int extraColumns) :
QAbstractListModel(/*collection->playlistStack()*/0),
QAbstractTableModel(/*collection->playlistStack()*/0),
m_collection(collection),
m_fetcher(new WebImageFetcher(this)),
m_selectedCount(0),
......
......@@ -24,7 +24,7 @@
#include <QVector>
#include <QEvent>
#include <QList>
#include <QAbstractListModel>
#include <QAbstractTableModel>
#include "covermanager.h"
#include "stringhash.h"
......@@ -48,7 +48,7 @@ class CollectionListItem;
typedef QList<PlaylistItem *> PlaylistItemList;
class Playlist : public QAbstractListModel, public PlaylistInterface
class Playlist : public QAbstractTableModel, public PlaylistInterface
{
Q_OBJECT
......@@ -97,7 +97,7 @@ public:
bool setData (const QModelIndex & index, const QVariant & value, int role = Qt::EditRole);
bool insertRows (int row, int count, const QModelIndex & parent = QModelIndex());
bool removeRows (int row, int count, const QModelIndex & parent = QModelIndex());
using QAbstractListModel::sort;
using QAbstractTableModel::sort;
// The following group of functions implement the PlaylistInterface API.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment