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
qwidgetplatformsystemtrayicon_p.h
Go to the documentation of this file.
1
// Copyright (C) 2021 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
4
#
ifndef
QWIDGETPLATFORMSYSTEMTRAYICON_P_H
5
#
define
QWIDGETPLATFORMSYSTEMTRAYICON_P_H
6
7
//
8
// W A R N I N G
9
// -------------
10
//
11
// This file is not part of the Qt API. It exists purely as an
12
// implementation detail. This header file may change from version to
13
// version without notice, or even be removed.
14
//
15
// We mean it.
16
//
17
18
#
include
<
QtGui
/
qpa
/
qplatformsystemtrayicon
.
h
>
19
#
include
<
QtCore
/
private
/
qglobal_p
.
h
>
20
21
QT_REQUIRE_CONFIG
(
systemtrayicon
);
22
23
QT_BEGIN_NAMESPACE
24
25
class
QSystemTrayIcon;
26
27
class
QWidgetPlatformSystemTrayIcon
:
public
QPlatformSystemTrayIcon
28
{
29
Q_OBJECT
30
31
public
:
32
explicit
QWidgetPlatformSystemTrayIcon
(
QObject
*
parent
=
nullptr
);
33
~
QWidgetPlatformSystemTrayIcon
();
34
35
void
init
()
override
;
36
void
cleanup
()
override
;
37
void
updateIcon
(
const
QIcon &icon)
override
;
38
void
updateToolTip
(
const
QString &tooltip)
override
;
39
void
updateMenu
(QPlatformMenu *menu)
override
;
40
QRect
geometry
()
const
override
;
41
void
showMessage
(
const
QString &title,
const
QString &msg,
42
const
QIcon &icon, MessageIcon iconType,
int
msecs)
override
;
43
44
bool
isSystemTrayAvailable
()
const
override
;
45
bool
supportsMessages
()
const
override
;
46
47
QPlatformMenu
*
createMenu
()
const
override
;
48
49
private
:
50
QScopedPointer<QSystemTrayIcon> m_systray;
51
};
52
53
QT_END_NAMESPACE
54
55
#
endif
// QWIDGETPLATFORMSYSTEMTRAYICON_P_H
QWidgetPlatformSystemTrayIcon
Definition
qwidgetplatformsystemtrayicon_p.h:28
QWidgetPlatformSystemTrayIcon::createMenu
QPlatformMenu * createMenu() const override
This method allows platforms to use a different QPlatformMenu for system tray menus than what would n...
Definition
qwidgetplatformsystemtrayicon.cpp:80
QWidgetPlatformSystemTrayIcon::~QWidgetPlatformSystemTrayIcon
~QWidgetPlatformSystemTrayIcon()
Definition
qwidgetplatformsystemtrayicon.cpp:22
QWidgetPlatformSystemTrayIcon::isSystemTrayAvailable
bool isSystemTrayAvailable() const override
Returns true if the system tray is available on the platform.
Definition
qwidgetplatformsystemtrayicon.cpp:70
QWidgetPlatformSystemTrayIcon::updateMenu
void updateMenu(QPlatformMenu *menu) override
This method is called when the system tray menu did change.
Definition
qwidgetplatformsystemtrayicon.cpp:46
QWidgetPlatformSystemTrayIcon::cleanup
void cleanup() override
This method is called to cleanup the platform dependent implementation.
Definition
qwidgetplatformsystemtrayicon.cpp:31
QWidgetPlatformSystemTrayIcon::updateToolTip
void updateToolTip(const QString &tooltip) override
This method is called when the tooltip text did change.
Definition
qwidgetplatformsystemtrayicon.cpp:41
QWidgetPlatformSystemTrayIcon::init
void init() override
This method is called to initialize the platform dependent implementation.
Definition
qwidgetplatformsystemtrayicon.cpp:26
QWidgetPlatformSystemTrayIcon::updateIcon
void updateIcon(const QIcon &icon) override
This method is called when the icon did change.
Definition
qwidgetplatformsystemtrayicon.cpp:36
QWidgetPlatformSystemTrayIcon::showMessage
void showMessage(const QString &title, const QString &msg, const QIcon &icon, MessageIcon iconType, int msecs) override
Shows a balloon message for the entry with the given title, message msg and icon for the time specifi...
Definition
qwidgetplatformsystemtrayicon.cpp:64
QWidgetPlatformSystemTrayIcon::geometry
QRect geometry() const override
This method returns the geometry of the platform dependent system tray icon on the screen.
Definition
qwidgetplatformsystemtrayicon.cpp:59
QWidgetPlatformSystemTrayIcon::supportsMessages
bool supportsMessages() const override
Returns true if the system tray supports messages on the platform.
Definition
qwidgetplatformsystemtrayicon.cpp:75
QT_REQUIRE_CONFIG
QT_REQUIRE_CONFIG(systemtrayicon)
qtdeclarative
src
labs
platform
widgets
qwidgetplatformsystemtrayicon_p.h
Generated on
for Qt by
1.18.0