author | zecke <zecke> | 2004-07-17 16:46:58 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-07-17 16:46:58 (UTC) |
commit | e917f3763a0beb6d540adbfa5f59e478d3baec64 (patch) (unidiff) | |
tree | c2cf3f13559d9693a4f66cd3f65e419b571377bd /noncore/securityplugins/dummy/dummyplugin.cpp | |
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/dummyplugin.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/securityplugins/dummy/dummyplugin.cpp | 11 |
1 files changed, 7 insertions, 4 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 @@ | |||
4 | 4 | ||
5 | #include <qdialog.h> | 5 | #include <qdialog.h> |
6 | #include <qlayout.h> | 6 | #include <qlayout.h> |
7 | #include <qlabel.h> | 7 | #include <qlabel.h> |
8 | #include <qpushbutton.h> | 8 | #include <qpushbutton.h> |
9 | 9 | ||
10 | using Opie::Security::MultiauthConfigWidget; | ||
11 | using Opie::Security::MultiauthPluginObject; | ||
12 | |||
10 | /// Simply return its name (Dummy plugin) | 13 | /// Simply return its name (Dummy plugin) |
11 | QString DummyPlugin::pluginName() const { | 14 | QString DummyPlugin::pluginName() const { |
12 | return "Dummy plugin"; | 15 | return "Dummy plugin"; |
13 | } | 16 | } |
14 | 17 | ||
15 | /// no configuration widget for the moment | 18 | /// no configuration widget for the moment |
@@ -51,42 +54,42 @@ int DummyPlugin::authenticate() { | |||
51 | "Dummy dialog", | 54 | "Dummy dialog", |
52 | TRUE, | 55 | TRUE, |
53 | Qt::WStyle_NoBorder | Qt::WStyle_Customize | Qt::WStyle_StaysOnTop); | 56 | Qt::WStyle_NoBorder | Qt::WStyle_Customize | Qt::WStyle_StaysOnTop); |
54 | 57 | ||
55 | QRect desk = oApp->desktop()->geometry(); | 58 | QRect desk = oApp->desktop()->geometry(); |
56 | dummyDialog.setGeometry( 0, 0, desk.width(), desk.height() ); | 59 | dummyDialog.setGeometry( 0, 0, desk.width(), desk.height() ); |
57 | 60 | ||
58 | /* Creation of the particular widgets of our Dummy user interface | 61 | /* Creation of the particular widgets of our Dummy user interface |
59 | * Note: we have to resize the VBox to the QDialog size, since it's not | 62 | * Note: we have to resize the VBox to the QDialog size, since it's not |
60 | * done automatically. | 63 | * done automatically. |
61 | */ | 64 | */ |
62 | QVBoxLayout layout(&dummyDialog); | 65 | QVBoxLayout layout(&dummyDialog); |
63 | layout.setSpacing(11); | 66 | layout.setSpacing(11); |
64 | layout.setMargin(11); | 67 | layout.setMargin(11); |
65 | layout.setAlignment( Qt::AlignTop ); | 68 | layout.setAlignment( Qt::AlignTop ); |
66 | 69 | ||
67 | QLabel title("<center><h1>" + tr("\"Dummy\" <br />demonstration plugin") + "</h1></center>", &dummyDialog); | 70 | QLabel title("<center><h1>" + tr("\"Dummy\" <br />demonstration plugin") + "</h1></center>", &dummyDialog); |
68 | QLabel subTitle("<center><h2>" +tr("You can simulate the following outcomes:") + "</h2></center>", &dummyDialog); | 71 | QLabel subTitle("<center><h2>" +tr("You can simulate the following outcomes:") + "</h2></center>", &dummyDialog); |
69 | layout.addWidget(&title); | 72 | layout.addWidget(&title); |
70 | layout.addWidget(&subTitle); | 73 | layout.addWidget(&subTitle); |
71 | 74 | ||
72 | QHBoxLayout hl(&layout); | 75 | QHBoxLayout hl(&layout); |
73 | QPushButton pbSuccess("Success", &dummyDialog); | 76 | QPushButton pbSuccess("Success", &dummyDialog); |
74 | QPushButton pbSkip("Skip", &dummyDialog); | 77 | QPushButton pbSkip("Skip", &dummyDialog); |
75 | QPushButton pbFailure("Failure", &dummyDialog); | 78 | QPushButton pbFailure("Failure", &dummyDialog); |
76 | hl.addWidget(&pbSuccess, 0, Qt::AlignHCenter); | 79 | hl.addWidget(&pbSuccess, 0, Qt::AlignHCenter); |
77 | hl.addWidget(&pbSkip, 0, Qt::AlignHCenter); | 80 | hl.addWidget(&pbSkip, 0, Qt::AlignHCenter); |
78 | hl.addWidget(&pbFailure, 0, Qt::AlignHCenter); | 81 | hl.addWidget(&pbFailure, 0, Qt::AlignHCenter); |
79 | 82 | ||
80 | /* Linking our pushbuttons to exit functions | 83 | /* Linking our pushbuttons to exit functions |
81 | * (each result button here has a corresponding slot) | 84 | * (each result button here has a corresponding slot) |
82 | */ | 85 | */ |
83 | QObject::connect(&pbSuccess, SIGNAL(clicked()), this, SLOT(success())); | 86 | QObject::connect(&pbSuccess, SIGNAL(clicked()), this, SLOT(success())); |
84 | QObject::connect(&pbFailure, SIGNAL(clicked()), this, SLOT(failure())); | 87 | QObject::connect(&pbFailure, SIGNAL(clicked()), this, SLOT(failure())); |
85 | QObject::connect(&pbSkip, SIGNAL(clicked()), this, SLOT(skip())); | 88 | QObject::connect(&pbSkip, SIGNAL(clicked()), this, SLOT(skip())); |
86 | 89 | ||
87 | /* The value of the signal these three slots will emit corresponds to | 90 | /* The value of the signal these three slots will emit corresponds to |
88 | * the different values we want to return | 91 | * the different values we want to return |
89 | */ | 92 | */ |
90 | QObject::connect(this, SIGNAL(emitCode(int)), &dummyDialog, SLOT(done(int))); | 93 | QObject::connect(this, SIGNAL(emitCode(int)), &dummyDialog, SLOT(done(int))); |
91 | return dummyDialog.exec(); | 94 | return dummyDialog.exec(); |
92 | } | 95 | } |