6
#include <KSystemTrayIcon>
12
* Provides a system tray icon for a normal window.
14
* @author Richard Moore, rich@kde.org
16
class KSysTrayCmd : public KSystemTrayIcon
23
void setWindow( WId w ) { win = w; }
24
void setCommand( const QString &cmd ) { command = cmd; }
25
void setPattern( const QString ®exp ) { window = regexp; }
26
void setStartOnShow( bool enable ) { lazyStart = enable; isVisible = !enable; }
27
void setNoQuit( bool enable ) { noquit = enable; }
28
void setQuitOnHide( bool enable ) { quitOnHide = enable; }
29
void setOnTop( bool enable ) { onTop = enable; }
30
void setOwnIcon( bool enable ) { ownIcon = enable; }
31
void setDefaultTip( const QString &tip ) { tooltip = tip; }
32
bool hasTargetWindow() const { return (win != 0); }
33
bool hasRunningClient() const { return (client != 0); }
34
const QString &errorMsg() const { return errStr; }
38
static WId findRealWindow( WId w, int depth = 0 );
45
void toggleWindow() { if ( isVisible ) hideWindow(); else showWindow(); }
47
void setTargetWindow( WId w );
48
void execContextMenu( const QPoint &pos );
56
void windowAdded(WId w);
57
void windowChanged(WId w);
58
void mousePressEvent(QSystemTrayIcon::ActivationReason reason);
62
void checkExistingWindows();
72
bool onTop; ///< tells if window must stay on top or not
73
bool ownIcon; ///< tells if the ksystraycmd icon must be used in systray
74
bool waitingForWindow;
81
/** Memorized 'top' position of the window*/
83
/** Memorized 'left' position of the window*/
87
#endif // KSYSTRAYCMD_H