author | drw <drw> | 2005-06-15 19:17:11 (UTC) |
---|---|---|
committer | drw <drw> | 2005-06-15 19:17:11 (UTC) |
commit | 1be8e6534619e409f51af90695dc00373d5a1e59 (patch) (side-by-side diff) | |
tree | 534f98ceccfa378667620632a92f81c45627c393 /noncore/net | |
parent | b86723182311fa621451c2641acf62b3b89dceeb (diff) | |
download | opie-1be8e6534619e409f51af90695dc00373d5a1e59.zip opie-1be8e6534619e409f51af90695dc00373d5a1e59.tar.gz opie-1be8e6534619e409f51af90695dc00373d5a1e59.tar.bz2 |
Resource -> OResource
-rw-r--r-- | noncore/net/wellenreiter/gui/mainwindow.cpp | 17 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/scanlist.cpp | 12 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiterbase.cpp | 12 |
3 files changed, 23 insertions, 18 deletions
diff --git a/noncore/net/wellenreiter/gui/mainwindow.cpp b/noncore/net/wellenreiter/gui/mainwindow.cpp index 3e18531..ccb3ec0 100644 --- a/noncore/net/wellenreiter/gui/mainwindow.cpp +++ b/noncore/net/wellenreiter/gui/mainwindow.cpp @@ -22,9 +22,9 @@ #include "scanlist.h" /* OPIE */ #ifdef QWS -#include <qpe/resource.h> +#include <opie2/oresource.h> #include <opie2/odebug.h> #include <opie2/ofiledialog.h> #else #include "resource.h" @@ -67,47 +67,52 @@ WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * n setCentralWidget( mw ); // setup application icon - setIcon( Resource::loadPixmap( "wellenreiter/appicon-trans" ) ); + setIcon( Opie::Core::OResource::loadPixmap( "wellenreiter/appicon-trans", Opie::Core::OResource::SmallIcon ) ); #ifndef QWS setIconText( "Wellenreiter/X11" ); #endif // setup tool buttons + bool useBigIcon = qApp->desktop()->size().width() > 330; startButton = new QToolButton( 0 ); + startButton->setUsesBigPixmap( useBigIcon ); QWhatsThis::add( startButton, tr( "Click here to start scanning." ) ); #ifdef QWS startButton->setAutoRaise( true ); #endif - startButton->setIconSet( Resource::loadIconSet( "wellenreiter/SearchIcon" ) ); + startButton->setIconSet( Opie::Core::OResource::loadPixmap( "wellenreiter/SearchIcon", Opie::Core::OResource::SmallIcon ) ); startButton->setEnabled( false ); connect( startButton, SIGNAL( clicked() ), mw, SLOT( startClicked() ) ); stopButton = new QToolButton( 0 ); + stopButton->setUsesBigPixmap( useBigIcon ); QWhatsThis::add( stopButton, tr( "Click here to stop scanning." ) ); #ifdef QWS stopButton->setAutoRaise( true ); #endif - stopButton->setIconSet( Resource::loadIconSet( "wellenreiter/CancelIcon" ) ); + stopButton->setIconSet( Opie::Core::OResource::loadPixmap( "wellenreiter/CancelIcon", Opie::Core::OResource::SmallIcon ) ); stopButton->setEnabled( false ); connect( stopButton, SIGNAL( clicked() ), mw, SLOT( stopClicked() ) ); QToolButton* d = new QToolButton( 0 ); + d->setUsesBigPixmap( useBigIcon ); QWhatsThis::add( d, tr( "Click here to open the configure dialog." ) ), #ifdef QWS d->setAutoRaise( true ); #endif - d->setIconSet( Resource::loadIconSet( "wellenreiter/SettingsIcon" ) ); + d->setIconSet( Opie::Core::OResource::loadPixmap( "wellenreiter/SettingsIcon", Opie::Core::OResource::SmallIcon ) ); connect( d, SIGNAL( clicked() ), this, SLOT( showConfigure() ) ); uploadButton = new QToolButton( 0 ); + uploadButton->setUsesBigPixmap( useBigIcon ); QWhatsThis::add( uploadButton, tr( "Click here to upload a capture session." ) ); #ifdef QWS uploadButton->setAutoRaise( true ); #endif - uploadButton->setIconSet( Resource::loadIconSet( "up" ) ); + uploadButton->setIconSet( Opie::Core::OResource::loadPixmap( "up", Opie::Core::OResource::SmallIcon ) ); uploadButton->setEnabled( false ); //uploadButton->setEnabled( true ); // DEBUGGING connect( uploadButton, SIGNAL( clicked() ), this, SLOT( uploadSession() ) ); diff --git a/noncore/net/wellenreiter/gui/scanlist.cpp b/noncore/net/wellenreiter/gui/scanlist.cpp index 587faad..a61e808 100644 --- a/noncore/net/wellenreiter/gui/scanlist.cpp +++ b/noncore/net/wellenreiter/gui/scanlist.cpp @@ -19,10 +19,10 @@ /* OPIE */ #ifdef QWS #include <opie2/odebug.h> +#include <opie2/oresource.h> #include <qpe/qpeapplication.h> -#include <qpe/resource.h> #else #include "resource.h" #endif @@ -476,11 +476,11 @@ void MScanListItem::serializeFrom( QDataStream& s ) s >> wep; _wep = (wep == 'y'); QString name = QString( "wellenreiter/"+ _type ); - setPixmap( col_type, Resource::loadPixmap( name ) ); + setPixmap( col_type, Opie::Core::OResource::loadPixmap( name, Opie::Core::OResource::SmallIcon ) ); if ( _wep ) - setPixmap( col_wep, Resource::loadPixmap( "wellenreiter/cracked" ) ); //FIXME: rename the pixmap! + setPixmap( col_wep, Opie::Core::OResource::loadPixmap( "wellenreiter/cracked", Opie::Core::OResource::SmallIcon ) ); //FIXME: rename the pixmap! listView()->triggerUpdate(); } void MScanListItem::decorateItem( QString type, QString essid, QString macaddr, bool wep, int channel, int signal, bool probed ) @@ -493,19 +493,19 @@ void MScanListItem::decorateItem( QString type, QString essid, QString macaddr, // set icon for managed or adhoc mode QString name; name.sprintf( "wellenreiter/"+ type ); - setPixmap( col_type, Resource::loadPixmap( name ) ); + setPixmap( col_type, Opie::Core::OResource::loadPixmap( name, Opie::Core::OResource::SmallIcon ) ); // special case for probed networks FIXME: This is ugly at present if ( type == "network" && probed ) { - setPixmap( col_type, Resource::loadPixmap( "wellenreiter/network-probed.png" ) ); + setPixmap( col_type, Opie::Core::OResource::loadPixmap( "wellenreiter/network-probed", Opie::Core::OResource::SmallIcon ) ); } // set icon for wep (wireless encryption protocol) if ( wep ) - setPixmap( col_wep, Resource::loadPixmap( "wellenreiter/cracked" ) ); //FIXME: rename the pixmap! + setPixmap( col_wep, Opie::Core::OResource::loadPixmap( "wellenreiter/cracked", Opie::Core::OResource::SmallIcon ) ); //FIXME: rename the pixmap! // set channel and signal text if ( signal != -1 ) diff --git a/noncore/net/wellenreiter/gui/wellenreiterbase.cpp b/noncore/net/wellenreiter/gui/wellenreiterbase.cpp index 1d5bd1b..11eb145 100644 --- a/noncore/net/wellenreiter/gui/wellenreiterbase.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiterbase.cpp @@ -24,9 +24,9 @@ #include "statwindow.h" #include "graphwindow.h" #ifdef QWS -#include <qpe/resource.h> +#include <opie2/oresource.h> #include <opie2/otabwidget.h> using namespace Opie; #else #include "resource.h" @@ -42,12 +42,12 @@ using namespace Opie::Ui; using namespace Opie::Ui; WellenreiterBase::WellenreiterBase( QWidget* parent, const char* name, WFlags fl ) : QWidget( parent, name, fl ) { - //ani1 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot0" ) ); - //ani2 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot90" ) ); - //ani3 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot180" ) ); - //ani4 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot270" ) ); + //ani1 = new QPixmap( Opie::Core::OResource::loadPixmap( "wellenreiter/networks_rot0", Opie::Core::OResource::SmallIcon ) ); + //ani2 = new QPixmap( Opie::Core::OResource::loadPixmap( "wellenreiter/networks_rot90", Opie::Core::OResource::SmallIcon ) ); + //ani3 = new QPixmap( Opie::Core::OResource::loadPixmap( "wellenreiter/networks_rot180", Opie::Core::OResource::SmallIcon ) ); + //ani4 = new QPixmap( Opie::Core::OResource::loadPixmap( "wellenreiter/networks_rot270", Opie::Core::OResource::SmallIcon ) ); if ( !name ) setName( "WellenreiterBase" ); resize( 191, 294 ); @@ -104,9 +104,9 @@ WellenreiterBase::WellenreiterBase( QWidget* parent, const char* name, WFlags f PixmapLabel1_3_2->setLineWidth( 2 ); PixmapLabel1_3_2->setMargin( 0 ); PixmapLabel1_3_2->setMidLineWidth( 0 ); - QPixmap logo = Resource::loadPixmap( "wellenreiter/logo" ); + QPixmap logo = Opie::Core::OResource::loadPixmap( "wellenreiter/logo" ); QPainter draw( &logo ); draw.setPen( Qt::black ); draw.setFont( QFont( "Fixed", 8 ) ); draw.drawText( 5, 10, WELLENREITER_VERSION ); |