29 #ifndef PLAYLISTITEMMODEL_H_
30 #define PLAYLISTITEMMODEL_H_
32 #include "Gui/Utils/SearchableWidget/SearchableModel.h"
33 #include "Utils/Playlist/PlaylistFwd.h"
34 #include "Utils/Pimpl.h"
53 void sig_data_ready();
65 explicit Model(PlaylistPtr pl, QObject* parent=
nullptr);
68 int rowCount(
const QModelIndex& parent=QModelIndex())
const override;
69 int columnCount(
const QModelIndex& parent=QModelIndex())
const override;
71 Qt::ItemFlags flags(
const QModelIndex& index=QModelIndex())
const override;
72 QVariant data(
const QModelIndex& index,
int role=Qt::DisplayRole)
const override;
73 bool setData(
const QModelIndex &index,
const QVariant &value,
int role)
override;
77 QModelIndex getRowIndexOf(
const QString& substr,
int row,
bool is_forward);
78 QModelIndexList search_results(
const QString& substr)
override;
81 void remove_rows(
const IndexSet& rows);
86 void change_rating(
const IndexSet& rows, Rating rating);
89 void set_current_track(
int row);
90 int current_track()
const;
95 QMimeData* mimeData(
const QModelIndexList& indexes)
const override;
97 bool has_local_media(
const IndexSet& rows)
const;
98 void set_drag_index(
int drag_index);
99 void set_row_height(
int row_height);
108 void playlist_changed(
int pl_idx);