Sayonara Player
Toggle main menu visibility
Loading...
Searching...
No Matches
src
Gui
Library
DirectoryView
DirectoryContextMenu.h
1
/* DirectoryContextMenu.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 DIRECTORYCONTEXTMENU_H
22
#define DIRECTORYCONTEXTMENU_H
23
24
#include "Gui/Utils/ContextMenu/LibraryContextMenu.h"
25
26
namespace
Library
27
{
28
class
InfoAccessor
;
29
}
30
31
namespace
Directory
32
{
37
class
ContextMenu :
38
public
Library::ContextMenu
39
{
40
Q_OBJECT
41
PIMPL(ContextMenu)
42
43
signals:
44
void
sigCreateDirectoryClicked();
45
void
sigRenameClicked();
46
void
sigRenameByTagClicked();
47
void
sigCollapseAllClicked();
48
void
sigViewInFileManagerClicked();
49
void
sigMoveToLibrary(LibraryId
id
);
50
void
sigCopyToLibrary(LibraryId
id
);
51
52
public
:
53
enum
Mode
54
{
55
Dir = 0,
56
File
57
};
58
59
enum
Entry
60
{
61
EntryCreateDir = Library::ContextMenu::EntryLast,
62
EntryRename = Library::ContextMenu::EntryLast << 1,
63
EntryRenameByTag = Library::ContextMenu::EntryLast << 2,
64
EntryCollapseAll = Library::ContextMenu::EntryLast << 3,
65
EntryMoveToLib = Library::ContextMenu::EntryLast << 4,
66
EntryCopyToLib = Library::ContextMenu::EntryLast << 5,
67
EntryViewInFM = Library::ContextMenu::EntryLast << 6
68
};
69
70
ContextMenu(Mode mode,
Library::InfoAccessor
* libraryInfoAccessor, QWidget* parent);
71
~ContextMenu()
override
;
72
73
void
refresh(
int
count = 0);
74
75
ContextMenu::Entries entries()
const override
;
76
void
showActions(ContextMenu::Entries entries)
override
;
77
void
showDirectoryAction(ContextMenu::Entry entry,
bool
b);
78
79
private
slots:
80
void
libraryMoveActionTriggered();
81
void
libraryCopyActionTriggered();
82
83
protected
:
84
void
languageChanged()
override
;
85
void
skinChanged()
override
;
86
};
87
}
88
89
#endif
// DIRECTORYCONTEXTMENU_H
Library::ContextMenu
Definition
LibraryContextMenu.h:40
Library::InfoAccessor
Definition
LibraryManager.h:36
Generated on
for Sayonara Player by
1.17.0