Mixxx

/home/maxime/Projets/Mixxx/1.10/mixxx/src/mixxx.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           mixxx.h  -  description
00003                              -------------------
00004     begin                : Mon Feb 18 09:48:17 CET 2002
00005     copyright            : (C) 2002 by Tue and Ken Haste Andersen
00006     email                :
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef MIXXX_H
00019 #define MIXXX_H
00020 
00021 // include files for QT
00022 #include <qaction.h>
00023 #include <qdom.h>
00024 #include <qmenubar.h>
00025 #include <qtoolbutton.h>
00026 #include <qstring.h>
00027 #include <qstringlist.h>
00028 #include <qpixmap.h>
00029 #include <qprinter.h>
00030 #include <qpainter.h>
00031 #include <qpoint.h>
00032 #include <qapplication.h>
00033 #include <QList>
00034 //Added by qt3to4:
00035 #include <QFrame>
00036 #include <qstringlist.h>
00037 
00038 // application specific includes
00039 #include "defs.h"
00040 #include "trackinfoobject.h"
00041 #include "engine/enginemaster.h"
00042 #include "controlobject.h"
00043 #include "dlgpreferences.h"
00044 //#include "trackplaylist.h"
00045 #include "recording/recordingmanager.h"
00046 
00047 #ifdef __SCRIPT__
00048 #include "script/scriptengine.h"
00049 #endif
00050 
00051 class EngineMaster;
00052 class PlayerManager;
00053 class TrackInfoObject;
00054 class PlayerProxy;
00055 class BpmDetector;
00056 class QSplashScreen;
00057 class ScriptEngine;
00058 class Player;
00059 class LibraryScanner;
00060 class AnalyserQueue;
00061 class Library;
00062 class MidiDeviceManager;
00063 class MixxxKeyboard;
00064 class SkinLoader;
00065 
00066 class VinylControlManager;
00067 
00074 class MixxxApp : public QMainWindow
00075 {
00076     Q_OBJECT
00077 
00078   public:
00080     MixxxApp(QApplication *app, struct CmdlineArgs args);
00082     virtual ~MixxxApp();
00084     void initActions();
00086     void initMenuBar();
00088     bool queryExit();
00089 
00090     void rebootMixxxView();
00091 
00092   public slots:
00093 
00094     //void slotQuitFullScreen();
00096     void slotFileLoadSongPlayer1();
00098     void slotFileLoadSongPlayer2();
00100     void slotFileQuit();
00101 
00103     void slotOptionsBeatMark(bool toggle);
00105     void slotControlVinylControl(double toggle);
00106     void slotCheckboxVinylControl(bool toggle);
00107     void slotControlVinylControl2(double toggle);
00108     void slotCheckboxVinylControl2(bool toggle);
00110     void slotOptionsRecord(bool toggle);
00112     void slotOptionsFullScreen(bool toggle);
00114     void slotOptionsPreferences();
00116     void slotHelpAbout();
00118     void slotHelpSupport();
00119     // Visits a feedback form
00120     void slotHelpFeedback();
00121     // Open the manual.
00122     void slotHelpManual();
00123     // Visits translation interface on launchpad.net
00124     void slotHelpTranslation();
00126     //void slotChangePlay(int,int,int, const QPoint &);
00127 
00128     void slotlibraryMenuAboutToShow();
00130     void slotScanLibrary();
00132     void slotEnableRescanLibraryAction();
00134     void slotOptionsMenuShow();
00136     void slotOptionsShoutcast(bool value);
00137 
00138 
00139 
00140   protected:
00142     bool eventFilter(QObject *obj, QEvent *event);
00143     void closeEvent(QCloseEvent *event);
00144 
00145 
00146 
00147   private:
00148     void checkDirectRendering();
00149     bool confirmExit();
00150 
00151     // Pointer to the root GUI widget
00152     QWidget* m_pView;
00153     QWidget* m_pWidgetParent;
00154 
00155     QApplication *m_pApp;
00156 
00157     // The mixing engine.
00158     EngineMaster *m_pEngine;
00159 
00160     // The skin loader
00161     SkinLoader* m_pSkinLoader;
00162 
00163     // The sound manager
00164     SoundManager *m_pSoundManager;
00165 
00166     // Keeps track of players
00167     PlayerManager* m_pPlayerManager;
00168     // RecordingManager
00169     RecordingManager* m_pRecordingManager;
00170 
00171     MidiDeviceManager *m_pMidiDeviceManager;
00172 
00173     ConfigObject<ConfigValue> *m_pConfig;
00174 
00175     VinylControlManager *m_pVCManager;
00176 
00177     MixxxKeyboard* m_pKeyboard;
00179     LibraryScanner* m_pLibraryScanner;
00180     // The library management object
00181     Library* m_pLibrary;
00182 
00184     QMenu *m_pFileMenu;
00186     QMenu *m_pEditMenu;
00188     QMenu *m_pLibraryMenu;
00190     QMenu *m_pOptionsMenu;
00192     QMenu *m_pViewMenu;
00194     QMenu *m_pHelpMenu;
00195 
00196 #ifdef __SCRIPT__
00197     QMenu *macroMenu;
00198 #endif
00199 
00200     QAction *m_pFileLoadSongPlayer1;
00201     QAction *m_pFileLoadSongPlayer2;
00202     QAction *m_pFileQuit;
00203 
00204     QAction *m_pPlaylistsNew;
00205     QAction *m_pCratesNew;
00206     QAction *m_pPlaylistsImport;
00207     QAction **m_pPlaylistsList;
00208 
00209     QAction *m_pBatchBpmDetect;
00210 
00211     QAction *m_pLibraryRescan;
00212 
00213     QAction *m_pOptionsBeatMark;
00214 
00215 #ifdef __VINYLCONTROL__
00216     QMenu *m_pVinylControlMenu;
00217     QAction *m_pOptionsVinylControl;
00218     QAction *m_pOptionsVinylControl2;
00219 #endif
00220     QAction *m_pOptionsRecord;
00221     QAction *m_pOptionsFullScreen;
00222     QAction *m_pOptionsPreferences;
00223 #ifdef __SHOUTCAST__
00224     QAction *m_pOptionsShoutcast;
00225 #endif
00226 
00227     QAction *m_pHelpAboutApp;
00228     QAction *m_pHelpSupport;
00229     QAction *m_pHelpFeedback;
00230     QAction *m_pHelpTranslation;
00231     QAction *m_pHelpManual;
00232 #ifdef __SCRIPT__
00233     QAction *macroStudio;
00234 #endif
00235     int m_iNoPlaylists;
00236 
00238     DlgPreferences *m_pPrefDlg;
00239 
00240 #ifdef __SCRIPT__
00241     ScriptEngine *scriptEng;
00242 #endif
00243 
00244     int noSoundDlg(void);
00245     int noOutputDlg(bool *continueClicked);
00246     // Fullscreen patch
00247     QPoint m_winpos;
00248     bool m_NativeMenuBarSupport;
00249 };
00250 
00251 //A structure to store the parsed command-line arguments
00252 struct CmdlineArgs
00253 {
00254     QList<QString> qlMusicFiles;    /* List of files to load into players at startup */
00255     bool bStartInFullscreen;        /* Start in fullscreen mode */
00256     QString locale;
00257 };
00258 
00259 
00260 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines