GuiApplication.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. #ifndef GUIAPPLICATION_H
  25. #define GUIAPPLICATION_H
  26. #include <QtCore/QObject>
  27. #include "lmms_export.h"
  28. #include "lmmsconfig.h"
  29. class QLabel;
  30. class AutomationEditorWindow;
  31. class ControllerRackView;
  32. class MixerView;
  33. class MainWindow;
  34. class MicrotunerConfig;
  35. class PatternEditorWindow;
  36. class PianoRollWindow;
  37. class ProjectNotes;
  38. class SongEditorWindow;
  39. class LMMS_EXPORT GuiApplication : public QObject
  40. {
  41. Q_OBJECT;
  42. public:
  43. explicit GuiApplication();
  44. ~GuiApplication();
  45. static GuiApplication* instance();
  46. #ifdef LMMS_BUILD_WIN32
  47. static QFont getWin32SystemFont();
  48. #endif
  49. MainWindow* mainWindow() { return m_mainWindow; }
  50. MixerView* mixerView() { return m_mixerView; }
  51. SongEditorWindow* songEditor() { return m_songEditor; }
  52. PatternEditorWindow* patternEditor() { return m_patternEditor; }
  53. PianoRollWindow* pianoRoll() { return m_pianoRoll; }
  54. ProjectNotes* getProjectNotes() { return m_projectNotes; }
  55. MicrotunerConfig* getMicrotunerConfig() { return m_microtunerConfig; }
  56. AutomationEditorWindow* automationEditor() { return m_automationEditor; }
  57. ControllerRackView* getControllerRackView() { return m_controllerRackView; }
  58. public slots:
  59. void displayInitProgress(const QString &msg);
  60. private slots:
  61. void childDestroyed(QObject *obj);
  62. private:
  63. static GuiApplication* s_instance;
  64. MainWindow* m_mainWindow;
  65. MixerView* m_mixerView;
  66. SongEditorWindow* m_songEditor;
  67. AutomationEditorWindow* m_automationEditor;
  68. PatternEditorWindow* m_patternEditor;
  69. PianoRollWindow* m_pianoRoll;
  70. ProjectNotes* m_projectNotes;
  71. MicrotunerConfig* m_microtunerConfig;
  72. ControllerRackView* m_controllerRackView;
  73. QLabel* m_loadingProgressLabel;
  74. };
  75. // Short-hand function
  76. LMMS_EXPORT GuiApplication* getGUI();
  77. #endif // GUIAPPLICATION_H