aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmltc/QmltcTests/cpptypes/typewithsignal.h
blob: 6bb94ae051b7c6842eb12cd552396def9adce566 (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
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only

#ifndef TYPEWITHSIGNAL_H
#define TYPEWITHSIGNAL_H

#include <QtCore/qobject.h>
#include <QtQml/qqmlregistration.h>
#include <QtGui/qfont.h>

class TypeWithSignal : public QObject
{
    Q_OBJECT
    QML_ELEMENT

Q_SIGNALS:
    // value types by value
    void signalWithPrimitive(int);
    void signalWithGadget(QFont);

    // value types by const reference
    void signalWithConstReferenceToGadget(const QFont &);
    void signalWithConstReferenceToPrimitive(const int &);

    // object by pointers
    void signalWithPointer(QObject *);
    void signalWithPointerToConst(const QObject *);
    void signalWithPointerToConst2(QObject const *);
    void signalWithConstPointer(QObject *const);
    void signalWithConstPointerToConst(const QObject *const);
    void signalWithConstPointerToConst2(QObject const *const);
};

#endif // TYPEWITHSIGNAL_H