blob: 606870a99ae66b887fbb0b16c64c7b238b352e7e (
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
|
#ifndef LOCKOUT_H
#define LOCKOUT_H
#include <qevent.h>
#include <qstring.h>
#include <kpanelapplet.h>
#include "simplebutton.h"
class QBoxLayout;
class QToolButton;
class Lockout : public KPanelApplet
{
Q_OBJECT
public:
Lockout( const QString& configFile,
QWidget *parent = 0, const char *name = 0 );
~Lockout();
int widthForHeight(int height) const;
int heightForWidth(int width) const;
protected:
virtual void mousePressEvent( QMouseEvent * );
virtual void mouseMoveEvent( QMouseEvent * );
virtual void mouseReleaseEvent( QMouseEvent * );
virtual void mouseDoubleClickEvent( QMouseEvent * );
virtual bool eventFilter( QObject *, QEvent * );
private slots:
void lock();
void logout();
void slotLockPrefs();
void slotLogoutPrefs();
void slotTransparent();
void slotIconChanged();
private:
void propagateMouseEvent( QMouseEvent * );
void checkLayout( int height ) const;
SimpleButton *lockButton, *logoutButton;
QBoxLayout *layout;
bool bTransparent;
};
#endif // LOCKOUT_H
|