author | zecke <zecke> | 2004-07-17 16:46:58 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-07-17 16:46:58 (UTC) |
commit | e917f3763a0beb6d540adbfa5f59e478d3baec64 (patch) (side-by-side diff) | |
tree | c2cf3f13559d9693a4f66cd3f65e419b571377bd /noncore/securityplugins/dummy | |
parent | d6a4bf47ef7dfaabd08fb8d514cde1832a055816 (diff) | |
download | opie-e917f3763a0beb6d540adbfa5f59e478d3baec64.zip opie-e917f3763a0beb6d540adbfa5f59e478d3baec64.tar.gz opie-e917f3763a0beb6d540adbfa5f59e478d3baec64.tar.bz2 |
Addjust to the namespace changes of OMAF
Diffstat (limited to 'noncore/securityplugins/dummy') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/securityplugins/dummy/dummyplugin.cpp | 11 | ||||
-rw-r--r-- | noncore/securityplugins/dummy/dummyplugin.h | 4 | ||||
-rw-r--r-- | noncore/securityplugins/dummy/dummypluginimpl.cpp | 3 | ||||
-rw-r--r-- | noncore/securityplugins/dummy/dummypluginimpl.h | 5 |
4 files changed, 14 insertions, 9 deletions
diff --git a/noncore/securityplugins/dummy/dummyplugin.cpp b/noncore/securityplugins/dummy/dummyplugin.cpp index 0d19e43..594825e 100644 --- a/noncore/securityplugins/dummy/dummyplugin.cpp +++ b/noncore/securityplugins/dummy/dummyplugin.cpp @@ -4,12 +4,15 @@ #include <qdialog.h> #include <qlayout.h> #include <qlabel.h> #include <qpushbutton.h> +using Opie::Security::MultiauthConfigWidget; +using Opie::Security::MultiauthPluginObject; + /// Simply return its name (Dummy plugin) QString DummyPlugin::pluginName() const { return "Dummy plugin"; } /// no configuration widget for the moment @@ -51,42 +54,42 @@ int DummyPlugin::authenticate() { "Dummy dialog", TRUE, Qt::WStyle_NoBorder | Qt::WStyle_Customize | Qt::WStyle_StaysOnTop); QRect desk = oApp->desktop()->geometry(); dummyDialog.setGeometry( 0, 0, desk.width(), desk.height() ); - + /* Creation of the particular widgets of our Dummy user interface * Note: we have to resize the VBox to the QDialog size, since it's not * done automatically. */ QVBoxLayout layout(&dummyDialog); layout.setSpacing(11); layout.setMargin(11); layout.setAlignment( Qt::AlignTop ); - + QLabel title("<center><h1>" + tr("\"Dummy\" <br />demonstration plugin") + "</h1></center>", &dummyDialog); QLabel subTitle("<center><h2>" +tr("You can simulate the following outcomes:") + "</h2></center>", &dummyDialog); layout.addWidget(&title); layout.addWidget(&subTitle); QHBoxLayout hl(&layout); QPushButton pbSuccess("Success", &dummyDialog); QPushButton pbSkip("Skip", &dummyDialog); QPushButton pbFailure("Failure", &dummyDialog); hl.addWidget(&pbSuccess, 0, Qt::AlignHCenter); hl.addWidget(&pbSkip, 0, Qt::AlignHCenter); hl.addWidget(&pbFailure, 0, Qt::AlignHCenter); - + /* Linking our pushbuttons to exit functions * (each result button here has a corresponding slot) */ QObject::connect(&pbSuccess, SIGNAL(clicked()), this, SLOT(success())); QObject::connect(&pbFailure, SIGNAL(clicked()), this, SLOT(failure())); QObject::connect(&pbSkip, SIGNAL(clicked()), this, SLOT(skip())); - + /* The value of the signal these three slots will emit corresponds to * the different values we want to return */ QObject::connect(this, SIGNAL(emitCode(int)), &dummyDialog, SLOT(done(int))); return dummyDialog.exec(); } diff --git a/noncore/securityplugins/dummy/dummyplugin.h b/noncore/securityplugins/dummy/dummyplugin.h index 9680dff..3bfca98 100644 --- a/noncore/securityplugins/dummy/dummyplugin.h +++ b/noncore/securityplugins/dummy/dummyplugin.h @@ -39,19 +39,19 @@ #include <opie2/multiauthplugininterface.h> /// Multi-authentication example plugin, implementing a trivial 'yes/no' verification. /** * The plugin itself, implementing the main authenticate() function. */ -class DummyPlugin : public QObject, public MultiauthPluginObject { +class DummyPlugin : public QObject, public Opie::Security::MultiauthPluginObject { Q_OBJECT public: int authenticate(); - MultiauthConfigWidget * configWidget(QWidget * parent); + Opie::Security::MultiauthConfigWidget * configWidget(QWidget * parent); QString pixmapNameConfig() const; QString pixmapNameWidget() const; QString pluginName() const; signals: /// Signal carrying the result code of this plugin diff --git a/noncore/securityplugins/dummy/dummypluginimpl.cpp b/noncore/securityplugins/dummy/dummypluginimpl.cpp index 518996c..54dbdd1 100644 --- a/noncore/securityplugins/dummy/dummypluginimpl.cpp +++ b/noncore/securityplugins/dummy/dummypluginimpl.cpp @@ -1,8 +1,11 @@ #include "dummypluginimpl.h" +using Opie::Security::MultiauthPluginInterface; +using Opie::Security::MultiauthPluginObject; + DummyPluginImpl::DummyPluginImpl() { dummyPlugin = new DummyPlugin(); } DummyPluginImpl::~DummyPluginImpl() { delete dummyPlugin; diff --git a/noncore/securityplugins/dummy/dummypluginimpl.h b/noncore/securityplugins/dummy/dummypluginimpl.h index 49a18cd..ce8620d 100644 --- a/noncore/securityplugins/dummy/dummypluginimpl.h +++ b/noncore/securityplugins/dummy/dummypluginimpl.h @@ -34,25 +34,24 @@ #ifndef DUMMY_PLUGIN_IMPL_H #define DUMMY_PLUGIN_IMPL_H #include "dummyplugin.h" /// Standard multiauth plugin class -class DummyPluginImpl : public MultiauthPluginInterface{ +class DummyPluginImpl : public Opie::Security::MultiauthPluginInterface{ public: DummyPluginImpl(); virtual ~DummyPluginImpl(); QRESULT queryInterface( const QUuid &, QUnknownInterface** ); /// defines standard addRef() and release() functions Q_REFCOUNT; - virtual MultiauthPluginObject *plugin(); + virtual Opie::Security::MultiauthPluginObject *plugin(); private: /// the plugin itself DummyPlugin *dummyPlugin; - ulong ref; }; #endif |