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 copy_rows(
const SP::Set<int>& rows,
int target_index);
64 void insert_metadata(
const MetaDataList& v_md,
int target_index);
66 void set_current_track(
int row);
67 int get_current_track()
const;
69 QModelIndex getFirstRowIndexOf(QString substr)
override;
70 QModelIndex getPrevRowIndexOf(QString substr,
int row,
const QModelIndex &parent=QModelIndex())
override;
71 QModelIndex getNextRowIndexOf(QString substr,
int row,
const QModelIndex &parent=QModelIndex())
override;
76 CustomMimeData* get_custom_mimedata(
const QModelIndexList& indexes)
const;
77 QMimeData* mimeData(
const QModelIndexList& indexes)
const override;
79 bool has_local_media(
const IdxList& idxs)
const;
83 PlaylistPtr _pl=
nullptr;
86 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