Sayonara Player
AlbumView.h
1 /* AlbumView.h */
2 
3 /* Copyright (C) 2011-2017 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 LIBRARYVIEWALBUM_H
22 #define LIBRARYVIEWALBUM_H
23 
24 #include "Utils/MetaData/Album.h"
25 #include "GUI/Library/TableView.h"
26 #include <QList>
27 #include <QModelIndex>
28 
29 class DiscPopupMenu;
30 
31 namespace Library
32 {
33  class AlbumView :
34  public TableView
35  {
36  Q_OBJECT
37  PIMPL(AlbumView)
38 
39  signals:
40  void sig_disc_pressed(Disc d);
41 
42  protected slots:
43  void index_clicked(const QModelIndex& idx);
44 
45  public:
46  explicit AlbumView(QWidget *parent=nullptr);
47  virtual ~AlbumView();
48 
49  private:
50  // Library::TableView
51  void init_view(AbstractLibrary* library) override;
52  ColumnHeaderList column_headers() const override;
53 
54  BoolList visible_columns() const override;
55  void save_visible_columns(const BoolList& lst) override;
56 
57  SortOrder sortorder() const override;
58  void save_sortorder(SortOrder s) override;
59 
60  // Library::ItemView
61  void play_clicked() override;
62  void play_new_tab_clicked() override;
63  void play_next_clicked() override;
64  void append_clicked() override;
65  void selection_changed(const IndexSet& indexes) override;
66  void refresh_clicked() override;
67  void run_merge_operation(const MergeData& mergedata) override;
68 
69  void calc_discmenu_point(QModelIndex idx);
70  void delete_discmenu();
71  void init_discmenu(QModelIndex idx);
72 
73  void show_discmenu();
74  void show_context_menu(const QPoint& p) override;
75 
76  AbstractLibrary* library() const override;
77 
78  private slots:
79  void use_clear_button_changed();
80  };
81 }
82 
83 #endif // LIBRARYVIEWALBUM_H
Definition: AbstractLibrary.h:39
Definition: DiscPopupMenu.h:42
Definition: ColumnHeader.h:93
A set structure. Inherited from std::set with some useful methods. For integer and String this set is...
Definition: Set.h:35
Definition: TableView.h:32
Definition: ItemView.h:61
An interface class needed when implementing a library plugin.
Definition: CachingThread.h:29
Definition: AlbumView.h:33
Definition: org_mpris_media_player2_adaptor.h:20