add more spacing
[personal-kdebase.git] / workspace / libs / kdm / kgreet_generic.h
blob60c855f468c1e63cebc0ce682403f49b8d5038bb
1 /*
3 Conversation widget for kdm greeter
5 Copyright (C) 2008 Dirk Mueller <mueller@kde.org>
6 Copyright (C) 2008 Oswald Buddenhagen <ossi@kde.org>
8 based on classic kdm greeter:
10 Copyright (C) 1997, 1998, 2000 Steffen Hansen <hansen@kde.org>
11 Copyright (C) 2000-2003 Oswald Buddenhagen <ossi@kde.org>
13 This program is free software; you can redistribute it and/or modify
14 it under the terms of the GNU General Public License as published by
15 the Free Software Foundation; either version 2 of the License, or
16 (at your option) any later version.
18 This program is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License for more details.
23 You should have received a copy of the GNU General Public License
24 along with this program; if not, write to the Free Software
25 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
29 #ifndef KGREET_GENERIC_H
30 #define KGREET_GENERIC_H
32 #include "kgreeterplugin.h"
34 #include <QObject>
36 class QGridLayout;
37 class QWidget;
38 class KLineEdit;
40 class KGenericGreeter : public QObject, public KGreeterPlugin {
41 Q_OBJECT
43 public:
44 KGenericGreeter( KGreeterPluginHandler *handler,
45 QWidget *parent, const QString &fixedEntitiy,
46 Function func, Context ctx );
47 ~KGenericGreeter();
48 virtual void loadUsers( const QStringList &users );
49 virtual void presetEntity( const QString &entity, int field );
50 virtual QString getEntity() const;
51 virtual void setUser( const QString &user );
52 virtual void setEnabled( bool on );
53 virtual bool textMessage( const char *message, bool error );
54 virtual void textPrompt( const char *prompt, bool echo, bool nonBlocking );
55 virtual bool binaryPrompt( const char *prompt, bool nonBlocking );
56 virtual void start();
57 virtual void suspend();
58 virtual void resume();
59 virtual void next();
60 virtual void abort();
61 virtual void succeeded();
62 virtual void failed();
63 virtual void revive();
64 virtual void clear();
66 public slots:
67 void slotLoginLostFocus();
68 void slotChanged();
70 private:
71 QGridLayout *m_grid;
72 QList<QWidget *> m_children;
73 KLineEdit *m_lineEdit;
74 QWidget *m_parentWidget;
75 QList<QString> m_infoMsgs;
76 QString fixedUser, curUser;
77 QStringList m_users;
78 Function func;
79 Context ctx;
80 int exp, m_line;
81 bool running, m_echo;
84 #endif /* KGREET_GENERIC_H */