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

KDEUI

ksystemtrayicon.h

Go to the documentation of this file.
00001 /* This file is part of the KDE libraries
00002    Copyright (C) 1999 Matthias Ettrich <ettrich@kde.org>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License version 2 as published by the Free Software Foundation.
00007 
00008    This library is distributed in the hope that it will be useful,
00009    but WITHOUT ANY WARRANTY; without even the implied warranty of
00010    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011    Library General Public License for more details.
00012 
00013    You should have received a copy of the GNU Library General Public License
00014    along with this library; see the file COPYING.LIB.  If not, write to
00015    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00016    Boston, MA 02110-1301, USA.
00017 */
00018 #ifndef KSYSTEMTRAY_H
00019 #define KSYSTEMTRAY_H
00020 
00021 #include <kdeui_export.h>
00022 #include <kglobal.h>
00023 
00024 #include <QtGui/QSystemTrayIcon>
00025 
00026 class KActionCollection;
00027 class KSystemTrayIconPrivate;
00028 class QAction;
00029 
00053 class KDEUI_EXPORT KSystemTrayIcon : public QSystemTrayIcon
00054 {
00055     Q_OBJECT
00056 public:
00057 
00071     explicit KSystemTrayIcon( QWidget* parent = 0 );
00072 
00077     explicit KSystemTrayIcon( const QString& icon, QWidget* parent = 0 );
00078 
00083     explicit KSystemTrayIcon( const QIcon& icon, QWidget* parent = 0 );
00084 
00088     ~KSystemTrayIcon();
00089 
00094     KActionCollection* actionCollection();
00095 
00099     QWidget *parentWidget() const;
00100 
00107     bool parentWidgetTrayClose() const;
00108 
00115     static QIcon loadIcon(const QString &icon, const KComponentData &componentData = KGlobal::mainComponent());
00116 
00127     void setContextMenuTitle(QAction *action);
00128 
00133     QAction *contextMenuTitle() const;
00134 
00135 Q_SIGNALS:
00140     void quitSelected();
00141 
00142 public Q_SLOTS:
00143     void toggleActive();
00144 
00145 private Q_SLOTS:
00146     void contextMenuAboutToShow();
00147     void minimizeRestoreAction();
00148     void maybeQuit();
00149     void activateOrHide( QSystemTrayIcon::ActivationReason reasonCalled );
00150 
00151 private:
00152     void init( QWidget* );
00153     void minimizeRestore( bool restore );
00154 
00155     KSystemTrayIconPrivate* const d;
00156 };
00157 
00158 #endif
00159 

KDEUI

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • KIO
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal