summaryrefslogtreecommitdiff
path: root/noncore/securityplugins/notice
Side-by-side diff
Diffstat (limited to 'noncore/securityplugins/notice') (more/less context) (show whitespace changes)
-rw-r--r--noncore/securityplugins/notice/noticeConfigWidget.cpp2
-rw-r--r--noncore/securityplugins/notice/noticeConfigWidget.h3
-rw-r--r--noncore/securityplugins/notice/noticeplugin.cpp2
-rw-r--r--noncore/securityplugins/notice/noticeplugin.h4
-rw-r--r--noncore/securityplugins/notice/noticepluginimpl.cpp3
-rw-r--r--noncore/securityplugins/notice/noticepluginimpl.h5
6 files changed, 13 insertions, 6 deletions
diff --git a/noncore/securityplugins/notice/noticeConfigWidget.cpp b/noncore/securityplugins/notice/noticeConfigWidget.cpp
index e2c2d83..e532232 100644
--- a/noncore/securityplugins/notice/noticeConfigWidget.cpp
+++ b/noncore/securityplugins/notice/noticeConfigWidget.cpp
@@ -1,22 +1,24 @@
#include "noticeConfigWidget.h"
#include <opie2/odebug.h>
#include <qwidget.h>
#include <qlayout.h>
#include <qlabel.h>
#include <qregexp.h>
#include <qgroupbox.h>
+using Opie::Security::MultiauthConfigWidget;
+
/// constructs the widget, filling the noticeMLE QMultiLineEdit with the "noticeText" entry
NoticeConfigWidget::NoticeConfigWidget(QWidget* parent = 0, const char* name = "Notice configuration widget") : MultiauthConfigWidget(parent, name)
{
QVBoxLayout *baseLayout = new QVBoxLayout( this);
baseLayout->setSpacing(11);
baseLayout->setMargin(6);
baseLayout->setAlignment( Qt::AlignTop );
QGroupBox *configBox = new QGroupBox(0, Qt::Vertical, tr("Set the message the user must accept"), this);
baseLayout->addWidget(configBox);
QVBoxLayout *boxLayout = new QVBoxLayout( configBox->layout() );
diff --git a/noncore/securityplugins/notice/noticeConfigWidget.h b/noncore/securityplugins/notice/noticeConfigWidget.h
index 69f15bf..c90484c 100644
--- a/noncore/securityplugins/notice/noticeConfigWidget.h
+++ b/noncore/securityplugins/notice/noticeConfigWidget.h
@@ -40,32 +40,33 @@
#include <opie2/multiauthconfigwidget.h>
static char defaultNoticeText [] = "<h2>NOTICE TO USERS</h2>\n"
"<p>This is a private computer system and is the property of "
"the company XXX / Mr or Ms X. It is for authorized "
"use only. Users have no expectation of privacy.</p>\n"
"<p><strong>Unauthorized or improper use of this system may result in "
"disciplinary action and civil and criminal penalties. <em>By continuing to use "
"this system you indicate your awareness of and consent to these "
"terms. LOG OFF IMMEDIATELY if you do not agree to them.</em></strong></p>";
-class NoticeConfigWidget : public MultiauthConfigWidget {
+class NoticeConfigWidget : public Opie::Security::MultiauthConfigWidget {
Q_OBJECT
public:
NoticeConfigWidget(QWidget* parent, const char* name);
virtual ~NoticeConfigWidget();
virtual void writeConfig();
private:
QMultiLineEdit * noticeMLE;
QPushButton * resetNoticeButton;
private slots:
void resetNotice();
private:
Config * m_config;
QString getNoticeText();
void setNoticeText(QString noticeText);
};
#endif // NOTICECONFIGWIDGET_H
+
diff --git a/noncore/securityplugins/notice/noticeplugin.cpp b/noncore/securityplugins/notice/noticeplugin.cpp
index bacc439..25a452a 100644
--- a/noncore/securityplugins/notice/noticeplugin.cpp
+++ b/noncore/securityplugins/notice/noticeplugin.cpp
@@ -1,19 +1,21 @@
#include "noticeplugin.h"
#include <opie2/oapplication.h>
#include <qmessagebox.h>
#include <qregexp.h>
+using Opie::Security::MultiauthPluginObject;
+using Opie::Security::MultiauthConfigWidget;
/// creates and initializes the m_config Config object
NoticePlugin::NoticePlugin() : MultiauthPluginObject(), noticeW(0) {
m_config = new Config("Security");
m_config->setGroup("NoticePlugin");
}
/// deletes the m_config Config object and noticeW if necessary
NoticePlugin::~NoticePlugin() {
delete m_config;
if (noticeW != 0)
delete noticeW;
diff --git a/noncore/securityplugins/notice/noticeplugin.h b/noncore/securityplugins/notice/noticeplugin.h
index 842d47b..4aa6f02 100644
--- a/noncore/securityplugins/notice/noticeplugin.h
+++ b/noncore/securityplugins/notice/noticeplugin.h
@@ -34,31 +34,31 @@
#ifndef NOTICE_PLUGIN_H
#define NOTICE_PLUGIN_H
#include <qstring.h>
#include <qpe/config.h>
#include <opie2/multiauthplugininterface.h>
#include "noticeConfigWidget.h"
/// Multi-authentication plugin, having the user accept a (legal, etc.) notice text.
/**
* The plugin itself, implementing the main authenticate() function.
*/
-class NoticePlugin : public QObject, public MultiauthPluginObject {
+class NoticePlugin : public QObject, public Opie::Security::MultiauthPluginObject {
Q_OBJECT;
public:
NoticePlugin();
virtual ~NoticePlugin();
int authenticate();
- MultiauthConfigWidget * configWidget(QWidget * parent);
+ Opie::Security::MultiauthConfigWidget * configWidget(QWidget * parent);
QString pixmapNameConfig() const;
QString pixmapNameWidget() const;
QString pluginName() const;
private:
NoticeConfigWidget * noticeW;
Config * m_config;
QString getNoticeText();
};
#endif
diff --git a/noncore/securityplugins/notice/noticepluginimpl.cpp b/noncore/securityplugins/notice/noticepluginimpl.cpp
index 34e3cfc..7524512 100644
--- a/noncore/securityplugins/notice/noticepluginimpl.cpp
+++ b/noncore/securityplugins/notice/noticepluginimpl.cpp
@@ -1,14 +1,17 @@
#include "noticepluginimpl.h"
+using Opie::Security::MultiauthPluginObject;
+using Opie::Security::MultiauthPluginInterface;
+
NoticePluginImpl::NoticePluginImpl() {
noticePlugin = new NoticePlugin();
}
NoticePluginImpl::~NoticePluginImpl() {
delete noticePlugin;
}
MultiauthPluginObject* NoticePluginImpl::plugin() {
return noticePlugin;
}
diff --git a/noncore/securityplugins/notice/noticepluginimpl.h b/noncore/securityplugins/notice/noticepluginimpl.h
index b2a1140..1b1e22f 100644
--- a/noncore/securityplugins/notice/noticepluginimpl.h
+++ b/noncore/securityplugins/notice/noticepluginimpl.h
@@ -30,32 +30,31 @@
Boston, MA 02111-1307, USA.
*/
#ifndef NOTICE_PLUGIN_IMPL
#define NOTICE_PLUGIN_IMPL
#include "noticeplugin.h"
/**
* \brief Standard multiauth plugin class
*/
-class NoticePluginImpl : public MultiauthPluginInterface{
+class NoticePluginImpl : public Opie::Security::MultiauthPluginInterface{
public:
NoticePluginImpl();
virtual ~NoticePluginImpl();
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
NoticePlugin *noticePlugin;
- ulong ref;
};
#endif