summaryrefslogtreecommitdiffstats
path: root/src/designer/src/lib/shared/qdesigner_introspection_p.h
blob: 1cdf0aa4f08681d373a997051bd16d17ccff3f3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

//
//  W A R N I N G
//  -------------
//
// This file is not part of the Qt API.  It exists for the convenience
// of Qt Designer.  This header
// file may change from version to version without notice, or even be removed.
//
// We mean it.
//

#ifndef DESIGNERINTROSPECTION
#define DESIGNERINTROSPECTION

#include "shared_global_p.h"
#include <abstractintrospection_p.h>
#include <QtCore/qhash.h>

QT_BEGIN_NAMESPACE

struct QMetaObject;
class QWidget;

namespace qdesigner_internal {
    // Qt C++ introspection with helpers to find core and meta object for an object
    class QDESIGNER_SHARED_EXPORT QDesignerIntrospection : public QDesignerIntrospectionInterface {
    public:
        QDesignerIntrospection();
        ~QDesignerIntrospection() override;

        const QDesignerMetaObjectInterface* metaObject(const QObject *object) const override;

        const QDesignerMetaObjectInterface* metaObjectForQMetaObject(const QMetaObject *metaObject) const;

    private:
        mutable QHash<const QMetaObject *, QDesignerMetaObjectInterface *> m_metaObjectMap;
    };
}

QT_END_NAMESPACE

#endif // DESIGNERINTROSPECTION