GuiApplication.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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 BBEditor;
  32. class ControllerRackView;
  33. class FxMixerView;
  34. class MainWindow;
  35. class PianoRollWindow;
  36. class ProjectNotes;
  37. class SongEditorWindow;
  38. class LMMS_EXPORT GuiApplication : public QObject
  39. {
  40. Q_OBJECT;
  41. public:
  42. explicit GuiApplication();
  43. ~GuiApplication();
  44. static GuiApplication* instance();
  45. #ifdef LMMS_BUILD_WIN32
  46. static QFont getWin32SystemFont();
  47. #endif
  48. MainWindow* mainWindow() { return m_mainWindow; }
  49. FxMixerView* fxMixerView() { return m_fxMixerView; }
  50. SongEditorWindow* songEditor() { return m_songEditor; }
  51. BBEditor* getBBEditor() { return m_bbEditor; }
  52. PianoRollWindow* pianoRoll() { return m_pianoRoll; }
  53. ProjectNotes* getProjectNotes() { return m_projectNotes; }
  54. AutomationEditorWindow* automationEditor() { return m_automationEditor; }
  55. ControllerRackView* getControllerRackView() { return m_controllerRackView; }
  56. public slots:
  57. void displayInitProgress(const QString &msg);
  58. private slots:
  59. void childDestroyed(QObject *obj);
  60. private:
  61. static GuiApplication* s_instance;
  62. MainWindow* m_mainWindow;
  63. FxMixerView* m_fxMixerView;
  64. SongEditorWindow* m_songEditor;
  65. AutomationEditorWindow* m_automationEditor;
  66. BBEditor* m_bbEditor;
  67. PianoRollWindow* m_pianoRoll;
  68. ProjectNotes* m_projectNotes;
  69. ControllerRackView* m_controllerRackView;
  70. QLabel* m_loadingProgressLabel;
  71. };
  72. #define gui GuiApplication::instance()
  73. #endif // GUIAPPLICATION_H