Sayonara Player
Loading...
Searching...
No Matches
CoverViewContextMenu.h
1/* CoverViewContextMenu.h */
2
3/* Copyright (C) 2011-2024 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 COVERVIEWCONTEXTMENU_H
22#define COVERVIEWCONTEXTMENU_H
23
24#include "Gui/Utils/ContextMenu/LibraryContextMenu.h"
25#include "Utils/Library/Sortorder.h"
26#include <QStringList>
27
28class MetaData;
29
30namespace Library
31{
34 {
35 Q_OBJECT
37
38 signals:
39 void sigZoomChanged(int zoom);
40 void sigSortingChanged(Library::AlbumSortorder sortorder);
41
42 public:
43 enum Entry
44 {
45 EntryShowUtils = Library::ContextMenu::EntryLast << 1,
46 EntrySorting = EntryShowUtils << 1,
47 EntryZoom = EntrySorting << 1,
48 EntryShowArtist = EntryZoom << 1
49 };
50
51 explicit CoverViewContextMenu(QWidget* parent);
52 ~CoverViewContextMenu() override;
53
54 [[nodiscard]] CoverViewContextMenu::Entries entries() const override;
55 void showActions(CoverViewContextMenu::Entries entries) override;
56
57 private:
58 void init();
59 void initSortingActions();
60 void initZoomActions();
61
62 void setZoom(int zoom);
63 void setSorting(Library::AlbumSortorder sortOrder);
64
65 private slots:
66 void actionZoomTriggered(bool b);
67 void actionSortingTriggered(bool b);
68
69 protected:
70 void languageChanged() override;
71 void showEvent(QShowEvent* e) override;
72 };
73}
74#endif // COVERVIEWCONTEXTMENU_H
Definition LibraryContextMenu.h:40
Definition CoverViewContextMenu.h:34
The MetaData class.
Definition MetaData.h:47