aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmltyperegistrar/hppheader.hpp
blob: dc82fc85306d85233bdbd9484fee4330e1b55517 (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
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

#ifndef HPPHEADER_HPP
#define HPPHEADER_HPP

#include <QtCore/qobject.h>
#include <QtQml/qqml.h>

class HppClass : public QObject
{
    Q_OBJECT
    QML_ELEMENT
    Q_PROPERTY(int eieiei READ eieiei WRITE setEieiei NOTIFY eieieiChanged)
    Q_PROPERTY(int eieiei2 READ eieiei2)

public:
    int eieiei() const { return m_eieiei; }
    int eieiei2() const { return m_eieiei2; }

public slots:
    void setEieiei(int eieiei)
    {
        if (m_eieiei == eieiei)
            return;

        m_eieiei = eieiei;
        emit eieieiChanged(m_eieiei);
    }

signals:
    void eieieiChanged(int eieiei);

private:
    int m_eieiei;
    int m_eieiei2;
};

#endif // HPPHEADER_HPP