One Property Tree (#500)

* Organize properties in one single property tree
* Update scenes to work with one property tree. Fix documentation issues.
This commit is contained in:
Emil Axelsson
2018-03-06 16:59:06 +01:00
committed by GitHub
parent ebd69d1333
commit 4675554471
53 changed files with 527 additions and 603 deletions
@@ -62,7 +62,9 @@ public:
static const std::string KeyLuaDocumentation;
/// The key that stores the scripting log
static const std::string KeyScriptLog;
/// The key that stores the Property documentation
/// The key that stores the Scene Property documentation
static const std::string KeyScenePropertyDocumentation;
/// The key that stores the Root Property documentation
static const std::string KeyPropertyDocumentation;
/// The key that stores the keyboard bindings that should be stored
static const std::string KeyKeyboardShortcuts;
+4 -1
View File
@@ -28,6 +28,7 @@
#include <memory>
#include <vector>
#include <openspace/properties/propertyowner.h>
#include <openspace/util/openspacemodule.h>
#include <ghoul/misc/assert.h>
@@ -47,8 +48,10 @@ namespace scripting { struct LuaLibrary; }
* Additional OpenSpaceModule%s can be registered with the #registerModule function, which
* will internally call the OpenSpaceModule::initialize method.
*/
class ModuleEngine {
class ModuleEngine : public properties::PropertyOwner {
public:
ModuleEngine();
/**
* Registers all of the OpenSpaceModule%s which are created by the CMake configuration
* and stored in the <code>moduleregistration.h</code> file. For all of those modules
+3 -4
View File
@@ -55,7 +55,6 @@ class ParallelConnection;
class RenderEngine;
class Scene;
class SyncEngine;
class SettingsEngine;
class TimeManager;
class VirtualPropertyManager;
class WindowWrapper;
@@ -131,12 +130,12 @@ public:
NetworkEngine& networkEngine();
ParallelConnection& parallelConnection();
RenderEngine& renderEngine();
SettingsEngine& settingsEngine();
TimeManager& timeManager();
WindowWrapper& windowWrapper();
ghoul::fontrendering::FontManager& fontManager();
interaction::NavigationHandler& navigationHandler();
interaction::KeyBindingManager& keyBindingManager();
properties::PropertyOwner& rootPropertyOwner();
properties::PropertyOwner& globalPropertyOwner();
scripting::ScriptEngine& scriptEngine();
scripting::ScriptScheduler& scriptScheduler();
@@ -215,7 +214,6 @@ private:
std::unique_ptr<NetworkEngine> _networkEngine;
std::unique_ptr<ParallelConnection> _parallelConnection;
std::unique_ptr<RenderEngine> _renderEngine;
std::unique_ptr<SettingsEngine> _settingsEngine;
std::unique_ptr<SyncEngine> _syncEngine;
std::unique_ptr<TimeManager> _timeManager;
std::unique_ptr<WindowWrapper> _windowWrapper;
@@ -229,7 +227,8 @@ private:
std::unique_ptr<VirtualPropertyManager> _virtualPropertyManager;
// Others
std::unique_ptr<properties::PropertyOwner> _globalPropertyNamespace;
std::unique_ptr<properties::PropertyOwner> _rootPropertyOwner;
std::unique_ptr<properties::PropertyOwner> _globalPropertyOwner;
std::unique_ptr<LoadingScreen> _loadingScreen;
-54
View File
@@ -1,54 +0,0 @@
/*****************************************************************************************
* *
* OpenSpace *
* *
* Copyright (c) 2014-2018 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
* without restriction, including without limitation the rights to use, copy, modify, *
* merge, publish, distribute, sublicense, and/or sell copies of the Software, and to *
* permit persons to whom the Software is furnished to do so, subject to the following *
* conditions: *
* *
* The above copyright notice and this permission notice shall be included in all copies *
* or substantial portions of the Software. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A *
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT *
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF *
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE *
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#ifndef __OPENSPACE_CORE___SETTINGSENGINE___H__
#define __OPENSPACE_CORE___SETTINGSENGINE___H__
#include <openspace/properties/propertyowner.h>
#include <openspace/properties/optionproperty.h>
#include <openspace/properties/scalar/boolproperty.h>
#include <openspace/properties/scalar/floatproperty.h>
#include <vector>
namespace openspace {
class OpenSpaceModule;
class SettingsEngine : public properties::PropertyOwner {
public:
SettingsEngine();
void initialize();
void setModules(const std::vector<OpenSpaceModule*>& modules);
private:
properties::OptionProperty _scenes;
};
} // namespace openspace
#endif // __OPENSPACE_CORE___SETTINGSENGINE___H__