Sayonara Player
Signals | Public Member Functions | Protected Types | Protected Slots | Protected Member Functions | List of all members
SC::ArtistView Class Reference
Inheritance diagram for SC::ArtistView:
Library::ArtistView Library::TableView Library::ItemView Gui::WidgetTemplate< T > InfoDialogContainer Gui::Dragable Gui::WidgetTemplateParent

Signals

void sig_sortorder_changed (SortOrder)
 
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_reload_clicked ()
 
void sig_import_files (const QStringList &files)
 
void sig_sel_changed (const IndexSet &indexes)
 
void sig_merge (const Util::Set< Id > &ids, int target_id)
 

Public Member Functions

Gui::LibraryContextMenu::Entries context_menu_entries () const override
 
virtual void init (AbstractLibrary *library)
 
void set_item_model (ItemModel *model)
 
QMimeData * dragable_mimedata () const override
 
QPixmap drag_pixmap () const override
 
void set_selection_type (SelectionViewInterface::SelectionType type) override
 
bool is_valid_drag_position (const QPoint &p) const override
 
void show_clear_button (bool visible)
 
void use_clear_button (bool yesno)
 
void resize_rows_to_contents ()
 
void resize_rows_to_contents (int first_row, int count)
 
virtual void showEvent (QShowEvent *e) override
 
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  EditTab {
  TabText,
  TabCover,
  TabTagsFromPath
}
 
enum  ReleaseReason : char {
  Dropped,
  Destroyed
}
 

Protected Slots

void header_actions_triggered ()
 
void sort_by_column (int column_idx)
 
void sizes_changed ()
 
virtual void show_context_menu (const QPoint &)
 
virtual void merge_action_triggered ()
 
virtual void delete_clicked ()
 
virtual void reload_clicked ()
 
virtual void cover_view_toggled ()
 
virtual void album_artists_toggled ()
 
virtual void filter_extensions_triggered (const QString &extension, bool b)
 
virtual void fill ()
 

Protected Member Functions

AbstractLibrarylibrary () const override
 
void selection_changed (const IndexSet &indexes) override
 
void play_next_clicked () override
 
void append_clicked () override
 
void refresh_clicked () override
 
void play_clicked () override
 
void play_new_tab_clicked () override
 
void run_merge_operation (const Library::MergeData &mergedata) override
 
IntList column_header_sizes () const override
 This method returns the SAVED column header sizes as they were remembered since the last time sayonara was running. Also see save_column_header_sizes() More...
 
void save_column_header_sizes (const IntList &sizes) override
 Here, the column headers sizes should be saved somewhere. More...
 
void init_view (AbstractLibrary *library) override
 here, the model and delegate should be instantiated as well as connections and setting listeners More...
 
ColumnHeaderList column_headers () const override
 returns a list of ColumnHeader objects containing name, sortorder. Everytime when the language is changed, this method is fetched as well when the UI is instantiated More...
 
void init_context_menu () override
 
BoolList visible_columns () const override
 A boolean vector where true indicates a visible column and false indicates an invisible column. More...
 
void save_visible_columns (const BoolList &columns) override
 save the current state of visible columns More...
 
SortOrder sortorder () const override
 returns the current sortorder for the table view
 
void save_sortorder (SortOrder s) override
 saves the current sortorder
 
bool is_mergeable () const override
 indicates if multiple ids can be merged into one. For example if the same artist is written in three different ways, they can be merged to one. On the other hand, for tracks that does not make sense More...
 
MD::Interpretation metadata_interpretation () const override
 get the interpretation for the metadata. Maybe a list of metadata should be intrepeted as albums while others should be considered as tracks More...
 
void language_changed () override
 
int index_by_model_index (const QModelIndex &idx) const override
 
ModelIndexRange model_indexrange_by_index (int idx) const override
 
virtual void mousePressEvent (QMouseEvent *event) override
 
virtual void mouseMoveEvent (QMouseEvent *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 keyPressEvent (QKeyEvent *event) override
 
virtual void resizeEvent (QResizeEvent *event) override
 
virtual void selected_items_changed (const QItemSelection &selected, const QItemSelection &deselected)
 
virtual void init_custom_context_menu (Gui::LibraryContextMenu *menu)
 
Gui::LibraryContextMenucontext_menu () const
 
ItemModel * item_model () const
 
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 import_requested (const QStringList &files)
 
int viewport_height () const override
 
virtual void skin_changed ()
 
virtual void show_info ()
 Show the Info dialogs' info tab.
 
virtual void show_lyrics ()
 Show the Info dialogs' lyrics tab.
 
virtual void show_edit ()
 Show the tag editor.
 
virtual void show_cover_edit ()
 
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
 

Member Function Documentation

◆ column_header_sizes()

IntList Library::ArtistView::column_header_sizes ( ) const
overrideprotectedvirtualinherited

This method returns the SAVED column header sizes as they were remembered since the last time sayonara was running. Also see save_column_header_sizes()

Returns
a list of widths in pixels

Implements Library::TableView.

◆ column_headers()

ColumnHeaderList Library::ArtistView::column_headers ( ) const
overrideprotectedvirtualinherited

returns a list of ColumnHeader objects containing name, sortorder. Everytime when the language is changed, this method is fetched as well when the UI is instantiated

Returns

Implements Library::TableView.

◆ dragable_mimedata()

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

Dragable

Implements Gui::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.

◆ init_view()

void Library::ArtistView::init_view ( AbstractLibrary library)
overrideprotectedvirtualinherited

here, the model and delegate should be instantiated as well as connections and setting listeners

Parameters
library

Implements Library::TableView.

◆ is_mergeable()

bool Library::ArtistView::is_mergeable ( ) const
overrideprotectedvirtualinherited

indicates if multiple ids can be merged into one. For example if the same artist is written in three different ways, they can be merged to one. On the other hand, for tracks that does not make sense

Returns

Implements Library::ItemView.

◆ metadata_interpretation()

MD::Interpretation Library::ArtistView::metadata_interpretation ( ) const
overrideprotectedvirtualinherited

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.

◆ save_column_header_sizes()

void Library::ArtistView::save_column_header_sizes ( const IntList sizes)
overrideprotectedvirtualinherited

Here, the column headers sizes should be saved somewhere.

Parameters
alist of widths in pixels. The list should be as big as there are columns (even if they are not visible)

Implements Library::TableView.

◆ save_visible_columns()

void Library::ArtistView::save_visible_columns ( const BoolList columns)
overrideprotectedvirtualinherited

save the current state of visible columns

Parameters
columnsa bool vector where true indicates a visible column and false indicates an invisible column

Implements Library::TableView.

◆ visible_columns()

BoolList Library::ArtistView::visible_columns ( ) const
overrideprotectedvirtualinherited

A boolean vector where true indicates a visible column and false indicates an invisible column.

Returns

Implements Library::TableView.