CopperSpice API  1.7.2
QPlatformSystemTrayIcon Class Referenceabstract

Abstracts the system tray icon. More...

Inheritance diagram for QPlatformSystemTrayIcon:
QObject

Public Types

enum  ActivationReason
 
enum  MessageIcon
 

Public Signals

void activated (QPlatformSystemTrayIcon::ActivationReason reason)
 
void messageClicked ()
 
- Public Signals inherited from QObject
void destroyed (QObject *obj=nullptr)
 
void objectNameChanged (const QString &objectName)
 

Public Methods

virtual void cleanup () = 0
 
virtual QPlatformMenucreateMenu () const
 
virtual QRect geometry () const = 0
 
virtual void init () = 0
 
virtual bool isSystemTrayAvailable () const = 0
 
virtual void showMessage (const QString &title, const QString &msg, const QIcon &icon, MessageIcon iconType, int msecs) = 0
 
virtual bool supportsMessages () const = 0
 
virtual void updateIcon (const QIcon &icon) = 0
 
virtual void updateMenu (QPlatformMenu *menu) = 0
 
virtual void updateToolTip (const QString &tooltip) = 0
 
- Public Methods inherited from QObject
 QObject (QObject *parent=nullptr)
 
 ~QObject ()
 
bool blockSignals (bool block)
 
const QList< QObject * > & children () const
 
bool connect (const QObject *sender, const QString &signalMethod, const QString &location, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
bool connect (const QObject *sender, const QString &signalMethod, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
bool disconnect (const QObject *receiver, const QString &slotMethod=QString ()) const
 
bool disconnect (const QString &signalMethod, const QString &location, const QObject *receiver=nullptr, const QString &slotMethod=QString ()) const
 
bool disconnect (const QString &signalMethod=QString (), const QObject *receiver=nullptr, const QString &slotMethod=QString ()) const
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QStringdynamicPropertyNames () const
 
virtual bool event (QEvent *event)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
template<typename T >
findChild (const QString &childName=QString ()) const
 
template<class T >
QList< T > findChildren (const QRegularExpression &regExp, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
template<class T >
QList< T > findChildren (const QString &objName=QString (), Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
bool inherits (const QString &className) const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const
 
bool isWindowType () const
 
void killTimer (int id)
 
const QMetaObjectmetaObject () const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const
 
QObject * parent () const
 
template<class T = QVariant>
property (const QString &name) const
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const QString &name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer)
 
QThreadthread () const
 

Additional Inherited Members

- Public Slots inherited from QObject
void deleteLater ()
 
- Static Public Methods inherited from QObject
static bool connect (const QObject *sender, const QMetaMethod &signalMethod, const QObject *receiver, const QMetaMethod &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool connect (const QObject *sender, const QString &signalMethod, const QObject *receiver, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection, const QString &location=QString ())
 
static bool connect (const QObject *sender, const QString &signalMethod, const QString &location, const QObject *receiver, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class SlotClass , class... SlotArgs, class SlotReturn >
static bool connect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, SlotReturn (SlotClass::*slotMethod)(SlotArgs...), Qt::ConnectionType type=Qt::AutoConnection)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class T >
static bool connect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, T slotLambda, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool disconnect (const QObject *sender, const QMetaMethod &signalMethod, const QObject *receiver, const QMetaMethod &slotMethod)
 
static bool disconnect (const QObject *sender, const QString &signalMethod, const QObject *receiver, const QString &slotMethod)
 
static bool disconnect (const QObject *sender, const QString &signalMethod, const QString &location, const QObject *receiver, const QString &slotMethod)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class SlotClass , class... SlotArgs, class SlotReturn >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, SlotReturn (SlotClass::*slotMethod)(SlotArgs...))
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, std::nullptr_t slotMethod=nullptr)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class T >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, T slotMethod)
 
static QMetaObjectstaticMetaObject ()
 
static QString tr (const char *text, const char *comment=nullptr, std::optional< int > numArg=std::optional< int >())
 
- Protected Methods inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signalMethod) const
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signalMethod) const
 
bool isSignalConnected (const QMetaMethod &signalMethod) const
 
int receivers (const QString &signal) const
 
QObject * sender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 
- Properties inherited from QObject
 objectName
 

Detailed Description

The QPlatformSystemTrayIcon class abstracts the system tray icon.

See also
QSystemTrayIcon

Member Enumeration Documentation

This enum describes the reason the system tray icon was activated.

Constant Value Description
QPlatformSystemTrayIcon::Unknown 0 Unknown reason
QPlatformSystemTrayIcon::Context 1 Context menu for the system tray entry was requested
QPlatformSystemTrayIcon::DoubleClick 2 System tray entry was double clicked
QPlatformSystemTrayIcon::Trigger 3 System tray entry was clicked
QPlatformSystemTrayIcon::MiddleClick 4 System tray entry was clicked with the middle mouse button
See also
activated()

This enum describes the icon that is shown when a balloon message is displayed.

Constant Value Description
QPlatformSystemTrayIcon::NoIcon 0 No icon is shown
QPlatformSystemTrayIcon::Information 1 Information icon is shown
QPlatformSystemTrayIcon::Warning 2 Standard warning icon is shown
QPlatformSystemTrayIcon::Critical 3 Critical warning icon is shown
See also
updateIcon(), showMessage(), QMessageBox

Method Documentation

void QPlatformSystemTrayIcon::activated ( QPlatformSystemTrayIcon::ActivationReason  reason)
signal

This signal is emitted when the user activates the system tray icon. The value for reason specifies why the icon was activated.

See also
QSystemTrayIcon::ActivationReason
void QPlatformSystemTrayIcon::cleanup ( )
pure virtual

This method is called to cleanup the platform dependent implementation.

QPlatformMenu * QPlatformSystemTrayIcon::createMenu ( ) const
virtual

This method is called if there is no QPlatformMenu available when updating the menu. This allows the abstraction to provide a menu for the system tray icon even if a non-native menu is used.

The default implementation returns a nullptr.

See also
updateMenu()
QRect QPlatformSystemTrayIcon::geometry ( ) const
pure virtual

This method returns the geometry of the platform dependent system tray icon on the screen.

void QPlatformSystemTrayIcon::init ( )
pure virtual

This method is called to initialize the platform dependent implementation.

bool QPlatformSystemTrayIcon::isSystemTrayAvailable ( ) const
pure virtual

Returns true if a system tray is available on this platform.

void QPlatformSystemTrayIcon::messageClicked ( )
signal

This signal is emitted when the message displayed using showMessage() was clicked by the user.

See also
activated()
void QPlatformSystemTrayIcon::showMessage ( const QString title,
const QString msg,
const QIcon icon,
MessageIcon  iconType,
int  msecs 
)
pure virtual

Shows a balloon message with the given title, msg, and icon for the duration specified in msecs. The iconType parameter is a hint for the implementation.

See also
QSystemTrayIcon::showMessage()
bool QPlatformSystemTrayIcon::supportsMessages ( ) const
pure virtual

Returns true if the system tray supports messages on the platform.

void QPlatformSystemTrayIcon::updateIcon ( const QIcon icon)
pure virtual

This method is called when the icon has changed.

void QPlatformSystemTrayIcon::updateMenu ( QPlatformMenu menu)
pure virtual

This method is called when the system tray menu has changed.

void QPlatformSystemTrayIcon::updateToolTip ( const QString tooltip)
pure virtual

This method is called when the tooltip has changed.