Sayonara Player
Loading...
Searching...
No Matches
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
28class MetaData;
29
30namespace Playlist
31{
34 {
35 Q_OBJECT
36 PIMPL(ContextMenu)
37
38 signals:
39 void sigBookmarkTriggered(Seconds timestamp);
40 void sigSortingTriggered(Library::SortOrder 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 };
55
56 ContextMenu(DynamicPlaybackChecker* dynamicPlaybackChecker, QWidget* parent);
57 ~ContextMenu() override;
58
59 [[nodiscard]] ContextMenu::Entries entries() const override;
60 void showActions(ContextMenu::Entries entries) override;
61
62 using Library::ContextMenu::action;
63 [[nodiscard]] QAction* action(ContextMenu::Entry entry) const;
64
65 ContextMenu::Entries setTrack(const MetaData& track, bool isCurrentTrack);
66 void clearTrack();
67
68 protected:
69 void languageChanged() override;
70 void skinChanged() override;
71 };
72}
73
74#endif // PLAYLISTCONTEXTMENU_H
Definition: DynamicPlaybackChecker.h:29
Definition: LibraryContextMenu.h:40
The MetaData class.
Definition: MetaData.h:47
Definition: PlaylistContextMenu.h:34