Add a skeleton model for the playlist view
[soundwave.git] / playlist_model.h
blobbc0b39326d18a13e4e029d74a7b7c0b4eaca84e8
1 #ifndef SOUNDWAVE_PLAYLIST_MODEL_H
2 #define SOUNDWAVE_PLAYLIST_MODEL_H
4 #include <QAbstractItemModel>
5 #include <QUrl>
7 struct PlaylistItem {
8 QString name;
9 QUrl location;
12 class PlaylistModel : public QAbstractItemModel
14 Q_OBJECT
16 public:
17 PlaylistModel( QObject *parent = 0 );
19 virtual QVariant data( const QModelIndex & index, int role = Qt::DisplayRole ) const;
20 virtual QModelIndex index( int row, int col, const QModelIndex & parent = QModelIndex()) const;
22 virtual QModelIndex parent( const QModelIndex & index ) const;
23 virtual int rowCount( const QModelIndex & parent = QModelIndex()) const;
24 virtual int colCount( const QModelIndex & parent = QModelIndex()) const;
26 private:
27 QList<PlaylistItem> items;
30 #endif