1 //===========================================================================
3 // This file is part of the KDE project
5 // Copyright 1999 Martin R. Jones <mjones@kde.org>
6 // Copyright 2003 Oswald Buddenhagen <ossi@kde.org>
12 #include <kgreeterplugin.h>
17 #include <QTimerEvent>
19 #include <QGridLayout>
22 struct GreeterPluginHandle
;
30 //===========================================================================
32 // Simple dialog for entering a password.
33 // It does not handle password validation.
35 class PasswordDlg
: public KDialog
, public KGreeterPluginHandler
40 PasswordDlg(LockProcess
*parent
, GreeterPluginHandle
*plugin
, const QString
&text
= QString());
42 virtual void setVisible(bool visible
);
44 // from KGreetPluginHandler
45 virtual void gplugReturnText( const char *text
, int tag
);
46 virtual void gplugReturnBinary( const char *data
);
47 virtual void gplugSetUser( const QString
& );
48 virtual void gplugStart();
49 virtual void gplugChanged();
50 virtual void gplugActivity();
51 virtual void gplugMsgBox( QMessageBox::Icon type
, const QString
&text
);
52 virtual bool gplugHasNode( const QString
&id
);
55 virtual void timerEvent(QTimerEvent
*);
56 virtual bool eventFilter(QObject
*, QEvent
*);
59 void slotSwitchUser();
60 void slotSessionActivated();
61 void slotStartNewSession();
68 int Reader (void *buf
, int count
);
69 bool GRead (void *buf
, int count
);
70 bool GWrite (const void *buf
, int count
);
71 bool GSendInt (int val
);
72 bool GSendStr (const char *buf
);
73 bool GSendArr (int len
, const char *buf
);
74 bool GRecvInt (int *val
);
75 bool GRecvArr (char **buf
);
79 GreeterPluginHandle
*mPlugin
;
80 KGreeterPlugin
*greet
;
82 QGridLayout
*frameLayout
;
84 KPushButton
*mNewSessButton
, *ok
, *cancel
;
88 bool mUnlockingFailed
;