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

KDEUI

  • sources
  • kde-4.14
  • kdelibs
  • 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 
28 class KActionCollection;
29 class KSystemTrayIconPrivate;
30 class QAction;
31 class QMovie;
32 
60 class KDEUI_EXPORT KSystemTrayIcon : public QSystemTrayIcon //krazy:exclude=qclasses
61 {
62  Q_OBJECT
63 public:
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 
164 Q_SIGNALS:
169  void quitSelected();
170 
171 public Q_SLOTS:
172  void toggleActive();
173 
174 private Q_SLOTS:
175  void contextMenuAboutToShow();
176  void minimizeRestoreAction();
177  void maybeQuit();
178  void activateOrHide( QSystemTrayIcon::ActivationReason reasonCalled );
179 
180 private:
181  void init( QWidget* );
182  void minimizeRestore( bool restore );
183 
184  KSystemTrayIconPrivate* const d;
185 
186 Q_PRIVATE_SLOT(d, void _k_slotNewFrame())
187 };
188 
189 #endif
190 
QWidget
KActionCollection
A container for a set of QAction objects.
Definition: kactioncollection.h:56
QMovie
kglobal.h
QString
QAction
KGlobal::mainComponent
const KComponentData & mainComponent()
kdeui_export.h
QSystemTrayIcon
KComponentData
QIcon
KSystemTrayIcon
KDE System Tray Window class
Definition: ksystemtrayicon.h:60
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:00 by doxygen 1.8.7 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 API Reference

Skip menu "kdelibs 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

Search



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