![]() |
Sayonara Player
|
#include <TableView.h>
Signals | |
void | sigSortorderChanged (SortOrder) |
void | sigDeleteClicked () |
void | sigPlayClicked () |
void | sigPlayNextClicked () |
void | sigPlayNewTabClicked () |
void | sigAppendClicked () |
void | sigRefreshClicked () |
void | sigReloadClicked () |
void | sigImportFiles (const QStringList &files) |
void | sigSelectionChanged (const IndexSet &indexes) |
Public Member Functions | |
TableView (QWidget *parent=nullptr) | |
virtual void | init (AbstractLibrary *library) |
void | setItemModel (ItemModel *model) |
void | showClearButton (bool visible) |
void | useClearButton (bool yesno) |
virtual Library::ContextMenu::Entries | contextMenuEntries () const |
QMimeData * | dragableMimedata () const override |
bool | isValidDragPosition (const QPoint &p) const override |
virtual void | showEvent (QShowEvent *e) override |
void | infoDialogClosed () |
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 | headerColumnsChanged (int oldCount, int newCount) |
void | sortorderChanged (int index, Qt::SortOrder sortorder) |
void | sectionResized (int logicalIndex, int oldSize, int newSize) |
void | sectionMoved (int logicalIndex, int old_visualIndex, int newVisualIndex) |
void | autoResizeTriggered (bool b) |
virtual void | showContextMenu (const QPoint &) |
virtual void | mergeActionTriggered () |
virtual void | playClicked () |
virtual void | playNewTabClicked () |
virtual void | playNextClicked () |
virtual void | deleteClicked () |
virtual void | appendClicked () |
virtual void | refreshClicked () |
virtual void | reloadClicked () |
virtual void | albumArtistsToggled () |
virtual void | filterExtensionsTriggered (const QString &extension, bool b) |
virtual void | fill () |
Protected Member Functions | |
void | setupColumnNames () |
the column names are reloaded and updated with their corresponding texts | |
virtual void | initView (AbstractLibrary *library)=0 |
here, the model and delegate should be instantiated as well as connections and setting listeners More... | |
virtual ColumnHeaderList | columnHeaders () const =0 |
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... | |
virtual QByteArray | columnHeaderState () const =0 |
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... | |
virtual void | saveColumnHeaderState (const QByteArray &state)=0 |
Here, the column headers sizes should be saved somewhere. More... | |
virtual SortOrder | sortorder () const =0 |
returns the current sortorder for the table view | |
virtual void | applySortorder (SortOrder s)=0 |
saves the current sortorder | |
virtual bool | autoResizeState () const =0 |
virtual void | saveAutoResizeState (bool b)=0 |
void | languageChanged () override |
int | mapModelIndexToIndex (const QModelIndex &idx) const override |
ModelIndexRange | mapIndexToModelIndexes (int idx) const override |
virtual void | mousePressEvent (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 | resizeEvent (QResizeEvent *event) override |
virtual void | selectionChanged (const QItemSelection &selected, const QItemSelection &deselected) override |
Library::ContextMenu * | contextMenu () const |
virtual void | initContextMenu () |
virtual void | initCustomContextMenu (Library::ContextMenu *menu) |
ItemModel * | itemModel () const |
virtual AbstractLibrary * | library () const |
virtual bool | isMergeable () const =0 |
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... | |
MetaDataList | infoDialogData () 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 | selectedItemsChanged (const IndexSet &indexes) |
virtual void | importRequested (const QStringList &files) |
virtual void | runMergeOperation (const Library::MergeData &md) |
int | viewportHeight () const override |
virtual void | skinChanged () |
virtual MD::Interpretation | metadataInterpretation () const =0 |
get the interpretation for the metadata. Maybe a list of metadata should be intrepeted as albums while others should be considered as tracks More... | |
virtual bool | hasMetadata () const |
returns, if the widget can provide metadata instantly If false, the info dialog will the pathlist More... | |
virtual QStringList | pathlist () const |
Returns a list of paths. This is only used if has_metadata() returns false. More... | |
virtual void | showInfo () |
Show the Info dialogs' info tab. | |
virtual void | showLyrics () |
Show the Info dialogs' lyrics tab. | |
virtual void | showEdit () |
Show the tag editor. | |
virtual void | showCoverEdit () |
Show the cover tab withing the tag editor. | |
virtual bool | hasDragLabel () const |
virtual QString | dragLabel () const |
The TableView class.
|
protectedpure virtual |
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
Implemented in Library::ArtistView, and Library::AlbumView.
|
protectedpure virtual |
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()
Implemented in Library::ArtistView, and Library::AlbumView.
|
overridevirtualinherited |
Dragable
Implements Gui::Dragable.
|
protectedvirtualinherited |
returns, if the widget can provide metadata instantly If false, the info dialog will the pathlist
Reimplemented in Directory::FileListView, and Directory::TreeView.
|
overrideprotectedvirtualinherited |
get the metadata that should be used for the info dialog So for lists, the selected tracks are used here
Implements InfoDialogContainer.
|
protectedpure virtual |
here, the model and delegate should be instantiated as well as connections and setting listeners
library |
Implemented in Library::ArtistView.
|
protectedpure virtualinherited |
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
Implemented in Library::ArtistView, and Library::CoverView.
|
protectedpure virtualinherited |
get the interpretation for the metadata. Maybe a list of metadata should be intrepeted as albums while others should be considered as tracks
Implemented in Playlist::View, GUI_ControlsBase, Library::ArtistView, Directory::FileListView, Directory::TreeView, and Library::CoverView.
|
protectedvirtualinherited |
Returns a list of paths. This is only used if has_metadata() returns false.
Reimplemented in Directory::FileListView, and Directory::TreeView.
|
protectedpure virtual |
Here, the column headers sizes should be saved somewhere.
a | list of widths in pixels. The list should be as big as there are columns (even if they are not visible) |
Implemented in Library::ArtistView, and Library::AlbumView.