1 /* 2 * GuiApplication.h 3 * 4 * Copyright (c) 2014 Lukas W <lukaswhl/at/gmail.com> 5 * 6 * This file is part of LMMS - https://lmms.io 7 * 8 * This program is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU General Public 10 * License as published by the Free Software Foundation; either 11 * version 2 of the License, or (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 * General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public 19 * License along with this program (see COPYING); if not, write to the 20 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 21 * Boston, MA 02110-1301 USA. 22 * 23 */ 24 25 #ifndef GUIAPPLICATION_H 26 #define GUIAPPLICATION_H 27 28 #include <QtCore/QObject> 29 30 #include "export.h" 31 32 class QLabel; 33 34 class AutomationEditorWindow; 35 class BBEditor; 36 class ControllerRackView; 37 class FxMixerView; 38 class MainWindow; 39 class PianoRollWindow; 40 class ProjectNotes; 41 class SongEditorWindow; 42 43 class EXPORT GuiApplication : public QObject 44 { 45 Q_OBJECT; 46 public: 47 explicit GuiApplication(); 48 ~GuiApplication(); 49 50 static GuiApplication* instance(); 51 mainWindow()52 MainWindow* mainWindow() { return m_mainWindow; } fxMixerView()53 FxMixerView* fxMixerView() { return m_fxMixerView; } songEditor()54 SongEditorWindow* songEditor() { return m_songEditor; } getBBEditor()55 BBEditor* getBBEditor() { return m_bbEditor; } pianoRoll()56 PianoRollWindow* pianoRoll() { return m_pianoRoll; } getProjectNotes()57 ProjectNotes* getProjectNotes() { return m_projectNotes; } automationEditor()58 AutomationEditorWindow* automationEditor() { return m_automationEditor; } getControllerRackView()59 ControllerRackView* getControllerRackView() { return m_controllerRackView; } 60 61 public slots: 62 void displayInitProgress(const QString &msg); 63 64 private slots: 65 void childDestroyed(QObject *obj); 66 67 private: 68 static GuiApplication* s_instance; 69 70 MainWindow* m_mainWindow; 71 FxMixerView* m_fxMixerView; 72 SongEditorWindow* m_songEditor; 73 AutomationEditorWindow* m_automationEditor; 74 BBEditor* m_bbEditor; 75 PianoRollWindow* m_pianoRoll; 76 ProjectNotes* m_projectNotes; 77 ControllerRackView* m_controllerRackView; 78 QLabel* m_loadingProgressLabel; 79 }; 80 81 #define gui GuiApplication::instance() 82 83 #endif // GUIAPPLICATION_H 84