summaryrefslogtreecommitdiff
path: root/core/settings/security/multiauthconfig.h
authorclem <clem>2004-10-05 23:38:06 (UTC)
committer clem <clem>2004-10-05 23:38:06 (UTC)
commitc09e45b02053c61b4e195c9d79a573ebfed2c521 (patch) (unidiff)
tree504a1a7d6b29e9dc186b2a7a7431ea41482041e3 /core/settings/security/multiauthconfig.h
parent2d05ffb4bad93532e17b9350ff2d66fe3419cbe3 (diff)
downloadopie-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) (show whitespace changes)
-rw-r--r--core/settings/security/multiauthconfig.h18
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
@@ -57,22 +57,26 @@
57#include "syncbase.h" 57#include "syncbase.h"
58#include "loginbase.h" 58#include "loginbase.h"
59 59
60class MultiauthConfig;
61class MultiauthGeneralConfig;
60 62
61/// the "misc" configuration tab, about general Opie Multiauth settings 63/// the "misc" configuration tab, about general Opie Multiauth settings
62class MultiauthGeneralConfig : public QWidget 64class MultiauthGeneralConfig : public QWidget
63{ 65{
64 Q_OBJECT 66 Q_OBJECT
65public: 67public:
66 MultiauthGeneralConfig(QWidget * parent, const char * name); 68 MultiauthGeneralConfig(MultiauthConfig * parentConfig, QWidget * parent, const char * name);
67 ~MultiauthGeneralConfig(); 69 ~MultiauthGeneralConfig();
68protected: 70protected:
69 QCheckBox *onStart, *onResume, *noProtectConfig, *explanScreens, *allowBypass; 71 QCheckBox *m_onStart, *m_onResume, *m_noProtectConfig, *m_explanScreens;
70 QSpinBox *nbSuccessMin; 72 QSpinBox *m_nbSuccessMin;
71private: 73private:
72 friend class MultiauthConfig; 74 friend class MultiauthConfig;
75 /// pointer to the MultiauthConfig that called us
76 MultiauthConfig *m_parentConfig;
77 QPushButton *m_tryButton;
73private slots: 78private slots:
74 void checkBypass(); 79 void tryAuth();
75 void checkScreens();
76}; 80};
77 81
78/// the whole configuration dialog 82/// the whole configuration dialog
@@ -84,7 +88,6 @@ 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
90protected slots: 93protected slots:
@@ -93,6 +96,7 @@ protected slots:
93 void pluginsChanged(); 96 void pluginsChanged();
94 void moveSelectedUp(); 97 void moveSelectedUp();
95 void moveSelectedDown(); 98 void moveSelectedDown();
99 void writeConfigs();
96 100
97private slots: 101private slots:
98 // Login and Sync stuff 102 // Login and Sync stuff
@@ -104,6 +108,7 @@ private slots:
104 void deleteListEntry(); 108 void deleteListEntry();
105 109
106private: 110private:
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
@@ -124,6 +129,7 @@ private:
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