Sayonara Player
TrackView.h
1 /* TrackView.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 
22 
23 #ifndef TRACKVIEW_H
24 #define TRACKVIEW_H
25 
26 #include "TableView.h"
27 #include "Utils/Pimpl.h"
28 #include "Utils/Library/Sortorder.h"
29 
30 class AbstractLibrary;
31 namespace Library
32 {
33  class TrackView :
34  public Library::TableView
35  {
36  Q_OBJECT
37  PIMPL(TrackView)
38 
39  public:
40  explicit TrackView(QWidget* parent=nullptr);
41  ~TrackView();
42 
43  private:
44  //from Library::TableView
45  void init_view(AbstractLibrary* library) override;
46  ColumnHeaderList column_headers() const override;
47  BoolList shown_columns() const override;
48  SortOrder sortorder() const override;
49 
50  void sortorder_changed(SortOrder s) override;
51  void columns_changed() override;
52 
53  // from Library::ItemView
54  void play_clicked() override;
55  void play_new_tab_clicked() override;
56  void middle_clicked() override;
57  void play_next_clicked() override;
58  void append_clicked() override;
59  void selection_changed(const IndexSet& lst) override;
60  void refresh_clicked() override;
61 
62  private slots:
63  void double_clicked(const QModelIndex& idx);
64  void tracks_ready();
65  };
66 }
67 
68 #endif // TRACKVIEW_H
Definition: AbstractLibrary.h:47
Definition: ColumnHeader.h:90
Definition: TableView.h:32
An interface class needed when implementing a library plugin.
Definition: LibraryManager.h:36
A set structure. Inherited from std::set with some useful methods. For integer and String this set is...
Definition: AbstractPlaylist.h:36
Definition: TrackView.h:33