MuseScore
3.4
Music composition and notation
mscore
qml
nativetooltip.h
Go to the documentation of this file.
1
//=============================================================================
2
// MuseScore
3
// Music Composition & Notation
4
//
5
// Copyright (C) 2019 MuseScore BVBA
6
//
7
// This program is free software; you can redistribute it and/or modify
8
// it under the terms of the GNU General Public License version 2.
9
//
10
// This program is distributed in the hope that it will be useful,
11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
// GNU General Public License for more details.
14
//
15
// You should have received a copy of the GNU General Public License
16
// along with this program; if not, write to the Free Software
17
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18
//=============================================================================
19
20
#ifndef __QML_NATIVETOOLTIP_H__
21
#define __QML_NATIVETOOLTIP_H__
22
23
namespace
Ms
{
24
25
//---------------------------------------------------------
26
// QmlNativeToolTip
27
//---------------------------------------------------------
28
29
class
QmlNativeToolTip
:
public
QObject {
30
Q_OBJECT
31
32
Q_PROPERTY(QQuickItem*
item
READ
item
WRITE
setItem
)
33
Q_PROPERTY(QString
text
READ
text
WRITE
setText
)
34
35
QWidget*
_widget
;
36
QPointer<QQuickItem>
_item
=
nullptr
;
37
QString
_text
;
38
QString
_lastShownText
;
39
QTimer
_timer
;
40
41
private slots:
42
void
showToolTip
();
43
44
public:
45
QmlNativeToolTip
(QWidget* w, QObject* parent =
nullptr
);
46
47
QQuickItem*
item
()
const
{
return
_item
; }
48
void
setItem
(QQuickItem*);
49
50
const
QString&
text
()
const
{
return
_text
; }
51
void
setText
(
const
QString& t) {
_text
= t; }
52
};
53
54
}
// namespace Ms
55
#endif
Ms::QmlNativeToolTip::_item
QPointer< QQuickItem > _item
Definition:
nativetooltip.h:36
Ms::QmlNativeToolTip::showToolTip
void showToolTip()
Definition:
nativetooltip.cpp:52
Ms::QmlNativeToolTip::setText
void setText(const QString &t)
Definition:
nativetooltip.h:51
Ms::QmlNativeToolTip
Definition:
nativetooltip.h:29
Ms::QmlNativeToolTip::_text
QString _text
Definition:
nativetooltip.h:37
Ms::QmlNativeToolTip::_timer
QTimer _timer
Definition:
nativetooltip.h:39
Ms::QmlNativeToolTip::item
QQuickItem * item() const
Definition:
nativetooltip.h:47
Ms::QmlNativeToolTip::_widget
QWidget * _widget
Definition:
nativetooltip.h:35
Ms
Definition:
aeolus.cpp:26
Ms::QmlNativeToolTip::text
const QString & text() const
Definition:
nativetooltip.h:50
Ms::QmlNativeToolTip::setItem
void setItem(QQuickItem *)
Definition:
nativetooltip.cpp:39
Ms::QmlNativeToolTip::_lastShownText
QString _lastShownText
Definition:
nativetooltip.h:38
Generated by
1.8.13