KDStateMachineEditor  1.1.0
A framework for creating Qt State Machine metacode using a graphical user interface
depthchecker.h
1 /*
2  This file is part of the KDAB State Machine Editor Library.
3 
4  Copyright (C) 2015-2016 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com.
5  All rights reserved.
6  Author: Kevin Funk <kevin.funk@kdab.com>
7 
8  Licensees holding valid commercial KDAB State Machine Editor Library
9  licenses may use this file in accordance with the KDAB State Machine Editor
10  Library License Agreement provided with the Software.
11 
12  This file may be distributed and/or modified under the terms of the
13  GNU Lesser General Public License version 2.1 as published by the
14  Free Software Foundation and appearing in the file LICENSE.LGPL.txt included.
15 
16  This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
17  WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
18 
19  Contact info@kdab.com if any conditions of this licensing are not
20  clear to you.
21 */
22 
23 #ifndef KDSME_DEPTHCHECKER_H
24 #define KDSME_DEPTHCHECKER_H
25 
26 #include "kdsme_core_export.h"
27 
28 #include "element.h"
29 
30 #include <QObject>
31 
32 namespace KDSME {
33 
34 class KDSME_CORE_EXPORT DepthChecker : public QObject
35 {
36  Q_OBJECT
37  Q_PROPERTY(KDSME::Element* target READ target WRITE setTarget NOTIFY targetChanged FINAL)
38  Q_PROPERTY(int depth READ depth NOTIFY depthChanged FINAL)
39 
40 public:
41  explicit DepthChecker(QObject* parent = nullptr);
42  ~DepthChecker();
43 
44  Element* target() const;
45  void setTarget(Element* target);
46 
47  int depth() const;
48 
49 Q_SIGNALS:
50  void targetChanged(QObject* target);
51  void depthChanged(int depth);
52 
53 private:
54  struct Private;
55  QScopedPointer<Private> d;
56 
57  Q_PRIVATE_SLOT(d, void updateDepth())
58 };
59 
60 }
61 
62 #endif // KDSME_DEPTHCHECKER_H
Definition: depthchecker.h:34
Definition: element.h:43
Definition: abstractexporter.h:33

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