Omnidome
Fulldome Mapping Software Toolkit
|
#include <List.h>
Public Types | |
typedef std::map< QString, std::unique_ptr< Patch > > | container_type |
Public Member Functions | |
Patch * | addPatch (QString const &_id, Id const &_typeId) |
Add new patch with given type id. Returns nullptr if input with typeid does not exist. More... | |
Patch * | addPatch (QString const &_id, Patch *) |
Input with id and return pointer to input when successfully added. More... | |
std::pair< QString, Patch * > | addPatch (Id const &_typeId) |
Add new input with given type id. Returns nullptr if input with typeid does not exist Id is automatically generated. More... | |
Patch * | getPatch (QString const &_id) |
Return pointer of input with id, nullptr if input does not exist. More... | |
Patch const * | getPatch (QString const &_id) const |
Return pointer of input with id, nullptr if input does not exist. More... | |
void | removePatch (QString const &_id) |
void | clear () |
Delete all patches. More... | |
QString | currentId () const |
Return ID of current patch. More... | |
void | setCurrentId (QString const &) |
Set current patch by id and deselected all other patches. More... | |
Patch * | operator[] (QString const &_id) const |
Return patch at index. More... | |
Patch * | current () |
Returns pointer to current patch Returns nullptr if currentIdx_ == -1 or input list is empty. More... | |
void | selectPatch (QString const &_id, bool _select=true) |
Select / deselect patch. More... | |
bool | patchIsSelected (QString const &) const |
Return flag whether patch with id is selected. More... | |
void | fromStream (QDataStream &) |
Deserialize from stream. More... | |
void | toStream (QDataStream &) const |
Serialize to stream. More... | |
Private Member Functions | |
QString | generateId () const |
Generate a new id for input. More... | |
Private Attributes | |
std::set< QString > | selectedPatches_ |
Ids of selected patches. More... | |
typedef std::map<QString,std::unique_ptr<Patch> > omni::patch::List::container_type |
Add new patch with given type id. Returns nullptr if input with typeid does not exist.
_id | Id for the patch |
_typeId | Type id of patch to determine which kind of input is created |
Add new input with given type id. Returns nullptr if input with typeid does not exist Id is automatically generated.
_typeId | Type id of input to determine which kind of input is created |
void omni::patch::List::clear | ( | ) |
Delete all patches.
Patch * omni::patch::List::current | ( | ) |
Returns pointer to current patch Returns nullptr if currentIdx_ == -1 or input list is empty.
QString omni::patch::List::currentId | ( | ) | const |
Return ID of current patch.
Return ID of current input.
void omni::patch::List::fromStream | ( | QDataStream & | _is | ) |
Deserialize from stream.
|
private |
Generate a new id for input.
Patch * omni::patch::List::getPatch | ( | QString const & | _id | ) |
Patch const * omni::patch::List::getPatch | ( | QString const & | _id | ) | const |
Patch* omni::patch::List::operator[] | ( | QString const & | _id | ) | const |
Return patch at index.
bool omni::patch::List::patchIsSelected | ( | QString const & | _id | ) | const |
Return flag whether patch with id is selected.
void omni::patch::List::removePatch | ( | QString const & | _id | ) |
void omni::patch::List::selectPatch | ( | QString const & | _id, |
bool | _select = true |
||
) |
Select / deselect patch.
void omni::patch::List::setCurrentId | ( | QString const & | _currentId | ) |
Set current patch by id and deselected all other patches.
Set current input by ID.
void omni::patch::List::toStream | ( | QDataStream & | _os | ) | const |
Serialize to stream.
|
private |
Ids of selected patches.