-rw-r--r-- | core/opie-login/loginwindowimpl.cpp | 49 |
1 files changed, 23 insertions, 26 deletions
diff --git a/core/opie-login/loginwindowimpl.cpp b/core/opie-login/loginwindowimpl.cpp index ac24894..547a9b3 100644 --- a/core/opie-login/loginwindowimpl.cpp +++ b/core/opie-login/loginwindowimpl.cpp | |||
@@ -1,61 +1,61 @@ | |||
1 | /* | 1 | /* |
2 | =. This file is part of the OPIE Project | 2 | =. This file is part of the OPIE Project |
3 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> | 3 | .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> |
4 | .>+-= | 4 | .>+-= |
5 | _;:, .> :=|. This file is free software; you can | 5 | _;:, .> :=|. This file is free software; you can |
6 | .> <`_, > . <= redistribute it and/or modify it under | 6 | .> <`_, > . <= redistribute it and/or modify it under |
7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public | 7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
8 | .="- .-=="i, .._ License as published by the Free Software | 8 | .="- .-=="i, .._ License as published by the Free Software |
9 | - . .-<_> .<> Foundation; either version 2 of the License, | 9 | - . .-<_> .<> Foundation; either version 2 of the License, |
10 | ._= =} : or (at your option) any later version. | 10 | ._= =} : or (at your option) any later version. |
11 | .%`+i> _;_. | 11 | .%`+i> _;_. |
12 | .i_,=:_. -<s. This file is distributed in the hope that | 12 | .i_,=:_. -<s. This file is distributed in the hope that |
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
14 | : .. .:, . . . without even the implied warranty of | 14 | : .. .:, . . . without even the implied warranty of |
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | 16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General |
17 | ..}^=.= = ; Public License for more details. | 17 | ..}^=.= = ; Public License for more details. |
18 | ++= -. .` .: | 18 | ++= -. .` .: |
19 | : = ...= . :.=- You should have received a copy of the GNU | 19 | : = ...= . :.=- You should have received a copy of the GNU |
20 | -. .:....=;==+<; General Public License along with this file; | 20 | -. .:....=;==+<; General Public License along with this file; |
21 | -_. . . )=. = see the file COPYING. If not, write to the | 21 | -_. . . )=. = see the file COPYING. If not, write to the |
22 | -- :-=` Free Software Foundation, Inc., | 22 | -- :-=` Free Software Foundation, Inc., |
23 | 59 Temple Place - Suite 330, | 23 | 59 Temple Place - Suite 330, |
24 | Boston, MA 02111-1307, USA. | 24 | Boston, MA 02111-1307, USA. |
25 | 25 | ||
26 | */ | 26 | */ |
27 | #include <qpe/version.h> | 27 | #include <qpe/version.h> |
28 | #include <qpushbutton.h> | 28 | #include <qpushbutton.h> |
29 | #include <qlayout.h> | 29 | #include <qlayout.h> |
30 | #include <qlineedit.h> | 30 | #include <qlineedit.h> |
31 | #include <qtimer.h> | 31 | #include <qtimer.h> |
32 | #include <qcombobox.h> | 32 | #include <qcombobox.h> |
33 | #include <qlabel.h> | 33 | #include <qlabel.h> |
34 | #include <qpopupmenu.h> | 34 | #include <qpopupmenu.h> |
35 | #include <qmessagebox.h> | 35 | #include <qmessagebox.h> |
36 | #if QT_VERSION < 0x030000 | 36 | #if QT_VERSION < 0x030000 |
37 | #include <qgfx_qws.h> | 37 | #include <qgfx_qws.h> |
38 | #endif | 38 | #endif |
39 | #include <qwindowsystem_qws.h> | 39 | #include <qwindowsystem_qws.h> |
40 | 40 | ||
41 | #include <qpe/resource.h> | ||
42 | #include <qpe/qcopenvelope_qws.h> | 41 | #include <qpe/qcopenvelope_qws.h> |
43 | #include <qpe/config.h> | 42 | #include <qpe/config.h> |
44 | 43 | ||
45 | #include <opie2/odevice.h> | 44 | #include <opie2/odevice.h> |
45 | #include <opie2/oresource.h> | ||
46 | 46 | ||
47 | #include <stdio.h> | 47 | #include <stdio.h> |
48 | #include <stdlib.h> | 48 | #include <stdlib.h> |
49 | 49 | ||
50 | #include "passworddialogimpl.h" | 50 | #include "passworddialogimpl.h" |
51 | #include "loginwindowimpl.h" | 51 | #include "loginwindowimpl.h" |
52 | #include "loginapplication.h" | 52 | #include "loginapplication.h" |
53 | #include "inputmethods.h" | 53 | #include "inputmethods.h" |
54 | 54 | ||
55 | using namespace Opie::Core; | 55 | using namespace Opie::Core; |
56 | 56 | ||
57 | 57 | ||
58 | LoginWindowImpl::LoginWindowImpl ( ) : LoginWindow ( 0, "LOGIN-WINDOW", WStyle_Customize | WStyle_NoBorder | WDestructiveClose ) | 58 | LoginWindowImpl::LoginWindowImpl ( ) : LoginWindow ( 0, "LOGIN-WINDOW", WStyle_Customize | WStyle_NoBorder | WDestructiveClose ) |
59 | { | 59 | { |
60 | QPopupMenu *pop = new QPopupMenu ( this ); | 60 | QPopupMenu *pop = new QPopupMenu ( this ); |
61 | pop-> insertItem ( tr( "Restart" ), this, SLOT( restart())); | 61 | pop-> insertItem ( tr( "Restart" ), this, SLOT( restart())); |
@@ -184,36 +184,33 @@ void LoginWindowImpl::suspend ( ) | |||
184 | ODevice::inst ( )-> suspend ( ); | 184 | ODevice::inst ( )-> suspend ( ); |
185 | 185 | ||
186 | QCopEnvelope e("QPE/System", "setBacklight(int)"); | 186 | QCopEnvelope e("QPE/System", "setBacklight(int)"); |
187 | e << -3; // Force on | 187 | e << -3; // Force on |
188 | } | 188 | } |
189 | 189 | ||
190 | void LoginWindowImpl::backlight ( ) | 190 | void LoginWindowImpl::backlight ( ) |
191 | { | 191 | { |
192 | QCopEnvelope e("QPE/System", "setBacklight(int)"); | 192 | QCopEnvelope e("QPE/System", "setBacklight(int)"); |
193 | e << -2; // toggle | 193 | e << -2; // toggle |
194 | } | 194 | } |
195 | 195 | ||
196 | class WaitLogo : public QLabel { | 196 | class WaitLogo : public QLabel { |
197 | public: | 197 | public: |
198 | WaitLogo ( ) : QLabel ( 0, "wait hack!", WStyle_Customize | WStyle_NoBorder | WStyle_Tool ) | 198 | WaitLogo ( ) : QLabel ( 0, "wait hack!", WStyle_Customize | WStyle_NoBorder | WStyle_Tool ) |
199 | { | 199 | { |
200 | QImage img = Resource::loadImage ( "launcher/new_wait" ); | 200 | setPixmap( Opie::Core::OResource::loadPixmap( "launcher/new_wait" ) ); |
201 | QPixmap pix; | ||
202 | pix. convertFromImage ( img ); | ||
203 | setPixmap ( pix ); | ||
204 | setAlignment ( AlignCenter ); | 201 | setAlignment ( AlignCenter ); |
205 | move ( 0, 0 ); | 202 | move ( 0, 0 ); |
206 | resize ( qApp-> desktop ( )-> width ( ), qApp-> desktop ( )-> height ( )); | 203 | resize ( qApp-> desktop ( )-> width ( ), qApp-> desktop ( )-> height ( )); |
207 | 204 | ||
208 | m_visible = false; | 205 | m_visible = false; |
209 | show ( ); | 206 | show ( ); |
210 | } | 207 | } |
211 | 208 | ||
212 | virtual void showEvent ( QShowEvent *e ) | 209 | virtual void showEvent ( QShowEvent *e ) |
213 | { | 210 | { |
214 | QLabel::showEvent ( e ); | 211 | QLabel::showEvent ( e ); |
215 | m_visible = true; | 212 | m_visible = true; |
216 | } | 213 | } |
217 | 214 | ||
218 | virtual void paintEvent ( QPaintEvent *e ) | 215 | virtual void paintEvent ( QPaintEvent *e ) |
219 | { | 216 | { |