create a global ResourcesDB instance
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1857 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -43,6 +43,7 @@ class mainWindow;
|
||||
class mixer;
|
||||
class pianoRoll;
|
||||
class projectNotes;
|
||||
class ResourcesDB;
|
||||
class song;
|
||||
class songEditor;
|
||||
class ladspa2LMMS;
|
||||
@@ -96,6 +97,11 @@ public:
|
||||
return( s_projectJournal );
|
||||
}
|
||||
|
||||
static ResourcesDB * getResourcesDB( void )
|
||||
{
|
||||
return( s_resourcesDB );
|
||||
}
|
||||
|
||||
// GUI
|
||||
static mainWindow * getMainWindow( void )
|
||||
{
|
||||
@@ -168,6 +174,7 @@ private:
|
||||
static mixer * s_mixer;
|
||||
static fxMixer * s_fxMixer;
|
||||
static song * s_song;
|
||||
static ResourcesDB * s_resourcesDB;
|
||||
static bbTrackContainer * s_bbTrackContainer;
|
||||
static projectJournal * s_projectJournal;
|
||||
static dummyTrackContainer * s_dummyTC;
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <QtCore/QDir>
|
||||
|
||||
#include "engine.h"
|
||||
#include "automation_editor.h"
|
||||
@@ -41,6 +42,7 @@
|
||||
#include "preset_preview_play_handle.h"
|
||||
#include "project_journal.h"
|
||||
#include "project_notes.h"
|
||||
#include "resources_db.h"
|
||||
#include "song_editor.h"
|
||||
#include "song.h"
|
||||
|
||||
@@ -54,6 +56,7 @@ fxMixerView * engine::s_fxMixerView = NULL;
|
||||
mainWindow * engine::s_mainWindow = NULL;
|
||||
bbTrackContainer * engine::s_bbTrackContainer = NULL;
|
||||
song * engine::s_song = NULL;
|
||||
ResourcesDB * engine::s_resourcesDB = NULL;
|
||||
songEditor * engine::s_songEditor = NULL;
|
||||
automationEditor * engine::s_automationEditor = NULL;
|
||||
bbEditor * engine::s_bbEditor = NULL;
|
||||
@@ -77,6 +80,9 @@ void engine::init( const bool _has_gui )
|
||||
s_projectJournal = new projectJournal;
|
||||
s_mixer = new mixer;
|
||||
s_song = new song;
|
||||
s_resourcesDB = new ResourcesDB( configManager::inst()->workingDir() +
|
||||
QDir::separator() +
|
||||
".resourcesdb.xml" );
|
||||
s_fxMixer = new fxMixer;
|
||||
s_bbTrackContainer = new bbTrackContainer;
|
||||
|
||||
@@ -151,6 +157,9 @@ void engine::destroy( void )
|
||||
delete s_song;
|
||||
s_song = NULL;
|
||||
|
||||
delete s_resourcesDB;
|
||||
s_resourcesDB = NULL;
|
||||
|
||||
delete configManager::inst();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user