-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy pathwmainmenubar.h
More file actions
122 lines (108 loc) · 3.49 KB
/
Copy pathwmainmenubar.h
File metadata and controls
122 lines (108 loc) · 3.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
#pragma once
#include <QList>
#include <QMenuBar>
#include <QObject>
#include <QScopedPointer>
#include "control/controlproxy.h"
#include "preferences/configobject.h"
#include "preferences/usersettings.h"
class QAction;
class KeyboardEventFilter;
class VisibilityControlConnection : public QObject {
Q_OBJECT
public:
VisibilityControlConnection(QObject* pParent, QAction* pAction,
const ConfigKey& key);
public slots:
void slotClearControl();
void slotReconnectControl();
private slots:
void slotControlChanged();
void slotActionToggled(bool toggle);
private:
ConfigKey m_key;
QScopedPointer<ControlProxy> m_pControl;
QAction* m_pAction;
};
class WMainMenuBar : public QMenuBar {
Q_OBJECT
public:
WMainMenuBar(QWidget* pParent,
UserSettingsPointer pConfig,
std::shared_ptr<KeyboardEventFilter> pKbd);
#ifndef __APPLE__
void hideMenuBar();
void showMenuBar();
#endif
public slots:
void onLibraryScanStarted();
void onLibraryScanFinished();
void onRecordingStateChange(bool recording);
void onBroadcastingStateChange(bool broadcasting);
void onNewSkinAboutToLoad();
void onNewSkinLoaded();
void onDeveloperToolsHidden();
void onDeveloperToolsShown();
void onFullScreenStateChange(bool fullscreen);
void onVinylControlDeckEnabledStateChange(int deck, bool enabled);
void onNumberOfDecksChanged(int decks);
void onKeywheelChange(int state);
#ifndef __APPLE__
void slotToggleMenuBar();
#endif
signals:
void createCrate();
void createPlaylist();
void loadTrackToDeck(int deck);
void reloadSkin();
void repairDatabase();
void rescanLibrary();
#ifdef __ENGINEPRIME__
void exportLibrary();
#endif
void searchInCurrentView();
void searchInAllTracks();
void showAutoDJ();
void menubarAutoHideChanged(bool autohide);
void showAbout();
void showKeywheel(bool visible);
void showPreferences();
void toggleDeveloperTools(bool toggle);
void toggleFullScreen(bool toggle);
void toggleKeyboardShortcuts(bool toggle);
void toggleBroadcasting(bool toggle);
void toggleRecording(bool enabled);
void toggleVinylControl(int deck);
void visitUrl(const QString& url);
void quit();
void internalRecordingStateChange(bool recording);
void internalBroadcastingStateChange(bool broadcasting);
void internalFullScreenStateChange(bool fullscreen);
void internalLibraryScanActive(bool active);
void internalDeveloperToolsStateChange(bool visible);
void internalKeywheelStateChanged(int state);
void internalOnNewSkinLoaded();
void internalOnNewSkinAboutToLoad();
private slots:
#ifndef __APPLE__
void slotAutoHideMenuBarToggled(bool autoHide);
#endif
void slotDeveloperStatsExperiment(bool enable);
void slotDeveloperStatsBase(bool enable);
void slotDeveloperDebugger(bool toggle);
void slotVisitUrl(const QUrl& url);
private:
void initialize();
#ifndef __APPLE__
/// this ensures the menubar is shown when a menu hotkey is pressed
/// while the menubar is hidden
void connectMenuToSlotShowMenuBar(const QMenu* pMenu);
#endif
void createVisibilityControl(QAction* pAction, const ConfigKey& key);
UserSettingsPointer m_pConfig;
QAction* m_pViewKeywheel;
// TODO KeyboardEventFilterPointer ??
std::shared_ptr<KeyboardEventFilter> m_pKeyboard;
QList<QAction*> m_loadToDeckActions;
QList<QAction*> m_vinylControlEnabledActions;
};