21 #ifndef LIBRARYITEMMODEL_H_ 22 #define LIBRARYITEMMODEL_H_ 24 #include "Gui/Utils/SearchableWidget/SearchableModel.h" 25 #include "Utils/Pimpl.h" 56 QVariant headerData (
int section, Qt::Orientation orientation,
int role=Qt::DisplayRole )
const override;
57 bool set_header_data(
const QStringList& names);
59 virtual int columnCount(
const QModelIndex& parent=QModelIndex())
const override;
61 QModelIndexList search_results(
const QString& substr)
override;
63 virtual bool is_selected(
int id)
const final;
69 virtual IndexSet selected_indexes()
const;
108 void refresh_data(
int* n_rows_before=
nullptr,
int* n_rows_after=
nullptr);
115 bool removeRows(
int position,
int rows,
const QModelIndex& index=QModelIndex())
override;
116 bool insertRows(
int row,
int count,
const QModelIndex &parent=QModelIndex())
override;
Mimedata class for drag and dropping metadata.
Definition: CustomMimeData.h:35
virtual const Util::Set< Id > & selections() const =0
returns a set of the selected ids
virtual int searchable_column() const =0
the index of the searchable column. This is the column where the text is searched for a certain searc...
Definition: SearchableModel.h:56
Definition: AbstractLibrary.h:41
The CoverLocation class.
Definition: CoverLocation.h:42
virtual Id id_by_index(int row) const =0
return the current id for a given row
A set structure. Inherited from std::set with some useful methods. For integer and String this set is...
Definition: Set.h:35
virtual QString searchable_string(int row) const =0
here, the searchable string can even be refined. Maybe we just want to search within a substring indi...
virtual const MetaDataList & mimedata_tracks() const =0
return the tracks which belong to the selections. If an album is selected for example,...
An interface class needed when implementing a library plugin.
Definition: LocalLibraryWatcher.h:32
virtual Cover::Location cover(const IndexSet &rows) const =0
return the cover for multiple rows. if rows.size() > 1, an invalid, default constructed cover locatio...
The ItemModel is intended to abstract the various views. It supports searching, selections and a libr...
Definition: ItemModel.h:46