Sayonara Player
Public Types | Signals | Public Member Functions | Protected Types | Protected Member Functions | Protected Slots | Protected Attributes | List of all members
Library::ArtistView Class Reference

Public Types

enum  SelectionType {
  Rows =0,
  Columns,
  Items
}
 

Signals

void sig_columns_changed ()
 
void sig_sortorder_changed (Library::SortOrder)
 
void sig_middle_button_clicked ()
 
void sig_all_selected ()
 
void sig_delete_clicked ()
 
void sig_play_clicked ()
 
void sig_play_next_clicked ()
 
void sig_play_new_tab_clicked ()
 
void sig_append_clicked ()
 
void sig_refresh_clicked ()
 
void sig_import_files (const QStringList &files)
 
void sig_double_clicked (const IndexSet &indexes)
 
void sig_sel_changed (const IndexSet &indexes)
 
void sig_merge (const SP::Set< Id > &ids, int target_id)
 

Public Member Functions

 ArtistView (QWidget *parent=nullptr)
 
virtual void init (AbstractLibrary *library)
 
virtual void set_item_model (ItemModel *model)
 
void show_context_menu_actions (int entries)
 
void add_context_action (QAction *action)
 
void remove_context_action (QAction *action)
 
QMimeData * dragable_mimedata () const override
 
QPixmap drag_pixmap () const override
 
void set_metadata_interpretation (MD::Interpretation type)
 
void set_selection_type (SelectionViewInterface::SelectionType type) override
 
void show_clear_button (bool visible)
 
void use_clear_button (bool yesno)
 
bool is_valid_drag_position (const QPoint &p) const override
 
template<typename T , typename ModelType >
void fill (const T &input_data)
 
void resize_rows_to_contents ()
 
void resize_rows_to_contents (int first_row, int count)
 
virtual void skin_changed ()
 
virtual void showEvent (QShowEvent *e) override
 
virtual void set_search_model (SearchableModelInterface *model) final
 
virtual QModelIndex model_index (int row, int col, const QModelIndex &parent=QModelIndex()) const override final
 
virtual int row_count (const QModelIndex &parent=QModelIndex()) const override final
 
virtual int column_count (const QModelIndex &parent=QModelIndex()) const override final
 
virtual QItemSelectionModel * selection_model () const override final
 
virtual void set_current_index (int idx) override final
 
bool is_minisearcher_active () const
 
void set_mini_searcher_padding (int padding)
 
IndexSet selected_items () const
 
void show_info ()
 Show the Info dialogs' info tab.
 
void show_lyrics ()
 Show the Info dialogs' lyrics tab.
 
void show_edit ()
 Show the tag editor.
 
void info_dialog_closed ()
 this function should not be called from outside. This function is triggered when the info dialog was closed.
 

Protected Types

enum  SearchDirection : unsigned char {
  First,
  Next,
  Prev
}
 
enum  ReleaseReason : char {
  Dropped,
  Destroyed
}
 

Protected Member Functions

void selection_changed (const IndexSet &indexes) override
 
void merge_action_triggered () override
 
void play_next_clicked () override
 
void middle_clicked () override
 
void append_clicked () override
 
void refresh_clicked () override
 
void play_clicked () override
 
void play_new_tab_clicked () override
 
void init_view (AbstractLibrary *library) override
 
ColumnHeaderList column_headers () const override
 
BoolList shown_columns () const override
 
Library::SortOrder sortorder () const override
 
void columns_changed () override
 
void sortorder_changed (SortOrder s) override
 
void resizeEvent (QResizeEvent *e) override
 
void language_changed () override
 
int index_by_model_index (const QModelIndex &idx) const override
 
QModelIndex model_index_by_index (int idx) const override
 
virtual void mousePressEvent (QMouseEvent *event) override
 
virtual void mouseMoveEvent (QMouseEvent *event) override
 
virtual void keyPressEvent (QKeyEvent *event) override
 
virtual void contextMenuEvent (QContextMenuEvent *event) override
 
virtual void dragEnterEvent (QDragEnterEvent *event) override
 
virtual void dragMoveEvent (QDragMoveEvent *event) override
 
virtual void dropEvent (QDropEvent *event) override
 
virtual void changeEvent (QEvent *event) override
 
virtual void selectionChanged (const QItemSelection &selected, const QItemSelection &deselected) override
 
virtual void init_context_menu ()
 
LibraryContextMenucontext_menu () const
 
virtual MD::Interpretation metadata_interpretation () const override final
 get the interpretation for the metadata. Maybe a list of metadata should be intrepeted as albums while others should be considered as tracks More...
 
MetaDataList info_dialog_data () const override
 get the metadata that should be used for the info dialog So for lists, the selected tracks are used here More...
 
virtual void select_match (const QString &str, SearchDirection direction)
 
virtual QModelIndex match_index (const QString &str, SearchDirection direction) const
 
void handle_key_press (QKeyEvent *e) override
 
void select_rows (const IndexSet &indexes, int min_col=-1, int max_col=-1)
 
void select_row (int row)
 
void select_columns (const IndexSet &indexes, int min_row=-1, int max_row=-1)
 
void select_column (int col)
 
void select_items (const IndexSet &indexes)
 
void select_item (int item)
 
void select_all ()
 
void clear_selection ()
 
int min_selected_item () const
 
SelectionViewInterface::SelectionType selection_type () const
 
virtual IndexSet indexes_by_model_indexes (const QModelIndexList &indexes) const
 
virtual QModelIndexList model_indexes_by_indexes (const IndexSet &indexes) const
 
virtual void drag_pressed (const QPoint &p) final
 
virtual QDrag * drag_moving (const QPoint &p) final
 
virtual void drag_released (ReleaseReason reason)
 
virtual bool has_drag_label () const
 
virtual QString drag_label () const
 

Protected Slots

void header_actions_triggered ()
 
void sort_by_column (int column_idx)
 
virtual void context_menu_show (const QPoint &)
 
virtual void delete_clicked ()
 

Protected Attributes

ItemModel_model =nullptr
 
Settings_settings =nullptr
 

Member Function Documentation

◆ dragable_mimedata()

QMimeData* Library::ItemView::dragable_mimedata ( ) const
overridevirtualinherited

Dragable

Implements Dragable.

◆ info_dialog_data()

MetaDataList Library::ItemView::info_dialog_data ( ) const
overrideprotectedvirtualinherited

get the metadata that should be used for the info dialog So for lists, the selected tracks are used here

Returns
MetaDataList

Implements InfoDialogContainer.

◆ metadata_interpretation()

virtual MD::Interpretation Library::ItemView::metadata_interpretation ( ) const
finaloverrideprotectedvirtualinherited

get the interpretation for the metadata. Maybe a list of metadata should be intrepeted as albums while others should be considered as tracks

Returns
interpretation of metadata

Implements InfoDialogContainer.

Inheritance diagram for Library::ArtistView:
Library::TableView Library::ItemView Gui::WidgetTemplate< SearchableTableView > InfoDialogContainer Dragable SearchableView< View > SayonaraClass SearchableViewInterface SelectionViewInterface