22 #ifndef LIBRARYITEMMODEL_H_ 23 #define LIBRARYITEMMODEL_H_ 27 #define COL_ALBUM_MACROS 28 #define COL_ALBUM_SAMPLER 0 29 #define COL_ALBUM_NAME 1 30 #define COL_ALBUM_DURATION 2 31 #define COL_ALBUM_N_SONGS 3 32 #define COL_ALBUM_YEAR 4 33 #define COL_ALBUM_RATING 5 35 #define COL_ARTIST_MACROS 36 #define COL_ARTIST_N_ALBUMS 0 37 #define COL_ARTIST_NAME 1 38 #define COL_ARTIST_TRACKS 2 40 #define COL_TRACK_NUM 0 48 #define COL_FILESIZE 7 49 #define COL_TRACK_RATING 8 51 #include "GUI/Helper/SearchableWidget/AbstractSearchModel.h" 52 #include "Helper/MetaData/MetaDataList.h" 53 #include "Helper/Set.h" 66 QStringList get_header_names()
const;
69 QVariant
headerData (
int section, Qt::Orientation orientation,
int role=Qt::DisplayRole )
const override;
70 bool setHeaderData(
int section, Qt::Orientation orientation,
const QVariant &value,
int role)
override;
72 int rowCount(
const QModelIndex &parent=QModelIndex())
const override;
73 int columnCount(
const QModelIndex& parent=QModelIndex())
const override;
74 bool insertColumns(
int position,
int cols,
const QModelIndex &index=QModelIndex())
override;
75 bool removeColumns(
int position,
int cols,
const QModelIndex &index=QModelIndex())
override;
76 bool removeRows(
int position,
int rows,
const QModelIndex& index=QModelIndex())
override;
77 bool insertRows(
int row,
int count,
const QModelIndex &parent=QModelIndex())
override;
79 virtual void add_selections(
const SP::Set<int>& rows)
final;
80 virtual void add_selection(
int row)
final;
81 virtual bool is_selected(
int id)
final;
82 virtual bool has_selections()
final;
83 virtual void remove_selection(
int row)
final;
84 virtual void clear_selections() final ;
94 QStringList _header_names;
102 virtual int get_id_by_row(
int row)=0;
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
Mimedata class for drag and dropping metadata.
Definition: CustomMimeData.h:34
Definition: AbstractSearchModel.h:48
Definition: LibraryItemModel.h:57
Definition: ColumnHeader.h:40