diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 4aed2c8219774f5d797760606b8489a92ddc5163 (patch) | |
tree | 3f8c130f7d269626bf6a9447407ef6c35954426a /kdesktop/lock/lockdlg.h | |
download | tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.tar.gz tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdesktop/lock/lockdlg.h')
-rw-r--r-- | kdesktop/lock/lockdlg.h | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/kdesktop/lock/lockdlg.h b/kdesktop/lock/lockdlg.h new file mode 100644 index 000000000..4bb468c03 --- /dev/null +++ b/kdesktop/lock/lockdlg.h @@ -0,0 +1,92 @@ +//=========================================================================== +// +// This file is part of the KDE project +// +// Copyright (c) 1999 Martin R. Jones <[email protected]> +// Copyright (c) 2003 Oswald Buddenhagen <[email protected]> +// + +#ifndef __LOCKDLG_H__ +#define __LOCKDLG_H__ + +#include <kgreeterplugin.h> + +#include <qdialog.h> +#include <qstringlist.h> + +struct GreeterPluginHandle; +class LockProcess; +class QFrame; +class QGridLayout; +class QLabel; +class KPushButton; +class QListView; + +//=========================================================================== +// +// Simple dialog for entering a password. +// It does not handle password validation. +// +class PasswordDlg : public QDialog, public KGreeterPluginHandler +{ + Q_OBJECT + +public: + PasswordDlg(LockProcess *parent, GreeterPluginHandle *plugin); + ~PasswordDlg(); + virtual void show(); + + // from KGreetPluginHandler + virtual void gplugReturnText( const char *text, int tag ); + virtual void gplugReturnBinary( const char *data ); + virtual void gplugSetUser( const QString & ); + virtual void gplugStart(); + virtual void gplugActivity(); + virtual void gplugMsgBox( QMessageBox::Icon type, const QString &text ); + +protected: + virtual void timerEvent(QTimerEvent *); + virtual bool eventFilter(QObject *, QEvent *); + +private slots: + void slotSwitchUser(); + void slotSessionActivated(); + void slotStartNewSession(); + void slotOK(); + void layoutClicked(); + void slotActivity(); + +private: + void setLayoutText( const QString &txt ); + void capsLocked(); + void updateLabel(); + int Reader (void *buf, int count); + bool GRead (void *buf, int count); + bool GWrite (const void *buf, int count); + bool GSendInt (int val); + bool GSendStr (const char *buf); + bool GSendArr (int len, const char *buf); + bool GRecvInt (int *val); + bool GRecvArr (char **buf); + void handleVerify(); + void reapVerify(); + void cantCheck(); + GreeterPluginHandle *mPlugin; + KGreeterPlugin *greet; + QFrame *frame; + QGridLayout *frameLayout; + QLabel *mStatusLabel; + KPushButton *mNewSessButton, *ok, *cancel; + QPushButton *mLayoutButton; + int mFailedTimerId; + int mTimeoutTimerId; + int mCapsLocked; + bool mUnlockingFailed; + QStringList layoutsList; + QStringList::iterator currLayout; + int sPid, sFd; + QListView *lv; +}; + +#endif + |