summaryrefslogtreecommitdiff
path: root/core
Side-by-side diff
Diffstat (limited to 'core') (more/less context) (show whitespace changes)
-rw-r--r--core/launcher/documentlist.cpp72
-rw-r--r--core/launcher/firstuse.cpp62
-rw-r--r--core/launcher/launcher.cpp60
-rw-r--r--core/launcher/launcherview.cpp53
-rw-r--r--core/launcher/startmenu.cpp77
-rw-r--r--core/launcher/syncdialog.cpp59
-rw-r--r--core/launcher/taskbar.cpp52
-rw-r--r--core/launcher/wait.cpp54
8 files changed, 259 insertions, 230 deletions
diff --git a/core/launcher/documentlist.cpp b/core/launcher/documentlist.cpp
index b8bf4e0..fd385d6 100644
--- a/core/launcher/documentlist.cpp
+++ b/core/launcher/documentlist.cpp
@@ -1,22 +1,30 @@
-/**********************************************************************
-** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
-**
-** This file is part of the Qtopia Environment.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
+/*
+                 This file is part of the Opie Project
+ =. (C) 2000-2002 Trolltech AS
+ .=l. (C) 2002-2005 The Opie Team <opie-devel@handhelds.org>
+           .>+-=
+ _;:,     .>    :=|. This program is free software; you can
+.> <`_,   >  .   <= redistribute it and/or modify it under
+ :`=1 )Y*s>-.--   : the terms of the GNU Library General Public
+.="- .-=="i,     .._ License as published by the Free Software
+ - .   .-<_>     .<> Foundation; version 2 of the License.
+     ._= =}       :
+    .%`+i>       _;_.
+    .i_,=:_.      -<s. This program is distributed in the hope that
+     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
+ : ..    .:,     . . . without even the implied warranty of
+    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
+  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.=       =       ; Library General Public License for more
+++=   -.     .`     .: details.
+ :     =  ...= . :.=-
+ -.   .:....=;==+<; You should have received a copy of the GNU
+  -_. . .   )=.  = Library General Public License along with
+    --        :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#include "documentlist.h"
#include "serverinterface.h"
#include "mediadlg.h"
@@ -24,9 +32,9 @@
/* OPIE */
#include <opie2/oglobal.h>
#include <opie2/odebug.h>
+#include <opie2/oresource.h>
#include <qtopia/config.h>
#include <qtopia/mimetype.h>
-#include <qtopia/resource.h>
#include <qtopia/private/categories.h>
#include <qtopia/qpeapplication.h>
#include <qtopia/applnk.h>
@@ -232,22 +240,19 @@ void DocumentList::reloadAppLnks()
QPixmap pm = appLnkSet->typePixmap(*ittypes);
QPixmap bgPm = appLnkSet->typeBigPixmap(*ittypes);
- if (pm.isNull()) {
- QImage img( Resource::loadImage( "UnknownDocument" ) );
- pm = img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() );
- bgPm = img.smoothScale( AppLnk::bigIconSize(), AppLnk::bigIconSize() );
+ if (pm.isNull())
+ {
+ pm = OResource::loadImage( "UnknownDocument", OResource::SmallIcon );
+ bgPm = OResource::loadImage( "UnknownDocument", OResource::BigIcon );
}
- //odebug << "adding type " << (*ittypes) << "" << oendl;
-
- // ### our current launcher expects docs tab to be last
+ //FIXME our current launcher expects docs tab to be last
d->serverGui->typeAdded( *ittypes, name.isNull() ? (*ittypes) : name, pm, bgPm );
}
prevTypeList.remove(*ittypes);
}
}
for ( QStringList::Iterator ittypes=prevTypeList.begin(); ittypes!=prevTypeList.end(); ++ittypes) {
- //odebug << "removing type " << (*ittypes) << "" << oendl;
d->serverGui->typeRemoved(*ittypes);
}
prevTypeList = types;
@@ -357,14 +362,12 @@ void DocumentList::DiffAppLnks()
QPixmap pm = appLnkSet2->typePixmap(*ittypes);
QPixmap bgPm = appLnkSet2->typeBigPixmap(*ittypes);
- if (pm.isNull()) {
- QImage img( Resource::loadImage( "UnknownDocument" ) );
- pm = img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() );
- bgPm = img.smoothScale( AppLnk::bigIconSize(), AppLnk::bigIconSize() );
+ if (pm.isNull())
+ {
+ pm = OResource::loadImage( "UnknownDocument", OResource::SmallIcon );
+ bgPm = OResource::loadImage( "UnknownDocument", OResource::BigIcon );
}
- odebug << "adding type " << (*ittypes) << "" << oendl;
-
// ### our current launcher expects docs tab to be last
d->serverGui->typeAdded( *ittypes, name.isNull() ? (*ittypes) : name, pm, bgPm );
}
@@ -372,7 +375,6 @@ void DocumentList::DiffAppLnks()
}
}
for ( QStringList::Iterator ittypes=prevTypeList.begin(); ittypes!=prevTypeList.end(); ++ittypes) {
- odebug << "removing type " << (*ittypes) << "" << oendl;
d->serverGui->typeRemoved(*ittypes);
}
prevTypeList = types;
diff --git a/core/launcher/firstuse.cpp b/core/launcher/firstuse.cpp
index 8344787..8c02ab0 100644
--- a/core/launcher/firstuse.cpp
+++ b/core/launcher/firstuse.cpp
@@ -1,25 +1,32 @@
-/**********************************************************************
-** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
-**
-** This file is part of the Qtopia Environment.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
+/*
+                 This file is part of the Opie Project
+ =. (C) 2000-2002 Trolltech AS
+ .=l. (C) 2002-2005 The Opie Team <opie-devel@handhelds.org>
+           .>+-=
+ _;:,     .>    :=|. This program is free software; you can
+.> <`_,   >  .   <= redistribute it and/or modify it under
+ :`=1 )Y*s>-.--   : the terms of the GNU Library General Public
+.="- .-=="i,     .._ License as published by the Free Software
+ - .   .-<_>     .<> Foundation; version 2 of the License.
+     ._= =}       :
+    .%`+i>       _;_.
+    .i_,=:_.      -<s. This program is distributed in the hope that
+     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
+ : ..    .:,     . . . without even the implied warranty of
+    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
+  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.=       =       ; Library General Public License for more
+++=   -.     .`     .: details.
+ :     =  ...= . :.=-
+ -.   .:....=;==+<; You should have received a copy of the GNU
+  -_. . .   )=.  = Library General Public License along with
+    --        :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
// I need access to some things you don't normally get access to.
-
#ifndef _MSC_VER
//### revise to allow removal of translators under MSVC
#define private public
@@ -34,7 +41,7 @@
/* OPIE */
#include <opie2/odebug.h>
-#include <qtopia/resource.h>
+#include <opie2/oresource.h>
#include <qtopia/qcopenvelope_qws.h>
#include <qtopia/config.h>
#include <qtopia/fontmanager.h>
@@ -241,12 +248,10 @@ void FirstUse::nextDialog()
Config config( "qpe" );
config.setGroup( "Startup" );
config.writeEntry( "FirstUse", FALSE );
- QPixmap pix = Resource::loadPixmap("bigwait");
- QLabel *lblWait = new QLabel(0, "wait hack!", // No tr
+ QLabel *lblWait = new QLabel("Please Wait...", 0, "wait hack!", // No tr
QWidget::WStyle_Customize | QWidget::WDestructiveClose |
QWidget::WStyle_NoBorder | QWidget::WStyle_Tool |
QWidget::WStyle_StaysOnTop);
- lblWait->setPixmap( pix );
lblWait->setAlignment( QWidget::AlignCenter );
lblWait->setGeometry( qApp->desktop()->geometry() );
lblWait->show();
@@ -430,15 +435,8 @@ void FirstUse::reloadLanguages()
void FirstUse::paintEvent( QPaintEvent * )
{
QPainter p( this );
-
p.drawPixmap(0,0, splash);
- QFont f = p.font();
- f.setPointSize(15);
- f.setItalic(FALSE);
- f.setBold(FALSE);
- p.setFont(f);
-
if ( currApp < 0 ) {
drawText(p, tr( "Tap anywhere on the screen to continue." ));
} else if ( settingsTable[currApp].app ) {
@@ -451,7 +449,7 @@ void FirstUse::paintEvent( QPaintEvent * )
void FirstUse::loadPixmaps()
{
- splash.convertFromImage( Resource::loadImage("launcher/firstuse")
+ splash.convertFromImage( OResource::loadImage("launcher/firstuse", OResource::NoScale )
.smoothScale( width(), height() ) );
setBackgroundPixmap(splash);
diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp
index 4ec5f4c..361a159 100644
--- a/core/launcher/launcher.cpp
+++ b/core/launcher/launcher.cpp
@@ -1,37 +1,45 @@
-/**********************************************************************
-** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
-**
-** This file is part of the Qtopia Environment.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
+/*
+                 This file is part of the Opie Project
+ =. (C) 2000-2002 Trolltech AS
+ .=l. (C) 2002-2005 The Opie Team <opie-devel@handhelds.org>
+           .>+-=
+ _;:,     .>    :=|. This program is free software; you can
+.> <`_,   >  .   <= redistribute it and/or modify it under
+ :`=1 )Y*s>-.--   : the terms of the GNU Library General Public
+.="- .-=="i,     .._ License as published by the Free Software
+ - .   .-<_>     .<> Foundation; version 2 of the License.
+     ._= =}       :
+    .%`+i>       _;_.
+    .i_,=:_.      -<s. This program is distributed in the hope that
+     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
+ : ..    .:,     . . . without even the implied warranty of
+    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
+  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.=       =       ; Library General Public License for more
+++=   -.     .`     .: details.
+ :     =  ...= . :.=-
+ -.   .:....=;==+<; You should have received a copy of the GNU
+  -_. . .   )=.  = Library General Public License along with
+    --        :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#include "startmenu.h"
#include "taskbar.h"
#include "serverinterface.h"
#include "launcherview.h"
#include "launcher.h"
#include "server.h"
-
/* OPIE */
#include <opie2/odebug.h>
+#include <opie2/oresource.h>
+using namespace Opie::Core;
+
#include <qtopia/global.h>
#ifdef Q_WS_QWS
#include <qtopia/qcopenvelope_qws.h>
#endif
-#include <qtopia/resource.h>
#include <qtopia/applnk.h>
#include <qtopia/config.h>
#include <qtopia/qpeapplication.h>
@@ -121,9 +129,8 @@ void LauncherTabWidget::createDocLoadingWidget()
QWidget *space1 = new QWidget( docLoadingVBox );
docLoadingVBox->setStretchFactor( space1, 1 );
- QLabel *waitPixmap = new QLabel( docLoadingVBox );
+ QLabel *waitPixmap = new QLabel( "Please Wait...", docLoadingVBox );
waitPixmap->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, waitPixmap->sizePolicy().hasHeightForWidth() ) );
- waitPixmap->setPixmap( Resource::loadPixmap( "bigwait" ) );
waitPixmap->setAlignment( int( QLabel::AlignCenter ) );
Config cfg( "Launcher" );
@@ -529,11 +536,8 @@ void Launcher::createGUI()
#endif
// all documents
- QImage img( Resource::loadImage( "DocsIcon" ) );
- QPixmap pm;
- pm = img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() );
+ QPixmap pm = OResource::loadPixmap( "DocsIcon", OResource::SmallIcon );
// It could add this itself if it handles docs
-
tabs->newView("Documents", pm, tr("Documents") )->setToolsEnabled( TRUE );
QTimer::singleShot( 0, tabs, SLOT( initLayout() ) );
diff --git a/core/launcher/launcherview.cpp b/core/launcher/launcherview.cpp
index d960908..6275fcb 100644
--- a/core/launcher/launcherview.cpp
+++ b/core/launcher/launcherview.cpp
@@ -1,33 +1,40 @@
-/**********************************************************************
-** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
-**
-** This file is part of the Qtopia Environment.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
+/*
+                 This file is part of the Opie Project
+ =. (C) 2000-2002 Trolltech AS
+ .=l. (C) 2002-2005 The Opie Team <opie-devel@handhelds.org>
+           .>+-=
+ _;:,     .>    :=|. This program is free software; you can
+.> <`_,   >  .   <= redistribute it and/or modify it under
+ :`=1 )Y*s>-.--   : the terms of the GNU Library General Public
+.="- .-=="i,     .._ License as published by the Free Software
+ - .   .-<_>     .<> Foundation; version 2 of the License.
+     ._= =}       :
+    .%`+i>       _;_.
+    .i_,=:_.      -<s. This program is distributed in the hope that
+     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
+ : ..    .:,     . . . without even the implied warranty of
+    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
+  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.=       =       ; Library General Public License for more
+++=   -.     .`     .: details.
+ :     =  ...= . :.=-
+ -.   .:....=;==+<; You should have received a copy of the GNU
+  -_. . .   )=.  = Library General Public License along with
+    --        :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#include "launcherview.h"
/* OPIE */
#include <opie2/odebug.h>
+#include <opie2/oresource.h>
#include <qpe/config.h>
#include <qtopia/qpeapplication.h>
#include <qtopia/private/categories.h>
#include <qtopia/categoryselect.h>
#include <qtopia/mimetype.h>
-#include <qtopia/resource.h>
using namespace Opie::Core;
#include <qpe/qcopenvelope_qws.h>
@@ -426,7 +433,7 @@ void LauncherIconView::setBusy(bool on)
#ifdef USE_ANIMATED_BUSY_ICON_OVERLAY
if ( busyPix.isNull() ) {
int size = ( bigIcns ) ? AppLnk::bigIconSize() : AppLnk::smallIconSize();
- busyPix.convertFromImage( Resource::loadImage( "busy" ).smoothScale( size * 16, size ) );
+ busyPix.convertFromImage( OResource::loadImage( "busy", OResource::NoScale ).smoothScale( size * 16, size ) );
}
#endif
@@ -1001,7 +1008,7 @@ void LauncherView::setBackgroundType( BackgroundType t, const QString &val )
QString imgFile = bgName;
bool tile = FALSE;
if ( imgFile[0]!='/' || !QFile::exists(imgFile) ) {
- imgFile = Resource::findPixmap( imgFile );
+ imgFile = OResource::findPixmap( imgFile );
tile = TRUE;
}
QImage img = loadBackgroundImage(imgFile);
diff --git a/core/launcher/startmenu.cpp b/core/launcher/startmenu.cpp
index ce7840e..24a9d7e 100644
--- a/core/launcher/startmenu.cpp
+++ b/core/launcher/startmenu.cpp
@@ -1,23 +1,30 @@
-/**********************************************************************
-** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
-**
-** This file is part of the Qtopia Environment.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
+/*
+                 This file is part of the Opie Project
+ =. (C) 2000-2002 Trolltech AS
+ .=l. (C) 2002-2005 The Opie Team <opie-devel@handhelds.org>
+           .>+-=
+ _;:,     .>    :=|. This program is free software; you can
+.> <`_,   >  .   <= redistribute it and/or modify it under
+ :`=1 )Y*s>-.--   : the terms of the GNU Library General Public
+.="- .-=="i,     .._ License as published by the Free Software
+ - .   .-<_>     .<> Foundation; version 2 of the License.
+     ._= =}       :
+    .%`+i>       _;_.
+    .i_,=:_.      -<s. This program is distributed in the hope that
+     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
+ : ..    .:,     . . . without even the implied warranty of
+    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
+  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.=       =       ; Library General Public License for more
+++=   -.     .`     .: details.
+ :     =  ...= . :.=-
+ -.   .:....=;==+<; You should have received a copy of the GNU
+  -_. . .   )=.  = Library General Public License along with
+    --        :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
// TODO. During startup
// Launcher::typeAdded
// is called for each new tab and calls then each time the refresh of startmenu
@@ -27,17 +34,14 @@
#include "startmenu.h"
+/* OPIE */
+#include <opie2/oresource.h>
+using namespace Opie::Core;
#include <qtopia/qpeapplication.h>
#include <qtopia/config.h>
-#include <qtopia/resource.h>
#include <qtopia/mimetype.h>
#include <qtopia/qlibrary.h>
-//#include <qpainter.h>
-
-//#include <stdlib.h>
-
-
#define APPLNK_ID_OFFSET 250
#define NO_ID -1
@@ -61,7 +65,7 @@ StartMenu::StartMenu(QWidget *parent) : QLabel( parent )
int sz = AppLnk::smallIconSize()+3;
QPixmap pm;
- pm.convertFromImage(Resource::loadImage( startButtonPixmap).smoothScale( sz,sz) );
+ pm.convertFromImage(OResource::loadImage( startButtonPixmap, OResource::NoScale ).smoothScale( sz,sz) );
setPixmap(pm);
setFocusPolicy( NoFocus );
@@ -145,13 +149,7 @@ void StartMenu::createAppEntry( QPopupMenu *menu, QDir dir, QString file )
menu->insertSeparator();
delete applnk;
} else {
- QPixmap test;
- QImage img = Resource::loadImage( applnk->icon() );
- if(!img.isNull() )
- test.convertFromImage(
- img.smoothScale(
- AppLnk::smallIconSize(), AppLnk::smallIconSize() ), 0 );
-
+ QPixmap pixmap = OResource::loadPixmap( applnk->icon(), OResource::SmallIcon );
// Insert items ordered lexically
int current, left = 0, right = currentItem;
while( left != right ) {
@@ -162,7 +160,7 @@ void StartMenu::createAppEntry( QPopupMenu *menu, QDir dir, QString file )
right = current;
}
- menu->insertItem( test, applnk->name(),
+ menu->insertItem( pixmap, applnk->name(),
currentItem + APPLNK_ID_OFFSET, current );
appLnks.insert( currentItem + APPLNK_ID_OFFSET, applnk );
currentItem++;
@@ -194,21 +192,18 @@ void StartMenu::createDirEntry( QPopupMenu *menu, QDir dir, QString file, bool l
// checks were ok
- QPixmap test;
- test.convertFromImage( Resource::loadImage( icon ).smoothScale(
- AppLnk::smallIconSize(), AppLnk::smallIconSize() ), 0 );
-
+ QPixmap pixmap = OResource::loadPixmap( icon, OResource::SmallIcon );
if ( useWidePopupMenu ) {
// generate submenu
QPopupMenu *submenu = new QPopupMenu( menu );
connect( submenu, SIGNAL(activated(int)), SLOT(itemSelected(int)) );
- menu->insertItem( test, name, submenu, NO_ID );
+ menu->insertItem( pixmap, name, submenu, NO_ID );
// ltabs is true cause else we wouldn't stuck around..
createMenuEntries( submenu, subdir, true, lot );
} else {
// no submenus - just bring corresponding tab to front
- menu->insertItem( test, name, currentItem );
+ menu->insertItem( pixmap, name, currentItem );
tabNames.insert( currentItem, new QString( file ) );
currentItem++;
}
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 @@
-/**********************************************************************
-** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
-**
-** This file is part of the Qtopia Environment.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
+/*
+                 This file is part of the Opie Project
+ =. (C) 2000-2002 Trolltech AS
+ .=l. (C) 2002-2005 The Opie Team <opie-devel@handhelds.org>
+           .>+-=
+ _;:,     .>    :=|. This program is free software; you can
+.> <`_,   >  .   <= redistribute it and/or modify it under
+ :`=1 )Y*s>-.--   : the terms of the GNU Library General Public
+.="- .-=="i,     .._ License as published by the Free Software
+ - .   .-<_>     .<> Foundation; version 2 of the License.
+     ._= =}       :
+    .%`+i>       _;_.
+    .i_,=:_.      -<s. This program is distributed in the hope that
+     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
+ : ..    .:,     . . . without even the implied warranty of
+    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
+  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.=       =       ; Library General Public License for more
+++=   -.     .`     .: details.
+ :     =  ...= . :.=-
+ -.   .:....=;==+<; You should have received a copy of the GNU
+  -_. . .   )=.  = Library General Public License along with
+    --        :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#include "syncdialog.h"
-#include <qtopia/resource.h>
+/* OPIE */
+#include <opie2/oresource.h>
+using namespace Opie::Core;
+/* QT */
#include <qpainter.h>
#include <qapplication.h>
#include <qpushbutton.h>
#include <qfile.h>
-
SyncDialog::SyncDialog( QWidget *parent, const QString &w )
: QDialog( parent, "SyncDialog", FALSE, WStyle_Tool | WStyle_Customize |
WStyle_StaysOnTop ), what(w), nextPt(0), rev(FALSE), hideDot(TRUE)
@@ -40,12 +49,12 @@ SyncDialog::SyncDialog( QWidget *parent, const QString &w )
QSize ds = qApp->desktop()->size();
setGeometry( 0, 0, ds.width(), ds.height() );
- img = Resource::loadImage( "SyncScreen" );
+ img = OResource::loadImage( "SyncScreen", OResource::NoScale );
if ( img.width() > ds.width() || img.height() > ds.height() ) {
path = scalePath( path, ds.width(), img.width(), ds.height(), img.height() );
img = img.smoothScale( ds.width(), ds.height() );
}
- dot = Resource::loadImage( "syncdot" );
+ dot = OResource::loadImage( "syncdot", OResource::NoScale );
setBackgroundColor( white );
QPushButton *pb = new QPushButton( tr("Abort"), this, "CancelSync" );
@@ -118,7 +127,7 @@ void SyncDialog::timerEvent( QTimerEvent * )
void SyncDialog::loadPath()
{
- QString pfile = Resource::findPixmap( "syncdot" );
+ QString pfile = OResource::findPixmap( "syncdot" );
if ( pfile.isEmpty() )
return;
int dp = pfile.findRev('.');
diff --git a/core/launcher/taskbar.cpp b/core/launcher/taskbar.cpp
index 7cbfe13..1356c77 100644
--- a/core/launcher/taskbar.cpp
+++ b/core/launcher/taskbar.cpp
@@ -1,23 +1,30 @@
-/**********************************************************************
-** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
-**
-** This file is part of the Qtopia Environment.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
+/*
+                 This file is part of the Opie Project
+ =. (C) 2000-2002 Trolltech AS
+ .=l. (C) 2002-2005 The Opie Team <opie-devel@handhelds.org>
+           .>+-=
+ _;:,     .>    :=|. This program is free software; you can
+.> <`_,   >  .   <= redistribute it and/or modify it under
+ :`=1 )Y*s>-.--   : the terms of the GNU Library General Public
+.="- .-=="i,     .._ License as published by the Free Software
+ - .   .-<_>     .<> Foundation; version 2 of the License.
+     ._= =}       :
+    .%`+i>       _;_.
+    .i_,=:_.      -<s. This program is distributed in the hope that
+     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
+ : ..    .:,     . . . without even the implied warranty of
+    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
+  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.=       =       ; Library General Public License for more
+++=   -.     .`     .: details.
+ :     =  ...= . :.=-
+ -.   .:....=;==+<; You should have received a copy of the GNU
+  -_. . .   )=.  = Library General Public License along with
+    --        :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#include "startmenu.h"
#include "inputmethods.h"
#include "runningappbar.h"
@@ -30,6 +37,7 @@
/* OPIE */
#include <opie2/odebug.h>
+#include <opie2/oresource.h>
#include <qtopia/config.h>
#include <qtopia/qpeapplication.h>
#ifdef QWS
@@ -138,8 +146,8 @@ public:
QWidget(parent),
nl(initNumLock()), cl(FALSE)
{
- nl_pm = Resource::loadPixmap("numlock");
- cl_pm = Resource::loadPixmap("capslock");
+ nl_pm = OResource::loadPixmap("numlock", OResource::NoScale);
+ cl_pm = OResource::loadPixmap("capslock", OResource::NoScale);
}
QSize sizeHint() const
{
diff --git a/core/launcher/wait.cpp b/core/launcher/wait.cpp
index 523819d..f872218 100644
--- a/core/launcher/wait.cpp
+++ b/core/launcher/wait.cpp
@@ -1,26 +1,35 @@
-/**********************************************************************
-** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
-**
-** This file is part of the Qtopia Environment.
-**
-** This file may be distributed and/or modified under the terms of the
-** GNU General Public License version 2 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file.
-**
-** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
-** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-**
-** See http://www.trolltech.com/gpl/ for GPL licensing information.
-**
-** Contact info@trolltech.com if any conditions of this licensing are
-** not clear to you.
-**
-**********************************************************************/
-
+/*
+                 This file is part of the Opie Project
+ =. (C) 2000-2002 Trolltech AS
+ .=l. (C) 2002-2005 The Opie Team <opie-devel@handhelds.org>
+           .>+-=
+ _;:,     .>    :=|. This program is free software; you can
+.> <`_,   >  .   <= redistribute it and/or modify it under
+ :`=1 )Y*s>-.--   : the terms of the GNU Library General Public
+.="- .-=="i,     .._ License as published by the Free Software
+ - .   .-<_>     .<> Foundation; version 2 of the License.
+     ._= =}       :
+    .%`+i>       _;_.
+    .i_,=:_.      -<s. This program is distributed in the hope that
+     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
+ : ..    .:,     . . . without even the implied warranty of
+    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
+  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.=       =       ; Library General Public License for more
+++=   -.     .`     .: details.
+ :     =  ...= . :.=-
+ -.   .:....=;==+<; You should have received a copy of the GNU
+  -_. . .   )=.  = Library General Public License along with
+    --        :-=` this library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation,
+ Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+*/
#include "wait.h"
#include <opie2/owait.h>
+#include <opie2/oresource.h>
+using namespace Opie::Core;
#include <qtopia/config.h>
#include <qtopia/applnk.h>
@@ -35,10 +44,7 @@ Wait::Wait( QWidget *parent ) : QWidget( parent ),
QSize size( AppLnk::smallIconSize(), AppLnk::smallIconSize() );
setFixedSize( size );
-
- QImage img = Resource::loadImage( "wait" );
- img = img.smoothScale( size.width(), size.height() );
- pm.convertFromImage( img );
+ pm = OResource::loadPixmap( "wait", OResource::SmallIcon );
lastWaitObject = this;
m_centralWait = new OWait( 0l );