aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmldesigner/components/propertyeditor/tooltip.h
blob: 0ca230f1e8409298bfabe3ff7f62785a524f500b (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
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0

#ifndef TOOLTIP_H
#define TOOLTIP_H

#include <QtQml>

#include <QtCore/qobject.h>

QT_BEGIN_NAMESPACE
class QPointF;
class QQuickItem;
QT_END_NAMESPACE

class Tooltip : public QObject
{
    Q_OBJECT

public:
    explicit Tooltip(QObject *parent = nullptr);

    Q_INVOKABLE void showText(QQuickItem *item, const QPointF &pos, const QString &text);
    Q_INVOKABLE void hideText();

    static void registerDeclarativeType();
};

QML_DECLARE_TYPE(Tooltip)

#endif // TOOLTIP_H