29 #ifndef PLAYLISTITEMMODEL_H_ 30 #define PLAYLISTITEMMODEL_H_ 32 #include "Components/Playlist/Playlist.h" 33 #include "GUI/Helper/SearchableWidget/AbstractSearchModel.h" 35 #include "Helper/MetaData/MetaData.h" 39 #include <QAbstractListModel> 40 #include <QStringList> 51 int rowCount(
const QModelIndex &parent=QModelIndex())
const override;
52 QVariant data(
const QModelIndex &index,
int role=Qt::DisplayRole)
const override;
53 const MetaData& get_md(
int row)
const;
55 Qt::ItemFlags flags(
const QModelIndex &index)
const override;
57 bool setData(
const QModelIndex &index,
const QVariant& var,
int role=Qt::DisplayRole)
override;
62 void move_rows(
const SP::Set<int>& rows,
int target_index);
63 void insert_metadata(
const MetaDataList& v_md,
int target_index);
64 void set_current_track(
int row);
66 QModelIndex getFirstRowIndexOf(QString substr)
override;
67 QModelIndex getPrevRowIndexOf(QString substr,
int row,
const QModelIndex &parent=QModelIndex())
override;
68 QModelIndex getNextRowIndexOf(QString substr,
int row,
const QModelIndex &parent=QModelIndex())
override;
73 CustomMimeData* get_custom_mimedata(
const QModelIndexList& indexes)
const;
74 QMimeData* mimeData(
const QModelIndexList& indexes)
const override;
76 bool has_local_media(
const IdxList& idxs)
const;
80 PlaylistPtr _pl=
nullptr;
83 void playlist_changed(
int pl_idx);
Mimedata class for drag and dropping metadata.
Definition: CustomMimeData.h:34
Definition: AbstractSearchModel.h:56
Definition: PlaylistItemModel.h:43