Sayonara Player
ArtistView.h
1/* ArtistView.h */
2
3/* Copyright (C) 2011-2020 Michael Lugmair (Lucio Carreras)
4 *
5 * This file is part of sayonara player
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#ifndef ARTISTVIEW_H
22#define ARTISTVIEW_H
23
24#include "TableView.h"
25#include "Utils/Pimpl.h"
26#include "Utils/Library/Sortorder.h"
27
28namespace Library
29{
30 class MergeData;
31
36 class ArtistView :
37 public TableView
38 {
39 PIMPL(ArtistView)
40 public:
41 explicit ArtistView(QWidget* parent = nullptr);
42 ~ArtistView() override;
43
44 // ItemView interface
45 protected:
46 AbstractLibrary* library() const override;
47 void selectedItemsChanged(const IndexSet& indexes) override;
48 void playNextClicked() override;
49 void appendClicked() override;
50 void refreshClicked() override;
51 void playClicked() override;
52 void playNewTabClicked() override;
53 void runMergeOperation(const Library::MergeData& mergedata) override;
54
55 void initView(AbstractLibrary* library) override;
56 void initContextMenu() override;
57
59 QByteArray columnHeaderState() const override;
60 void saveColumnHeaderState(const QByteArray& state) override;
61
62 SortOrder sortorder() const override;
63 void applySortorder(SortOrder s) override;
64
65 bool autoResizeState() const override;
66 void saveAutoResizeState(bool b) override;
67
68 // ItemView
69 bool isMergeable() const override;
70 MD::Interpretation metadataInterpretation() const override;
71
72 void languageChanged() override;
73
74 private slots:
75 void useClearButtonChanged();
76 void showAlbumArtistsChanged();
77 void albumArtistsTriggered(bool b);
78 };
79}
80
81#endif // ARTISTVIEW_H
Definition: AbstractLibrary.h:44
The ArtistView class.
Definition: ArtistView.h:38
bool isMergeable() const override
indicates if multiple ids can be merged into one. For example if the same artist is written in three ...
void initView(AbstractLibrary *library) override
here, the model and delegate should be instantiated as well as connections and setting listeners
QByteArray columnHeaderState() const override
This method returns the SAVED column header sizes as they were remembered since the last time sayonar...
SortOrder sortorder() const override
returns the current sortorder for the table view
void saveColumnHeaderState(const QByteArray &state) override
Here, the column headers sizes should be saved somewhere.
ColumnHeaderList columnHeaders() const override
returns a list of ColumnHeader objects containing name, sortorder. Everytime when the language is cha...
MD::Interpretation metadataInterpretation() const override
get the interpretation for the metadata. Maybe a list of metadata should be intrepeted as albums whil...
void applySortorder(SortOrder s) override
saves the current sortorder
Definition: MergeData.h:33
The TableView class.
Definition: TableView.h:38
Definition: EngineUtils.h:33
A set structure. Inherited from std::set with some useful methods. For integer and String this set is...
Definition: Set.h:37
An interface class needed when implementing a library plugin.
Definition: LocalLibraryWatcher.h:31