KDStateMachineEditor  1.1.0
A framework for creating Qt State Machine metacode using a graphical user interface
layoutproperties.h
1 /*
2  layoutproperties.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_LAYOUTPROPERTIES_H
26 #define KDSME_LAYOUT_LAYOUTPROPERTIES_H
27 
28 #include "kdsme_core_export.h"
29 
30 #include <QFont>
31 #include <QObject>
32 #include <QRectF>
33 #include <QVariant>
34 
35 namespace KDSME {
36 
37 class KDSME_CORE_EXPORT LayoutProperties : public QObject
38 {
39  Q_OBJECT
40  Q_PROPERTY(qreal regionMargins READ regionMargins WRITE setRegionMargins NOTIFY regionMarginsChanged FINAL)
41  Q_PROPERTY(QFont regionLabelFont READ regionLabelFont WRITE setRegionLabelFont NOTIFY regionLabelFontChanged FINAL)
42  Q_PROPERTY(qreal regionLabelMargins READ regionLabelMargins WRITE setRegionLabelMargins NOTIFY regionLabelMarginsChanged FINAL)
43  Q_PROPERTY(QSizeF regionLabelButtonBoxSize READ regionLabelButtonBoxSize WRITE setRegionLabelButtonBoxSize NOTIFY regionLabelButtonBoxSizeChanged FINAL)
44  Q_PROPERTY(bool showTransitionLabels READ showTransitionLabels WRITE setShowTransitionLabels NOTIFY showTransitionLabelsChanged FINAL)
45 
46 public:
47  explicit LayoutProperties(QObject* parent = nullptr);
49 
50  qreal regionMargins() const;
51  void setRegionMargins(qreal margins);
52 
53  QFont regionLabelFont() const;
54  void setRegionLabelFont(const QFont& font);
55 
56  qreal regionLabelMargins() const;
57  void setRegionLabelMargins(qreal margins);
58 
59  QSizeF regionLabelButtonBoxSize() const;
60  void setRegionLabelButtonBoxSize(const QSizeF& size);
61 
62  bool showTransitionLabels() const;
63  void setShowTransitionLabels(bool show);
64 
65 Q_SIGNALS:
66  void regionMarginsChanged(qreal);
67  void regionLabelFontChanged(const QFont&);
68  void regionLabelMarginsChanged(qreal);
69  void regionLabelButtonBoxSizeChanged(const QSizeF&);
70  void showTransitionLabelsChanged(bool);
71  void changed();
72 
73 private:
74  struct Private;
75  QScopedPointer<Private> d;
76 };
77 
78 }
79 
80 #endif // LAYOUTPROPERTIES_H
Definition: layoutproperties.h:37
Definition: abstractexporter.h:33

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