author | clem <clem> | 2004-06-15 13:49:36 (UTC) |
---|---|---|
committer | clem <clem> | 2004-06-15 13:49:36 (UTC) |
commit | 5431072f0ea1cbc8ca37914b6349e66079f1acff (patch) (unidiff) | |
tree | da335f89e506cde6ffe59a252b4ccab4e177809b /noncore/securityplugins/pin | |
parent | ba4722d0fed5527a5b799281caf6324f2e7ad5d8 (diff) | |
download | opie-5431072f0ea1cbc8ca37914b6349e66079f1acff.zip opie-5431072f0ea1cbc8ca37914b6349e66079f1acff.tar.gz opie-5431072f0ea1cbc8ca37914b6349e66079f1acff.tar.bz2 |
First revision of securityplugins, called by libopiesecurity2 authentication framework (see http://dudu.dyn.2-h.org/nist/OMAF.php).
-rw-r--r-- | noncore/securityplugins/pin/.cvsignore | 4 | ||||
-rw-r--r-- | noncore/securityplugins/pin/Makefile | 237 | ||||
-rw-r--r-- | noncore/securityplugins/pin/config.in | 4 | ||||
-rw-r--r-- | noncore/securityplugins/pin/pin.control | 12 | ||||
-rw-r--r-- | noncore/securityplugins/pin/pin.cpp | 342 | ||||
-rw-r--r-- | noncore/securityplugins/pin/pin.h | 68 | ||||
-rw-r--r-- | noncore/securityplugins/pin/pinConfigWidget.cpp | 39 | ||||
-rw-r--r-- | noncore/securityplugins/pin/pinConfigWidget.h | 51 | ||||
-rw-r--r-- | noncore/securityplugins/pin/pinDialogBase.cpp | 304 | ||||
-rw-r--r-- | noncore/securityplugins/pin/pinDialogBase.h | 47 | ||||
-rw-r--r-- | noncore/securityplugins/pin/pinDialogBase.ui | 1258 | ||||
-rw-r--r-- | noncore/securityplugins/pin/pinplugin.pro | 21 | ||||
-rw-r--r-- | noncore/securityplugins/pin/pinpluginimpl.cpp | 28 | ||||
-rw-r--r-- | noncore/securityplugins/pin/pinpluginimpl.h | 58 |
14 files changed, 2473 insertions, 0 deletions
diff --git a/noncore/securityplugins/pin/.cvsignore b/noncore/securityplugins/pin/.cvsignore new file mode 100644 index 0000000..2fc28bd --- a/dev/null +++ b/noncore/securityplugins/pin/.cvsignore | |||
@@ -0,0 +1,4 @@ | |||
1 | *.moc | ||
2 | Makefile | ||
3 | pinDialogBase.cpp | ||
4 | pinDialogBase.h | ||
diff --git a/noncore/securityplugins/pin/Makefile b/noncore/securityplugins/pin/Makefile new file mode 100644 index 0000000..8c6a231 --- a/dev/null +++ b/noncore/securityplugins/pin/Makefile | |||
@@ -0,0 +1,237 @@ | |||
1 | ############################################################################# | ||
2 | # Makefile for building: libmultiauthpinplugin.so.0.0.2 | ||
3 | # Generated by qmake (1.05a) (Qt 3.1.2) on: Mon Jun 14 11:00:20 2004 | ||
4 | # Project: pinplugin.pro | ||
5 | # Template: lib | ||
6 | # Command: $(QMAKE) -o Makefile pinplugin.pro | ||
7 | ############################################################################# | ||
8 | |||
9 | ####### Compiler, tools and options | ||
10 | |||
11 | CC = $(CCACHE) $(DISTCC) gcc | ||
12 | CXX = $(CCACHE) $(DISTCC) g++ | ||
13 | LEX = flex | ||
14 | YACC = yacc | ||
15 | CFLAGS = -pipe $(CFLAGS_EXTRA) -Wall -W -g -fPIC -DQT_COMPONENT_DEBUG=2 -DQT_DEBUG -DOPIE_NO_BUILTIN_SHUTDOWN -DUSE_FILE_NOTIFICATION -DOPIE_SOUND_FRAGMENT_SHIFT=16 | ||
16 | CXXFLAGS = -pipe $(CFLAGS_EXTRA) -DQWS -fno-exceptions -fno-rtti $(CXXFLAGS_EXTRA) -Wall -W -g -fPIC -DQT_COMPONENT_DEBUG=2 -DQT_DEBUG -DOPIE_NO_BUILTIN_SHUTDOWN -DUSE_FILE_NOTIFICATION -DOPIE_SOUND_FRAGMENT_SHIFT=16 | ||
17 | LEXFLAGS = | ||
18 | YACCFLAGS= -d | ||
19 | INCPATH = -I/opt/opie/mkspecs/qws/linux-generic-g++ -I. -I$(OPIEDIR)/include -I$(QTDIR)/include -I.moc/$(PLATFORM)/ | ||
20 | LINK = g++ | ||
21 | LFLAGS = $(LFLAGS_EXTRA) -Wl,-rpath-link,$(OPIEDIR)/lib -shared -Wl,-soname,libmultiauthpinplugin.so.0 -Wl,-rpath,/opt/opie/plugins/security | ||
22 | LIBS = $(SUBLIBS) -Wl,-rpath,$(QTDIR)/lib -L$(QTDIR)/lib $(LIBS_EXTRA) -lqpe -lopieui2 -L$(OPIEDIR)/lib -lqte | ||
23 | AR = ar cqs | ||
24 | RANLIB = | ||
25 | MOC = $(QTDIR)/bin/moc | ||
26 | UIC = $(QTDIR)/bin/uic | ||
27 | QMAKE = qmake | ||
28 | TAR = tar -cf | ||
29 | GZIP = gzip -9f | ||
30 | COPY = cp -f | ||
31 | COPY_FILE= $(COPY) -p | ||
32 | COPY_DIR = $(COPY) -pR | ||
33 | DEL_FILE = rm -f | ||
34 | SYMLINK = ln -sf | ||
35 | DEL_DIR = rmdir | ||
36 | MOVE = mv -f | ||
37 | PRO = pinplugin.pro | ||
38 | CHK_DIR_EXISTS= | ||
39 | MKDIR = | ||
40 | |||
41 | ####### Output directory | ||
42 | |||
43 | OBJECTS_DIR = .obj/$(PLATFORM)/ | ||
44 | |||
45 | ####### Files | ||
46 | |||
47 | HEADERS = pin.h \ | ||
48 | pinpluginimpl.h \ | ||
49 | pinConfigWidget.h | ||
50 | SOURCES = pin.cpp \ | ||
51 | pinpluginimpl.cpp \ | ||
52 | pinConfigWidget.cpp | ||
53 | OBJECTS = .obj/$(PLATFORM)/pin.o \ | ||
54 | .obj/$(PLATFORM)/pinpluginimpl.o \ | ||
55 | .obj/$(PLATFORM)/pinConfigWidget.o \ | ||
56 | .obj/$(PLATFORM)/pinDialogBase.o | ||
57 | FORMS = pinDialogBase.ui | ||
58 | UICDECLS = pinDialogBase.h | ||
59 | UICIMPLS = pinDialogBase.cpp | ||
60 | SRCMOC = .moc/$(PLATFORM)/moc_pin.cpp \ | ||
61 | .moc/$(PLATFORM)/moc_pinDialogBase.cpp \ | ||
62 | .moc/$(PLATFORM)/pin.moc | ||
63 | OBJMOC = .obj/$(PLATFORM)/moc_pin.o \ | ||
64 | .obj/$(PLATFORM)/moc_pinDialogBase.o | ||
65 | DIST = ../../../gen.pro \ | ||
66 | ../../../include.pro \ | ||
67 | pinplugin.pro | ||
68 | QMAKE_TARGET = multiauthpinplugin | ||
69 | DESTDIR = $(OPIEDIR)/plugins/security/ | ||
70 | TARGET = libmultiauthpinplugin.so.0.0.2 | ||
71 | TARGETA= $(OPIEDIR)/plugins/security/libmultiauthpinplugin.a | ||
72 | TARGETD= libmultiauthpinplugin.so.0.0.2 | ||
73 | TARGET0= libmultiauthpinplugin.so | ||
74 | TARGET1= libmultiauthpinplugin.so.0 | ||
75 | TARGET2= libmultiauthpinplugin.so.0.0 | ||
76 | |||
77 | first: all | ||
78 | ####### Implicit rules | ||
79 | |||
80 | .SUFFIXES: .c .cpp .cc .cxx .C | ||
81 | |||
82 | .cpp.o: | ||
83 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< | ||
84 | |||
85 | .cc.o: | ||
86 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< | ||
87 | |||
88 | .cxx.o: | ||
89 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< | ||
90 | |||
91 | .C.o: | ||
92 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $< | ||
93 | |||
94 | .c.o: | ||
95 | $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $< | ||
96 | |||
97 | ####### Build rules | ||
98 | |||
99 | all: Makefile $(OPIEDIR)/plugins/security/$(TARGET) | ||
100 | |||
101 | $(OPIEDIR)/plugins/security/$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) $(SUBLIBS) | ||
102 | test -d $(OPIEDIR)/plugins/security/ || mkdir -p $(OPIEDIR)/plugins/security/ | ||
103 | -$(DEL_FILE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2) | ||
104 | $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJMOC) $(LIBS) | ||
105 | -ln -s $(TARGET) $(TARGET0) | ||
106 | -ln -s $(TARGET) $(TARGET1) | ||
107 | -ln -s $(TARGET) $(TARGET2) | ||
108 | -$(DEL_FILE) $(OPIEDIR)/plugins/security/$(TARGET) | ||
109 | -$(DEL_FILE) $(OPIEDIR)/plugins/security/$(TARGET0) | ||
110 | -$(DEL_FILE) $(OPIEDIR)/plugins/security/$(TARGET1) | ||
111 | -$(DEL_FILE) $(OPIEDIR)/plugins/security/$(TARGET2) | ||
112 | -$(MOVE) $(TARGET) $(TARGET0) $(TARGET1) $(TARGET2) $(OPIEDIR)/plugins/security/ | ||
113 | |||
114 | |||
115 | |||
116 | staticlib: $(TARGETA) | ||
117 | |||
118 | $(TARGETA): $(UICDECLS) $(OBJECTS) $(OBJMOC) | ||
119 | -$(DEL_FILE) $(TARGETA) | ||
120 | $(AR) $(TARGETA) $(OBJECTS) $(OBJMOC) | ||
121 | |||
122 | mocables: $(SRCMOC) | ||
123 | |||
124 | $(MOC): | ||
125 | ( cd $(QTDIR)/src/moc ; $(MAKE) ) | ||
126 | |||
127 | Makefile: pinplugin.pro /opt/opie/mkspecs/qws/linux-generic-g++/qmake.conf ../../../gen.pro \ | ||
128 | ../../../include.pro | ||
129 | $(QMAKE) -o Makefile pinplugin.pro | ||
130 | qmake: | ||
131 | @$(QMAKE) -o Makefile pinplugin.pro | ||
132 | |||
133 | dist: | ||
134 | @mkdir -p .obj/$(PLATFORM)/multiauthpinplugin && $(COPY_FILE) --parents $(SOURCES) $(HEADERS) $(FORMS) $(DIST) .obj/$(PLATFORM)/multiauthpinplugin/ && ( cd `dirname .obj/$(PLATFORM)/multiauthpinplugin` && $(TAR) multiauthpinplugin.tar multiauthpinplugin && $(GZIP) multiauthpinplugin.tar ) && $(MOVE) `dirname .obj/$(PLATFORM)/multiauthpinplugin`/multiauthpinplugin.tar.gz . && $(DEL_FILE) -r .obj/$(PLATFORM)/multiauthpinplugin | ||
135 | |||
136 | mocclean: | ||
137 | -$(DEL_FILE) $(OBJMOC) | ||
138 | -$(DEL_FILE) $(SRCMOC) | ||
139 | |||
140 | uiclean: | ||
141 | -$(DEL_FILE) $(UICIMPLS) $(UICDECLS) | ||
142 | |||
143 | yaccclean: | ||
144 | lexclean: | ||
145 | clean: mocclean uiclean | ||
146 | -$(DEL_FILE) $(OBJECTS) | ||
147 | -$(DEL_FILE) *~ core *.core | ||
148 | |||
149 | |||
150 | ####### Sub-libraries | ||
151 | |||
152 | distclean: clean | ||
153 | -$(DEL_FILE) $(OPIEDIR)/plugins/security/$(TARGET) $(TARGET) | ||
154 | -$(DEL_FILE) $(OPIEDIR)/plugins/security/$(TARGET0) $(OPIEDIR)/plugins/security/$(TARGET1) $(OPIEDIR)/plugins/security/$(TARGET2) $(TARGETA) | ||
155 | |||
156 | |||
157 | lupdate: | ||
158 | lupdate -noobsolete $(PRO) | ||
159 | |||
160 | lrelease: | ||
161 | lrelease $(PRO) | ||
162 | |||
163 | ipk: | ||
164 | tmp=`mktemp -d /tmp/ipkg-opie.XXXXXXXXXX` && ( $(MAKE) INSTALL_ROOT="" install && ipkg-build ; rm -rf ; ) | ||
165 | |||
166 | opie-lupdate: | ||
167 | opie-lupdate $(PRO) | ||
168 | |||
169 | opie-lrelease: | ||
170 | opie-lrelease $(PRO) | ||
171 | |||
172 | messages: | ||
173 | xgettext -C -n -ktr -kQT_TRANSLATE_NOOP pin.h pinpluginimpl.h pinConfigWidget.h pin.cpp pinpluginimpl.cpp pinConfigWidget.cpp -o '$(OPIEDIR)/messages-$(QMAKE_TARGET)-tr.po' && xgettext -C -n -a pin.h pinpluginimpl.h pinConfigWidget.h pin.cpp pinpluginimpl.cpp pinConfigWidget.cpp -o '$(OPIEDIR)/messages-$(QMAKE_TARGET)-allstrings.po' | ||
174 | |||
175 | FORCE: | ||
176 | |||
177 | ####### Compile | ||
178 | |||
179 | .obj/$(PLATFORM)/pin.o: pin.cpp pin.h \ | ||
180 | pinDialogBase.h \ | ||
181 | pinConfigWidget.h \ | ||
182 | .moc/$(PLATFORM)/pin.moc | ||
183 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/$(PLATFORM)/pin.o pin.cpp | ||
184 | |||
185 | .obj/$(PLATFORM)/pinpluginimpl.o: pinpluginimpl.cpp pinpluginimpl.h \ | ||
186 | pin.h \ | ||
187 | pinConfigWidget.h | ||
188 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/$(PLATFORM)/pinpluginimpl.o pinpluginimpl.cpp | ||
189 | |||
190 | .obj/$(PLATFORM)/pinConfigWidget.o: pinConfigWidget.cpp pinConfigWidget.h | ||
191 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/$(PLATFORM)/pinConfigWidget.o pinConfigWidget.cpp | ||
192 | |||
193 | pinDialogBase.h: pinDialogBase.ui | ||
194 | $(UIC) pinDialogBase.ui -o pinDialogBase.h | ||
195 | |||
196 | pinDialogBase.cpp: pinDialogBase.h pinDialogBase.ui | ||
197 | $(UIC) pinDialogBase.ui -i pinDialogBase.h -o pinDialogBase.cpp | ||
198 | |||
199 | .obj/$(PLATFORM)/pinDialogBase.o: pinDialogBase.cpp pinDialogBase.h | ||
200 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/$(PLATFORM)/pinDialogBase.o pinDialogBase.cpp | ||
201 | |||
202 | .obj/$(PLATFORM)/moc_pin.o: .moc/$(PLATFORM)/moc_pin.cpp pin.h pinConfigWidget.h | ||
203 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/$(PLATFORM)/moc_pin.o .moc/$(PLATFORM)/moc_pin.cpp | ||
204 | |||
205 | .obj/$(PLATFORM)/moc_pinDialogBase.o: .moc/$(PLATFORM)/moc_pinDialogBase.cpp pinDialogBase.h | ||
206 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o .obj/$(PLATFORM)/moc_pinDialogBase.o .moc/$(PLATFORM)/moc_pinDialogBase.cpp | ||
207 | |||
208 | .moc/x86-linux/moc_pin.cpp: $(MOC) pin.h | ||
209 | $(MOC) pin.h -o .moc/x86-linux/moc_pin.cpp | ||
210 | |||
211 | .moc/x86-linux/pin.moc: $(MOC) pin.cpp | ||
212 | $(MOC) pin.cpp -o .moc/x86-linux/pin.moc | ||
213 | |||
214 | .moc/x86-linux/moc_pinDialogBase.cpp: $(MOC) pinDialogBase.h | ||
215 | $(MOC) pinDialogBase.h -o .moc/x86-linux/moc_pinDialogBase.cpp | ||
216 | |||
217 | ####### Install | ||
218 | |||
219 | install_target: | ||
220 | @$(CHK_DIR_EXISTS) "$(INSTALL_ROOT)$(OPIEDIR)/lib/" || $(MKDIR) "$(INSTALL_ROOT)$(OPIEDIR)/lib/" | ||
221 | -$(COPY) "$(OPIEDIR)/plugins/security/$(TARGET)" "$(INSTALL_ROOT)$(OPIEDIR)/lib/$(TARGET)" | ||
222 | -$(SYMLINK) "$(TARGET)" "$(INSTALL_ROOT)$(OPIEDIR)/lib/$(TARGET0)" | ||
223 | -$(SYMLINK) "$(TARGET)" "$(INSTALL_ROOT)$(OPIEDIR)/lib/$(TARGET1)" | ||
224 | -$(SYMLINK) "$(TARGET)" "$(INSTALL_ROOT)$(OPIEDIR)/lib/$(TARGET2)" | ||
225 | |||
226 | uninstall_target: | ||
227 | -$(DEL_FILE) "$(INSTALL_ROOT)$(OPIEDIR)/lib/$(TARGET)" | ||
228 | -$(DEL_FILE) "$(INSTALL_ROOT)$(OPIEDIR)/lib/$(TARGET0)" | ||
229 | -$(DEL_FILE) "$(INSTALL_ROOT)$(OPIEDIR)/lib/$(TARGET1)" | ||
230 | -$(DEL_FILE) "$(INSTALL_ROOT)$(OPIEDIR)/lib/$(TARGET2)" | ||
231 | -$(DEL_DIR) "$(INSTALL_ROOT)$(OPIEDIR)/lib/" | ||
232 | |||
233 | |||
234 | install: all install_target | ||
235 | |||
236 | uninstall: uninstall_target | ||
237 | |||
diff --git a/noncore/securityplugins/pin/config.in b/noncore/securityplugins/pin/config.in new file mode 100644 index 0000000..d255038 --- a/dev/null +++ b/noncore/securityplugins/pin/config.in | |||
@@ -0,0 +1,4 @@ | |||
1 | config MULTIAUTH_PIN | ||
2 | boolean "opie-multiauth-pin (PIN authentication plugin for opie-multiauth)" | ||
3 | default "y" | ||
4 | depends SECURITY | ||
diff --git a/noncore/securityplugins/pin/pin.control b/noncore/securityplugins/pin/pin.control new file mode 100644 index 0000000..158e20d --- a/dev/null +++ b/noncore/securityplugins/pin/pin.control | |||
@@ -0,0 +1,12 @@ | |||
1 | Package: opie-multiauth-pinplugin | ||
2 | Files: plugins/security/libmultiauthpinplugin.so* pics/security/pinplugin.png | ||
3 | Priority: optional | ||
4 | Section: opie/settings | ||
5 | Maintainer: Clement Seveillac <clement@nist.gov> | ||
6 | Architecture: arm | ||
7 | Version: 0.0.2.6 | ||
8 | Depends: opie-security | ||
9 | Description: PIN plugin for opie-security authentication. | ||
10 | It implements the same kind of widgets as opie-security package, | ||
11 | but this implementation can be used along with other authentication | ||
12 | methods in the Opie Multi-Authentication Framework. | ||
diff --git a/noncore/securityplugins/pin/pin.cpp b/noncore/securityplugins/pin/pin.cpp new file mode 100644 index 0000000..37dc5be --- a/dev/null +++ b/noncore/securityplugins/pin/pin.cpp | |||
@@ -0,0 +1,342 @@ | |||
1 | /** | ||
2 | * \note Taken from opie-security and libqpe password.cpp, and modified for Opie multiauth by Clement Seveillac | ||
3 | */ | ||
4 | /********************************************************************** | ||
5 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | ||
6 | ** | ||
7 | ** This file is part of the Qtopia Environment. | ||
8 | ** | ||
9 | ** This file may be distributed and/or modified under the terms of the | ||
10 | ** GNU General Public License version 2 as published by the Free Software | ||
11 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
12 | ** packaging of this file. | ||
13 | ** | ||
14 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
15 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
16 | ** | ||
17 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
18 | ** | ||
19 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
20 | ** not clear to you. | ||
21 | ** | ||
22 | **********************************************************************/ | ||
23 | |||
24 | #include "pin.h" | ||
25 | #include "pinDialogBase.h" | ||
26 | #include "pinConfigWidget.h" | ||
27 | /* OPIE */ | ||
28 | #include <opie2/odebug.h> | ||
29 | #include <opie2/oapplication.h> | ||
30 | /* QT */ | ||
31 | #include <qpe/config.h> | ||
32 | #include <qlabel.h> | ||
33 | #include <qlineedit.h> | ||
34 | #include <qtextview.h> | ||
35 | #include <qstring.h> | ||
36 | #include <qdialog.h> | ||
37 | /* UNIX */ | ||
38 | #include <unistd.h> | ||
39 | #include <stdlib.h> | ||
40 | #include <time.h> | ||
41 | |||
42 | extern "C" char *crypt(const char *key, const char *salt); | ||
43 | |||
44 | /// set to TRUE when we press the 'Skip' button | ||
45 | bool isSkip = FALSE; | ||
46 | |||
47 | /// PIN input graphical widget. | ||
48 | /** | ||
49 | * Inherits the PinDialogBase class defined originally in pinDialogBase.ui interface file. | ||
50 | * \sa PinDlg and PinDialog (the class generated from the .ui file) | ||
51 | * It comes from the original PIN locking code in Opie : | ||
52 | * \sa http://dudu.dyn.2-h.org/opiedoxydoc/library_2password_8cpp-source.html | ||
53 | */ | ||
54 | class PinDialog : public PinDialogBase | ||
55 | { | ||
56 | Q_OBJECT | ||
57 | |||
58 | public: | ||
59 | PinDialog( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | ||
60 | ~PinDialog(); | ||
61 | |||
62 | void clear(); | ||
63 | void setPrompt( const QString& ); | ||
64 | |||
65 | signals: | ||
66 | /// emitted when we press the Enter button | ||
67 | void passwordEntered( const QString& ); | ||
68 | /// emitted when we press the Skip button | ||
69 | void skip(); | ||
70 | |||
71 | protected: | ||
72 | bool eventFilter( QObject*, QEvent* ); | ||
73 | |||
74 | private: | ||
75 | void input( QString ); | ||
76 | friend class PinPlugin; | ||
77 | QString text; | ||
78 | }; | ||
79 | |||
80 | |||
81 | /// Constructs a PinDialog widget, and initializes things | ||
82 | PinDialog::PinDialog( QWidget* parent, const char* name, WFlags fl ) | ||
83 | : PinDialogBase( parent, name, fl ) | ||
84 | { | ||
85 | QRect desk = oApp->desktop()->geometry(); | ||
86 | |||
87 | if ( desk.width() < 220 ) { | ||
88 | QFont f( font() ); | ||
89 | f.setPointSize( 18 ); | ||
90 | setFont( f ); | ||
91 | f.setPointSize( 12 ); | ||
92 | prompt->setFont( f ); | ||
93 | } | ||
94 | |||
95 | button_0->installEventFilter( this ); | ||
96 | button_1->installEventFilter( this ); | ||
97 | button_2->installEventFilter( this ); | ||
98 | button_3->installEventFilter( this ); | ||
99 | button_4->installEventFilter( this ); | ||
100 | button_5->installEventFilter( this ); | ||
101 | button_6->installEventFilter( this ); | ||
102 | button_7->installEventFilter( this ); | ||
103 | button_8->installEventFilter( this ); | ||
104 | button_9->installEventFilter( this ); | ||
105 | button_Skip->installEventFilter( this ); | ||
106 | button_OK->installEventFilter( this ); | ||
107 | setFocus(); | ||
108 | } | ||
109 | |||
110 | /// nothing to do | ||
111 | PinDialog::~PinDialog() | ||
112 | { | ||
113 | // no need to delete child widgets, Qt does it all for us | ||
114 | } | ||
115 | |||
116 | /// Record the pressed numbers, and the Skip and Enter commands | ||
117 | bool PinDialog::eventFilter( QObject*o, QEvent*e ) | ||
118 | { | ||
119 | if ( e->type() == QEvent::MouseButtonRelease ) { | ||
120 | if ( o == button_OK ) { | ||
121 | emit passwordEntered( text ); | ||
122 | } | ||
123 | else if ( o == button_Skip ) { | ||
124 | isSkip = TRUE; | ||
125 | emit skip(); | ||
126 | } | ||
127 | else { | ||
128 | QLabel *l = (QLabel*)o; | ||
129 | input(l->text()); | ||
130 | } | ||
131 | } | ||
132 | return FALSE; | ||
133 | } | ||
134 | |||
135 | void PinDialog::input( QString c ) | ||
136 | { | ||
137 | text += c; | ||
138 | display->setText( text ); | ||
139 | } | ||
140 | |||
141 | void PinDialog::setPrompt( const QString& s ) | ||
142 | { | ||
143 | prompt->setText( s ); | ||
144 | } | ||
145 | |||
146 | void PinDialog::clear() | ||
147 | { | ||
148 | text = ""; | ||
149 | input(""); | ||
150 | } | ||
151 | |||
152 | /// PIN dialog | ||
153 | /** | ||
154 | * Dialog containing the PinDialog widget (which asks for a PIN) and interfacing with its I/O. | ||
155 | * \sa PinDialog | ||
156 | */ | ||
157 | class PinDlg : public QDialog | ||
158 | { | ||
159 | public: | ||
160 | PinDlg( QWidget *parent, const char * name, bool modal, bool fullscreen = FALSE ) | ||
161 | : QDialog( parent, name, modal, fullscreen ? WStyle_NoBorder | WStyle_Customize | WStyle_StaysOnTop : 0 ), | ||
162 | modl(modal) | ||
163 | { | ||
164 | pinD = new PinDialog( this ); | ||
165 | |||
166 | if ( fullscreen ) { | ||
167 | QRect desk = oApp->desktop()->geometry(); | ||
168 | setGeometry( 0, 0, desk.width(), desk.height() ); | ||
169 | } | ||
170 | |||
171 | connect( pinD, SIGNAL(passwordEntered(const QString&)), | ||
172 | this, SLOT(accept()) ); | ||
173 | connect( pinD, SIGNAL(skip()), this, SLOT(accept()) ); | ||
174 | } | ||
175 | |||
176 | void resizeEvent( QResizeEvent * ) | ||
177 | { | ||
178 | pinD->resize( size() ); | ||
179 | } | ||
180 | |||
181 | void reset() | ||
182 | { | ||
183 | pinD->clear(); | ||
184 | } | ||
185 | |||
186 | /// Slot receiving the Skip or Enter commands, and closing the QDialog | ||
187 | void accept() | ||
188 | { | ||
189 | if ( !modl ) | ||
190 | oApp->exit_loop(); | ||
191 | QDialog::accept(); | ||
192 | } | ||
193 | |||
194 | PinDialog *pinD; | ||
195 | bool modl; | ||
196 | }; | ||
197 | |||
198 | /// generate a fairly random salt and return the PIN hashed by crypt() | ||
199 | QString PinPlugin::encrypt(const QString& pin) | ||
200 | { | ||
201 | // the salt must begin by "$1$" if we want crypt() to use MD5 | ||
202 | char salt[] = "$1$........"; | ||
203 | const char *const seedchars = "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; | ||
204 | // initialize the random generator | ||
205 | srandom(time(0)); | ||
206 | int i; | ||
207 | for(i = 0; i < 8; i++) | ||
208 | { | ||
209 | // initialize the salt with random() | ||
210 | salt[i+3] = seedchars[random() % 64]; | ||
211 | } | ||
212 | return QString::fromLatin1(crypt(pin.latin1(),salt)); | ||
213 | } | ||
214 | |||
215 | /// verify a PIN against its crypt() hash | ||
216 | /** | ||
217 | * \return true if the \a pin matches its \a hash | ||
218 | */ | ||
219 | bool PinPlugin::verify(const QString& pin, const QString& hash) | ||
220 | { | ||
221 | // the hash, which contains the salt (8 chars after "$1$"), can be given as the salt | ||
222 | return hash.compare( QString::fromLatin1(crypt( pin.latin1(), hash.latin1() )) ) == 0 ? true : false; | ||
223 | } | ||
224 | |||
225 | /// Displays a PinDialog and returns the typed in PIN | ||
226 | /** | ||
227 | * The returned value is QString::null if the user cancels the operation, | ||
228 | * or the empty string if the user enters no password (but confirms the | ||
229 | * dialog). | ||
230 | */ | ||
231 | QString PinPlugin::getPIN( const QString& prompt ) | ||
232 | { | ||
233 | PinDlg pd(0,0,TRUE); | ||
234 | pd.pinD->setPrompt( prompt ); | ||
235 | |||
236 | pd.showMaximized(); | ||
237 | int r = pd.exec(); | ||
238 | |||
239 | if ( r == QDialog::Accepted ) { | ||
240 | if (pd.pinD->text.isEmpty()) | ||
241 | return ""; | ||
242 | else | ||
243 | return pd.pinD->text; | ||
244 | } | ||
245 | else | ||
246 | return QString::null; | ||
247 | } | ||
248 | |||
249 | /// Displays the PIN dialog and returns a hash of the typed in PIN | ||
250 | /** | ||
251 | * \return the hashed ( =one-way encrypted) PIN typed in by the user | ||
252 | * \param prompt the prompt to display in the PinDialog | ||
253 | */ | ||
254 | QString PinPlugin::getCryptedPIN( const QString& prompt ) | ||
255 | { | ||
256 | return encrypt(getPIN(prompt)); | ||
257 | } | ||
258 | |||
259 | /// Displays the PIN dialog, asks 2 times for a new PIN, saves it if entered two times | ||
260 | /** | ||
261 | * writes nothing if we enter nothing the first time | ||
262 | */ | ||
263 | void PinPlugin::changePIN() | ||
264 | { | ||
265 | QString new1, new2; | ||
266 | do { | ||
267 | new1 = getPIN(QObject::tr("Enter new PIN")); | ||
268 | if ( new1.isNull() ) | ||
269 | return; | ||
270 | new2 = getPIN(QObject::tr("Re-enter new PIN")); | ||
271 | } while (new1 != new2); | ||
272 | |||
273 | odebug << "writing new PIN hash in Security.conf" << oendl; | ||
274 | Config cfg("Security"); | ||
275 | cfg.setGroup("PinPlugin"); | ||
276 | cfg.writeEntry("hashedPIN", encrypt(new1)); | ||
277 | } | ||
278 | |||
279 | /// Removes the PIN hashed value in the config file | ||
280 | void PinPlugin::clearPIN() | ||
281 | { | ||
282 | Config cfg("Security"); | ||
283 | cfg.setGroup("PinPlugin"); | ||
284 | cfg.removeEntry("hashedPIN"); | ||
285 | } | ||
286 | |||
287 | /// Prompt, fullscreen, for the user's PIN and compare it to the stored one. | ||
288 | /** | ||
289 | * \return the result code, as a MultiauthPluginObject::authResult object | ||
290 | */ | ||
291 | int PinPlugin::authenticate() | ||
292 | { | ||
293 | // reset skip (if we ran Pin two times in a row, skipping the first time, it must be put to 0 again) | ||
294 | isSkip = FALSE; | ||
295 | // fetch value in config | ||
296 | Config cfg("Security"); | ||
297 | cfg.setGroup("PinPlugin"); | ||
298 | QString hashedPin = cfg.readEntry("hashedPIN"); | ||
299 | if (!hashedPin.isEmpty()) | ||
300 | { | ||
301 | // prompt for the PIN in a fullscreen modal dialog | ||
302 | PinDlg pd(0,0,TRUE,TRUE); | ||
303 | pd.reset(); | ||
304 | pd.exec(); | ||
305 | |||
306 | // analyse the result | ||
307 | if (isSkip == TRUE) | ||
308 | return MultiauthPluginObject::Skip; | ||
309 | else if (verify(pd.pinD->text, hashedPin)) | ||
310 | return MultiauthPluginObject::Success; | ||
311 | else | ||
312 | return MultiauthPluginObject::Failure; | ||
313 | } | ||
314 | owarn << "No PIN has been defined! We consider it as a successful authentication though." << oendl; | ||
315 | return MultiauthPluginObject::Success; | ||
316 | } | ||
317 | |||
318 | /// Simply returns the plugin name (PIN plugin) | ||
319 | QString PinPlugin::pluginName() const { | ||
320 | return "PIN Plugin"; | ||
321 | } | ||
322 | |||
323 | QString PinPlugin::pixmapNameWidget() const { | ||
324 | return "security/pinplugin"; | ||
325 | } | ||
326 | |||
327 | QString PinPlugin::pixmapNameConfig() const { | ||
328 | return "security/pinplugin"; | ||
329 | } | ||
330 | |||
331 | /// returns a PinConfigWidget | ||
332 | MultiauthConfigWidget * PinPlugin::configWidget(QWidget * parent) { | ||
333 | PinConfigWidget * pinw = new PinConfigWidget(parent, "PIN configuration widget"); | ||
334 | |||
335 | connect(pinw->changePIN, SIGNAL( clicked() ), this, SLOT( changePIN() )); | ||
336 | connect(pinw->clearPIN, SIGNAL( clicked() ), this, SLOT( clearPIN() )); | ||
337 | |||
338 | return pinw; | ||
339 | } | ||
340 | |||
341 | #include "pin.moc" | ||
342 | |||
diff --git a/noncore/securityplugins/pin/pin.h b/noncore/securityplugins/pin/pin.h new file mode 100644 index 0000000..6cd328a --- a/dev/null +++ b/noncore/securityplugins/pin/pin.h | |||
@@ -0,0 +1,68 @@ | |||
1 | /** | ||
2 | * \file pin.h | ||
3 | * \brief Standard Opie multiauth plugin definition | ||
4 | * \author Clément Séveillac (clement . seveillac (at) via . ecp . fr) | ||
5 | */ | ||
6 | /* | ||
7 | =. This file is part of the Opie Project | ||
8 | .=l. Copyright (C) 2004 Opie Developer Team <opie-devel@handhelds.org> | ||
9 | .>+-= | ||
10 | _;:, .> :=|. This library is free software; you can | ||
11 | .> <`_, > . <= redistribute it and/or modify it under | ||
12 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | ||
13 | .="- .-=="i, .._ License as published by the Free Software | ||
14 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
15 | ._= =} : or (at your option) any later version. | ||
16 | .%`+i> _;_. | ||
17 | .i_,=:_. -<s. This library is distributed in the hope that | ||
18 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
19 | : .. .:, . . . without even the implied warranty of | ||
20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
21 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
22 | ..}^=.= = ; Library General Public License for more | ||
23 | ++= -. .` .: details. | ||
24 | : = ...= . :.=- | ||
25 | -. .:....=;==+<; You should have received a copy of the GNU | ||
26 | -_. . . )=. = Library General Public License along with | ||
27 | -- :-=` this library; see the file COPYING.LIB. | ||
28 | If not, write to the Free Software Foundation, | ||
29 | Inc., 59 Temple Place - Suite 330, | ||
30 | Boston, MA 02111-1307, USA. | ||
31 | |||
32 | */ | ||
33 | |||
34 | #ifndef PIN_H | ||
35 | #define PIN_H | ||
36 | |||
37 | #include <qobject.h> | ||
38 | #include <qstring.h> | ||
39 | #include <opie2/multiauthplugininterface.h> | ||
40 | #include "pinConfigWidget.h" | ||
41 | |||
42 | /// Multi-authentication plugin, implementing a PIN verification. | ||
43 | /** | ||
44 | * The plugin itself, implementing the main authenticate() function. | ||
45 | */ | ||
46 | class PinPlugin : public QObject, public MultiauthPluginObject { | ||
47 | |||
48 | Q_OBJECT | ||
49 | |||
50 | public: | ||
51 | int authenticate(); | ||
52 | MultiauthConfigWidget * configWidget(QWidget * parent); | ||
53 | QString pixmapNameConfig() const; | ||
54 | QString pixmapNameWidget() const; | ||
55 | QString pluginName() const; | ||
56 | |||
57 | private slots: | ||
58 | QString getPIN( const QString& prompt ); | ||
59 | QString getCryptedPIN( const QString& prompt ); | ||
60 | void changePIN(); | ||
61 | void clearPIN(); | ||
62 | |||
63 | private: | ||
64 | QString encrypt(const QString& pin); | ||
65 | bool verify(const QString& pin, const QString& hash); | ||
66 | }; | ||
67 | |||
68 | #endif // PIN_H | ||
diff --git a/noncore/securityplugins/pin/pinConfigWidget.cpp b/noncore/securityplugins/pin/pinConfigWidget.cpp new file mode 100644 index 0000000..53e1a20 --- a/dev/null +++ b/noncore/securityplugins/pin/pinConfigWidget.cpp | |||
@@ -0,0 +1,39 @@ | |||
1 | #include <qwidget.h> | ||
2 | #include <qlayout.h> | ||
3 | #include <qlabel.h> | ||
4 | #include <qgroupbox.h> | ||
5 | |||
6 | #include "pinConfigWidget.h" | ||
7 | |||
8 | PinConfigWidget::PinConfigWidget(QWidget* parent = 0, const char* name = "PIN configuration widget") | ||
9 | : MultiauthConfigWidget(parent, name) | ||
10 | { | ||
11 | QVBoxLayout * baseLayout = new QVBoxLayout( this); | ||
12 | baseLayout->setSpacing(11); | ||
13 | baseLayout->setMargin(11); | ||
14 | baseLayout->setAlignment( Qt::AlignTop ); | ||
15 | |||
16 | QGroupBox * configBox = new QGroupBox(0, Qt::Vertical, tr("Configure your PIN here"), this); | ||
17 | baseLayout->addWidget(configBox); | ||
18 | QVBoxLayout *boxLayout = new QVBoxLayout( configBox->layout() ); | ||
19 | |||
20 | QLabel * description = new QLabel("<p>" + tr("PIN protection provides a minimal level of protection from casual access to this device.") + "</p>", configBox); | ||
21 | boxLayout->addWidget(description); | ||
22 | |||
23 | QHBoxLayout * buttonLayout = new QHBoxLayout(); | ||
24 | buttonLayout->setSpacing(6); | ||
25 | changePIN = new QPushButton( tr("Change PIN"), configBox, "changePIN" ); | ||
26 | clearPIN = new QPushButton( tr("Clear PIN"), configBox, "clearPIN" ); | ||
27 | buttonLayout->addWidget(changePIN); | ||
28 | buttonLayout->addWidget(clearPIN); | ||
29 | boxLayout->addLayout(buttonLayout); | ||
30 | |||
31 | } | ||
32 | |||
33 | /// nothing to do | ||
34 | PinConfigWidget::~PinConfigWidget() | ||
35 | {} | ||
36 | |||
37 | /// does nothing since the config file update is already done in changePIN or clearPIN | ||
38 | void PinConfigWidget::writeConfig() | ||
39 | {} | ||
diff --git a/noncore/securityplugins/pin/pinConfigWidget.h b/noncore/securityplugins/pin/pinConfigWidget.h new file mode 100644 index 0000000..3242ad0 --- a/dev/null +++ b/noncore/securityplugins/pin/pinConfigWidget.h | |||
@@ -0,0 +1,51 @@ | |||
1 | /** | ||
2 | * \file pinConfigWidget.h | ||
3 | * \brief PIN plugin configuration widget | ||
4 | * \author Clément Séveillac (clement . seveillac (at) via . ecp . fr) | ||
5 | */ | ||
6 | /* | ||
7 | =. This file is part of the Opie Project | ||
8 | .=l. Copyright (C) 2004 Opie Developer Team <opie-devel@handhelds.org> | ||
9 | .>+-= | ||
10 | _;:, .> :=|. This library is free software; you can | ||
11 | .> <`_, > . <= redistribute it and/or modify it under | ||
12 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | ||
13 | .="- .-=="i, .._ License as published by the Free Software | ||
14 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
15 | ._= =} : or (at your option) any later version. | ||
16 | .%`+i> _;_. | ||
17 | .i_,=:_. -<s. This library is distributed in the hope that | ||
18 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
19 | : .. .:, . . . without even the implied warranty of | ||
20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
21 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
22 | ..}^=.= = ; Library General Public License for more | ||
23 | ++= -. .` .: details. | ||
24 | : = ...= . :.=- | ||
25 | -. .:....=;==+<; You should have received a copy of the GNU | ||
26 | -_. . . )=. = Library General Public License along with | ||
27 | -- :-=` this library; see the file COPYING.LIB. | ||
28 | If not, write to the Free Software Foundation, | ||
29 | Inc., 59 Temple Place - Suite 330, | ||
30 | Boston, MA 02111-1307, USA. | ||
31 | |||
32 | */ | ||
33 | |||
34 | #ifndef PINCONFIGWIDGET_H | ||
35 | #define PINCONFIGWIDGET_H | ||
36 | #include <qpushbutton.h> | ||
37 | |||
38 | #include <opie2/multiauthconfigwidget.h> | ||
39 | |||
40 | class PinConfigWidget : public MultiauthConfigWidget { | ||
41 | public: | ||
42 | PinConfigWidget(QWidget* parent, const char* name); | ||
43 | virtual ~PinConfigWidget(); | ||
44 | virtual void writeConfig(); | ||
45 | ///\todo to protect? | ||
46 | QPushButton *changePIN; | ||
47 | QPushButton *clearPIN; | ||
48 | |||
49 | }; | ||
50 | |||
51 | #endif // PINCONFIGWIDGET_H | ||
diff --git a/noncore/securityplugins/pin/pinDialogBase.cpp b/noncore/securityplugins/pin/pinDialogBase.cpp new file mode 100644 index 0000000..244a75e --- a/dev/null +++ b/noncore/securityplugins/pin/pinDialogBase.cpp | |||
@@ -0,0 +1,304 @@ | |||
1 | /**************************************************************************** | ||
2 | ** Form implementation generated from reading ui file 'pinDialogBase.ui' | ||
3 | ** | ||
4 | ** Created: Mon Jun 14 11:01:08 2004 | ||
5 | ** by: The User Interface Compiler (uic) | ||
6 | ** | ||
7 | ** WARNING! All changes made in this file will be lost! | ||
8 | ****************************************************************************/ | ||
9 | #include "pinDialogBase.h" | ||
10 | |||
11 | #include <qlabel.h> | ||
12 | #include <qlineedit.h> | ||
13 | #include <qlayout.h> | ||
14 | #include <qvariant.h> | ||
15 | #include <qtooltip.h> | ||
16 | #include <qwhatsthis.h> | ||
17 | |||
18 | /* | ||
19 | * Constructs a PinDialogBase which is a child of 'parent', with the | ||
20 | * name 'name' and widget flags set to 'f' | ||
21 | */ | ||
22 | PinDialogBase::PinDialogBase( QWidget* parent, const char* name, WFlags fl ) | ||
23 | : QWidget( parent, name, fl ) | ||
24 | { | ||
25 | if ( !name ) | ||
26 | setName( "PinDialogBase" ); | ||
27 | resize( 231, 293 ); | ||
28 | QFont f( font() ); | ||
29 | f.setPointSize( 24 ); | ||
30 | setFont( f ); | ||
31 | setCaption( tr( "PinDialogBase" ) ); | ||
32 | |||
33 | button_4 = new QLabel( this, "button_4" ); | ||
34 | button_4->setGeometry( QRect( 11, 138, 68, 44 ) ); | ||
35 | button_4->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, button_4->sizePolicy().hasHeightForWidth() ) ); | ||
36 | button_4->setFrameShape( QLabel::Box ); | ||
37 | button_4->setFrameShadow( QLabel::Raised ); | ||
38 | button_4->setText( tr( "4" ) ); | ||
39 | button_4->setAlignment( int( QLabel::AlignCenter ) ); | ||
40 | |||
41 | button_7 = new QLabel( this, "button_7" ); | ||
42 | button_7->setGeometry( QRect( 11, 188, 68, 44 ) ); | ||
43 | button_7->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, button_7->sizePolicy().hasHeightForWidth() ) ); | ||
44 | button_7->setFrameShape( QLabel::Box ); | ||
45 | button_7->setFrameShadow( QLabel::Raised ); | ||
46 | button_7->setText( tr( "7" ) ); | ||
47 | button_7->setAlignment( int( QLabel::AlignCenter ) ); | ||
48 | |||
49 | prompt = new QLabel( this, "prompt" ); | ||
50 | prompt->setGeometry( QRect( 11, 11, 217, 25 ) ); | ||
51 | QFont prompt_font( prompt->font() ); | ||
52 | prompt_font.setPointSize( 18 ); | ||
53 | prompt->setFont( prompt_font ); | ||
54 | prompt->setText( tr( "Enter your PIN" ) ); | ||
55 | |||
56 | display = new QLineEdit( this, "display" ); | ||
57 | display->setEnabled( FALSE ); | ||
58 | display->setGeometry( QRect( 11, 42, 217, 40 ) ); | ||
59 | QPalette pal; | ||
60 | QColorGroup cg; | ||
61 | cg.setColor( QColorGroup::Foreground, black ); | ||
62 | cg.setColor( QColorGroup::Button, QColor( 228, 228, 228) ); | ||
63 | cg.setColor( QColorGroup::Light, white ); | ||
64 | cg.setColor( QColorGroup::Midlight, QColor( 242, 242, 242) ); | ||
65 | cg.setColor( QColorGroup::Dark, QColor( 78, 78, 78) ); | ||
66 | cg.setColor( QColorGroup::Mid, QColor( 183, 183, 183) ); | ||
67 | cg.setColor( QColorGroup::Text, black ); | ||
68 | cg.setColor( QColorGroup::BrightText, white ); | ||
69 | cg.setColor( QColorGroup::ButtonText, black ); | ||
70 | cg.setColor( QColorGroup::Base, white ); | ||
71 | cg.setColor( QColorGroup::Background, QColor( 220, 220, 220) ); | ||
72 | cg.setColor( QColorGroup::Shadow, black ); | ||
73 | cg.setColor( QColorGroup::Highlight, QColor( 10, 95, 137) ); | ||
74 | cg.setColor( QColorGroup::HighlightedText, white ); | ||
75 | pal.setActive( cg ); | ||
76 | cg.setColor( QColorGroup::Foreground, black ); | ||
77 | cg.setColor( QColorGroup::Button, QColor( 228, 228, 228) ); | ||
78 | cg.setColor( QColorGroup::Light, white ); | ||
79 | cg.setColor( QColorGroup::Midlight, QColor( 242, 242, 242) ); | ||
80 | cg.setColor( QColorGroup::Dark, QColor( 78, 78, 78) ); | ||
81 | cg.setColor( QColorGroup::Mid, QColor( 183, 183, 183) ); | ||
82 | cg.setColor( QColorGroup::Text, black ); | ||
83 | cg.setColor( QColorGroup::BrightText, white ); | ||
84 | cg.setColor( QColorGroup::ButtonText, black ); | ||
85 | cg.setColor( QColorGroup::Base, white ); | ||
86 | cg.setColor( QColorGroup::Background, QColor( 220, 220, 220) ); | ||
87 | cg.setColor( QColorGroup::Shadow, black ); | ||
88 | cg.setColor( QColorGroup::Highlight, QColor( 10, 95, 137) ); | ||
89 | cg.setColor( QColorGroup::HighlightedText, white ); | ||
90 | pal.setInactive( cg ); | ||
91 | cg.setColor( QColorGroup::Foreground, QColor( 128, 128, 128) ); | ||
92 | cg.setColor( QColorGroup::Button, QColor( 228, 228, 228) ); | ||
93 | cg.setColor( QColorGroup::Light, white ); | ||
94 | cg.setColor( QColorGroup::Midlight, white ); | ||
95 | cg.setColor( QColorGroup::Dark, QColor( 114, 114, 114) ); | ||
96 | cg.setColor( QColorGroup::Mid, QColor( 152, 152, 152) ); | ||
97 | cg.setColor( QColorGroup::Text, black ); | ||
98 | cg.setColor( QColorGroup::BrightText, white ); | ||
99 | cg.setColor( QColorGroup::ButtonText, black ); | ||
100 | cg.setColor( QColorGroup::Base, white ); | ||
101 | cg.setColor( QColorGroup::Background, QColor( 220, 220, 220) ); | ||
102 | cg.setColor( QColorGroup::Shadow, black ); | ||
103 | cg.setColor( QColorGroup::Highlight, QColor( 0, 0, 128) ); | ||
104 | cg.setColor( QColorGroup::HighlightedText, white ); | ||
105 | pal.setDisabled( cg ); | ||
106 | display->setPalette( pal ); | ||
107 | display->setEchoMode( QLineEdit::Password ); | ||
108 | |||
109 | button_1 = new QLabel( this, "button_1" ); | ||
110 | button_1->setGeometry( QRect( 11, 88, 68, 44 ) ); | ||
111 | button_1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, button_1->sizePolicy().hasHeightForWidth() ) ); | ||
112 | button_1->setFrameShape( QLabel::Box ); | ||
113 | button_1->setFrameShadow( QLabel::Raised ); | ||
114 | button_1->setText( tr( "1" ) ); | ||
115 | button_1->setAlignment( int( QLabel::AlignCenter ) ); | ||
116 | |||
117 | button_2 = new QLabel( this, "button_2" ); | ||
118 | button_2->setGeometry( QRect( 85, 88, 69, 44 ) ); | ||
119 | button_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, button_2->sizePolicy().hasHeightForWidth() ) ); | ||
120 | button_2->setFrameShape( QLabel::Box ); | ||
121 | button_2->setFrameShadow( QLabel::Raised ); | ||
122 | button_2->setText( tr( "2" ) ); | ||
123 | button_2->setAlignment( int( QLabel::AlignCenter ) ); | ||
124 | |||
125 | button_5 = new QLabel( this, "button_5" ); | ||
126 | button_5->setGeometry( QRect( 85, 138, 69, 44 ) ); | ||
127 | button_5->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, button_5->sizePolicy().hasHeightForWidth() ) ); | ||
128 | button_5->setFrameShape( QLabel::Box ); | ||
129 | button_5->setFrameShadow( QLabel::Raised ); | ||
130 | button_5->setText( tr( "5" ) ); | ||
131 | button_5->setAlignment( int( QLabel::AlignCenter ) ); | ||
132 | |||
133 | button_6 = new QLabel( this, "button_6" ); | ||
134 | button_6->setGeometry( QRect( 160, 138, 68, 44 ) ); | ||
135 | button_6->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, button_6->sizePolicy().hasHeightForWidth() ) ); | ||
136 | button_6->setFrameShape( QLabel::Box ); | ||
137 | button_6->setFrameShadow( QLabel::Raised ); | ||
138 | button_6->setText( tr( "6" ) ); | ||
139 | button_6->setAlignment( int( QLabel::AlignCenter ) ); | ||
140 | |||
141 | button_3 = new QLabel( this, "button_3" ); | ||
142 | button_3->setGeometry( QRect( 160, 88, 68, 44 ) ); | ||
143 | button_3->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, button_3->sizePolicy().hasHeightForWidth() ) ); | ||
144 | button_3->setFrameShape( QLabel::Box ); | ||
145 | button_3->setFrameShadow( QLabel::Raised ); | ||
146 | button_3->setText( tr( "3" ) ); | ||
147 | button_3->setAlignment( int( QLabel::AlignCenter ) ); | ||
148 | |||
149 | button_0 = new QLabel( this, "button_0" ); | ||
150 | button_0->setGeometry( QRect( 11, 238, 68, 44 ) ); | ||
151 | button_0->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, button_0->sizePolicy().hasHeightForWidth() ) ); | ||
152 | button_0->setFrameShape( QLabel::Box ); | ||
153 | button_0->setFrameShadow( QLabel::Raised ); | ||
154 | button_0->setText( tr( "0" ) ); | ||
155 | button_0->setAlignment( int( QLabel::AlignCenter ) ); | ||
156 | |||
157 | button_8 = new QLabel( this, "button_8" ); | ||
158 | button_8->setGeometry( QRect( 85, 188, 69, 44 ) ); | ||
159 | button_8->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, button_8->sizePolicy().hasHeightForWidth() ) ); | ||
160 | button_8->setFrameShape( QLabel::Box ); | ||
161 | button_8->setFrameShadow( QLabel::Raised ); | ||
162 | button_8->setText( tr( "8" ) ); | ||
163 | button_8->setAlignment( int( QLabel::AlignCenter ) ); | ||
164 | |||
165 | button_9 = new QLabel( this, "button_9" ); | ||
166 | button_9->setGeometry( QRect( 160, 188, 68, 44 ) ); | ||
167 | button_9->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, button_9->sizePolicy().hasHeightForWidth() ) ); | ||
168 | button_9->setFrameShape( QLabel::Box ); | ||
169 | button_9->setFrameShadow( QLabel::Raised ); | ||
170 | button_9->setText( tr( "9" ) ); | ||
171 | button_9->setAlignment( int( QLabel::AlignCenter ) ); | ||
172 | |||
173 | button_OK = new QLabel( this, "button_OK" ); | ||
174 | button_OK->setGeometry( QRect( 160, 238, 68, 44 ) ); | ||
175 | button_OK->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, button_OK->sizePolicy().hasHeightForWidth() ) ); | ||
176 | cg.setColor( QColorGroup::Foreground, black ); | ||
177 | cg.setColor( QColorGroup::Button, QColor( 192, 192, 192) ); | ||
178 | cg.setColor( QColorGroup::Light, white ); | ||
179 | cg.setColor( QColorGroup::Midlight, QColor( 223, 223, 223) ); | ||
180 | cg.setColor( QColorGroup::Dark, QColor( 96, 96, 96) ); | ||
181 | cg.setColor( QColorGroup::Mid, QColor( 128, 128, 128) ); | ||
182 | cg.setColor( QColorGroup::Text, black ); | ||
183 | cg.setColor( QColorGroup::BrightText, white ); | ||
184 | cg.setColor( QColorGroup::ButtonText, black ); | ||
185 | cg.setColor( QColorGroup::Base, white ); | ||
186 | cg.setColor( QColorGroup::Background, QColor( 0, 170, 0) ); | ||
187 | cg.setColor( QColorGroup::Shadow, black ); | ||
188 | cg.setColor( QColorGroup::Highlight, black ); | ||
189 | cg.setColor( QColorGroup::HighlightedText, white ); | ||
190 | pal.setActive( cg ); | ||
191 | cg.setColor( QColorGroup::Foreground, black ); | ||
192 | cg.setColor( QColorGroup::Button, QColor( 192, 192, 192) ); | ||
193 | cg.setColor( QColorGroup::Light, white ); | ||
194 | cg.setColor( QColorGroup::Midlight, QColor( 220, 220, 220) ); | ||
195 | cg.setColor( QColorGroup::Dark, QColor( 96, 96, 96) ); | ||
196 | cg.setColor( QColorGroup::Mid, QColor( 128, 128, 128) ); | ||
197 | cg.setColor( QColorGroup::Text, black ); | ||
198 | cg.setColor( QColorGroup::BrightText, white ); | ||
199 | cg.setColor( QColorGroup::ButtonText, black ); | ||
200 | cg.setColor( QColorGroup::Base, white ); | ||
201 | cg.setColor( QColorGroup::Background, QColor( 0, 170, 0) ); | ||
202 | cg.setColor( QColorGroup::Shadow, black ); | ||
203 | cg.setColor( QColorGroup::Highlight, black ); | ||
204 | cg.setColor( QColorGroup::HighlightedText, white ); | ||
205 | pal.setInactive( cg ); | ||
206 | cg.setColor( QColorGroup::Foreground, QColor( 128, 128, 128) ); | ||
207 | cg.setColor( QColorGroup::Button, QColor( 192, 192, 192) ); | ||
208 | cg.setColor( QColorGroup::Light, white ); | ||
209 | cg.setColor( QColorGroup::Midlight, QColor( 220, 220, 220) ); | ||
210 | cg.setColor( QColorGroup::Dark, QColor( 96, 96, 96) ); | ||
211 | cg.setColor( QColorGroup::Mid, QColor( 128, 128, 128) ); | ||
212 | cg.setColor( QColorGroup::Text, black ); | ||
213 | cg.setColor( QColorGroup::BrightText, white ); | ||
214 | cg.setColor( QColorGroup::ButtonText, QColor( 128, 128, 128) ); | ||
215 | cg.setColor( QColorGroup::Base, white ); | ||
216 | cg.setColor( QColorGroup::Background, QColor( 0, 170, 0) ); | ||
217 | cg.setColor( QColorGroup::Shadow, black ); | ||
218 | cg.setColor( QColorGroup::Highlight, black ); | ||
219 | cg.setColor( QColorGroup::HighlightedText, white ); | ||
220 | pal.setDisabled( cg ); | ||
221 | button_OK->setPalette( pal ); | ||
222 | button_OK->setFrameShape( QLabel::Box ); | ||
223 | button_OK->setFrameShadow( QLabel::Raised ); | ||
224 | button_OK->setText( tr( "Enter" ) ); | ||
225 | button_OK->setAlignment( int( QLabel::AlignCenter ) ); | ||
226 | |||
227 | button_Skip = new QLabel( this, "button_Skip" ); | ||
228 | button_Skip->setGeometry( QRect( 85, 238, 69, 44 ) ); | ||
229 | button_Skip->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, button_Skip->sizePolicy().hasHeightForWidth() ) ); | ||
230 | cg.setColor( QColorGroup::Foreground, black ); | ||
231 | cg.setColor( QColorGroup::Button, QColor( 192, 192, 192) ); | ||
232 | cg.setColor( QColorGroup::Light, white ); | ||
233 | cg.setColor( QColorGroup::Midlight, QColor( 223, 223, 223) ); | ||
234 | cg.setColor( QColorGroup::Dark, QColor( 96, 96, 96) ); | ||
235 | cg.setColor( QColorGroup::Mid, QColor( 128, 128, 128) ); | ||
236 | cg.setColor( QColorGroup::Text, black ); | ||
237 | cg.setColor( QColorGroup::BrightText, white ); | ||
238 | cg.setColor( QColorGroup::ButtonText, black ); | ||
239 | cg.setColor( QColorGroup::Base, white ); | ||
240 | cg.setColor( QColorGroup::Background, QColor( 255, 255, 127) ); | ||
241 | cg.setColor( QColorGroup::Shadow, black ); | ||
242 | cg.setColor( QColorGroup::Highlight, black ); | ||
243 | cg.setColor( QColorGroup::HighlightedText, white ); | ||
244 | pal.setActive( cg ); | ||
245 | cg.setColor( QColorGroup::Foreground, black ); | ||
246 | cg.setColor( QColorGroup::Button, QColor( 192, 192, 192) ); | ||
247 | cg.setColor( QColorGroup::Light, white ); | ||
248 | cg.setColor( QColorGroup::Midlight, QColor( 220, 220, 220) ); | ||
249 | cg.setColor( QColorGroup::Dark, QColor( 96, 96, 96) ); | ||
250 | cg.setColor( QColorGroup::Mid, QColor( 128, 128, 128) ); | ||
251 | cg.setColor( QColorGroup::Text, black ); | ||
252 | cg.setColor( QColorGroup::BrightText, white ); | ||
253 | cg.setColor( QColorGroup::ButtonText, black ); | ||
254 | cg.setColor( QColorGroup::Base, white ); | ||
255 | cg.setColor( QColorGroup::Background, QColor( 255, 255, 127) ); | ||
256 | cg.setColor( QColorGroup::Shadow, black ); | ||
257 | cg.setColor( QColorGroup::Highlight, black ); | ||
258 | cg.setColor( QColorGroup::HighlightedText, white ); | ||
259 | pal.setInactive( cg ); | ||
260 | cg.setColor( QColorGroup::Foreground, QColor( 128, 128, 128) ); | ||
261 | cg.setColor( QColorGroup::Button, QColor( 192, 192, 192) ); | ||
262 | cg.setColor( QColorGroup::Light, white ); | ||
263 | cg.setColor( QColorGroup::Midlight, QColor( 220, 220, 220) ); | ||
264 | cg.setColor( QColorGroup::Dark, QColor( 96, 96, 96) ); | ||
265 | cg.setColor( QColorGroup::Mid, QColor( 128, 128, 128) ); | ||
266 | cg.setColor( QColorGroup::Text, black ); | ||
267 | cg.setColor( QColorGroup::BrightText, white ); | ||
268 | cg.setColor( QColorGroup::ButtonText, QColor( 128, 128, 128) ); | ||
269 | cg.setColor( QColorGroup::Base, white ); | ||
270 | cg.setColor( QColorGroup::Background, QColor( 255, 255, 127) ); | ||
271 | cg.setColor( QColorGroup::Shadow, black ); | ||
272 | cg.setColor( QColorGroup::Highlight, black ); | ||
273 | cg.setColor( QColorGroup::HighlightedText, white ); | ||
274 | pal.setDisabled( cg ); | ||
275 | button_Skip->setPalette( pal ); | ||
276 | button_Skip->setFrameShape( QLabel::Box ); | ||
277 | button_Skip->setFrameShadow( QLabel::Raised ); | ||
278 | button_Skip->setText( tr( "Skip" ) ); | ||
279 | button_Skip->setAlignment( int( QLabel::AlignCenter ) ); | ||
280 | } | ||
281 | |||
282 | /* | ||
283 | * Destroys the object and frees any allocated resources | ||
284 | */ | ||
285 | PinDialogBase::~PinDialogBase() | ||
286 | { | ||
287 | // no need to delete child widgets, Qt does it all for us | ||
288 | } | ||
289 | |||
290 | /* | ||
291 | * Main event handler. Reimplemented to handle application | ||
292 | * font changes | ||
293 | */ | ||
294 | bool PinDialogBase::event( QEvent* ev ) | ||
295 | { | ||
296 | bool ret = QWidget::event( ev ); | ||
297 | if ( ev->type() == QEvent::ApplicationFontChange ) { | ||
298 | QFont prompt_font( prompt->font() ); | ||
299 | prompt_font.setPointSize( 18 ); | ||
300 | prompt->setFont( prompt_font ); | ||
301 | } | ||
302 | return ret; | ||
303 | } | ||
304 | |||
diff --git a/noncore/securityplugins/pin/pinDialogBase.h b/noncore/securityplugins/pin/pinDialogBase.h new file mode 100644 index 0000000..3ed2b63 --- a/dev/null +++ b/noncore/securityplugins/pin/pinDialogBase.h | |||
@@ -0,0 +1,47 @@ | |||
1 | /**************************************************************************** | ||
2 | ** Form interface generated from reading ui file 'pinDialogBase.ui' | ||
3 | ** | ||
4 | ** Created: Mon Jun 14 11:00:59 2004 | ||
5 | ** by: The User Interface Compiler (uic) | ||
6 | ** | ||
7 | ** WARNING! All changes made in this file will be lost! | ||
8 | ****************************************************************************/ | ||
9 | #ifndef PINDIALOGBASE_H | ||
10 | #define PINDIALOGBASE_H | ||
11 | |||
12 | #include <qvariant.h> | ||
13 | #include <qwidget.h> | ||
14 | class QVBoxLayout; | ||
15 | class QHBoxLayout; | ||
16 | class QGridLayout; | ||
17 | class QLabel; | ||
18 | class QLineEdit; | ||
19 | |||
20 | class PinDialogBase : public QWidget | ||
21 | { | ||
22 | Q_OBJECT | ||
23 | |||
24 | public: | ||
25 | PinDialogBase( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | ||
26 | ~PinDialogBase(); | ||
27 | |||
28 | QLabel* button_4; | ||
29 | QLabel* button_7; | ||
30 | QLabel* prompt; | ||
31 | QLineEdit* display; | ||
32 | QLabel* button_1; | ||
33 | QLabel* button_2; | ||
34 | QLabel* button_5; | ||
35 | QLabel* button_6; | ||
36 | QLabel* button_3; | ||
37 | QLabel* button_0; | ||
38 | QLabel* button_8; | ||
39 | QLabel* button_9; | ||
40 | QLabel* button_OK; | ||
41 | QLabel* button_Skip; | ||
42 | |||
43 | protected: | ||
44 | bool event( QEvent* ); | ||
45 | }; | ||
46 | |||
47 | #endif // PINDIALOGBASE_H | ||
diff --git a/noncore/securityplugins/pin/pinDialogBase.ui b/noncore/securityplugins/pin/pinDialogBase.ui new file mode 100644 index 0000000..79e7a55 --- a/dev/null +++ b/noncore/securityplugins/pin/pinDialogBase.ui | |||
@@ -0,0 +1,1258 @@ | |||
1 | <!DOCTYPE UI><UI> | ||
2 | <class>PinDialogBase</class> | ||
3 | <widget> | ||
4 | <class>QWidget</class> | ||
5 | <property stdset="1"> | ||
6 | <name>name</name> | ||
7 | <cstring>PinDialogBase</cstring> | ||
8 | </property> | ||
9 | <property stdset="1"> | ||
10 | <name>geometry</name> | ||
11 | <rect> | ||
12 | <x>0</x> | ||
13 | <y>0</y> | ||
14 | <width>231</width> | ||
15 | <height>293</height> | ||
16 | </rect> | ||
17 | </property> | ||
18 | <property stdset="1"> | ||
19 | <name>font</name> | ||
20 | <font> | ||
21 | <pointsize>24</pointsize> | ||
22 | </font> | ||
23 | </property> | ||
24 | <property stdset="1"> | ||
25 | <name>caption</name> | ||
26 | <string>PinDialogBase</string> | ||
27 | </property> | ||
28 | <widget> | ||
29 | <class>QLabel</class> | ||
30 | <property stdset="1"> | ||
31 | <name>name</name> | ||
32 | <cstring>button_4</cstring> | ||
33 | </property> | ||
34 | <property stdset="1"> | ||
35 | <name>geometry</name> | ||
36 | <rect> | ||
37 | <x>11</x> | ||
38 | <y>138</y> | ||
39 | <width>68</width> | ||
40 | <height>44</height> | ||
41 | </rect> | ||
42 | </property> | ||
43 | <property stdset="1"> | ||
44 | <name>sizePolicy</name> | ||
45 | <sizepolicy> | ||
46 | <hsizetype>5</hsizetype> | ||
47 | <vsizetype>5</vsizetype> | ||
48 | </sizepolicy> | ||
49 | </property> | ||
50 | <property stdset="1"> | ||
51 | <name>frameShape</name> | ||
52 | <enum>Box</enum> | ||
53 | </property> | ||
54 | <property stdset="1"> | ||
55 | <name>frameShadow</name> | ||
56 | <enum>Raised</enum> | ||
57 | </property> | ||
58 | <property stdset="1"> | ||
59 | <name>text</name> | ||
60 | <string>4</string> | ||
61 | </property> | ||
62 | <property stdset="1"> | ||
63 | <name>alignment</name> | ||
64 | <set>AlignCenter</set> | ||
65 | </property> | ||
66 | <property> | ||
67 | <name>hAlign</name> | ||
68 | </property> | ||
69 | </widget> | ||
70 | <widget> | ||
71 | <class>QLabel</class> | ||
72 | <property stdset="1"> | ||
73 | <name>name</name> | ||
74 | <cstring>button_7</cstring> | ||
75 | </property> | ||
76 | <property stdset="1"> | ||
77 | <name>geometry</name> | ||
78 | <rect> | ||
79 | <x>11</x> | ||
80 | <y>188</y> | ||
81 | <width>68</width> | ||
82 | <height>44</height> | ||
83 | </rect> | ||
84 | </property> | ||
85 | <property stdset="1"> | ||
86 | <name>sizePolicy</name> | ||
87 | <sizepolicy> | ||
88 | <hsizetype>5</hsizetype> | ||
89 | <vsizetype>5</vsizetype> | ||
90 | </sizepolicy> | ||
91 | </property> | ||
92 | <property stdset="1"> | ||
93 | <name>frameShape</name> | ||
94 | <enum>Box</enum> | ||
95 | </property> | ||
96 | <property stdset="1"> | ||
97 | <name>frameShadow</name> | ||
98 | <enum>Raised</enum> | ||
99 | </property> | ||
100 | <property stdset="1"> | ||
101 | <name>text</name> | ||
102 | <string>7</string> | ||
103 | </property> | ||
104 | <property stdset="1"> | ||
105 | <name>alignment</name> | ||
106 | <set>AlignCenter</set> | ||
107 | </property> | ||
108 | <property> | ||
109 | <name>hAlign</name> | ||
110 | </property> | ||
111 | </widget> | ||
112 | <widget> | ||
113 | <class>QLabel</class> | ||
114 | <property stdset="1"> | ||
115 | <name>name</name> | ||
116 | <cstring>prompt</cstring> | ||
117 | </property> | ||
118 | <property stdset="1"> | ||
119 | <name>geometry</name> | ||
120 | <rect> | ||
121 | <x>11</x> | ||
122 | <y>11</y> | ||
123 | <width>217</width> | ||
124 | <height>25</height> | ||
125 | </rect> | ||
126 | </property> | ||
127 | <property stdset="1"> | ||
128 | <name>font</name> | ||
129 | <font> | ||
130 | <pointsize>18</pointsize> | ||
131 | </font> | ||
132 | </property> | ||
133 | <property stdset="1"> | ||
134 | <name>text</name> | ||
135 | <string>Enter your PIN</string> | ||
136 | </property> | ||
137 | </widget> | ||
138 | <widget> | ||
139 | <class>QLineEdit</class> | ||
140 | <property stdset="1"> | ||
141 | <name>name</name> | ||
142 | <cstring>display</cstring> | ||
143 | </property> | ||
144 | <property stdset="1"> | ||
145 | <name>enabled</name> | ||
146 | <bool>false</bool> | ||
147 | </property> | ||
148 | <property stdset="1"> | ||
149 | <name>geometry</name> | ||
150 | <rect> | ||
151 | <x>11</x> | ||
152 | <y>42</y> | ||
153 | <width>217</width> | ||
154 | <height>40</height> | ||
155 | </rect> | ||
156 | </property> | ||
157 | <property stdset="1"> | ||
158 | <name>palette</name> | ||
159 | <palette> | ||
160 | <active> | ||
161 | <color> | ||
162 | <red>0</red> | ||
163 | <green>0</green> | ||
164 | <blue>0</blue> | ||
165 | </color> | ||
166 | <color> | ||
167 | <red>228</red> | ||
168 | <green>228</green> | ||
169 | <blue>228</blue> | ||
170 | </color> | ||
171 | <color> | ||
172 | <red>255</red> | ||
173 | <green>255</green> | ||
174 | <blue>255</blue> | ||
175 | </color> | ||
176 | <color> | ||
177 | <red>242</red> | ||
178 | <green>242</green> | ||
179 | <blue>242</blue> | ||
180 | </color> | ||
181 | <color> | ||
182 | <red>78</red> | ||
183 | <green>78</green> | ||
184 | <blue>78</blue> | ||
185 | </color> | ||
186 | <color> | ||
187 | <red>183</red> | ||
188 | <green>183</green> | ||
189 | <blue>183</blue> | ||
190 | </color> | ||
191 | <color> | ||
192 | <red>0</red> | ||
193 | <green>0</green> | ||
194 | <blue>0</blue> | ||
195 | </color> | ||
196 | <color> | ||
197 | <red>255</red> | ||
198 | <green>255</green> | ||
199 | <blue>255</blue> | ||
200 | </color> | ||
201 | <color> | ||
202 | <red>0</red> | ||
203 | <green>0</green> | ||
204 | <blue>0</blue> | ||
205 | </color> | ||
206 | <color> | ||
207 | <red>255</red> | ||
208 | <green>255</green> | ||
209 | <blue>255</blue> | ||
210 | </color> | ||
211 | <color> | ||
212 | <red>220</red> | ||
213 | <green>220</green> | ||
214 | <blue>220</blue> | ||
215 | </color> | ||
216 | <color> | ||
217 | <red>0</red> | ||
218 | <green>0</green> | ||
219 | <blue>0</blue> | ||
220 | </color> | ||
221 | <color> | ||
222 | <red>10</red> | ||
223 | <green>95</green> | ||
224 | <blue>137</blue> | ||
225 | </color> | ||
226 | <color> | ||
227 | <red>255</red> | ||
228 | <green>255</green> | ||
229 | <blue>255</blue> | ||
230 | </color> | ||
231 | </active> | ||
232 | <disabled> | ||
233 | <color> | ||
234 | <red>128</red> | ||
235 | <green>128</green> | ||
236 | <blue>128</blue> | ||
237 | </color> | ||
238 | <color> | ||
239 | <red>228</red> | ||
240 | <green>228</green> | ||
241 | <blue>228</blue> | ||
242 | </color> | ||
243 | <color> | ||
244 | <red>255</red> | ||
245 | <green>255</green> | ||
246 | <blue>255</blue> | ||
247 | </color> | ||
248 | <color> | ||
249 | <red>255</red> | ||
250 | <green>255</green> | ||
251 | <blue>255</blue> | ||
252 | </color> | ||
253 | <color> | ||
254 | <red>114</red> | ||
255 | <green>114</green> | ||
256 | <blue>114</blue> | ||
257 | </color> | ||
258 | <color> | ||
259 | <red>152</red> | ||
260 | <green>152</green> | ||
261 | <blue>152</blue> | ||
262 | </color> | ||
263 | <color> | ||
264 | <red>0</red> | ||
265 | <green>0</green> | ||
266 | <blue>0</blue> | ||
267 | </color> | ||
268 | <color> | ||
269 | <red>255</red> | ||
270 | <green>255</green> | ||
271 | <blue>255</blue> | ||
272 | </color> | ||
273 | <color> | ||
274 | <red>0</red> | ||
275 | <green>0</green> | ||
276 | <blue>0</blue> | ||
277 | </color> | ||
278 | <color> | ||
279 | <red>255</red> | ||
280 | <green>255</green> | ||
281 | <blue>255</blue> | ||
282 | </color> | ||
283 | <color> | ||
284 | <red>220</red> | ||
285 | <green>220</green> | ||
286 | <blue>220</blue> | ||
287 | </color> | ||
288 | <color> | ||
289 | <red>0</red> | ||
290 | <green>0</green> | ||
291 | <blue>0</blue> | ||
292 | </color> | ||
293 | <color> | ||
294 | <red>0</red> | ||
295 | <green>0</green> | ||
296 | <blue>128</blue> | ||
297 | </color> | ||
298 | <color> | ||
299 | <red>255</red> | ||
300 | <green>255</green> | ||
301 | <blue>255</blue> | ||
302 | </color> | ||
303 | </disabled> | ||
304 | <inactive> | ||
305 | <color> | ||
306 | <red>0</red> | ||
307 | <green>0</green> | ||
308 | <blue>0</blue> | ||
309 | </color> | ||
310 | <color> | ||
311 | <red>228</red> | ||
312 | <green>228</green> | ||
313 | <blue>228</blue> | ||
314 | </color> | ||
315 | <color> | ||
316 | <red>255</red> | ||
317 | <green>255</green> | ||
318 | <blue>255</blue> | ||
319 | </color> | ||
320 | <color> | ||
321 | <red>242</red> | ||
322 | <green>242</green> | ||
323 | <blue>242</blue> | ||
324 | </color> | ||
325 | <color> | ||
326 | <red>78</red> | ||
327 | <green>78</green> | ||
328 | <blue>78</blue> | ||
329 | </color> | ||
330 | <color> | ||
331 | <red>183</red> | ||
332 | <green>183</green> | ||
333 | <blue>183</blue> | ||
334 | </color> | ||
335 | <color> | ||
336 | <red>0</red> | ||
337 | <green>0</green> | ||
338 | <blue>0</blue> | ||
339 | </color> | ||
340 | <color> | ||
341 | <red>255</red> | ||
342 | <green>255</green> | ||
343 | <blue>255</blue> | ||
344 | </color> | ||
345 | <color> | ||
346 | <red>0</red> | ||
347 | <green>0</green> | ||
348 | <blue>0</blue> | ||
349 | </color> | ||
350 | <color> | ||
351 | <red>255</red> | ||
352 | <green>255</green> | ||
353 | <blue>255</blue> | ||
354 | </color> | ||
355 | <color> | ||
356 | <red>220</red> | ||
357 | <green>220</green> | ||
358 | <blue>220</blue> | ||
359 | </color> | ||
360 | <color> | ||
361 | <red>0</red> | ||
362 | <green>0</green> | ||
363 | <blue>0</blue> | ||
364 | </color> | ||
365 | <color> | ||
366 | <red>10</red> | ||
367 | <green>95</green> | ||
368 | <blue>137</blue> | ||
369 | </color> | ||
370 | <color> | ||
371 | <red>255</red> | ||
372 | <green>255</green> | ||
373 | <blue>255</blue> | ||
374 | </color> | ||
375 | </inactive> | ||
376 | </palette> | ||
377 | </property> | ||
378 | <property stdset="1"> | ||
379 | <name>echoMode</name> | ||
380 | <enum>Password</enum> | ||
381 | </property> | ||
382 | </widget> | ||
383 | <widget> | ||
384 | <class>QLabel</class> | ||
385 | <property stdset="1"> | ||
386 | <name>name</name> | ||
387 | <cstring>button_1</cstring> | ||
388 | </property> | ||
389 | <property stdset="1"> | ||
390 | <name>geometry</name> | ||
391 | <rect> | ||
392 | <x>11</x> | ||
393 | <y>88</y> | ||
394 | <width>68</width> | ||
395 | <height>44</height> | ||
396 | </rect> | ||
397 | </property> | ||
398 | <property stdset="1"> | ||
399 | <name>sizePolicy</name> | ||
400 | <sizepolicy> | ||
401 | <hsizetype>5</hsizetype> | ||
402 | <vsizetype>5</vsizetype> | ||
403 | </sizepolicy> | ||
404 | </property> | ||
405 | <property stdset="1"> | ||
406 | <name>frameShape</name> | ||
407 | <enum>Box</enum> | ||
408 | </property> | ||
409 | <property stdset="1"> | ||
410 | <name>frameShadow</name> | ||
411 | <enum>Raised</enum> | ||
412 | </property> | ||
413 | <property stdset="1"> | ||
414 | <name>text</name> | ||
415 | <string>1</string> | ||
416 | </property> | ||
417 | <property stdset="1"> | ||
418 | <name>alignment</name> | ||
419 | <set>AlignCenter</set> | ||
420 | </property> | ||
421 | <property> | ||
422 | <name>hAlign</name> | ||
423 | </property> | ||
424 | </widget> | ||
425 | <widget> | ||
426 | <class>QLabel</class> | ||
427 | <property stdset="1"> | ||
428 | <name>name</name> | ||
429 | <cstring>button_2</cstring> | ||
430 | </property> | ||
431 | <property stdset="1"> | ||
432 | <name>geometry</name> | ||
433 | <rect> | ||
434 | <x>85</x> | ||
435 | <y>88</y> | ||
436 | <width>69</width> | ||
437 | <height>44</height> | ||
438 | </rect> | ||
439 | </property> | ||
440 | <property stdset="1"> | ||
441 | <name>sizePolicy</name> | ||
442 | <sizepolicy> | ||
443 | <hsizetype>5</hsizetype> | ||
444 | <vsizetype>5</vsizetype> | ||
445 | </sizepolicy> | ||
446 | </property> | ||
447 | <property stdset="1"> | ||
448 | <name>frameShape</name> | ||
449 | <enum>Box</enum> | ||
450 | </property> | ||
451 | <property stdset="1"> | ||
452 | <name>frameShadow</name> | ||
453 | <enum>Raised</enum> | ||
454 | </property> | ||
455 | <property stdset="1"> | ||
456 | <name>text</name> | ||
457 | <string>2</string> | ||
458 | </property> | ||
459 | <property stdset="1"> | ||
460 | <name>alignment</name> | ||
461 | <set>AlignCenter</set> | ||
462 | </property> | ||
463 | <property> | ||
464 | <name>hAlign</name> | ||
465 | </property> | ||
466 | </widget> | ||
467 | <widget> | ||
468 | <class>QLabel</class> | ||
469 | <property stdset="1"> | ||
470 | <name>name</name> | ||
471 | <cstring>button_5</cstring> | ||
472 | </property> | ||
473 | <property stdset="1"> | ||
474 | <name>geometry</name> | ||
475 | <rect> | ||
476 | <x>85</x> | ||
477 | <y>138</y> | ||
478 | <width>69</width> | ||
479 | <height>44</height> | ||
480 | </rect> | ||
481 | </property> | ||
482 | <property stdset="1"> | ||
483 | <name>sizePolicy</name> | ||
484 | <sizepolicy> | ||
485 | <hsizetype>5</hsizetype> | ||
486 | <vsizetype>5</vsizetype> | ||
487 | </sizepolicy> | ||
488 | </property> | ||
489 | <property stdset="1"> | ||
490 | <name>frameShape</name> | ||
491 | <enum>Box</enum> | ||
492 | </property> | ||
493 | <property stdset="1"> | ||
494 | <name>frameShadow</name> | ||
495 | <enum>Raised</enum> | ||
496 | </property> | ||
497 | <property stdset="1"> | ||
498 | <name>text</name> | ||
499 | <string>5</string> | ||
500 | </property> | ||
501 | <property stdset="1"> | ||
502 | <name>alignment</name> | ||
503 | <set>AlignCenter</set> | ||
504 | </property> | ||
505 | <property> | ||
506 | <name>hAlign</name> | ||
507 | </property> | ||
508 | </widget> | ||
509 | <widget> | ||
510 | <class>QLabel</class> | ||
511 | <property stdset="1"> | ||
512 | <name>name</name> | ||
513 | <cstring>button_6</cstring> | ||
514 | </property> | ||
515 | <property stdset="1"> | ||
516 | <name>geometry</name> | ||
517 | <rect> | ||
518 | <x>160</x> | ||
519 | <y>138</y> | ||
520 | <width>68</width> | ||
521 | <height>44</height> | ||
522 | </rect> | ||
523 | </property> | ||
524 | <property stdset="1"> | ||
525 | <name>sizePolicy</name> | ||
526 | <sizepolicy> | ||
527 | <hsizetype>5</hsizetype> | ||
528 | <vsizetype>5</vsizetype> | ||
529 | </sizepolicy> | ||
530 | </property> | ||
531 | <property stdset="1"> | ||
532 | <name>frameShape</name> | ||
533 | <enum>Box</enum> | ||
534 | </property> | ||
535 | <property stdset="1"> | ||
536 | <name>frameShadow</name> | ||
537 | <enum>Raised</enum> | ||
538 | </property> | ||
539 | <property stdset="1"> | ||
540 | <name>text</name> | ||
541 | <string>6</string> | ||
542 | </property> | ||
543 | <property stdset="1"> | ||
544 | <name>alignment</name> | ||
545 | <set>AlignCenter</set> | ||
546 | </property> | ||
547 | <property> | ||
548 | <name>hAlign</name> | ||
549 | </property> | ||
550 | </widget> | ||
551 | <widget> | ||
552 | <class>QLabel</class> | ||
553 | <property stdset="1"> | ||
554 | <name>name</name> | ||
555 | <cstring>button_3</cstring> | ||
556 | </property> | ||
557 | <property stdset="1"> | ||
558 | <name>geometry</name> | ||
559 | <rect> | ||
560 | <x>160</x> | ||
561 | <y>88</y> | ||
562 | <width>68</width> | ||
563 | <height>44</height> | ||
564 | </rect> | ||
565 | </property> | ||
566 | <property stdset="1"> | ||
567 | <name>sizePolicy</name> | ||
568 | <sizepolicy> | ||
569 | <hsizetype>5</hsizetype> | ||
570 | <vsizetype>5</vsizetype> | ||
571 | </sizepolicy> | ||
572 | </property> | ||
573 | <property stdset="1"> | ||
574 | <name>frameShape</name> | ||
575 | <enum>Box</enum> | ||
576 | </property> | ||
577 | <property stdset="1"> | ||
578 | <name>frameShadow</name> | ||
579 | <enum>Raised</enum> | ||
580 | </property> | ||
581 | <property stdset="1"> | ||
582 | <name>text</name> | ||
583 | <string>3</string> | ||
584 | </property> | ||
585 | <property stdset="1"> | ||
586 | <name>alignment</name> | ||
587 | <set>AlignCenter</set> | ||
588 | </property> | ||
589 | <property> | ||
590 | <name>hAlign</name> | ||
591 | </property> | ||
592 | </widget> | ||
593 | <widget> | ||
594 | <class>QLabel</class> | ||
595 | <property stdset="1"> | ||
596 | <name>name</name> | ||
597 | <cstring>button_0</cstring> | ||
598 | </property> | ||
599 | <property stdset="1"> | ||
600 | <name>geometry</name> | ||
601 | <rect> | ||
602 | <x>11</x> | ||
603 | <y>238</y> | ||
604 | <width>68</width> | ||
605 | <height>44</height> | ||
606 | </rect> | ||
607 | </property> | ||
608 | <property stdset="1"> | ||
609 | <name>sizePolicy</name> | ||
610 | <sizepolicy> | ||
611 | <hsizetype>5</hsizetype> | ||
612 | <vsizetype>5</vsizetype> | ||
613 | </sizepolicy> | ||
614 | </property> | ||
615 | <property stdset="1"> | ||
616 | <name>frameShape</name> | ||
617 | <enum>Box</enum> | ||
618 | </property> | ||
619 | <property stdset="1"> | ||
620 | <name>frameShadow</name> | ||
621 | <enum>Raised</enum> | ||
622 | </property> | ||
623 | <property stdset="1"> | ||
624 | <name>text</name> | ||
625 | <string>0</string> | ||
626 | </property> | ||
627 | <property stdset="1"> | ||
628 | <name>alignment</name> | ||
629 | <set>AlignCenter</set> | ||
630 | </property> | ||
631 | <property> | ||
632 | <name>hAlign</name> | ||
633 | </property> | ||
634 | <property> | ||
635 | <name>layoutMargin</name> | ||
636 | </property> | ||
637 | <property> | ||
638 | <name>layoutSpacing</name> | ||
639 | </property> | ||
640 | </widget> | ||
641 | <widget> | ||
642 | <class>QLabel</class> | ||
643 | <property stdset="1"> | ||
644 | <name>name</name> | ||
645 | <cstring>button_8</cstring> | ||
646 | </property> | ||
647 | <property stdset="1"> | ||
648 | <name>geometry</name> | ||
649 | <rect> | ||
650 | <x>85</x> | ||
651 | <y>188</y> | ||
652 | <width>69</width> | ||
653 | <height>44</height> | ||
654 | </rect> | ||
655 | </property> | ||
656 | <property stdset="1"> | ||
657 | <name>sizePolicy</name> | ||
658 | <sizepolicy> | ||
659 | <hsizetype>5</hsizetype> | ||
660 | <vsizetype>5</vsizetype> | ||
661 | </sizepolicy> | ||
662 | </property> | ||
663 | <property stdset="1"> | ||
664 | <name>frameShape</name> | ||
665 | <enum>Box</enum> | ||
666 | </property> | ||
667 | <property stdset="1"> | ||
668 | <name>frameShadow</name> | ||
669 | <enum>Raised</enum> | ||
670 | </property> | ||
671 | <property stdset="1"> | ||
672 | <name>text</name> | ||
673 | <string>8</string> | ||
674 | </property> | ||
675 | <property stdset="1"> | ||
676 | <name>alignment</name> | ||
677 | <set>AlignCenter</set> | ||
678 | </property> | ||
679 | <property> | ||
680 | <name>hAlign</name> | ||
681 | </property> | ||
682 | </widget> | ||
683 | <widget> | ||
684 | <class>QLabel</class> | ||
685 | <property stdset="1"> | ||
686 | <name>name</name> | ||
687 | <cstring>button_9</cstring> | ||
688 | </property> | ||
689 | <property stdset="1"> | ||
690 | <name>geometry</name> | ||
691 | <rect> | ||
692 | <x>160</x> | ||
693 | <y>188</y> | ||
694 | <width>68</width> | ||
695 | <height>44</height> | ||
696 | </rect> | ||
697 | </property> | ||
698 | <property stdset="1"> | ||
699 | <name>sizePolicy</name> | ||
700 | <sizepolicy> | ||
701 | <hsizetype>5</hsizetype> | ||
702 | <vsizetype>5</vsizetype> | ||
703 | </sizepolicy> | ||
704 | </property> | ||
705 | <property stdset="1"> | ||
706 | <name>frameShape</name> | ||
707 | <enum>Box</enum> | ||
708 | </property> | ||
709 | <property stdset="1"> | ||
710 | <name>frameShadow</name> | ||
711 | <enum>Raised</enum> | ||
712 | </property> | ||
713 | <property stdset="1"> | ||
714 | <name>text</name> | ||
715 | <string>9</string> | ||
716 | </property> | ||
717 | <property stdset="1"> | ||
718 | <name>alignment</name> | ||
719 | <set>AlignCenter</set> | ||
720 | </property> | ||
721 | <property> | ||
722 | <name>hAlign</name> | ||
723 | </property> | ||
724 | <property> | ||
725 | <name>layoutMargin</name> | ||
726 | </property> | ||
727 | <property> | ||
728 | <name>layoutSpacing</name> | ||
729 | </property> | ||
730 | </widget> | ||
731 | <widget> | ||
732 | <class>QLabel</class> | ||
733 | <property stdset="1"> | ||
734 | <name>name</name> | ||
735 | <cstring>button_OK</cstring> | ||
736 | </property> | ||
737 | <property stdset="1"> | ||
738 | <name>geometry</name> | ||
739 | <rect> | ||
740 | <x>160</x> | ||
741 | <y>238</y> | ||
742 | <width>68</width> | ||
743 | <height>44</height> | ||
744 | </rect> | ||
745 | </property> | ||
746 | <property stdset="1"> | ||
747 | <name>sizePolicy</name> | ||
748 | <sizepolicy> | ||
749 | <hsizetype>5</hsizetype> | ||
750 | <vsizetype>5</vsizetype> | ||
751 | </sizepolicy> | ||
752 | </property> | ||
753 | <property stdset="1"> | ||
754 | <name>palette</name> | ||
755 | <palette> | ||
756 | <active> | ||
757 | <color> | ||
758 | <red>0</red> | ||
759 | <green>0</green> | ||
760 | <blue>0</blue> | ||
761 | </color> | ||
762 | <color> | ||
763 | <red>192</red> | ||
764 | <green>192</green> | ||
765 | <blue>192</blue> | ||
766 | </color> | ||
767 | <color> | ||
768 | <red>255</red> | ||
769 | <green>255</green> | ||
770 | <blue>255</blue> | ||
771 | </color> | ||
772 | <color> | ||
773 | <red>223</red> | ||
774 | <green>223</green> | ||
775 | <blue>223</blue> | ||
776 | </color> | ||
777 | <color> | ||
778 | <red>96</red> | ||
779 | <green>96</green> | ||
780 | <blue>96</blue> | ||
781 | </color> | ||
782 | <color> | ||
783 | <red>128</red> | ||
784 | <green>128</green> | ||
785 | <blue>128</blue> | ||
786 | </color> | ||
787 | <color> | ||
788 | <red>0</red> | ||
789 | <green>0</green> | ||
790 | <blue>0</blue> | ||
791 | </color> | ||
792 | <color> | ||
793 | <red>255</red> | ||
794 | <green>255</green> | ||
795 | <blue>255</blue> | ||
796 | </color> | ||
797 | <color> | ||
798 | <red>0</red> | ||
799 | <green>0</green> | ||
800 | <blue>0</blue> | ||
801 | </color> | ||
802 | <color> | ||
803 | <red>255</red> | ||
804 | <green>255</green> | ||
805 | <blue>255</blue> | ||
806 | </color> | ||
807 | <color> | ||
808 | <red>0</red> | ||
809 | <green>170</green> | ||
810 | <blue>0</blue> | ||
811 | </color> | ||
812 | <color> | ||
813 | <red>0</red> | ||
814 | <green>0</green> | ||
815 | <blue>0</blue> | ||
816 | </color> | ||
817 | <color> | ||
818 | <red>0</red> | ||
819 | <green>0</green> | ||
820 | <blue>0</blue> | ||
821 | </color> | ||
822 | <color> | ||
823 | <red>255</red> | ||
824 | <green>255</green> | ||
825 | <blue>255</blue> | ||
826 | </color> | ||
827 | </active> | ||
828 | <disabled> | ||
829 | <color> | ||
830 | <red>128</red> | ||
831 | <green>128</green> | ||
832 | <blue>128</blue> | ||
833 | </color> | ||
834 | <color> | ||
835 | <red>192</red> | ||
836 | <green>192</green> | ||
837 | <blue>192</blue> | ||
838 | </color> | ||
839 | <color> | ||
840 | <red>255</red> | ||
841 | <green>255</green> | ||
842 | <blue>255</blue> | ||
843 | </color> | ||
844 | <color> | ||
845 | <red>220</red> | ||
846 | <green>220</green> | ||
847 | <blue>220</blue> | ||
848 | </color> | ||
849 | <color> | ||
850 | <red>96</red> | ||
851 | <green>96</green> | ||
852 | <blue>96</blue> | ||
853 | </color> | ||
854 | <color> | ||
855 | <red>128</red> | ||
856 | <green>128</green> | ||
857 | <blue>128</blue> | ||
858 | </color> | ||
859 | <color> | ||
860 | <red>0</red> | ||
861 | <green>0</green> | ||
862 | <blue>0</blue> | ||
863 | </color> | ||
864 | <color> | ||
865 | <red>255</red> | ||
866 | <green>255</green> | ||
867 | <blue>255</blue> | ||
868 | </color> | ||
869 | <color> | ||
870 | <red>128</red> | ||
871 | <green>128</green> | ||
872 | <blue>128</blue> | ||
873 | </color> | ||
874 | <color> | ||
875 | <red>255</red> | ||
876 | <green>255</green> | ||
877 | <blue>255</blue> | ||
878 | </color> | ||
879 | <color> | ||
880 | <red>0</red> | ||
881 | <green>170</green> | ||
882 | <blue>0</blue> | ||
883 | </color> | ||
884 | <color> | ||
885 | <red>0</red> | ||
886 | <green>0</green> | ||
887 | <blue>0</blue> | ||
888 | </color> | ||
889 | <color> | ||
890 | <red>0</red> | ||
891 | <green>0</green> | ||
892 | <blue>0</blue> | ||
893 | </color> | ||
894 | <color> | ||
895 | <red>255</red> | ||
896 | <green>255</green> | ||
897 | <blue>255</blue> | ||
898 | </color> | ||
899 | </disabled> | ||
900 | <inactive> | ||
901 | <color> | ||
902 | <red>0</red> | ||
903 | <green>0</green> | ||
904 | <blue>0</blue> | ||
905 | </color> | ||
906 | <color> | ||
907 | <red>192</red> | ||
908 | <green>192</green> | ||
909 | <blue>192</blue> | ||
910 | </color> | ||
911 | <color> | ||
912 | <red>255</red> | ||
913 | <green>255</green> | ||
914 | <blue>255</blue> | ||
915 | </color> | ||
916 | <color> | ||
917 | <red>220</red> | ||
918 | <green>220</green> | ||
919 | <blue>220</blue> | ||
920 | </color> | ||
921 | <color> | ||
922 | <red>96</red> | ||
923 | <green>96</green> | ||
924 | <blue>96</blue> | ||
925 | </color> | ||
926 | <color> | ||
927 | <red>128</red> | ||
928 | <green>128</green> | ||
929 | <blue>128</blue> | ||
930 | </color> | ||
931 | <color> | ||
932 | <red>0</red> | ||
933 | <green>0</green> | ||
934 | <blue>0</blue> | ||
935 | </color> | ||
936 | <color> | ||
937 | <red>255</red> | ||
938 | <green>255</green> | ||
939 | <blue>255</blue> | ||
940 | </color> | ||
941 | <color> | ||
942 | <red>0</red> | ||
943 | <green>0</green> | ||
944 | <blue>0</blue> | ||
945 | </color> | ||
946 | <color> | ||
947 | <red>255</red> | ||
948 | <green>255</green> | ||
949 | <blue>255</blue> | ||
950 | </color> | ||
951 | <color> | ||
952 | <red>0</red> | ||
953 | <green>170</green> | ||
954 | <blue>0</blue> | ||
955 | </color> | ||
956 | <color> | ||
957 | <red>0</red> | ||
958 | <green>0</green> | ||
959 | <blue>0</blue> | ||
960 | </color> | ||
961 | <color> | ||
962 | <red>0</red> | ||
963 | <green>0</green> | ||
964 | <blue>0</blue> | ||
965 | </color> | ||
966 | <color> | ||
967 | <red>255</red> | ||
968 | <green>255</green> | ||
969 | <blue>255</blue> | ||
970 | </color> | ||
971 | </inactive> | ||
972 | </palette> | ||
973 | </property> | ||
974 | <property stdset="1"> | ||
975 | <name>frameShape</name> | ||
976 | <enum>Box</enum> | ||
977 | </property> | ||
978 | <property stdset="1"> | ||
979 | <name>frameShadow</name> | ||
980 | <enum>Raised</enum> | ||
981 | </property> | ||
982 | <property stdset="1"> | ||
983 | <name>text</name> | ||
984 | <string>Enter</string> | ||
985 | </property> | ||
986 | <property stdset="1"> | ||
987 | <name>alignment</name> | ||
988 | <set>AlignCenter</set> | ||
989 | </property> | ||
990 | <property> | ||
991 | <name>hAlign</name> | ||
992 | </property> | ||
993 | </widget> | ||
994 | <widget> | ||
995 | <class>QLabel</class> | ||
996 | <property stdset="1"> | ||
997 | <name>name</name> | ||
998 | <cstring>button_Skip</cstring> | ||
999 | </property> | ||
1000 | <property stdset="1"> | ||
1001 | <name>geometry</name> | ||
1002 | <rect> | ||
1003 | <x>85</x> | ||
1004 | <y>238</y> | ||
1005 | <width>69</width> | ||
1006 | <height>44</height> | ||
1007 | </rect> | ||
1008 | </property> | ||
1009 | <property stdset="1"> | ||
1010 | <name>sizePolicy</name> | ||
1011 | <sizepolicy> | ||
1012 | <hsizetype>5</hsizetype> | ||
1013 | <vsizetype>5</vsizetype> | ||
1014 | </sizepolicy> | ||
1015 | </property> | ||
1016 | <property stdset="1"> | ||
1017 | <name>palette</name> | ||
1018 | <palette> | ||
1019 | <active> | ||
1020 | <color> | ||
1021 | <red>0</red> | ||
1022 | <green>0</green> | ||
1023 | <blue>0</blue> | ||
1024 | </color> | ||
1025 | <color> | ||
1026 | <red>192</red> | ||
1027 | <green>192</green> | ||
1028 | <blue>192</blue> | ||
1029 | </color> | ||
1030 | <color> | ||
1031 | <red>255</red> | ||
1032 | <green>255</green> | ||
1033 | <blue>255</blue> | ||
1034 | </color> | ||
1035 | <color> | ||
1036 | <red>223</red> | ||
1037 | <green>223</green> | ||
1038 | <blue>223</blue> | ||
1039 | </color> | ||
1040 | <color> | ||
1041 | <red>96</red> | ||
1042 | <green>96</green> | ||
1043 | <blue>96</blue> | ||
1044 | </color> | ||
1045 | <color> | ||
1046 | <red>128</red> | ||
1047 | <green>128</green> | ||
1048 | <blue>128</blue> | ||
1049 | </color> | ||
1050 | <color> | ||
1051 | <red>0</red> | ||
1052 | <green>0</green> | ||
1053 | <blue>0</blue> | ||
1054 | </color> | ||
1055 | <color> | ||
1056 | <red>255</red> | ||
1057 | <green>255</green> | ||
1058 | <blue>255</blue> | ||
1059 | </color> | ||
1060 | <color> | ||
1061 | <red>0</red> | ||
1062 | <green>0</green> | ||
1063 | <blue>0</blue> | ||
1064 | </color> | ||
1065 | <color> | ||
1066 | <red>255</red> | ||
1067 | <green>255</green> | ||
1068 | <blue>255</blue> | ||
1069 | </color> | ||
1070 | <color> | ||
1071 | <red>255</red> | ||
1072 | <green>255</green> | ||
1073 | <blue>127</blue> | ||
1074 | </color> | ||
1075 | <color> | ||
1076 | <red>0</red> | ||
1077 | <green>0</green> | ||
1078 | <blue>0</blue> | ||
1079 | </color> | ||
1080 | <color> | ||
1081 | <red>0</red> | ||
1082 | <green>0</green> | ||
1083 | <blue>0</blue> | ||
1084 | </color> | ||
1085 | <color> | ||
1086 | <red>255</red> | ||
1087 | <green>255</green> | ||
1088 | <blue>255</blue> | ||
1089 | </color> | ||
1090 | </active> | ||
1091 | <disabled> | ||
1092 | <color> | ||
1093 | <red>128</red> | ||
1094 | <green>128</green> | ||
1095 | <blue>128</blue> | ||
1096 | </color> | ||
1097 | <color> | ||
1098 | <red>192</red> | ||
1099 | <green>192</green> | ||
1100 | <blue>192</blue> | ||
1101 | </color> | ||
1102 | <color> | ||
1103 | <red>255</red> | ||
1104 | <green>255</green> | ||
1105 | <blue>255</blue> | ||
1106 | </color> | ||
1107 | <color> | ||
1108 | <red>220</red> | ||
1109 | <green>220</green> | ||
1110 | <blue>220</blue> | ||
1111 | </color> | ||
1112 | <color> | ||
1113 | <red>96</red> | ||
1114 | <green>96</green> | ||
1115 | <blue>96</blue> | ||
1116 | </color> | ||
1117 | <color> | ||
1118 | <red>128</red> | ||
1119 | <green>128</green> | ||
1120 | <blue>128</blue> | ||
1121 | </color> | ||
1122 | <color> | ||
1123 | <red>0</red> | ||
1124 | <green>0</green> | ||
1125 | <blue>0</blue> | ||
1126 | </color> | ||
1127 | <color> | ||
1128 | <red>255</red> | ||
1129 | <green>255</green> | ||
1130 | <blue>255</blue> | ||
1131 | </color> | ||
1132 | <color> | ||
1133 | <red>128</red> | ||
1134 | <green>128</green> | ||
1135 | <blue>128</blue> | ||
1136 | </color> | ||
1137 | <color> | ||
1138 | <red>255</red> | ||
1139 | <green>255</green> | ||
1140 | <blue>255</blue> | ||
1141 | </color> | ||
1142 | <color> | ||
1143 | <red>255</red> | ||
1144 | <green>255</green> | ||
1145 | <blue>127</blue> | ||
1146 | </color> | ||
1147 | <color> | ||
1148 | <red>0</red> | ||
1149 | <green>0</green> | ||
1150 | <blue>0</blue> | ||
1151 | </color> | ||
1152 | <color> | ||
1153 | <red>0</red> | ||
1154 | <green>0</green> | ||
1155 | <blue>0</blue> | ||
1156 | </color> | ||
1157 | <color> | ||
1158 | <red>255</red> | ||
1159 | <green>255</green> | ||
1160 | <blue>255</blue> | ||
1161 | </color> | ||
1162 | </disabled> | ||
1163 | <inactive> | ||
1164 | <color> | ||
1165 | <red>0</red> | ||
1166 | <green>0</green> | ||
1167 | <blue>0</blue> | ||
1168 | </color> | ||
1169 | <color> | ||
1170 | <red>192</red> | ||
1171 | <green>192</green> | ||
1172 | <blue>192</blue> | ||
1173 | </color> | ||
1174 | <color> | ||
1175 | <red>255</red> | ||
1176 | <green>255</green> | ||
1177 | <blue>255</blue> | ||
1178 | </color> | ||
1179 | <color> | ||
1180 | <red>220</red> | ||
1181 | <green>220</green> | ||
1182 | <blue>220</blue> | ||
1183 | </color> | ||
1184 | <color> | ||
1185 | <red>96</red> | ||
1186 | <green>96</green> | ||
1187 | <blue>96</blue> | ||
1188 | </color> | ||
1189 | <color> | ||
1190 | <red>128</red> | ||
1191 | <green>128</green> | ||
1192 | <blue>128</blue> | ||
1193 | </color> | ||
1194 | <color> | ||
1195 | <red>0</red> | ||
1196 | <green>0</green> | ||
1197 | <blue>0</blue> | ||
1198 | </color> | ||
1199 | <color> | ||
1200 | <red>255</red> | ||
1201 | <green>255</green> | ||
1202 | <blue>255</blue> | ||
1203 | </color> | ||
1204 | <color> | ||
1205 | <red>0</red> | ||
1206 | <green>0</green> | ||
1207 | <blue>0</blue> | ||
1208 | </color> | ||
1209 | <color> | ||
1210 | <red>255</red> | ||
1211 | <green>255</green> | ||
1212 | <blue>255</blue> | ||
1213 | </color> | ||
1214 | <color> | ||
1215 | <red>255</red> | ||
1216 | <green>255</green> | ||
1217 | <blue>127</blue> | ||
1218 | </color> | ||
1219 | <color> | ||
1220 | <red>0</red> | ||
1221 | <green>0</green> | ||
1222 | <blue>0</blue> | ||
1223 | </color> | ||
1224 | <color> | ||
1225 | <red>0</red> | ||
1226 | <green>0</green> | ||
1227 | <blue>0</blue> | ||
1228 | </color> | ||
1229 | <color> | ||
1230 | <red>255</red> | ||
1231 | <green>255</green> | ||
1232 | <blue>255</blue> | ||
1233 | </color> | ||
1234 | </inactive> | ||
1235 | </palette> | ||
1236 | </property> | ||
1237 | <property stdset="1"> | ||
1238 | <name>frameShape</name> | ||
1239 | <enum>Box</enum> | ||
1240 | </property> | ||
1241 | <property stdset="1"> | ||
1242 | <name>frameShadow</name> | ||
1243 | <enum>Raised</enum> | ||
1244 | </property> | ||
1245 | <property stdset="1"> | ||
1246 | <name>text</name> | ||
1247 | <string>Skip</string> | ||
1248 | </property> | ||
1249 | <property stdset="1"> | ||
1250 | <name>alignment</name> | ||
1251 | <set>AlignCenter</set> | ||
1252 | </property> | ||
1253 | <property> | ||
1254 | <name>hAlign</name> | ||
1255 | </property> | ||
1256 | </widget> | ||
1257 | </widget> | ||
1258 | </UI> | ||
diff --git a/noncore/securityplugins/pin/pinplugin.pro b/noncore/securityplugins/pin/pinplugin.pro new file mode 100644 index 0000000..d066805 --- a/dev/null +++ b/noncore/securityplugins/pin/pinplugin.pro | |||
@@ -0,0 +1,21 @@ | |||
1 | VERSION = 0.0.2 | ||
2 | TEMPLATE = lib | ||
3 | CONFIG += qt warn_on | ||
4 | |||
5 | HEADERS = pin.h pinpluginimpl.h pinConfigWidget.h | ||
6 | |||
7 | INTERFACES = pinDialogBase.ui | ||
8 | |||
9 | SOURCES = pin.cpp pinpluginimpl.cpp pinConfigWidget.cpp | ||
10 | |||
11 | |||
12 | INCLUDEPATH+= $(OPIEDIR)/include | ||
13 | DEPENDPATH+= | ||
14 | |||
15 | LIBS += -lqpe -lopieui2 | ||
16 | |||
17 | DESTDIR = $(OPIEDIR)/plugins/security | ||
18 | TARGET = multiauthpinplugin | ||
19 | |||
20 | include ( $(OPIEDIR)/include.pro ) | ||
21 | |||
diff --git a/noncore/securityplugins/pin/pinpluginimpl.cpp b/noncore/securityplugins/pin/pinpluginimpl.cpp new file mode 100644 index 0000000..1c32f81 --- a/dev/null +++ b/noncore/securityplugins/pin/pinpluginimpl.cpp | |||
@@ -0,0 +1,28 @@ | |||
1 | #include "pinpluginimpl.h" | ||
2 | |||
3 | PinPluginImpl::PinPluginImpl() { | ||
4 | pinPlugin = new PinPlugin(); | ||
5 | } | ||
6 | |||
7 | PinPluginImpl::~PinPluginImpl() { | ||
8 | delete pinPlugin; | ||
9 | } | ||
10 | |||
11 | MultiauthPluginObject* PinPluginImpl::plugin() { | ||
12 | return pinPlugin; | ||
13 | } | ||
14 | |||
15 | Q_EXPORT_INTERFACE() { | ||
16 | Q_CREATE_INSTANCE( PinPluginImpl ) | ||
17 | } | ||
18 | |||
19 | QRESULT PinPluginImpl::queryInterface( const QUuid & uuid, QUnknownInterface **iface ) { | ||
20 | *iface = 0; | ||
21 | if ( ( uuid == IID_QUnknown ) || ( uuid == IID_MultiauthPluginInterface ) ) { | ||
22 | *iface = this, (*iface)->addRef(); | ||
23 | } else { | ||
24 | return QE_NOINTERFACE; | ||
25 | } | ||
26 | return QS_OK; | ||
27 | |||
28 | } | ||
diff --git a/noncore/securityplugins/pin/pinpluginimpl.h b/noncore/securityplugins/pin/pinpluginimpl.h new file mode 100644 index 0000000..e604b64 --- a/dev/null +++ b/noncore/securityplugins/pin/pinpluginimpl.h | |||
@@ -0,0 +1,58 @@ | |||
1 | /** | ||
2 | * \file pinpluginimpl.h | ||
3 | * \brief Standard Opie multiauth plugin definition | ||
4 | * \author Clément Séveillac (clement . seveillac (at) via . ecp . fr) | ||
5 | */ | ||
6 | /* | ||
7 | =. This file is part of the Opie Project | ||
8 | .=l. Copyright (C) 2004 Opie Developer Team <opie-devel@handhelds.org> | ||
9 | .>+-= | ||
10 | _;:, .> :=|. This library is free software; you can | ||
11 | .> <`_, > . <= redistribute it and/or modify it under | ||
12 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | ||
13 | .="- .-=="i, .._ License as published by the Free Software | ||
14 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
15 | ._= =} : or (at your option) any later version. | ||
16 | .%`+i> _;_. | ||
17 | .i_,=:_. -<s. This library is distributed in the hope that | ||
18 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
19 | : .. .:, . . . without even the implied warranty of | ||
20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
21 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
22 | ..}^=.= = ; Library General Public License for more | ||
23 | ++= -. .` .: details. | ||
24 | : = ...= . :.=- | ||
25 | -. .:....=;==+<; You should have received a copy of the GNU | ||
26 | -_. . . )=. = Library General Public License along with | ||
27 | -- :-=` this library; see the file COPYING.LIB. | ||
28 | If not, write to the Free Software Foundation, | ||
29 | Inc., 59 Temple Place - Suite 330, | ||
30 | Boston, MA 02111-1307, USA. | ||
31 | |||
32 | */ | ||
33 | |||
34 | #ifndef PIN_PLUGIN_IMPL_H | ||
35 | #define PIN_PLUGIN_IMPL_H | ||
36 | |||
37 | #include "pin.h" | ||
38 | |||
39 | /// Standard multiauth plugin class | ||
40 | class PinPluginImpl : public MultiauthPluginInterface{ | ||
41 | |||
42 | public: | ||
43 | PinPluginImpl(); | ||
44 | virtual ~PinPluginImpl(); | ||
45 | |||
46 | QRESULT queryInterface( const QUuid &, QUnknownInterface** ); | ||
47 | // defines standard addRef() and release() functions | ||
48 | Q_REFCOUNT; | ||
49 | |||
50 | virtual MultiauthPluginObject *plugin(); | ||
51 | |||
52 | private: | ||
53 | /// the plugin itself | ||
54 | PinPlugin *pinPlugin; | ||
55 | ulong ref; | ||
56 | }; | ||
57 | |||
58 | #endif | ||