Struct LayoutLoader

Inheritance Relationships

Base Type

Struct Documentation

struct SmartPeak::LayoutLoader : public SmartPeak::IApplicationProcessorObserver

This class aims at loading and saving ui layout. As UI must be constructed before to load the layout, It will detect that a session has been loaded to then load the layout from the session file. The saving is actually not an issue as the UI is already constructed, but for consistency and simplicity, this class also handle it the same way.

Public Functions

LayoutLoader(ApplicationHandler &application_handler)
virtual void onApplicationProcessorStart(const std::vector<std::string> &commands) override

IApplicationProcessorObserver

virtual void onApplicationProcessorCommandStart(size_t command_index, const std::string &command_name) override
virtual void onApplicationProcessorCommandEnd(size_t command_index, const std::string &command_name) override
virtual void onApplicationProcessorEnd() override
virtual void onApplicationProcessorError(const std::string &error) override
void process()

will load / save the layout if the session has just been loaded (to call once ui is ready to be setup).

Public Members

std::vector<IPropertiesHandler*> properties_handlers_

Protected Attributes

bool session_loaded_ = false
bool loading_session_ = false
bool session_saved_ = false
bool saving_session_ = false
ApplicationHandler &application_handler_