KDStateMachineEditor  1.1.0
A framework for creating Qt State Machine metacode using a graphical user interface
layoutimportexport.h
1 /*
2  layoutimportexport.h
3 
4  This file is part of the KDAB State Machine Editor Library.
5 
6  Copyright (C) 2014-2016 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com.
7  All rights reserved.
8  Author: Kevin Funk <kevin.funk@kdab.com>
9 
10  Licensees holding valid commercial KDAB State Machine Editor Library
11  licenses may use this file in accordance with the KDAB State Machine Editor
12  Library License Agreement provided with the Software.
13 
14  This file may be distributed and/or modified under the terms of the
15  GNU Lesser General Public License version 2.1 as published by the
16  Free Software Foundation and appearing in the file LICENSE.LGPL.txt included.
17 
18  This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
19  WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
20 
21  Contact info@kdab.com if any conditions of this licensing are not
22  clear to you.
23 */
24 
25 #ifndef KDSME_LAYOUT_LAYOUTIMPORTEXPORT_H
26 #define KDSME_LAYOUT_LAYOUTIMPORTEXPORT_H
27 
28 #include "kdsme_core_export.h"
29 
30 #include <qglobal.h>
31 
32 QT_BEGIN_NAMESPACE
33 class QJsonObject;
34 QT_END_NAMESPACE
35 
36 namespace KDSME {
37 
38 class State;
39 
44 namespace LayoutImportExport
45 {
52  KDSME_CORE_EXPORT bool matches(const QJsonObject& data, State* state);
53 
66  KDSME_CORE_EXPORT QJsonObject exportLayout(const State* state);
67 
77  KDSME_CORE_EXPORT void importLayout(const QJsonObject& data, State* state);
78 }
79 
80 }
81 
89 #endif // LAYOUTIMPORTEXPORT_H
KDSME_CORE_EXPORT void importLayout(const QJsonObject &data, State *state)
Import layout data to set properties of state and its children.
Definition: layoutimportexport.cpp:149
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.
Definition: layoutimportexport.cpp:183
Definition: state.h:35
KDSME_CORE_EXPORT QJsonObject exportLayout(const State *state)
Export layout of state into a machine-parsable JSON format.
Definition: layoutimportexport.cpp:166
Definition: abstractexporter.h:33

Klarälvdalens Datakonsult AB (KDAB)
Qt-related services and products
http://www.kdab.com/
https://github.com/KDAB/KDStateMachineEditor