Sayonara Player
Toggle main menu visibility
Loading...
Searching...
No Matches
src
Gui
Library
CoverView
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
28
class
MetaData
;
29
30
namespace
Library
31
{
32
class
CoverViewContextMenu :
33
public
Library::ContextMenu
34
{
35
Q_OBJECT
36
PIMPL(CoverViewContextMenu)
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
EntryShowYear = EntryShowArtist << 1,
50
EntryShowDuration = EntryShowYear << 1
51
52
};
53
54
explicit
CoverViewContextMenu(QWidget* parent);
55
~CoverViewContextMenu()
override
;
56
57
[[nodiscard]] CoverViewContextMenu::Entries entries()
const override
;
58
void
showActions(CoverViewContextMenu::Entries entries)
override
;
59
60
private
:
61
void
init();
62
void
initSortingActions();
63
void
initZoomActions();
64
65
void
setZoom(
int
zoom);
66
void
setSorting(Library::AlbumSortorder sortOrder);
67
68
private
slots:
69
void
actionZoomTriggered(
bool
b);
70
void
actionSortingTriggered(
bool
b);
71
72
protected
:
73
void
languageChanged()
override
;
74
void
showEvent(QShowEvent* e)
override
;
75
};
76
}
77
#endif
// COVERVIEWCONTEXTMENU_H
Library::ContextMenu
Definition
LibraryContextMenu.h:40
MetaData
Definition
MetaData.h:43
Generated on
for Sayonara Player by
1.17.0