KDStateMachineEditor  1.0.0
A framework for creating Qt State Machine metacode using a graphical user interface
layerwiselayouter.h
1 /*
2  layerwiselayouter.h
3 
4  This file is part of the KDAB State Machine Editor Library.
5 
6  Copyright (C) 2014-2015 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_LAYERWISELAYOUTER_H
26 #define KDSME_LAYOUT_LAYERWISELAYOUTER_H
27 
28 #include "kdsme_core_export.h"
29 
30 #include "layouter.h"
31 #include "elementwalker.h"
32 
33 #include <QtCore/qglobal.h>
34 
35 namespace KDSME {
36 
37 class GraphvizLayerLayouter;
38 class LayoutProperties;
39 
40 class KDSME_CORE_EXPORT RegionLayouter : public QObject
41 {
42  Q_OBJECT
43 
44 public:
45  explicit RegionLayouter(QObject* parent = nullptr);
46 
47  void layoutRegion(State* state, const QRectF& boundingRectHint, const LayoutProperties* properties);
48 };
49 
50 class KDSME_CORE_EXPORT LayerwiseLayouter : public Layouter
51 {
52  Q_OBJECT
53 
54 public:
55  explicit LayerwiseLayouter(QObject* parent = nullptr);
56 
57  virtual QRectF layout(State* state, const LayoutProperties* properties) override;
58 
59 private:
60  ElementWalker::VisitResult layoutState(Element* element);
61 
62  GraphvizLayerLayouter* m_layerLayouter;
63  RegionLayouter* m_regionLayouter;
64  const LayoutProperties* m_properties;
65 };
66 
67 }
68 
69 #endif // LAYERWISELAYOUTER_H
Definition: layerwiselayouter.h:50
Definition: layoutproperties.h:37
Definition: graphvizlayerlayouter.h:34
Definition: layerwiselayouter.h:40
VisitResult
Definition: treewalker.h:51
Definition: state.h:35
Definition: layouter.h:40
Definition: element.h:41
Definition: abstractexporter.h:33

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