KDStateMachineEditor API Documentation 2.1
Loading...
Searching...
No Matches
graphvizlayouterbackend_p.h
Go to the documentation of this file.
1/*
2 This file is part of the KDAB State Machine Editor Library.
3
4 SPDX-FileCopyrightText: 2015 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_GRAPHVIZLAYOUTERBACKEND_P_H
17#define KDSME_LAYOUT_GRAPHVIZLAYOUTERBACKEND_P_H
18
19#include <QString>
20#include <clocale>
21
22QT_BEGIN_NAMESPACE
23class QRectF;
24QT_END_NAMESPACE
25
26namespace KDSME {
27class LayoutProperties;
28class Transition;
29class State;
30class StateMachineScene;
31}
32
34{
35public:
41
44
47
53 LayoutMode layoutMode() const;
54 void setLayoutMode(LayoutMode mode);
55
56 void openLayout(KDSME::State *state, const KDSME::LayoutProperties *properties);
57 void closeLayout();
58
64 void buildState(KDSME::State *state);
70 void buildTransitions(const KDSME::State *state);
71
72 void buildTransition(KDSME::Transition *transition);
73
74 void layout();
75 void import();
76
77 QRectF boundingRect() const;
78
87 void saveToFile(const QString &filePath, const QString &format = QStringLiteral("png"));
88
89private:
90 struct Private;
91 Private *const d;
92};
93
102class LocaleLocker // clazy:exclude=rule-of-three
103{
104public:
106 : m_oldlocale(qstrdup(setlocale(LC_NUMERIC, nullptr)))
107 {
108 setlocale(LC_NUMERIC, "C");
109 }
110
112 {
113 setlocale(LC_NUMERIC, m_oldlocale);
114 delete[] m_oldlocale;
115 }
116
117private:
118 const char *m_oldlocale;
119};
120
121#endif
void openLayout(KDSME::State *state, const KDSME::LayoutProperties *properties)
void buildTransitions(const KDSME::State *state)
void buildState(KDSME::State *state)
GraphvizLayouterBackend & operator=(const GraphvizLayouterBackend &)=delete
GraphvizLayouterBackend(const GraphvizLayouterBackend &other)=delete
void setLayoutMode(LayoutMode mode)
void buildTransition(KDSME::Transition *transition)
void saveToFile(const QString &filePath, const QString &format=QStringLiteral("png"))
@ RecursiveMode
Performs a recursive import of all state machine elements,.
@ NonRecursiveMode
Only a direct import of state machine elements.

© 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
Generated on Tue Jul 15 2025 15:21:47 for KDStateMachineEditor API Documentation by doxygen 1.9.8