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
00060 class KDEUI_EXPORT KSystemTrayIcon : public QSystemTrayIcon
00061 {
00062 Q_OBJECT
00063 public:
00077 explicit KSystemTrayIcon( QWidget* parent = 0 );
00078
00083 explicit KSystemTrayIcon( const QString& icon, QWidget* parent = 0 );
00084
00089 explicit KSystemTrayIcon( const QIcon& icon, QWidget* parent = 0 );
00090
00096 explicit KSystemTrayIcon(QMovie* movie, QWidget* parent);
00097
00101 ~KSystemTrayIcon();
00102
00109 void setMovie(QMovie* movie);
00110
00117 const QMovie* movie() const;
00118
00123 KActionCollection* actionCollection();
00124
00128 QWidget *parentWidget() const;
00129
00136 bool parentWidgetTrayClose() const;
00137
00144 static QIcon loadIcon(const QString &icon, const KComponentData &componentData = KGlobal::mainComponent());
00145
00156 void setContextMenuTitle(QAction *action);
00157
00162 QAction *contextMenuTitle() const;
00163
00164 Q_SIGNALS:
00169 void quitSelected();
00170
00171 public Q_SLOTS:
00172 void toggleActive();
00173
00174 private Q_SLOTS:
00175 void contextMenuAboutToShow();
00176 void minimizeRestoreAction();
00177 void maybeQuit();
00178 void activateOrHide( QSystemTrayIcon::ActivationReason reasonCalled );
00179
00180 private:
00181 void init( QWidget* );
00182 void minimizeRestore( bool restore );
00183
00184 KSystemTrayIconPrivate* const d;
00185
00186 Q_PRIVATE_SLOT(d, void _k_slotNewFrame())
00187 };
00188
00189 #endif
00190