From 3a7dd5b0904cdea71d486ffdea8bfd1aedb0af59 Mon Sep 17 00:00:00 2001 From: drw Date: Tue, 24 May 2005 22:29:46 +0000 Subject: Resource -> OResource --- (limited to 'noncore/applets') diff --git a/noncore/applets/autorotateapplet/autorotate.cpp b/noncore/applets/autorotateapplet/autorotate.cpp index 34802fb..28b631b 100644 --- a/noncore/applets/autorotateapplet/autorotate.cpp +++ b/noncore/applets/autorotateapplet/autorotate.cpp @@ -15,9 +15,9 @@ /* OPIE */ #include #include +#include #include #include -#include using namespace Opie::Core; /* QT */ @@ -28,8 +28,8 @@ AutoRotate::AutoRotate(QWidget * parent):QWidget(parent) setFixedWidth( AppLnk::smallIconSize() ); setFixedHeight( AppLnk::smallIconSize() ); - enabledPm.convertFromImage( Resource::loadImage("autorotate/rotate").smoothScale( height(), width() ) ); - disabledPm.convertFromImage( Resource::loadImage("autorotate/norotate").smoothScale( height(), width() ) ); + enabledPm = Opie::Core::OResource::loadImage("autorotate/rotate", Opie::Core::OResource::SmallIcon); + disabledPm = Opie::Core::OResource::loadImage("autorotate/norotate", Opie::Core::OResource::SmallIcon); repaint(true); popupMenu = 0; diff --git a/noncore/applets/networkapplet/networkapplet.cpp b/noncore/applets/networkapplet/networkapplet.cpp index bd6ca66..10c2b34 100644 --- a/noncore/applets/networkapplet/networkapplet.cpp +++ b/noncore/applets/networkapplet/networkapplet.cpp @@ -1,27 +1,27 @@ /* -                 This file is part of the Opie Project + This file is part of the Opie Project =. (C) 2003 Michael 'Mickey' Lauer .=l. -           .>+-= - _;:,     .>    :=|. 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; either version 2 of the License, -     ._= =}       : or (at your option) any later version. -    .%`+i>       _;_. -    .i_,=:_.      -`: 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. + .>+-= +_;:, .> :=|. 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; either version 2 of the License, + ._= =} : or (at your option) any later version. + .%`+i> _;_. + .i_,=:_. -`: 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. @@ -33,9 +33,10 @@ /* OPIE */ #include #include +#include #include #include -#include +#include using namespace Opie::Core; using namespace Opie::Ui; using namespace Opie::Net; @@ -55,11 +56,10 @@ IfaceUpDownButton::IfaceUpDownButton( QWidget* parent, const char* name ) _iface = ONetwork::instance()->interface( name ); assert( _iface ); setToggleButton( true ); - //setAutoRaise( true ); - setOnIconSet( QIconSet( Resource::loadPixmap( "up" ) ) ); - setOffIconSet( QIconSet( Resource::loadPixmap( "down" ) ) ); + setUsesBigPixmap( qApp->desktop()->size().width() > 330 ); + setOnIconSet( QIconSet( Opie::Core::OResource::loadPixmap( "up", Opie::Core::OResource::SmallIcon ) ) ); + setOffIconSet( QIconSet( Opie::Core::OResource::loadPixmap( "down", Opie::Core::OResource::SmallIcon ) ) ); setOn( _iface->isUp() ); - //setFixedWidth( 16 ); connect( this, SIGNAL( clicked() ), this, SLOT( clicked() ) ); } @@ -121,7 +121,7 @@ void NetworkAppletControl::build() { QHBoxLayout* h = new QHBoxLayout( l ); QLabel* symbol = new QLabel( this ); - symbol->setPixmap( Resource::loadPixmap( guessDevice( it.current() ) ) ); + symbol->setPixmap( Opie::Core::OResource::loadPixmap( guessDevice( it.current() ), Opie::Core::OResource::SmallIcon ) ); h->addWidget( symbol ); symbol->show(); @@ -215,7 +215,7 @@ NetworkApplet::NetworkApplet( QWidget *parent, const char *name ) { setFixedHeight( AppLnk::smallIconSize() ); setFixedWidth( AppLnk::smallIconSize() ); - _pixmap.convertFromImage( Resource::loadImage( "networkapplet/network" ).smoothScale( height(), width() ) ); + _pixmap = Opie::Core::OResource::loadPixmap( "networkapplet/network", Opie::Core::OResource::SmallIcon ); _control = new NetworkAppletControl( this, "control" ); } diff --git a/noncore/applets/notesapplet/notes.cpp b/noncore/applets/notesapplet/notes.cpp index d06672a..13f297e 100644 --- a/noncore/applets/notesapplet/notes.cpp +++ b/noncore/applets/notesapplet/notes.cpp @@ -18,13 +18,13 @@ /* OPIE */ #include #include +#include #include #include #include #include #include #include -#include using namespace Opie::Core; using namespace Opie::Ui; @@ -432,7 +432,7 @@ NotesApplet::NotesApplet( QWidget *parent, const char *name ) : QWidget( parent, name ) { setFixedHeight( AppLnk::smallIconSize() ); setFixedWidth( AppLnk::smallIconSize() ); - notesPixmap.convertFromImage( Resource::loadImage( "edit" ).smoothScale( height(), width() ) ); + notesPixmap = Opie::Core::OResource::loadImage( "edit", Opie::Core::OResource::SmallIcon ); vc = new NotesControl; } diff --git a/noncore/applets/pyquicklaunch/pyquicklaunch.cpp b/noncore/applets/pyquicklaunch/pyquicklaunch.cpp index bcd2f0d..45eda4e 100644 --- a/noncore/applets/pyquicklaunch/pyquicklaunch.cpp +++ b/noncore/applets/pyquicklaunch/pyquicklaunch.cpp @@ -16,10 +16,10 @@ /* OPIE */ #include +#include #include #include #include -#include using namespace Opie::Core; /* QT */ @@ -82,8 +82,8 @@ PyQuicklaunchApplet::PyQuicklaunchApplet( QWidget *parent, const char *name ) setFixedWidth( 14 ); status = new PyQuicklaunchControl( this, this, "Python Quicklaunch Status" ); - _online = Resource::loadPixmap( "pyquicklaunch/online" ); - _offline = Resource::loadPixmap( "pyquicklaunch/offline" ); + _online = Opie::Core::OResource::loadPixmap( "pyquicklaunch/online", Opie::Core::OResource::SmallIcon ); + _offline = Opie::Core::OResource::loadPixmap( "pyquicklaunch/offline", Opie::Core::OResource::SmallIcon ); _fifoName = QString().sprintf( "/tmp/mickeys-quicklauncher-%s", ::getpwuid( ::getuid() )->pw_name ); odebug << "PyQuicklaunchApplet fifo name = '" << _fifoName << "'" << oendl; diff --git a/noncore/applets/zkbapplet/applet/zkbwidget.cpp b/noncore/applets/zkbapplet/applet/zkbwidget.cpp index 55c08b3..324ccdc 100644 --- a/noncore/applets/zkbapplet/applet/zkbwidget.cpp +++ b/noncore/applets/zkbapplet/applet/zkbwidget.cpp @@ -1,18 +1,18 @@ #include #include +#include #include #include #include -#include -#include -#include +//#include +//#include #include "zkbwidget.h" #include "zkbcfg.h" using namespace Opie::Ui; ZkbWidget::ZkbWidget(QWidget* parent) - :QLabel(parent),keymap(0),disabled(Resource::loadPixmap("zkb-disabled")) { + :QLabel(parent),keymap(0),disabled(Opie::Core::OResource::loadPixmap("zkb-disabled", Opie::Core::OResource::SmallIcon)) { labels = new QPopupMenu(); connect(labels, SIGNAL(activated(int)), this, -- cgit v0.9.0.2