|
Omnidome
Fulldome Mapping Software Toolkit
|
Generic input interface. More...
#include <Interface.h>


Public Types | |
| typedef Interface | interface_type |
| typedef std::vector< Interface const * > | inputlist_type |
| typedef std::map< QString, std::unique_ptr< Interface > > | container_type |
| typedef std::function< void()> | callback_type |
| typedef std::set< QString > | categoryset_type |
Public Member Functions | |
| Interface (Interface const *_parent=nullptr) | |
| virtual | ~Interface () |
| Virtual destructor. More... | |
| virtual GLuint | textureId () const =0 |
| An input must return an OpenGL texture ID. More... | |
| virtual void | update () |
| Update interface. More... | |
| virtual QSize | size () const =0 |
| An input must return width and height information. More... | |
| size_t | numberOfChildren () const |
| int | width () const |
| Return width from size. More... | |
| int | height () const |
| Return height from size. More... | |
| virtual categoryset_type | categories () const |
| Input can have a fixed set of categories. More... | |
| QString | infoText () const |
| Optional info text. More... | |
| virtual QWidget * | widget () |
| Make new parameter widget. More... | |
| virtual QWidget * | controlWidget () |
| Make new large control widget for live mode. More... | |
| virtual bool | canAdd () |
| Returns true if this input can be added E.g., an input can be added after an initial settings dialog was approved or it has valid settings. More... | |
| virtual bool | canHaveChildren () const |
| int | setUpdateCallback (callback_type _updatedCallback) |
| Insert a new callback when input has updated and returns its unique id. More... | |
| callback_type | updatedCallback (int _id) |
| void | triggerUpdateCallbacks () const |
| void | removeUpdateCallback (int _id) |
| Interface * | addInput (QString const &_id, Id const &_typeId) |
| Add new input with given type id. Returns nullptr if input with typeid does not exist. More... | |
| Interface * | addInput (QString const &_id, Interface *_i) |
| Input with id and return pointer to input when successfully added. More... | |
| QString | getId (Interface const *) const |
| Get id of child interface. More... | |
| virtual void | removeInput (QString const &_id) |
| Remove input with id. More... | |
| Interface * | getInput (QString const &_id) |
| Return pointer of input with id, nullptr if input does not exist. More... | |
| Interface const * | getInput (QString const &_id) const |
| Return pointer of input with id, nullptr if input does not exist. More... | |
| container_type const & | children () const |
| Return children. More... | |
| Interface const * | parent () const |
| Return parent interface (const version) More... | |
| QString | path () const |
| Return absolute path of interface. More... | |
| void | setParent (Interface *) |
| Set new parent. More... | |
| virtual void | toPropertyMap (PropertyMap &) const |
| Serialize to property map. More... | |
| virtual void | fromPropertyMap (PropertyMap const &) |
| Deserialize from property map. More... | |
| inputlist_type | getAllInputs () const |
| Returns a list of input maintained by controller, except this one. More... | |
Public Member Functions inherited from omni::TypeIdInterface | |
| virtual | ~TypeIdInterface () |
| virtual Id | getTypeId () const =0 |
| Returns type id of object. More... | |
| virtual void | registerInFactory () const =0 |
| Register the inherited class in factory. More... | |
Private Member Functions | |
| virtual void | activate () |
| virtual void | deactivate () |
| void | getInputsRecurse (Interface const *_root, inputlist_type &_list, bool _excludeThis=true) const |
| int | genCallbackId () const |
Private Attributes | |
| Interface const * | parent_ = nullptr |
| std::map< int, callback_type > | updatedCallbacks_ |
Friends | |
| class | Controller |
Generic input interface.
| typedef std::function<void ()> omni::input::Interface::callback_type |
| typedef std::set<QString> omni::input::Interface::categoryset_type |
| typedef std::map<QString, std::unique_ptr<Interface> > omni::input::Interface::container_type |
| typedef std::vector<Interface const*> omni::input::Interface::inputlist_type |
| omni::input::Interface::Interface | ( | Interface const * | _parent = nullptr | ) |
|
virtual |
Virtual destructor.
Removing input from global controller also deactivates it
Add new input with given type id. Returns nullptr if input with typeid does not exist.
| _id | Id for the input |
| _typeId | Type id of input to determine which kind of input is created |
|
inlinevirtual |
|
inlinevirtual |
Reimplemented in omni::input::List.
|
inlinevirtual |
Input can have a fixed set of categories.
Reimplemented in omni::input::TestImage.
| Interface::container_type const & omni::input::Interface::children | ( | ) | const |
|
inlinevirtual |
|
virtual |
Deserialize from property map.
Deserialize from stream.
Reimplemented in omni::input::List, omni::input::TestImage, and omni::input::Framebuffer.
|
inlineprivate |
| Interface::inputlist_type omni::input::Interface::getAllInputs | ( | ) | const |
Returns a list of input maintained by controller, except this one.
| QString omni::input::Interface::getId | ( | Interface const * | _i | ) | const |
| Interface * omni::input::Interface::getInput | ( | QString const & | _id | ) |
| Interface const * omni::input::Interface::getInput | ( | QString const & | _id | ) | const |
|
private |
|
inline |
Return height from size.
|
inline |
|
inline |
| Interface const * omni::input::Interface::parent | ( | ) | const |
Return parent interface (const version)
| QString omni::input::Interface::path | ( | ) | const |
Return absolute path of interface.
|
virtual |
|
inline |
| void omni::input::Interface::setParent | ( | Interface * | _parent | ) |
Set new parent.
|
inline |
Insert a new callback when input has updated and returns its unique id.
|
pure virtual |
An input must return width and height information.
Implemented in omni::input::List, and omni::input::Framebuffer.
|
pure virtual |
An input must return an OpenGL texture ID.
Implemented in omni::input::List, and omni::input::Framebuffer.
|
virtual |
Serialize to property map.
Serialize to stream.
Reimplemented in omni::input::List, omni::input::TestImage, and omni::input::Framebuffer.
|
inline |
|
inlinevirtual |
|
inline |
|
virtual |
Make new parameter widget.
Reimplemented in omni::input::List.
|
inline |
Return width from size.
|
friend |
|
private |
|
private |
1.8.6