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 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235
|
/***************************************************************************
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 <QAction>
#include <QList>
#include <QMainWindow>
#include <QString>
#include <QDir>
// REMOVE ME
#include <QtDebug>
#include <QResizeEvent>
class EngineMaster;
class Library;
class LibraryScanner;
class ControllerManager;
class MixxxKeyboard;
class PlayerManager;
class RecordingManager;
class SkinLoader;
class VinylControlManager;
class DlgPreferences;
class SoundManager;
#include "configobject.h"
#include "util/cmdlineargs.h"
#include "util/timer.h"
/**
* 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 MixxxApp : public QMainWindow {
Q_OBJECT
public:
/** Construtor. files is a list of command line arguments */
MixxxApp(QApplication *app, const CmdlineArgs& args);
virtual ~MixxxApp();
/** initializes all QActions of the application */
void initActions();
/** initMenuBar creates the menu_bar and inserts the menuitems */
void initMenuBar();
void resizeEvent(QResizeEvent *e) { qDebug() << "resize" << e->size();}
void setToolTips(int tt);
void rebootMixxxView();
public slots:
//void slotQuitFullScreen();
void slotFileLoadSongPlayer(int deck);
/** Opens a file in player 1 */
void slotFileLoadSongPlayer1();
/** Opens a file in player 2 */
void slotFileLoadSongPlayer2();
/** exits the application */
void slotFileQuit();
/** toggle vinyl control - Don't #ifdef this because MOC is dumb**/
void slotControlVinylControl(double toggle);
void slotCheckboxVinylControl(bool toggle);
void slotControlVinylControl2(double toggle);
void slotCheckboxVinylControl2(bool toggle);
/** toggle recording - Don't #ifdef this because MOC is dumb**/
void slotOptionsRecord(bool toggle);
/** toogle keyboard on-off */
void slotOptionsKeyboard(bool toggle);
/** Preference dialog */
void slotOptionsPreferences();
/** shows an about dlg*/
void slotHelpAbout();
/** visits support section of website*/
void slotHelpSupport();
// Visits a feedback form
void slotHelpFeedback();
// Open the manual.
void slotHelpManual();
// Visits translation interface on launchpad.net
void slotHelpTranslation();
/** Scan or rescan the music library directory */
void slotScanLibrary();
/** Enables the "Rescan Library" menu item. This gets disabled when a scan is running.*/
void slotEnableRescanLibraryAction();
/**Updates the checkboxes for Recording and Livebroadcasting when connection drops, or lame is not available **/
void slotOptionsMenuShow();
/** toggles Livebroadcasting **/
void slotOptionsShoutcast(bool value);
/** toogle on-screen widget visibility */
void slotViewShowSamplers(bool);
void slotViewShowVinylControl(bool);
void slotViewShowMicrophone(bool);
void slotViewShowPreviewDeck(bool);
/** toogle full screen mode */
void slotViewFullScreen(bool toggle);
// Reload the skin.
void slotDeveloperReloadSkin(bool toggle);
void slotToCenterOfPrimaryScreen();
void onNewSkinLoaded();
void slotSyncControlSystem();
signals:
void newSkinLoaded();
protected:
/** Event filter to block certain events (eg. tooltips if tooltips are disabled) */
bool eventFilter(QObject *obj, QEvent *event);
void closeEvent(QCloseEvent *event);
private:
void checkDirectRendering();
bool confirmExit();
// Pointer to the root GUI widget
QWidget* m_pView;
QWidget* m_pWidgetParent;
// The mixing engine.
EngineMaster *m_pEngine;
// The skin loader
SkinLoader* m_pSkinLoader;
// The sound manager
SoundManager *m_pSoundManager;
// Keeps track of players
PlayerManager* m_pPlayerManager;
// RecordingManager
RecordingManager* m_pRecordingManager;
ControllerManager *m_pControllerManager;
ConfigObject<ConfigValue> *m_pConfig;
VinylControlManager *m_pVCManager;
MixxxKeyboard* m_pKeyboard;
/** Library scanner object */
LibraryScanner* m_pLibraryScanner;
// The library management object
Library* m_pLibrary;
/** file_menu contains all items of the menubar entry "File" */
QMenu *m_pFileMenu;
/** edit_menu contains all items of the menubar entry "Edit" */
QMenu *m_pEditMenu;
/** library menu */
QMenu *m_pLibraryMenu;
/** options_menu contains all items of the menubar entry "Options" */
QMenu *m_pOptionsMenu;
/** view_menu contains all items of the menubar entry "View" */
QMenu *m_pViewMenu;
/** view_menu contains all items of the menubar entry "Help" */
QMenu *m_pHelpMenu;
// Developer options.
QMenu* m_pDeveloperMenu;
QAction *m_pFileLoadSongPlayer1;
QAction *m_pFileLoadSongPlayer2;
QAction *m_pFileQuit;
QAction *m_pPlaylistsNew;
QAction *m_pCratesNew;
QAction *m_pLibraryRescan;
#ifdef __VINYLCONTROL__
QMenu *m_pVinylControlMenu;
QAction *m_pOptionsVinylControl;
QAction *m_pOptionsVinylControl2;
#endif
QAction *m_pOptionsRecord;
QAction *m_pOptionsKeyboard;
QAction *m_pOptionsPreferences;
#ifdef __SHOUTCAST__
QAction *m_pOptionsShoutcast;
#endif
QAction *m_pViewShowSamplers;
QAction *m_pViewVinylControl;
QAction *m_pViewShowMicrophone;
QAction *m_pViewShowPreviewDeck;
QAction *m_pViewFullScreen;
QAction *m_pHelpAboutApp;
QAction *m_pHelpSupport;
QAction *m_pHelpFeedback;
QAction *m_pHelpTranslation;
QAction *m_pHelpManual;
QAction *m_pDeveloperReloadSkin;
int m_iNoPlaylists;
/** Pointer to preference dialog */
DlgPreferences *m_pPrefDlg;
int noSoundDlg(void);
int noOutputDlg(bool *continueClicked);
// Fullscreen patch
QPoint m_winpos;
bool m_NativeMenuBarSupport;
ConfigObject<ConfigValueKbd>* m_pKbdConfig;
ConfigObject<ConfigValueKbd>* m_pKbdConfigEmpty;
int m_tooltips; //0=OFF, 1=ON, 2=ON (only in Library)
// Timer that tracks how long Mixxx has been running.
Timer m_runtime_timer;
const CmdlineArgs& m_cmdLineArgs;
};
#endif
|