Diffstat (limited to 'core/launcher/syncdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/launcher/syncdialog.cpp | 59 |
1 files changed, 34 insertions, 25 deletions
diff --git a/core/launcher/syncdialog.cpp b/core/launcher/syncdialog.cpp index 4a2b8ff..d90b2ea 100644 --- a/core/launcher/syncdialog.cpp +++ b/core/launcher/syncdialog.cpp | |||
@@ -1,33 +1,42 @@ | |||
1 | /********************************************************************** | 1 | /* |
2 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | 2 | This file is part of the Opie Project |
3 | ** | 3 | =. (C) 2000-2002 Trolltech AS |
4 | ** This file is part of the Qtopia Environment. | 4 | .=l. (C) 2002-2005 The Opie Team <opie-devel@handhelds.org> |
5 | ** | 5 | .>+-= |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | _;:, .> :=|. This program is free software; you can |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | .> <`_, > . <= redistribute it and/or modify it under |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
9 | ** packaging of this file. | 9 | .="- .-=="i, .._ License as published by the Free Software |
10 | ** | 10 | - . .-<_> .<> Foundation; version 2 of the License. |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ._= =} : |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | .%`+i> _;_. |
13 | ** | 13 | .i_,=:_. -<s. This program is distributed in the hope that |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
15 | ** | 15 | : .. .:, . . . without even the implied warranty of |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
17 | ** not clear to you. | 17 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
18 | ** | 18 | ..}^=.= = ; Library General Public License for more |
19 | **********************************************************************/ | 19 | ++= -. .` .: details. |
20 | 20 | : = ...= . :.=- | |
21 | -. .:....=;==+<; You should have received a copy of the GNU | ||
22 | -_. . . )=. = Library General Public License along with | ||
23 | -- :-=` this library; see the file COPYING.LIB. | ||
24 | If not, write to the Free Software Foundation, | ||
25 | Inc., 59 Temple Place - Suite 330, | ||
26 | Boston, MA 02111-1307, USA. | ||
27 | */ | ||
21 | #include "syncdialog.h" | 28 | #include "syncdialog.h" |
22 | 29 | ||
23 | #include <qtopia/resource.h> | 30 | /* OPIE */ |
31 | #include <opie2/oresource.h> | ||
32 | using namespace Opie::Core; | ||
24 | 33 | ||
34 | /* QT */ | ||
25 | #include <qpainter.h> | 35 | #include <qpainter.h> |
26 | #include <qapplication.h> | 36 | #include <qapplication.h> |
27 | #include <qpushbutton.h> | 37 | #include <qpushbutton.h> |
28 | #include <qfile.h> | 38 | #include <qfile.h> |
29 | 39 | ||
30 | |||
31 | SyncDialog::SyncDialog( QWidget *parent, const QString &w ) | 40 | SyncDialog::SyncDialog( QWidget *parent, const QString &w ) |
32 | : QDialog( parent, "SyncDialog", FALSE, WStyle_Tool | WStyle_Customize | | 41 | : QDialog( parent, "SyncDialog", FALSE, WStyle_Tool | WStyle_Customize | |
33 | WStyle_StaysOnTop ), what(w), nextPt(0), rev(FALSE), hideDot(TRUE) | 42 | WStyle_StaysOnTop ), what(w), nextPt(0), rev(FALSE), hideDot(TRUE) |
@@ -40,12 +49,12 @@ SyncDialog::SyncDialog( QWidget *parent, const QString &w ) | |||
40 | 49 | ||
41 | QSize ds = qApp->desktop()->size(); | 50 | QSize ds = qApp->desktop()->size(); |
42 | setGeometry( 0, 0, ds.width(), ds.height() ); | 51 | setGeometry( 0, 0, ds.width(), ds.height() ); |
43 | img = Resource::loadImage( "SyncScreen" ); | 52 | img = OResource::loadImage( "SyncScreen", OResource::NoScale ); |
44 | if ( img.width() > ds.width() || img.height() > ds.height() ) { | 53 | if ( img.width() > ds.width() || img.height() > ds.height() ) { |
45 | path = scalePath( path, ds.width(), img.width(), ds.height(), img.height() ); | 54 | path = scalePath( path, ds.width(), img.width(), ds.height(), img.height() ); |
46 | img = img.smoothScale( ds.width(), ds.height() ); | 55 | img = img.smoothScale( ds.width(), ds.height() ); |
47 | } | 56 | } |
48 | dot = Resource::loadImage( "syncdot" ); | 57 | dot = OResource::loadImage( "syncdot", OResource::NoScale ); |
49 | setBackgroundColor( white ); | 58 | setBackgroundColor( white ); |
50 | 59 | ||
51 | QPushButton *pb = new QPushButton( tr("Abort"), this, "CancelSync" ); | 60 | QPushButton *pb = new QPushButton( tr("Abort"), this, "CancelSync" ); |
@@ -118,7 +127,7 @@ void SyncDialog::timerEvent( QTimerEvent * ) | |||
118 | 127 | ||
119 | void SyncDialog::loadPath() | 128 | void SyncDialog::loadPath() |
120 | { | 129 | { |
121 | QString pfile = Resource::findPixmap( "syncdot" ); | 130 | QString pfile = OResource::findPixmap( "syncdot" ); |
122 | if ( pfile.isEmpty() ) | 131 | if ( pfile.isEmpty() ) |
123 | return; | 132 | return; |
124 | int dp = pfile.findRev('.'); | 133 | int dp = pfile.findRev('.'); |