2024-11-22 15:11:48 +00:00
|
|
|
#include "app/Application.h"
|
|
|
|
|
|
|
|
#include "common/RecourceHelper.h"
|
|
|
|
#include "workspace/WorkSpaceManager.h"
|
|
|
|
#include "entities/EntitiesManager.h"
|
|
|
|
#include "viewer/OsgViewer.h"
|
|
|
|
#include "scene/MeshManager.h"
|
|
|
|
#include "network/NetDriver.h"
|
2024-12-12 00:23:16 +00:00
|
|
|
#include "python/PythonModule.h"
|
2024-11-22 15:11:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
Application::Application(int& argc, char** argv, int /*= ApplicationFlags*/)
|
|
|
|
: QApplication(argc, argv) {
|
|
|
|
|
|
|
|
Init();
|
|
|
|
}
|
|
|
|
|
|
|
|
Application::~Application() {
|
|
|
|
Uninit();
|
|
|
|
}
|
|
|
|
|
|
|
|
QString Application::GetWorkSpacePath() {
|
|
|
|
const QString path = QString("%1/workspace").arg(applicationDirPath());
|
|
|
|
return path;
|
|
|
|
}
|
|
|
|
|
|
|
|
void Application::Init() {
|
|
|
|
Singleton<MeshManager>::Create(this);
|
|
|
|
Singleton<OsgViewer>::Create(this);
|
|
|
|
Singleton<RecourceHelper>::Create(this);
|
|
|
|
Singleton<EntitiesManager>::Create(this);
|
|
|
|
Singleton<WorkSpaceManager>::Create(this);
|
|
|
|
Singleton<NetDriver>::Create(this);
|
2024-12-16 16:06:46 +00:00
|
|
|
//Singleton<PythonModule>::Create(this);
|
2024-11-22 15:11:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void Application::Uninit() {
|
2024-12-16 16:06:46 +00:00
|
|
|
//Singleton<PythonModule>::Destory();
|
2024-11-22 15:11:48 +00:00
|
|
|
Singleton<NetDriver>::Destory();
|
|
|
|
Singleton<WorkSpaceManager>::Destory();
|
|
|
|
Singleton<EntitiesManager>::Destory();
|
|
|
|
Singleton<RecourceHelper>::Destory();
|
|
|
|
Singleton<OsgViewer>::Destory();
|
|
|
|
Singleton<MeshManager>::Destory();
|
|
|
|
}
|