Browse Source

Add preset todo in SettingsLoader

master
Krisjanis Rijnieks 9 years ago
parent
commit
e3f67a3067
  1. 6
      src/Application/SettingsLoader.cpp
  2. 6
      src/Surfaces/SurfaceManager.h
  3. 7
      src/Surfaces/SurfaceStack.h

6
src/Application/SettingsLoader.cpp

@ -29,6 +29,12 @@ bool SettingsLoader::load(SurfaceStack & surfaces, MediaServer & mediaServer, st
return false;
}
/* TODO: Add presets.
* Presets would be surface groups. Now we are using a single <surfaces> tag
* to store only one possible composition. We can multiply the <surfaces> container
* in order to get presets working.
*/
if(!xmlSettings->tagExists("surfaces")){
ofLogWarning("SettingsLoader::load()") << "XML settings is empty or has wrong markup";
return false;

6
src/Surfaces/SurfaceManager.h

@ -21,6 +21,12 @@ namespace piMapper {
class SurfaceManager {
/* TODO: Add presets.
* This would be solved by adding multiple SurfaceStack instances. Depending on selected
* preset, it would draw and operate on a a specific surface stack. SurfaceManager would
* become kind of a state machine.
*/
public:
SurfaceManager();

7
src/Surfaces/SurfaceStack.h

@ -6,9 +6,10 @@
namespace ofx {
namespace piMapper {
// One can imagine this as a layers panel in an image editor.
// TODO: Make it singleton for easy access from commands.
// And refactor rest of the code to use it this way.
/* TODO: Do not use singleton here.
* For presets we need multiple instances of surface stacks.
*/
class SurfaceStack {
public:
static SurfaceStack * instance();

Loading…
Cancel
Save