GuiApplication.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. class QLabel;
  29. class AutomationEditorWindow;
  30. class BBEditor;
  31. class ControllerRackView;
  32. class FxMixerView;
  33. class GrooveView;
  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. MainWindow* mainWindow() { return m_mainWindow; }
  46. FxMixerView* fxMixerView() { return m_fxMixerView; }
  47. GrooveView* grooveView() { return m_grooveView; }
  48. SongEditorWindow* songEditor() { return m_songEditor; }
  49. BBEditor* getBBEditor() { return m_bbEditor; }
  50. PianoRollWindow* pianoRoll() { return m_pianoRoll; }
  51. ProjectNotes* getProjectNotes() { return m_projectNotes; }
  52. AutomationEditorWindow* automationEditor() { return m_automationEditor; }
  53. ControllerRackView* getControllerRackView() { return m_controllerRackView; }
  54. public slots:
  55. void displayInitProgress(const QString &msg);
  56. private slots:
  57. void childDestroyed(QObject *obj);
  58. private:
  59. static GuiApplication* s_instance;
  60. MainWindow* m_mainWindow;
  61. FxMixerView* m_fxMixerView;
  62. GrooveView* m_grooveView;
  63. SongEditorWindow* m_songEditor;
  64. AutomationEditorWindow* m_automationEditor;
  65. BBEditor* m_bbEditor;
  66. PianoRollWindow* m_pianoRoll;
  67. ProjectNotes* m_projectNotes;
  68. ControllerRackView* m_controllerRackView;
  69. QLabel* m_loadingProgressLabel;
  70. };
  71. #define gui GuiApplication::instance()
  72. #endif // GUIAPPLICATION_H