add more spacing
[personal-kdebase.git] / workspace / libs / kdm / kgreet_winbind.h
blobf317fd83ee6f1c7500d54960859ab3f69453d273
1 /*
3 Conversation widget for kdm greeter
5 Copyright (C) 1997, 1998 Steffen Hansen <hansen@kde.org>
6 Copyright (C) 2000-2003 Oswald Buddenhagen <ossi@kde.org>
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26 #ifndef KGREET_WINBIND_H
27 #define KGREET_WINBIND_H
29 #include "kgreeterplugin.h"
31 #include <QObject>
32 #include <QtCore/QTimer>
34 class KComboBox;
35 class KLineEdit;
36 class KSimpleConfig;
37 class QLabel;
38 class KProcess;
40 class KWinbindGreeter : public QObject, public KGreeterPlugin {
41 Q_OBJECT
43 public:
44 KWinbindGreeter( KGreeterPluginHandler *handler,
45 QWidget *parent,
46 const QString &fixedEntitiy,
47 Function func, Context ctx );
48 ~KWinbindGreeter();
49 virtual void loadUsers( const QStringList &users );
50 virtual void presetEntity( const QString &entity, int field );
51 virtual QString getEntity() const;
52 virtual void setUser( const QString &user );
53 virtual void setEnabled( bool on );
54 virtual bool textMessage( const char *message, bool error );
55 virtual void textPrompt( const char *prompt, bool echo, bool nonBlocking );
56 virtual bool binaryPrompt( const char *prompt, bool nonBlocking );
57 virtual void start();
58 virtual void suspend();
59 virtual void resume();
60 virtual void next();
61 virtual void abort();
62 virtual void succeeded();
63 virtual void failed();
64 virtual void revive();
65 virtual void clear();
67 public Q_SLOTS:
68 void slotLoginLostFocus();
69 void slotChangedDomain( const QString &dom );
70 void slotChanged();
71 void slotStartDomainList();
72 void slotEndDomainList();
74 private:
75 void setActive( bool enable );
76 void setActive2( bool enable );
77 void returnData();
79 QLabel *domainLabel, *loginLabel, *passwdLabel, *passwd1Label, *passwd2Label;
80 KComboBox *domainCombo;
81 KLineEdit *loginEdit;
82 KLineEdit *passwdEdit, *passwd1Edit, *passwd2Edit;
83 KSimpleConfig *stsFile;
84 QString fixedDomain, fixedUser, curUser;
85 QStringList allUsers;
86 KProcess* m_domainLister;
88 Function func;
89 Context ctx;
90 int exp, pExp, has;
91 bool running, authTok;
94 #endif /* KGREET_WINBIND_H */