21 #ifndef SAYONARASELECTIONVIEW_H 22 #define SAYONARASELECTIONVIEW_H 24 #include "Utils/typedefs.h" 25 #include "Utils/Pimpl.h" 27 #include <QModelIndex> 34 class QItemSelectionModel;
52 enum class SelectionType
59 virtual IndexSet selected_items()
const;
65 virtual QItemSelectionModel* selection_model()
const=0;
66 virtual QModelIndex model_index(
int row,
int col,
const QModelIndex& parent=QModelIndex())
const=0;
67 virtual int row_count(
const QModelIndex& parent=QModelIndex())
const=0;
68 virtual int column_count(
const QModelIndex& parent=QModelIndex())
const=0;
69 virtual void set_current_index(
int idx)=0;
71 void select_rows(
const IndexSet& indexes,
int min_col=-1,
int max_col=-1);
72 void select_row(
int row);
74 void select_columns(
const IndexSet& indexes,
int min_row=-1,
int max_row=-1);
75 void select_column(
int col);
77 void select_items(
const IndexSet& indexes);
78 void select_item(
int item);
82 virtual void clear_selection();
83 int min_selected_item()
const;
85 virtual void set_selection_type(SelectionViewInterface::SelectionType type);
86 SelectionViewInterface::SelectionType selection_type()
const;
89 virtual int index_by_model_index(
const QModelIndex& idx)
const=0;
92 virtual IndexSet indexes_by_model_indexes(
const QModelIndexList& indexes)
const;
96 virtual void handle_key_press(QKeyEvent* e);
99 #endif // SAYONARASELECTIONVIEW_H Definition: AbstractPlaylist.h:35
The SayonaraSelectionView class.
Definition: SelectionView.h:47
Set namespace defines the setting: Which key and which type.
Definition: SettingKey.h:230
Definition: typedefs.h:28
A set structure. Inherited from std::set with some useful methods. For integer and String this set is...
Definition: AbstractPlaylist.h:38
Definition: org_mpris_media_player2_adaptor.h:20