5 Copyright (C) 1997, 1998 Steffen Hansen <hansen@kde.org>
6 Copyright (C) 2000-2004 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.
37 class QListWidgetItem
;
47 SessType( const QString
&n
, const QString
&t
, bool h
, int p
) :
48 name( n
), type( t
), action( 0 ), hid( h
), prio( p
) {}
49 bool operator<( const SessType
&st
) const {
50 return hid
!= st
.hid
? hid
< st
.hid
:
51 prio
!= st
.prio
? prio
< st
.prio
:
56 class KGreeter
: public KGDialog
, public KGVerifyHandler
{
58 typedef KGDialog inherited
;
61 KGreeter( bool themed
= false );
67 void slotUserClicked( QListWidgetItem
* );
68 void slotSessionSelected();
69 void slotUserEntered();
72 void installUserList();
73 void insertUser( const QImage
&, const QString
&, struct passwd
* );
75 void putSession( const QString
&, const QString
&, bool, const char * );
76 void insertSessions();
77 virtual void pluginSetup();
78 void setPrevWM( QAction
* );
80 QString curUser
, dName
;
81 KConfigGroup
*stsGroup
;
82 UserListView
*userView
;
83 QStringList
*userList
;
85 QActionGroup
*sessGroup
;
86 QVector
<SessType
> sessionTypes
;
87 int nNormals
, nSpecials
;
93 static PluginList pluginList
;
96 void slotLoadPrevWM();
98 public: // from KGVerifyHandler
99 virtual void verifyPluginChanged( int id
);
100 virtual void verifyClear();
101 virtual void verifyOk();
102 virtual void verifyFailed();
103 virtual void verifyRetry();
104 virtual void verifySetUser( const QString
&user
);
107 class KStdGreeter
: public KGreeter
{
109 typedef KGreeter inherited
;
115 virtual void pluginSetup();
120 QPushButton
*goButton
;
122 public: // from KGVerifyHandler
123 virtual void verifyFailed();
124 virtual void verifyRetry();
127 class KThemedGreeter
: public KGreeter
{
129 typedef KGreeter inherited
;
132 KThemedGreeter( KdmThemer
*_themer
);
136 void slotThemeActivated( const QString
&id
);
138 void slotActionMenu();
141 virtual void updateStatus( bool fail
, bool caps
, int timedleft
);
142 virtual void pluginSetup();
143 virtual void keyPressEvent( QKeyEvent
* );
144 virtual bool event( QEvent
*e
);
149 KdmItem
*caps_warning
, *xauth_warning
, *pam_error
, *timed_label
,
150 *userlist_node
, *userlist_rect
,
151 *session_button
, *system_button
;
153 // public: // from KGVerifyHandler
154 // virtual void verifyFailed();
155 // virtual void verifyRetry();
158 #endif /* KGREETER_H */