not quite so much needs to be delayed to the init() function
[personal-kdebase.git] / workspace / kdm / kfrontend / kgdialog.h
blob5d86aaf6a37b0ed8cfb9972e2c9369020878af91
1 /*
3 Base class for various kdm greeter dialogs
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.
26 #ifndef KGDIALOG_H
27 #define KGDIALOG_H
29 #include <config-workspace.h>
30 #include <config-kdm.h> // for WITH_KDM_XCONSOLE
32 #include "kdmconfig.h"
33 #include "kfdialog.h"
35 class KConsole;
36 class KGVerify;
38 class QMenu;
40 #define ex_exit 1
41 #define ex_greet 2
42 #define ex_choose 3
43 #define ex_login 4
45 class KGDialog : public FDialog {
46 Q_OBJECT
47 typedef FDialog inherited;
49 public:
50 KGDialog( bool themed = false );
52 public Q_SLOTS:
53 void slotActivateMenu( QAction * );
54 void slotActivateMenu( bool );
55 void slotExit();
56 void slotSwitch();
57 void slotConsole();
58 void slotShutdown();
60 protected:
61 #ifdef XDMCP
62 void completeMenu( int _switchIf, int _switchCode, const QString &_switchMsg, int _switchAccel );
63 #else
64 void completeMenu();
65 #endif
66 void inserten( const QKeySequence &shortcut, const char *member, int data = -1 );
67 void inserten( const QString &txt, const QKeySequence &shortcut, const char *member );
68 void inserten( const QString &txt, const QKeySequence &shortcut, QMenu *cmnu );
70 bool needSep;
71 QMenu *optMenu;
72 KGVerify *verify;
73 #ifdef WITH_KDM_XCONSOLE
74 KConsole *consoleView;
75 #endif
77 private Q_SLOTS:
78 void slotDisplaySelected( QAction * );
79 void slotPopulateDisplays();
81 private:
82 void ensureMenu();
84 #ifdef HAVE_VTS
85 QMenu *dpyMenu;
86 #endif
87 int switchCode;
90 #endif /* KGDIALOG_H */