Merge branch 'gui_application' into ed_refac

Conflicts:
	src/core/Song.cpp
	src/gui/MainWindow.cpp
This commit is contained in:
Lukas W
2015-01-07 00:03:32 +01:00
48 changed files with 436 additions and 345 deletions

View File

@@ -34,7 +34,7 @@
class AboutDialog : public QDialog, public Ui::AboutDialog
{
public:
AboutDialog( void );
AboutDialog(QWidget* parent=0);
} ;

View File

@@ -97,42 +97,6 @@ public:
return s_projectJournal;
}
// GUI
static MainWindow * mainWindow()
{
return s_mainWindow;
}
static FxMixerView * fxMixerView()
{
return s_fxMixerView;
}
static SongEditorWindow* songEditor()
{
return s_songEditor;
}
static BBEditor * getBBEditor()
{
return s_bbEditor;
}
static PianoRollWindow* pianoRoll()
{
return s_pianoRoll;
}
static ProjectNotes * getProjectNotes()
{
return s_projectNotes;
}
static AutomationEditorWindow * automationEditor()
{
return s_automationEditor;
}
static Ladspa2LMMS * getLADSPAManager()
{
return s_ladspaManager;
@@ -143,11 +107,6 @@ public:
return s_dummyTC;
}
static ControllerRackView * getControllerRackView()
{
return s_controllerRackView;
}
static float framesPerTick()
{
return s_framesPerTick;
@@ -182,22 +141,14 @@ private:
static BBTrackContainer * s_bbTrackContainer;
static ProjectJournal * s_projectJournal;
static DummyTrackContainer * s_dummyTC;
static ControllerRackView * s_controllerRackView;
// GUI
static MainWindow * s_mainWindow;
static FxMixerView * s_fxMixerView;
static SongEditorWindow* s_songEditor;
static AutomationEditorWindow * s_automationEditor;
static BBEditor * s_bbEditor;
static PianoRollWindow* s_pianoRoll;
static ProjectNotes * s_projectNotes;
static Ladspa2LMMS * s_ladspaManager;
static QMap<QString, QString> s_pluginFileHandling;
static void initPluginFileHandling();
friend class GuiApplication;
} ;

71
include/GuiApplication.h Normal file
View File

@@ -0,0 +1,71 @@
/*
* GuiApplication.h
*
* Copyright (c) 2014 Lukas W <lukaswhl/at/gmail.com>
*
* This file is part of LMMS - http://lmms.io
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this program (see COPYING); if not, write to the
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
*/
#ifndef GUIAPPLICATION_H
#define GUIAPPLICATION_H
#include "export.h"
class AutomationEditorWindow;
class BBEditor;
class ControllerRackView;
class FxMixerView;
class MainWindow;
class PianoRollWindow;
class ProjectNotes;
class SongEditorWindow;
class EXPORT GuiApplication
{
public:
explicit GuiApplication();
~GuiApplication();
static GuiApplication* instance();
MainWindow* mainWindow() { return m_mainWindow; }
FxMixerView* fxMixerView() { return m_fxMixerView; }
SongEditorWindow* songEditor() { return m_songEditor; }
BBEditor* getBBEditor() { return m_bbEditor; }
PianoRollWindow* pianoRoll() { return m_pianoRoll; }
ProjectNotes* getProjectNotes() { return m_projectNotes; }
AutomationEditorWindow* automationEditor() { return m_automationEditor; }
ControllerRackView* getControllerRackView() { return m_controllerRackView; }
private:
static GuiApplication* s_instance;
MainWindow* m_mainWindow;
FxMixerView* m_fxMixerView;
SongEditorWindow* m_songEditor;
AutomationEditorWindow* m_automationEditor;
BBEditor* m_bbEditor;
PianoRollWindow* m_pianoRoll;
ProjectNotes* m_projectNotes;
ControllerRackView* m_controllerRackView;
};
#define gui GuiApplication::instance()
#endif // GUIAPPLICATION_H

View File

@@ -178,7 +178,7 @@ private:
QList<QString>* m_errors;
friend class Engine;
friend class GuiApplication;
private slots: