KDStateMachineEditor API Documentation  1.2.9
A framework for creating Qt State Machine metacode using a graphical user interface
layerwiselayouter.h
1 /*
2  This file is part of the KDAB State Machine Editor Library.
3 
4  SPDX-FileCopyrightText: 2014-2021 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
5  Author: Kevin Funk <kevin.funk@kdab.com>
6 
7  SPDX-License-Identifier: LGPL-2.1-only OR LicenseRef-KDAB-KDStateMachineEditor
8 
9  Licensees holding valid commercial KDAB State Machine Editor Library
10  licenses may use this file in accordance with the KDAB State Machine Editor
11  Library License Agreement provided with the Software.
12 
13  Contact info@kdab.com if any conditions of this licensing are not clear to you.
14 */
15 
16 #ifndef KDSME_LAYOUT_LAYERWISELAYOUTER_H
17 #define KDSME_LAYOUT_LAYERWISELAYOUTER_H
18 
19 #include "kdsme_core_export.h"
20 
21 #include "layouter.h"
22 #include "elementwalker.h"
23 
24 #include <QtCore/qglobal.h>
25 
26 namespace KDSME {
27 
28 class GraphvizLayerLayouter;
29 class LayoutProperties;
30 
31 class KDSME_CORE_EXPORT RegionLayouter : public QObject
32 {
33  Q_OBJECT
34 
35 public:
36  explicit RegionLayouter(QObject* parent = nullptr);
37 
38  void layoutRegion(State* state, const QRectF& boundingRectHint, const LayoutProperties* properties);
39 };
40 
41 class KDSME_CORE_EXPORT LayerwiseLayouter : public Layouter
42 {
43  Q_OBJECT
44 
45 public:
46  explicit LayerwiseLayouter(QObject* parent = nullptr);
47 
48  QRectF layout(State* state, const LayoutProperties* properties) override;
49 
50 private:
51  ElementWalker::VisitResult layoutState(Element* element);
52 
53  GraphvizLayerLayouter* m_layerLayouter;
54  RegionLayouter* m_regionLayouter;
55  const LayoutProperties* m_properties;
56 };
57 
58 }
59 
60 #endif // LAYERWISELAYOUTER_H
Definition: layerwiselayouter.h:41
Definition: layoutproperties.h:28
Definition: graphvizlayerlayouter.h:25
Definition: layerwiselayouter.h:31
VisitResult
Definition: treewalker.h:42
Definition: state.h:28
Definition: layouter.h:33
Definition: element.h:34
Definition: mainwindow.h:21

Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
KDStateMachineEditor
Create Qt State Machine metacode using a graphical user interface
https://github.com/KDAB/KDStateMachineEditor