diff options
author | Slávek Banko <[email protected]> | 2013-07-28 02:30:20 +0200 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2013-07-28 02:30:20 +0200 |
commit | 48a589b8c526b34e79e8cdddc4cb7f5fc7b76815 (patch) | |
tree | 0f30d90998669b60a0aa840f824cc3d4ea7ddc66 /kshutdownlockout/lockout.h | |
download | kshutdown-48a589b8c526b34e79e8cdddc4cb7f5fc7b76815.tar.gz kshutdown-48a589b8c526b34e79e8cdddc4cb7f5fc7b76815.zip |
Initial import of kshutdown 1.0.4
Diffstat (limited to 'kshutdownlockout/lockout.h')
-rw-r--r-- | kshutdownlockout/lockout.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/kshutdownlockout/lockout.h b/kshutdownlockout/lockout.h new file mode 100644 index 0000000..faecd58 --- /dev/null +++ b/kshutdownlockout/lockout.h @@ -0,0 +1,59 @@ +#ifndef __LOCKOUT_H__ +#define __LOCKOUT_H__ + +#include <kpanelapplet.h> + +class KAction; + +/** + * @short A KShutDown panel applet. + * Based on the Lockout applet. + */ +class Lockout: public KPanelApplet +{ + Q_OBJECT +public: + /** + * Constructs a new applet. + * @param configFile A configuration file (provided by the Kicker) + * @param parent A parent widget + */ + Lockout(const QString& configFile, QWidget *parent = 0); + + /** + * Destructor. + */ + ~Lockout(); + + /** + * Returns a suggested height for a given @p width. + */ + int heightForWidth(int width) const; + + /** + * Returns a suggested width for a given @p height. + */ + int widthForHeight(int height) const; +private: + bool _transparent; + KAction + *_configureKShutDownAction, + *_lockScreenAction, + *_logoutAction, + *_rebootAction, + *_shutDownAction; + void callKShutDown(const QCString &function); + void initActions(); + void runCommand(const QString &command); +private slots: + void slotCancel(); + void slotConfigureKShutDown(); + void slotIconChanged(); + void slotLockScreen(); + void slotLogout(); + void slotReboot(); + void slotShowKShutDown(); + void slotShutDown(); +}; + +#endif // __LOCKOUT_H__ |