#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" #include "python/PythonModule.h" Application::Application(int& argc, char** argv, int /*= ApplicationFlags*/) : QApplication(argc, argv) { Init(); } Application::~Application() { } QString Application::GetWorkSpacePath() { const QString path = QString("%1/workspace").arg(applicationDirPath()); return path; } QString Application::GetBinPath() { return applicationDirPath(); } void Application::Init() { Singleton::Create(this); Singleton::Create(this); Singleton::Create(this); Singleton::Create(this); Singleton::Create(this); //Singleton::Create(this); connect(&timer_, &QTimer::timeout, this, &Application::OnTimeout); timer_.start(1000 / 60); // 60 FPS } void Application::OnTimeout() { WorkSpaceManager::Get().OnFrame(); } void Application::Uninit() { //Singleton::Destory(); Singleton::Destory(); Singleton::Destory(); Singleton::Destory(); Singleton::Destory(); Singleton::Destory(); }