|
KDStateMachineEditor API Documentation
1.2.50
|
Utils for importing/exporting layout properties of a the object tree representing a state. More...
Functions | |
| 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. More... | |
| KDSME_CORE_EXPORT QJsonObject | exportLayout (const State *state) |
Export layout of state into a machine-parsable JSON format. More... | |
| KDSME_CORE_EXPORT void | importLayout (const QJsonObject &data, State *state) |
Import layout data to set properties of state and its children. More... | |
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
| 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 imported| 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.