blob: 69ae82f83cb3b455dbc5872c6022330a484b2337 (
plain)
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
|
/***************************************************************************
mixxx.h - description
-------------------
begin : Mon Feb 18 09:48:17 CET 2002
copyright : (C) 2002 by Tue and Ken Haste Andersen
email :
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef MIXXX_H
#define MIXXX_H
#include <QMainWindow>
#include <QString>
#include "preferences/configobject.h"
#include "preferences/usersettings.h"
#include "preferences/constants.h"
#include "track/track.h"
#include "util/cmdlineargs.h"
#include "util/timer.h"
#include "util/db/dbconnectionpool.h"
#include "soundio/sounddeviceerror.h"
class ControlPushButton;
class ControllerManager;
class DlgDeveloperTools;
class DlgPreferences;
class EffectsManager;
class EngineMaster;
class GuiTick;
class LaunchImage;
class Library;
class KeyboardEventFilter;
class PlayerManager;
class RecordingManager;
class SettingsManager;
class BroadcastManager;
class SkinLoader;
class SoundManager;
class VinylControlManager;
class WMainMenuBar;
// This Class is the base class for Mixxx. It sets up the main
// window and providing a menubar.
// For the main view, an instance of class MixxxView is
// created which creates your view.
class MixxxMainWindow : public QMainWindow {
Q_OBJECT
public:
// Construtor. files is a list of command line arguments
MixxxMainWindow(QApplication *app, const CmdlineArgs& args);
~MixxxMainWindow() override;
void finalize();
// creates the menu_bar and inserts the file Menu
void createMenuBar();
void connectMenuBar();
void setInhibitScreensaver(mixxx::ScreenSaverPreference inhibit);
mixxx::ScreenSaverPreference getInhibitScreensaver();
void setToolTipsCfg(mixxx::TooltipsPreference tt);
inline mixxx::TooltipsPreference getToolTipsCfg() { return m_toolTipsCfg; }
inline GuiTick* getGuiTick() { return m_pGuiTick; };
public slots:
void rebootMixxxView();
void slotFileLoadSongPlayer(int deck);
// toogle keyboard on-off
void slotOptionsKeyboard(bool toggle);
// Preference dialog
void slotOptionsPreferences();
// shows an about dlg
void slotHelpAbout();
// toogle full screen mode
void slotViewFullScreen(bool toggle);
// Open the developer tools dialog.
void slotDeveloperTools(bool enable);
void slotDeveloperToolsClosed();
void slotUpdateWindowTitle(TrackPointer pTrack);
void slotChangedPlayingDeck(int deck);
// Warn the user when inputs are not configured.
void slotNoMicrophoneInputConfigured();
void slotNoDeckPassthroughInputConfigured();
void slotNoVinylControlInputConfigured();
signals:
void newSkinLoaded();
// used to uncheck the menu when the dialog of develeoper tools is closed
void developerToolsDlgClosed(int r);
void closeDeveloperToolsDlgChecked(int r);
void fullScreenChanged(bool fullscreen);
protected:
// Event filter to block certain events (eg. tooltips if tooltips are disabled)
virtual bool eventFilter(QObject *obj, QEvent *event);
virtual void closeEvent(QCloseEvent *event);
virtual bool event(QEvent* e);
private:
void initialize(QApplication *app, const CmdlineArgs& args);
// progresses the launch image progress bar
// this must be called from the GUi thread only
void launchProgress(int progress);
void initializeWindow();
void initializeKeyboard();
void checkDirectRendering();
bool initializeDatabase();
bool confirmExit();
QDialog::DialogCode soundDeviceErrorDlg(
const QString &title, const QString &text, bool* retryClicked);
QDialog::DialogCode soundDeviceBusyDlg(bool* retryClicked);
QDialog::DialogCode soundDeviceErrorMsgDlg(
SoundDeviceError err, bool* retryClicked);
QDialog::DialogCode noOutputDlg(bool* continueClicked);
// Pointer to the root GUI widget
QWidget* m_pWidgetParent;
LaunchImage* m_pLaunchImage;
SettingsManager* m_pSettingsManager;
// The effects processing system
EffectsManager* m_pEffectsManager;
// The mixing engine.
EngineMaster* m_pEngine;
// The skin loader.
// TODO(rryan): doesn't need to be a member variable
SkinLoader* m_pSkinLoader;
// The sound manager
SoundManager* m_pSoundManager;
// Keeps track of players
PlayerManager* m_pPlayerManager;
// RecordingManager
RecordingManager* m_pRecordingManager;
#ifdef __BROADCAST__
BroadcastManager* m_pBroadcastManager;
#endif
ControllerManager* m_pControllerManager;
GuiTick* m_pGuiTick;
VinylControlManager* m_pVCManager;
KeyboardEventFilter* m_pKeyboard;
// The Mixxx database connection pool
mixxx::DbConnectionPoolPtr m_pDbConnectionPool;
// The library management object
Library* m_pLibrary;
WMainMenuBar* m_pMenuBar;
DlgDeveloperTools* m_pDeveloperToolsDlg;
/** Pointer to preference dialog */
DlgPreferences* m_pPrefDlg;
ConfigObject<ConfigValueKbd>* m_pKbdConfig;
ConfigObject<ConfigValueKbd>* m_pKbdConfigEmpty;
mixxx::TooltipsPreference m_toolTipsCfg;
// Timer that tracks how long Mixxx has been running.
Timer m_runtime_timer;
const CmdlineArgs& m_cmdLineArgs;
ControlPushButton* m_pTouchShift;
mixxx::ScreenSaverPreference m_inhibitScreensaver;
static const int kMicrophoneCount;
static const int kAuxiliaryCount;
};
#endif
|