Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qquicklabsplatformsystemtrayicon_p.h
Go to the documentation of this file.
1
// Copyright (C) 2017 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
// Qt-Security score:significant reason:default
4
5
#
ifndef
QQUICKLABSPLATFORMSYSTEMTRAYICON_P_H
6
#
define
QQUICKLABSPLATFORMSYSTEMTRAYICON_P_H
7
8
//
9
// W A R N I N G
10
// -------------
11
//
12
// This file is not part of the Qt API. It exists purely as an
13
// implementation detail. This header file may change from version to
14
// version without notice, or even be removed.
15
//
16
// We mean it.
17
//
18
19
#
include
<
QtCore
/
qurl
.
h
>
20
#
include
<
QtCore
/
qrect
.
h
>
21
#
include
<
QtGui
/
qpa
/
qplatformsystemtrayicon
.
h
>
22
#
include
<
QtQml
/
qqmlparserstatus
.
h
>
23
#
include
<
QtQml
/
qqml
.
h
>
24
25
#
include
"qquicklabsplatformicon_p.h"
26
27
QT_REQUIRE_CONFIG
(
systemtrayicon
);
28
29
QT_BEGIN_NAMESPACE
30
31
class
QQuickLabsPlatformMenu;
32
class
QQuickLabsPlatformIconLoader
;
33
34
class
QQuickLabsPlatformSystemTrayIcon
:
public
QObject
,
public
QQmlParserStatus
35
{
36
Q_OBJECT
37
QML_NAMED_ELEMENT(SystemTrayIcon)
38
QML_ADDED_IN_VERSION
(1, 0)
39
QML_EXTENDED_NAMESPACE
(
QPlatformSystemTrayIcon
)
40
Q_INTERFACES
(
QQmlParserStatus
)
41
Q_PROPERTY
(
bool
available
READ
isAvailable
CONSTANT
FINAL
)
42
Q_PROPERTY
(
bool
supportsMessages
READ
supportsMessages
CONSTANT
FINAL
)
43
Q_PROPERTY
(
bool
visible
READ
isVisible
WRITE
setVisible
NOTIFY
visibleChanged
FINAL
)
44
Q_PROPERTY
(
QString
tooltip
READ
tooltip
WRITE
setTooltip
NOTIFY
tooltipChanged
FINAL
)
45
Q_PROPERTY
(
QQuickLabsPlatformMenu
*
menu
READ
menu
WRITE
setMenu
NOTIFY
menuChanged
FINAL
)
46
Q_PROPERTY
(
QRect
geometry
READ
geometry
NOTIFY
geometryChanged
FINAL
REVISION
(1, 1))
47
Q_PROPERTY
(
QQuickLabsPlatformIcon
icon
READ
icon
WRITE
setIcon
NOTIFY
iconChanged
FINAL
REVISION
(1, 1))
48
49
public
:
50
explicit
QQuickLabsPlatformSystemTrayIcon
(
QObject
*
parent
=
nullptr
);
51
~
QQuickLabsPlatformSystemTrayIcon
();
52
53
QPlatformSystemTrayIcon
*
handle
()
const
;
54
55
bool
isAvailable
()
const
;
56
bool
supportsMessages
()
const
;
57
58
bool
isVisible
()
const
;
59
void
setVisible
(
bool
visible);
60
61
QString
tooltip
()
const
;
62
void
setTooltip
(
const
QString &tooltip);
63
64
QQuickLabsPlatformMenu
*
menu
()
const
;
65
void
setMenu
(
QQuickLabsPlatformMenu
*menu);
66
67
QRect
geometry
()
const
;
68
69
QQuickLabsPlatformIcon
icon
()
const
;
70
void
setIcon
(
const
QQuickLabsPlatformIcon
&icon);
71
72
public
Q_SLOTS
:
73
void
show
();
74
void
hide
();
75
76
void
showMessage
(
const
QString &title,
const
QString &message,
77
QPlatformSystemTrayIcon::MessageIcon iconType =
QPlatformSystemTrayIcon
::
Information
,
int
msecs = 10000);
78
79
Q_SIGNALS
:
80
void
activated
(
QPlatformSystemTrayIcon
::
ActivationReason
reason
);
81
void
messageClicked
();
82
void
visibleChanged
();
83
void
tooltipChanged
();
84
void
menuChanged
();
85
Q_REVISION
(1, 1)
void
geometryChanged
();
86
Q_REVISION
(1, 1)
void
iconChanged
();
87
88
protected
:
89
void
init
();
90
void
cleanup
();
91
92
void
classBegin
()
override
;
93
void
componentComplete
()
override
;
94
95
QQuickLabsPlatformIconLoader
*
iconLoader
()
const
;
96
97
private
Q_SLOTS
:
98
void
updateIcon
();
99
100
private
:
101
bool
m_complete;
102
bool
m_visible;
103
QString m_tooltip;
104
QQuickLabsPlatformMenu
*m_menu;
105
mutable
QQuickLabsPlatformIconLoader
*m_iconLoader;
106
QPlatformSystemTrayIcon *m_handle;
107
};
108
109
QT_END_NAMESPACE
110
111
#
endif
// QQUICKLABSPLATFORMSYSTEMTRAYICON_P_H
QQuickLabsPlatformIconLoader
Definition
qquicklabsplatformiconloader_p.h:31
QQuickLabsPlatformIconLoader::setIcon
void setIcon(const QQuickLabsPlatformIcon &icon)
Definition
qquicklabsplatformiconloader.cpp:46
QQuickLabsPlatformIconLoader::icon
QQuickLabsPlatformIcon icon() const
Definition
qquicklabsplatformiconloader.cpp:41
QQuickLabsPlatformIconLoader::setEnabled
void setEnabled(bool enabled)
Definition
qquicklabsplatformiconloader.cpp:26
QQuickLabsPlatformIcon
Definition
qquicklabsplatformicon_p.h:30
QQuickLabsPlatformIcon::operator==
bool operator==(const QQuickLabsPlatformIcon &other) const
Definition
qquicklabsplatformicon.cpp:39
QQuickLabsPlatformMenu
Definition
qquicklabsplatformmenu_p.h:44
QQuickLabsPlatformSystemTrayIcon
Definition
qquicklabsplatformsystemtrayicon_p.h:35
QQuickLabsPlatformSystemTrayIcon::~QQuickLabsPlatformSystemTrayIcon
~QQuickLabsPlatformSystemTrayIcon()
Definition
qquicklabsplatformsystemtrayicon.cpp:155
QQuickLabsPlatformSystemTrayIcon::menu
QQuickLabsPlatformMenu * menu() const
\qmlproperty Menu Qt.labs.platform::SystemTrayIcon::menu
Definition
qquicklabsplatformsystemtrayicon.cpp:250
QQuickLabsPlatformSystemTrayIcon::tooltipChanged
void tooltipChanged()
QQuickLabsPlatformSystemTrayIcon::hide
void hide()
\qmlmethod void Qt.labs.platform::SystemTrayIcon::hide()
Definition
qquicklabsplatformsystemtrayicon.cpp:335
QQuickLabsPlatformSystemTrayIcon::isVisible
bool isVisible() const
\qmlproperty bool Qt.labs.platform::SystemTrayIcon::visible
Definition
qquicklabsplatformsystemtrayicon.cpp:202
QQuickLabsPlatformSystemTrayIcon::showMessage
void showMessage(const QString &title, const QString &message, QPlatformSystemTrayIcon::MessageIcon iconType=QPlatformSystemTrayIcon::Information, int msecs=10000)
\qmlmethod void Qt.labs.platform::SystemTrayIcon::showMessage(string title, string message,...
Definition
qquicklabsplatformsystemtrayicon.cpp:352
QQuickLabsPlatformSystemTrayIcon::icon
QQuickLabsPlatformIcon icon() const
Definition
qquicklabsplatformsystemtrayicon.cpp:303
QQuickLabsPlatformSystemTrayIcon::classBegin
void classBegin() override
Invoked after class creation, but before any properties have been set.
Definition
qquicklabsplatformsystemtrayicon.cpp:379
QQuickLabsPlatformSystemTrayIcon::init
void init()
Definition
qquicklabsplatformsystemtrayicon.cpp:358
QQuickLabsPlatformSystemTrayIcon::handle
QPlatformSystemTrayIcon * handle() const
Definition
qquicklabsplatformsystemtrayicon.cpp:166
QQuickLabsPlatformSystemTrayIcon::setTooltip
void setTooltip(const QString &tooltip)
Definition
qquicklabsplatformsystemtrayicon.cpp:233
QQuickLabsPlatformSystemTrayIcon::menuChanged
void menuChanged()
QQuickLabsPlatformSystemTrayIcon::setVisible
void setVisible(bool visible)
Definition
qquicklabsplatformsystemtrayicon.cpp:207
QQuickLabsPlatformSystemTrayIcon::iconLoader
QQuickLabsPlatformIconLoader * iconLoader() const
Definition
qquicklabsplatformsystemtrayicon.cpp:390
QQuickLabsPlatformSystemTrayIcon::geometry
QRect geometry() const
Definition
qquicklabsplatformsystemtrayicon.cpp:283
QQuickLabsPlatformSystemTrayIcon::setMenu
void setMenu(QQuickLabsPlatformMenu *menu)
Definition
qquicklabsplatformsystemtrayicon.cpp:255
QQuickLabsPlatformSystemTrayIcon::isAvailable
bool isAvailable() const
\readonly \qmlproperty bool Qt.labs.platform::SystemTrayIcon::available
Definition
qquicklabsplatformsystemtrayicon.cpp:177
QQuickLabsPlatformSystemTrayIcon::supportsMessages
bool supportsMessages() const
\readonly \qmlproperty bool Qt.labs.platform::SystemTrayIcon::supportsMessages
Definition
qquicklabsplatformsystemtrayicon.cpp:190
QQuickLabsPlatformSystemTrayIcon::componentComplete
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
Definition
qquicklabsplatformsystemtrayicon.cpp:383
QQuickLabsPlatformSystemTrayIcon::cleanup
void cleanup()
Definition
qquicklabsplatformsystemtrayicon.cpp:371
QQuickLabsPlatformSystemTrayIcon::Q_REVISION
Q_REVISION(1, 1) void geometryChanged()
QQuickLabsPlatformSystemTrayIcon::visibleChanged
void visibleChanged()
QQuickLabsPlatformSystemTrayIcon::setIcon
void setIcon(const QQuickLabsPlatformIcon &icon)
Definition
qquicklabsplatformsystemtrayicon.cpp:311
QQuickLabsPlatformSystemTrayIcon::messageClicked
void messageClicked()
QQuickLabsPlatformSystemTrayIcon::tooltip
QString tooltip() const
\qmlproperty string Qt.labs.platform::SystemTrayIcon::tooltip
Definition
qquicklabsplatformsystemtrayicon.cpp:228
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
QT_REQUIRE_CONFIG
QT_REQUIRE_CONFIG(liburing)
qtdeclarative
src
labs
platform
qquicklabsplatformsystemtrayicon_p.h
Generated on
for Qt by
1.18.0