• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KDEUI

  • kdeui
  • notifications
ksystemtrayicon.h
Go to the documentation of this file.
1/* This file is part of the KDE libraries
2 Copyright (C) 1999 Matthias Ettrich <ettrich@kde.org>
3 Copyright (C) 2007 by Charles Connell <charles@connells.org>
4 Copyright (C) 2008 Lukas Appelhans <l.appelhans@gmx.de>
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License version 2 as published by the Free Software Foundation.
9
10 This library 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 GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/
20#ifndef KSYSTEMTRAY_H
21#define KSYSTEMTRAY_H
22
23#include <kdeui_export.h>
24#include <kglobal.h>
25
26#include <QtGui/QSystemTrayIcon>
27
28class KActionCollection;
29class KSystemTrayIconPrivate;
30class QAction;
31class QMovie;
32
60class KDEUI_EXPORT KSystemTrayIcon : public QSystemTrayIcon //krazy:exclude=qclasses
61{
62 Q_OBJECT
63public:
77 explicit KSystemTrayIcon( QWidget* parent = 0 );
78
83 explicit KSystemTrayIcon( const QString& icon, QWidget* parent = 0 );
84
89 explicit KSystemTrayIcon( const QIcon& icon, QWidget* parent = 0 );
90
96 explicit KSystemTrayIcon(QMovie* movie, QWidget* parent);
97
101 ~KSystemTrayIcon();
102
109 void setMovie(QMovie* movie);
110
117 const QMovie* movie() const;
118
123 KActionCollection* actionCollection();
124
128 QWidget *parentWidget() const;
129
136 bool parentWidgetTrayClose() const;
137
144 static QIcon loadIcon(const QString &icon, const KComponentData &componentData = KGlobal::mainComponent());
145
156 void setContextMenuTitle(QAction *action);
157
162 QAction *contextMenuTitle() const;
163
164Q_SIGNALS:
169 void quitSelected();
170
171public Q_SLOTS:
172 void toggleActive();
173
174private Q_SLOTS:
175 void contextMenuAboutToShow();
176 void minimizeRestoreAction();
177 void maybeQuit();
178 void activateOrHide( QSystemTrayIcon::ActivationReason reasonCalled );
179
180private:
181 void init( QWidget* );
182 void minimizeRestore( bool restore );
183
184 KSystemTrayIconPrivate* const d;
185
186Q_PRIVATE_SLOT(d, void _k_slotNewFrame())
187};
188
189#endif
190
KActionCollection
A container for a set of QAction objects.
Definition: kactioncollection.h:57
KComponentData
KSystemTrayIcon
KDE System Tray Window class
Definition: ksystemtrayicon.h:61
KSystemTrayIcon::quitSelected
void quitSelected()
Emitted when quit is selected in the menu.
QAction
QSystemTrayIcon
QWidget
kdeui_export.h
kglobal.h
KGlobal::mainComponent
const KComponentData & mainComponent()
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal