00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef KGREET_CLASSIC_H
00026 #define KGREET_CLASSIC_H
00027
00028 #include "kgreeterplugin.h"
00029
00030 #include <tqobject.h>
00031 #include <tqlayout.h>
00032
00033 class KLineEdit;
00034 class KPasswordEdit;
00035 class KSimpleConfig;
00036 class TQGridLayout;
00037 class TQLabel;
00038
00039 class KPamGreeter : public TQObject, public KGreeterPlugin {
00040 Q_OBJECT
00041
00042 public:
00043 KPamGreeter( KGreeterPluginHandler *handler,
00044 KdmThemer *themer,
00045 TQWidget *parent, TQWidget *predecessor,
00046 const TQString &fixedEntitiy,
00047 Function func, Context ctx );
00048 ~KPamGreeter();
00049 virtual void loadUsers( const TQStringList &users );
00050 virtual void presetEntity( const TQString &entity, int field );
00051 virtual TQString getEntity() const;
00052 virtual void setUser( const TQString &user );
00053 virtual void setEnabled( bool on );
00054 virtual bool textMessage( const char *message, bool error );
00055 virtual void textPrompt( const char *prompt, bool echo, bool nonBlocking );
00056 virtual bool binaryPrompt( const char *prompt, bool nonBlocking );
00057 virtual void start();
00058 virtual void suspend();
00059 virtual void resume();
00060 virtual void next();
00061 virtual void abort();
00062 virtual void succeeded();
00063 virtual void failed();
00064 virtual void revive();
00065 virtual void clear();
00066
00067 TQGridLayout *getLayoutItem() const { return static_cast<TQGridLayout*>(layoutItem); }
00068
00069 public slots:
00070 void slotLoginLostFocus();
00071 void slotActivity();
00072
00073 private:
00074 void setActive( bool enable );
00075 void setAllActive( bool enable );
00076 void returnData();
00077
00078 TQLabel *loginLabel;
00079 TQValueList<TQLabel*> authLabel;
00080 KLineEdit *loginEdit;
00081 TQWidget* m_parentWidget;
00082 TQValueList<KPasswordEdit*> authEdit;
00083 KSimpleConfig *stsFile;
00084 KdmThemer *m_themer;
00085 TQString fixedUser, curUser;
00086 Function func;
00087 Context ctx;
00088 int exp, pExp, has;
00089 unsigned state;
00090 bool running, authTok;
00091 };
00092
00093 #endif