KDEUI
ksystemtrayicon.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef KSYSTEMTRAY_H
00021 #define KSYSTEMTRAY_H
00022
00023 #include <kdeui_export.h>
00024 #include <kglobal.h>
00025
00026 #include <QtGui/QSystemTrayIcon>
00027
00028 class KActionCollection;
00029 class KSystemTrayIconPrivate;
00030 class QAction;
00031 class QMovie;
00032
00056 class KDEUI_EXPORT KSystemTrayIcon : public QSystemTrayIcon
00057 {
00058 Q_OBJECT
00059 public:
00073 explicit KSystemTrayIcon( QWidget* parent = 0 );
00074
00079 explicit KSystemTrayIcon( const QString& icon, QWidget* parent = 0 );
00080
00085 explicit KSystemTrayIcon( const QIcon& icon, QWidget* parent = 0 );
00086
00092 explicit KSystemTrayIcon(QMovie* movie, QWidget* parent);
00093
00097 ~KSystemTrayIcon();
00098
00105 void setMovie(QMovie* movie);
00106
00113 const QMovie* movie() const;
00114
00119 KActionCollection* actionCollection();
00120
00124 QWidget *parentWidget() const;
00125
00132 bool parentWidgetTrayClose() const;
00133
00140 static QIcon loadIcon(const QString &icon, const KComponentData &componentData = KGlobal::mainComponent());
00141
00152 void setContextMenuTitle(QAction *action);
00153
00158 QAction *contextMenuTitle() const;
00159
00160 Q_SIGNALS:
00165 void quitSelected();
00166
00167 public Q_SLOTS:
00168 void toggleActive();
00169
00170 private Q_SLOTS:
00171 void contextMenuAboutToShow();
00172 void minimizeRestoreAction();
00173 void maybeQuit();
00174 void activateOrHide( QSystemTrayIcon::ActivationReason reasonCalled );
00175
00176 private:
00177 void init( QWidget* );
00178 void minimizeRestore( bool restore );
00179
00180 KSystemTrayIconPrivate* const d;
00181
00182 Q_PRIVATE_SLOT(d, void _k_slotNewFrame())
00183 };
00184
00185 #endif
00186