1 /* TrackView.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 LIBRARYTRACKVIEW_H 22 #define LIBRARYTRACKVIEW_H 23 24 #include "TableView.h" 25 #include "Utils/Pimpl.h" 26 #include "Utils/Library/Sortorder.h" 27 28 class AbstractLibrary; 29 namespace Library 30 { 31 /** 32 * @brief The TrackView class 33 * @ingroup GuiLibrary 34 */ 35 class TrackView : 36 public TableView 37 { 38 Q_OBJECT 39 PIMPL(TrackView) 40 41 public: 42 explicit TrackView(QWidget* parent = nullptr); 43 ~TrackView() override; 44 45 private: 46 AbstractLibrary* library() const override; 47 //from Library::TableView 48 void initView(AbstractLibrary* library) override; 49 50 ColumnHeaderList columnHeaders() const override; 51 QByteArray columnHeaderState() const override; 52 void saveColumnHeaderState(const QByteArray& state) override; 53 54 bool autoResizeState() const override; 55 void saveAutoResizeState(bool b) override; 56 57 SortOrder sortorder() const override; 58 void applySortorder(SortOrder s) override; 59 60 ContextMenu::Entries contextMenuEntries() const override; 61 62 // from Library::ItemView 63 void playClicked() override; 64 void playNewTabClicked() override; 65 void playNextClicked() override; 66 void appendClicked() override; 67 void selectedItemsChanged(const IndexSet& lst) override; 68 void refreshClicked() override; 69 70 bool isMergeable() const override; 71 MD::Interpretation metadataInterpretation() const override; 72 }; 73 } 74 75 #endif // LIBRARYTRACKVIEW_H 76