|
KDStateMachineEditor API Documentation 2.3
|
Utils for importing/exporting layout properties of a the object tree representing a state. More...
Functions | |
| KDSME_CORE_EXPORT QJsonObject | exportLayout (const State *state) |
Export layout of state into a machine-parsable JSON format. | |
| KDSME_CORE_EXPORT void | importLayout (const QJsonObject &data, State *state) |
Import layout data to set properties of state and its children. | |
| KDSME_CORE_EXPORT bool | matches (const QJsonObject &data, State *state) |
Check if the ids in data still match the ids from the object tree represented by state. | |
Utils for importing/exporting layout properties of a the object tree representing a state.
| QJsonObject KDSME::LayoutImportExport::exportLayout | ( | const State * | state | ) |
Export layout of state into a machine-parsable JSON format.
Goes through the object tree representented by state and fetches the layout properties of each element (such as, x/y-position, width/height, shape, ...)
The resulting JSON output can be used to restore the layout of the exact same state hierarchy
Definition at line 149 of file layoutimportexport.cpp.
References KDSME::State::childStates(), exportLayout(), and KDSME::State::transitions().
Referenced by exportLayout().
| void KDSME::LayoutImportExport::importLayout | ( | const QJsonObject & | data, |
| State * | state | ||
| ) |
Import layout data to set properties of state and its children.
state and its children must match with the ids stored in data, otherwise the layout cannot be importedDefinition at line 132 of file layoutimportexport.cpp.
References KDSME::State::childStates(), importLayout(), and KDSME::State::transitions().
Referenced by importLayout().
| bool KDSME::LayoutImportExport::matches | ( | const QJsonObject & | data, |
| State * | state | ||
| ) |
Check if the ids in data still match the ids from the object tree represented by state.
Definition at line 170 of file layoutimportexport.cpp.
References KDSME::State::childStates(), matches(), and KDSME::State::transitions().
Referenced by matches().