GammaRay  2.0.0
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Pages
propertycontroller.h
1 /*
2  propertycontroller.h
3 
4  This file is part of GammaRay, the Qt application inspection and
5  manipulation tool.
6 
7  Copyright (C) 2013-2014 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com
8  Author: Volker Krause <volker.krause@kdab.com>
9 
10  This program is free software; you can redistribute it and/or modify
11  it under the terms of the GNU General Public License as published by
12  the Free Software Foundation, either version 2 of the License, or
13  (at your option) any later version.
14 
15  This program is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  GNU General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with this program. If not, see <http://www.gnu.org/licenses/>.
22 */
23 
24 #ifndef GAMMARAY_PROPERTYCONTROLLER_H
25 #define GAMMARAY_PROPERTYCONTROLLER_H
26 
27 #include "gammaray_core_export.h"
28 
29 #include <common/propertycontrollerinterface.h>
30 
31 #include <QPointer>
32 
33 class QAbstractItemModel;
34 class QStandardItemModel;
35 
36 namespace GammaRay {
37 
38 class ConnectionFilterProxyModel;
39 class MultiSignalMapper;
40 class ObjectDynamicPropertyModel;
41 class ObjectStaticPropertyModel;
42 class ObjectClassInfoModel;
43 class ObjectMethodModel;
44 class ObjectEnumModel;
45 class MetaPropertyModel;
46 class MethodArgumentModel;
47 
49 class GAMMARAY_CORE_EXPORT PropertyController : public PropertyControllerInterface
50 {
51  Q_OBJECT
53 public:
54  explicit PropertyController(const QString &baseName, QObject *parent);
56 
57  void setObject(QObject *object);
58  void setObject(void *object, const QString &className);
59  void setMetaObject(const QMetaObject *metaObject);
60 
61 public slots:
62  void activateMethod();
63  void invokeMethod(Qt::ConnectionType type);
64 
65 private slots:
66  void signalEmitted(QObject *sender, int signalIndex, const QVector<QVariant> &args);
67 
68 private:
69  void registerModel(QAbstractItemModel *model, const QString &nameSuffix);
70 
71 private:
72  QString m_objectBaseName;
73 
74  QPointer<QObject> m_object;
75  ObjectStaticPropertyModel *m_staticPropertyModel;
76  ObjectDynamicPropertyModel *m_dynamicPropertyModel;
77  ObjectClassInfoModel *m_classInfoModel;
78  ObjectMethodModel *m_methodModel;
79  ConnectionFilterProxyModel *m_inboundConnectionModel;
80  ConnectionFilterProxyModel *m_outboundConnectionModel;
81  ObjectEnumModel *m_enumModel;
82  MultiSignalMapper *m_signalMapper;
83  QStandardItemModel *m_methodLogModel;
84  MetaPropertyModel *m_metaPropertyModel;
85 
86  MethodArgumentModel *m_methodArgumentModel;
87 };
88 
89 }
90 
91 #endif // GAMMARAY_PROPERTYCONTROLLER_H

Klarälvdalens Datakonsult AB (KDAB)
"The Cross-Platform Experts"
http://www.kdab.com/
GammaRay
Qt-application inspection and manipulation tool
http://www.kdab.com/kdab-products/gammaray/