summaryrefslogtreecommitdiffstats
path: root/kshutdownlockout/lockout.h
blob: a494b47fb03e912d0f56b9d710dfd1adf7708722 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#ifndef __LOCKOUT_H__
#define __LOCKOUT_H__

#include <kpanelapplet.h>

class TDEAction;

/**
 * @short A KShutDown panel applet.
 * Based on the Lockout applet.
 */
class Lockout: public KPanelApplet
{
	TQ_OBJECT
public:
	/**
	 * Constructs a new applet.
	 * @param configFile A configuration file (provided by the Kicker)
	 * @param parent A parent widget
	 */
	Lockout(const TQString& configFile, TQWidget *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;
	TDEAction
		*_configureKShutDownAction,
		*_lockScreenAction,
		*_logoutAction,
		*_rebootAction,
		*_shutDownAction;
	void callKShutDown(const TQCString &function);
	void initActions();
	void runCommand(const TQString &command);
private slots:
	void slotCancel();
	void slotConfigureKShutDown();
	void slotIconChanged();
	void slotLockScreen();
	void slotLogout();
	void slotReboot();
	void slotShowKShutDown();
	void slotShutDown();
};

#endif // __LOCKOUT_H__