author | clem <clem> | 2004-10-05 23:38:06 (UTC) |
---|---|---|
committer | clem <clem> | 2004-10-05 23:38:06 (UTC) |
commit | c09e45b02053c61b4e195c9d79a573ebfed2c521 (patch) (unidiff) | |
tree | 504a1a7d6b29e9dc186b2a7a7431ea41482041e3 /core/settings/security/multiauthconfig.h | |
parent | 2d05ffb4bad93532e17b9350ff2d66fe3419cbe3 (diff) | |
download | opie-c09e45b02053c61b4e195c9d79a573ebfed2c521.zip opie-c09e45b02053c61b4e195c9d79a573ebfed2c521.tar.gz opie-c09e45b02053c61b4e195c9d79a573ebfed2c521.tar.bz2 |
Changed the way to test authentication: instead of having a hardcoded config
option, allowByPass, we now have a "Test now" button in the configuration
interface. We add to change both the config app and the libopie2security files
for that, since the MultiauthMainWindow constructor has to know whether to
implement a debug mode (with an new argument, false by default). We also had
to give MultiauthGeneralConfig a link to MultiauthConfig, since the test
button triggers the writing of the whole configuration.
Some cleaning too (m_ on *all* member attributes, removal of obsolete
allowByPass / explanScreens checking code.
Diffstat (limited to 'core/settings/security/multiauthconfig.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/settings/security/multiauthconfig.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/core/settings/security/multiauthconfig.h b/core/settings/security/multiauthconfig.h index 5287083..e64795c 100644 --- a/core/settings/security/multiauthconfig.h +++ b/core/settings/security/multiauthconfig.h | |||
@@ -54,59 +54,64 @@ | |||
54 | #include <qtextstream.h> | 54 | #include <qtextstream.h> |
55 | 55 | ||
56 | /* UI */ | 56 | /* UI */ |
57 | #include "syncbase.h" | 57 | #include "syncbase.h" |
58 | #include "loginbase.h" | 58 | #include "loginbase.h" |
59 | 59 | ||
60 | class MultiauthConfig; | ||
61 | class MultiauthGeneralConfig; | ||
60 | 62 | ||
61 | /// the "misc" configuration tab, about general Opie Multiauth settings | 63 | /// the "misc" configuration tab, about general Opie Multiauth settings |
62 | class MultiauthGeneralConfig : public QWidget | 64 | class MultiauthGeneralConfig : public QWidget |
63 | { | 65 | { |
64 | Q_OBJECT | 66 | Q_OBJECT |
65 | public: | 67 | public: |
66 | MultiauthGeneralConfig(QWidget * parent, const char * name); | 68 | MultiauthGeneralConfig(MultiauthConfig * parentConfig, QWidget * parent, const char * name); |
67 | ~MultiauthGeneralConfig(); | 69 | ~MultiauthGeneralConfig(); |
68 | protected: | 70 | protected: |
69 | QCheckBox *onStart, *onResume, *noProtectConfig, *explanScreens, *allowBypass; | 71 | QCheckBox *m_onStart, *m_onResume, *m_noProtectConfig, *m_explanScreens; |
70 | QSpinBox *nbSuccessMin; | 72 | QSpinBox *m_nbSuccessMin; |
71 | private: | 73 | private: |
72 | friend class MultiauthConfig; | 74 | friend class MultiauthConfig; |
75 | /// pointer to the MultiauthConfig that called us | ||
76 | MultiauthConfig *m_parentConfig; | ||
77 | QPushButton *m_tryButton; | ||
73 | private slots: | 78 | private slots: |
74 | void checkBypass(); | 79 | void tryAuth(); |
75 | void checkScreens(); | ||
76 | }; | 80 | }; |
77 | 81 | ||
78 | /// the whole configuration dialog | 82 | /// the whole configuration dialog |
79 | class MultiauthConfig : public QDialog | 83 | class MultiauthConfig : public QDialog |
80 | { | 84 | { |
81 | Q_OBJECT | 85 | Q_OBJECT |
82 | 86 | ||
83 | public: | 87 | public: |
84 | static QString appName() { return QString::fromLatin1("security"); } | 88 | static QString appName() { return QString::fromLatin1("security"); } |
85 | MultiauthConfig(QWidget *parent, const char* name, WFlags fl); | 89 | MultiauthConfig(QWidget *parent, const char* name, WFlags fl); |
86 | virtual ~MultiauthConfig(); | 90 | virtual ~MultiauthConfig(); |
87 | void writeConfig(); | ||
88 | QList<Opie::Security::MultiauthConfigWidget> configWidgetList; | 91 | QList<Opie::Security::MultiauthConfigWidget> configWidgetList; |
89 | 92 | ||
90 | protected slots: | 93 | protected slots: |
91 | void accept(); | 94 | void accept(); |
92 | void done(int r); | 95 | void done(int r); |
93 | void pluginsChanged(); | 96 | void pluginsChanged(); |
94 | void moveSelectedUp(); | 97 | void moveSelectedUp(); |
95 | void moveSelectedDown(); | 98 | void moveSelectedDown(); |
99 | void writeConfigs(); | ||
96 | 100 | ||
97 | private slots: | 101 | private slots: |
98 | // Login and Sync stuff | 102 | // Login and Sync stuff |
99 | void setSyncNet(const QString&); | 103 | void setSyncNet(const QString&); |
100 | void changeLoginName(int); | 104 | void changeLoginName(int); |
101 | void toggleAutoLogin(bool); | 105 | void toggleAutoLogin(bool); |
102 | void restoreDefaults(); | 106 | void restoreDefaults(); |
103 | void insertDefaultRanges(); | 107 | void insertDefaultRanges(); |
104 | void deleteListEntry(); | 108 | void deleteListEntry(); |
105 | 109 | ||
106 | private: | 110 | private: |
111 | friend class MultiauthGeneralConfig; | ||
107 | /// the widget holding all the tabs (or pages) | 112 | /// the widget holding all the tabs (or pages) |
108 | Opie::Ui::OTabWidget *m_mainTW; | 113 | Opie::Ui::OTabWidget *m_mainTW; |
109 | /// list of authentication plugins in the "Plugins" page | 114 | /// list of authentication plugins in the "Plugins" page |
110 | QListView *m_pluginListView; | 115 | QListView *m_pluginListView; |
111 | QStringList m_allPlugins, m_excludePlugins; | 116 | QStringList m_allPlugins, m_excludePlugins; |
112 | QMap<QString,QCheckListItem*> m_plugins; | 117 | QMap<QString,QCheckListItem*> m_plugins; |
@@ -121,12 +126,13 @@ private: | |||
121 | 126 | ||
122 | int m_nbSuccessReq; | 127 | int m_nbSuccessReq; |
123 | bool m_plugins_changed; | 128 | bool m_plugins_changed; |
124 | bool m_pluginsInstalled; | 129 | bool m_pluginsInstalled; |
125 | 130 | ||
126 | void readConfig(); | 131 | void readConfig(); |
132 | void writeConfig(); | ||
127 | void loadPlugins(); | 133 | void loadPlugins(); |
128 | 134 | ||
129 | // Login and Sync stuff | 135 | // Login and Sync stuff |
130 | void loadUsers(); | 136 | void loadUsers(); |
131 | bool telnetAvailable() const; | 137 | bool telnetAvailable() const; |
132 | bool sshAvailable() const; | 138 | bool sshAvailable() const; |