-rw-r--r-- | core/launcher/shutdownimpl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/launcher/shutdownimpl.cpp b/core/launcher/shutdownimpl.cpp index cf4f926..899d9ac 100644 --- a/core/launcher/shutdownimpl.cpp +++ b/core/launcher/shutdownimpl.cpp | |||
@@ -2,97 +2,97 @@ | |||
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include "shutdownimpl.h" | 21 | #include "shutdownimpl.h" |
22 | 22 | ||
23 | #include <qpe/global.h> | 23 | #include <qpe/global.h> |
24 | #include <qpe/qcopenvelope_qws.h> | 24 | #include <qpe/qcopenvelope_qws.h> |
25 | 25 | ||
26 | #include <qtimer.h> | 26 | #include <qtimer.h> |
27 | #include <qprogressbar.h> | 27 | #include <qprogressbar.h> |
28 | #include <qpushbutton.h> | 28 | #include <qpushbutton.h> |
29 | #include <qbuttongroup.h> | 29 | #include <qbuttongroup.h> |
30 | #include <qlabel.h> | 30 | #include <qlabel.h> |
31 | #include <qlayout.h> | 31 | #include <qlayout.h> |
32 | #include <qpalette.h> | 32 | #include <qpalette.h> |
33 | 33 | ||
34 | 34 | ||
35 | static void changeButtonColor ( QPushButton *btn, const QColor &col ) | 35 | static void changeButtonColor ( QPushButton *btn, const QColor &col ) |
36 | { | 36 | { |
37 | QPalette pal = btn-> palette ( ); | 37 | QPalette pal = btn-> palette ( ); |
38 | 38 | ||
39 | pal. setColor ( QPalette::Active, QColorGroup::Button, col ); | 39 | pal. setColor ( QPalette::Active, QColorGroup::Button, col ); |
40 | pal. setColor ( QPalette::Disabled, QColorGroup::Button, col ); | 40 | pal. setColor ( QPalette::Disabled, QColorGroup::Button, col ); |
41 | pal. setColor ( QPalette::Inactive, QColorGroup::Button, col ); | 41 | pal. setColor ( QPalette::Inactive, QColorGroup::Button, col ); |
42 | 42 | ||
43 | btn-> setPalette ( pal ); | 43 | btn-> setPalette ( pal ); |
44 | } | 44 | } |
45 | 45 | ||
46 | 46 | ||
47 | ShutdownImpl::ShutdownImpl( QWidget* parent, const char *name, WFlags fl ) | 47 | ShutdownImpl::ShutdownImpl( QWidget* parent, const char *name, WFlags fl ) |
48 | : QWidget ( parent, name, fl ) | 48 | : QWidget ( parent, name, fl ) |
49 | { | 49 | { |
50 | setCaption ( tr( "Shut down..." ) ); | 50 | setCaption ( tr( "Shutdown..." ) ); |
51 | 51 | ||
52 | QVBoxLayout *vbox = new QVBoxLayout ( this ); | 52 | QVBoxLayout *vbox = new QVBoxLayout ( this ); |
53 | vbox-> setSpacing ( 3 ); | 53 | vbox-> setSpacing ( 3 ); |
54 | vbox-> setMargin ( 6 ); | 54 | vbox-> setMargin ( 6 ); |
55 | 55 | ||
56 | QButtonGroup *btngrp = new QButtonGroup ( this ); | 56 | QButtonGroup *btngrp = new QButtonGroup ( this ); |
57 | 57 | ||
58 | btngrp-> setTitle ( tr( "Terminate" ) ); | 58 | btngrp-> setTitle ( tr( "Terminate" ) ); |
59 | btngrp-> setColumnLayout ( 0, Qt::Vertical ); | 59 | btngrp-> setColumnLayout ( 0, Qt::Vertical ); |
60 | btngrp-> layout ( ) -> setSpacing ( 0 ); | 60 | btngrp-> layout ( ) -> setSpacing ( 0 ); |
61 | btngrp-> layout ( ) -> setMargin ( 0 ); | 61 | btngrp-> layout ( ) -> setMargin ( 0 ); |
62 | 62 | ||
63 | QGridLayout *grid = new QGridLayout ( btngrp-> layout ( ) ); | 63 | QGridLayout *grid = new QGridLayout ( btngrp-> layout ( ) ); |
64 | grid-> setAlignment ( Qt::AlignTop ); | 64 | grid-> setAlignment ( Qt::AlignTop ); |
65 | grid-> setSpacing ( 3 ); | 65 | grid-> setSpacing ( 3 ); |
66 | grid-> setMargin ( 7 ); | 66 | grid-> setMargin ( 7 ); |
67 | 67 | ||
68 | QPushButton *quit = new QPushButton ( tr( "Terminate Opie" ), btngrp, "quit" ); | 68 | QPushButton *quit = new QPushButton ( tr( "Terminate Opie" ), btngrp, "quit" ); |
69 | changeButtonColor ( quit, QColor ( 236, 236, 179 ) ); | 69 | changeButtonColor ( quit, QColor ( 236, 236, 179 ) ); |
70 | btngrp-> insert ( quit, 4 ); | 70 | btngrp-> insert ( quit, 4 ); |
71 | grid-> addWidget ( quit, 1, 1 ); | 71 | grid-> addWidget ( quit, 1, 1 ); |
72 | 72 | ||
73 | QPushButton *reboot = new QPushButton ( tr( "Reboot" ), btngrp, "reboot" ); | 73 | QPushButton *reboot = new QPushButton ( tr( "Reboot" ), btngrp, "reboot" ); |
74 | changeButtonColor ( reboot, QColor( 236, 183, 181 ) ); | 74 | changeButtonColor ( reboot, QColor( 236, 183, 181 ) ); |
75 | btngrp-> insert ( reboot, 2 ); | 75 | btngrp-> insert ( reboot, 2 ); |
76 | grid-> addWidget( reboot, 1, 0 ); | 76 | grid-> addWidget( reboot, 1, 0 ); |
77 | 77 | ||
78 | QPushButton *restart = new QPushButton ( tr( "Restart Opie" ), btngrp, "restart" ); | 78 | QPushButton *restart = new QPushButton ( tr( "Restart Opie" ), btngrp, "restart" ); |
79 | changeButtonColor ( restart, QColor( 236, 236, 179 ) ); | 79 | changeButtonColor ( restart, QColor( 236, 236, 179 ) ); |
80 | btngrp-> insert ( restart, 3 ); | 80 | btngrp-> insert ( restart, 3 ); |
81 | grid-> addWidget ( restart, 0, 1 ); | 81 | grid-> addWidget ( restart, 0, 1 ); |
82 | 82 | ||
83 | QPushButton *shutdown = new QPushButton( tr( "Shutdown" ), btngrp, "shutdown" ); | 83 | QPushButton *shutdown = new QPushButton( tr( "Shutdown" ), btngrp, "shutdown" ); |
84 | changeButtonColor ( shutdown, QColor( 236, 183, 181 ) ); | 84 | changeButtonColor ( shutdown, QColor( 236, 183, 181 ) ); |
85 | btngrp-> insert ( shutdown, 1 ); | 85 | btngrp-> insert ( shutdown, 1 ); |
86 | grid-> addWidget ( shutdown, 0, 0 ); | 86 | grid-> addWidget ( shutdown, 0, 0 ); |
87 | 87 | ||
88 | vbox-> addWidget ( btngrp ); | 88 | vbox-> addWidget ( btngrp ); |
89 | 89 | ||
90 | m_info = new QLabel ( this, "info" ); | 90 | m_info = new QLabel ( this, "info" ); |
91 | m_info-> setText( tr( "<p>\n" "These termination options are provided primarily for use while developing and testing the Opie system. In a normal environment, these concepts are unnecessary." ) ); | 91 | m_info-> setText( tr( "<p>\n" "These termination options are provided primarily for use while developing and testing the Opie system. In a normal environment, these concepts are unnecessary." ) ); |
92 | vbox-> addWidget ( m_info ); | 92 | vbox-> addWidget ( m_info ); |
93 | 93 | ||
94 | m_progress = new QProgressBar ( this, "progressBar" ); | 94 | m_progress = new QProgressBar ( this, "progressBar" ); |
95 | m_progress-> setFrameShape ( QProgressBar::Panel ); | 95 | m_progress-> setFrameShape ( QProgressBar::Panel ); |
96 | m_progress-> setFrameShadow ( QProgressBar::Sunken ); | 96 | m_progress-> setFrameShadow ( QProgressBar::Sunken ); |
97 | m_progress-> setTotalSteps ( 20 ); | 97 | m_progress-> setTotalSteps ( 20 ); |
98 | m_progress-> setIndicatorFollowsStyle ( false ); | 98 | m_progress-> setIndicatorFollowsStyle ( false ); |