Sayonara Player
Toggle main menu visibility
Loading...
Searching...
No Matches
src
Gui
Playlist
PlaylistContextMenu.h
1
/* PlaylistContextMenu.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 PLAYLISTCONTEXTMENU_H
22
#define PLAYLISTCONTEXTMENU_H
23
24
#include "Gui/Utils/ContextMenu/LibraryContextMenu.h"
25
#include "Utils/Library/Sortorder.h"
26
27
class
DynamicPlaybackChecker
;
28
class
MetaData
;
29
30
namespace
Playlist
31
{
32
class
ContextMenu :
33
public
Library::ContextMenu
34
{
35
Q_OBJECT
36
PIMPL(ContextMenu)
37
38
signals:
39
void
sigBookmarkTriggered(Seconds timestamp);
40
void
sigSortingTriggered(Library::TrackSortorder sortOrder);
41
void
sigRatingChanged(Rating rating);
42
43
public
:
44
enum
Entry
45
{
46
EntryRating = (Library::ContextMenu::EntryLast << 1),
47
EntryBookmarks = (Library::ContextMenu::EntryLast << 2),
48
EntryCurrentTrack = (Library::ContextMenu::EntryLast << 3),
49
EntryFindInLibrary = (Library::ContextMenu::EntryLast << 4),
50
EntryJumpToNextAlbum = (Library::ContextMenu::EntryLast << 5),
51
EntrySort = (Library::ContextMenu::EntryLast << 6),
52
EntryReverse = (Library::ContextMenu::EntryLast << 7),
53
EntryRandomize = (Library::ContextMenu::EntryLast << 8),
54
EntryLastTrackBeforeStop = (Library::ContextMenu::EntryLast << 9)
55
};
56
57
ContextMenu(
DynamicPlaybackChecker
* dynamicPlaybackChecker, QWidget* parent);
58
~ContextMenu()
override
;
59
60
[[nodiscard]] ContextMenu::Entries entries()
const override
;
61
void
showActions(ContextMenu::Entries entries)
override
;
62
63
using
Library::ContextMenu::action;
64
[[nodiscard]] QAction* action(ContextMenu::Entry entry)
const
;
65
66
ContextMenu::Entries setTrack(
const
MetaData
& track,
bool
isCurrentTrack);
67
void
clearTrack();
68
69
protected
:
70
void
languageChanged()
override
;
71
void
skinChanged()
override
;
72
};
73
}
74
75
#endif
// PLAYLISTCONTEXTMENU_H
DynamicPlaybackChecker
Definition
DynamicPlaybackChecker.h:29
Library::ContextMenu
Definition
LibraryContextMenu.h:40
MetaData
Definition
MetaData.h:43
Generated on
for Sayonara Player by
1.17.0