author | drw <drw> | 2005-06-15 19:44:04 (UTC) |
---|---|---|
committer | drw <drw> | 2005-06-15 19:44:04 (UTC) |
commit | 1cc97c3b70f59b90dc4bf032a14198dc8bd07f2e (patch) (side-by-side diff) | |
tree | cb873e7e3f7330368b857d8fe69826d6a9e4e68a /core/multimedia/opieplayer/audiowidget.cpp | |
parent | dfad70bb3964d6f7142660ea4349d4af0349b46d (diff) | |
download | opie-1cc97c3b70f59b90dc4bf032a14198dc8bd07f2e.zip opie-1cc97c3b70f59b90dc4bf032a14198dc8bd07f2e.tar.gz opie-1cc97c3b70f59b90dc4bf032a14198dc8bd07f2e.tar.bz2 |
Resource -> OResource and fix doc headers
Diffstat (limited to 'core/multimedia/opieplayer/audiowidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/audiowidget.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/multimedia/opieplayer/audiowidget.cpp b/core/multimedia/opieplayer/audiowidget.cpp index d135647..2918097 100644 --- a/core/multimedia/opieplayer/audiowidget.cpp +++ b/core/multimedia/opieplayer/audiowidget.cpp @@ -1,51 +1,51 @@ /********************************************************************** ** Copyright (C) 2000 Trolltech AS. All rights reserved. ** ** This file is part of 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. ** **********************************************************************/ #include "audiowidget.h" #include "mediaplayerstate.h" /* OPIE */ #include <qpe/qpeapplication.h> -#include <qpe/resource.h> #include <qpe/config.h> #include <opie2/odebug.h> +#include <opie2/oresource.h> /* QT */ #include <qdir.h> /* STD */ #include <stdlib.h> #include <stdio.h> extern MediaPlayerState *mediaPlayerState; static const int xo = -2; // movable x offset static const int yo = 22; // movable y offset using namespace Opie::Ui; struct MediaButton { bool isToggle, isHeld, isDown; }; //Layout information for the audioButtons (and if it is a toggle button or not) MediaButton audioButtons[] = { { TRUE, FALSE, FALSE }, // play { FALSE, FALSE, FALSE }, // stop { FALSE, FALSE, FALSE }, // next @@ -71,51 +71,51 @@ static void changeTextColor( QWidget *w ) { } static const int numButtons = (sizeof(audioButtons)/sizeof(MediaButton)); AudioWidget::AudioWidget(QWidget* parent, const char* name, WFlags f) : QWidget( parent, name, f ), songInfo( this ), slider( Qt::Horizontal, this ), time( this ) { setCaption( tr("OpiePlayer") ); // odebug << "<<<<<audioWidget" << oendl; Config cfg("OpiePlayer"); cfg.setGroup("Options"); skin = cfg.readEntry("Skin","default"); //skin = "scaleTest"; // color of background, frame, degree of transparency // QString skinPath = "opieplayer/skins/" + skin; QString skinPath; skinPath = "opieplayer2/skins/" + skin; if(!QDir(QString(getenv("OPIEDIR")) +"/pics/"+skinPath).exists()) skinPath = "opieplayer2/skins/default"; // odebug << "skin path " + skinPath << oendl; - pixBg = new QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) ); - imgUp = new QImage( Resource::loadImage( QString("%1/skin_up").arg(skinPath) ) ); - imgDn = new QImage( Resource::loadImage( QString("%1/skin_down").arg(skinPath) ) ); + pixBg = new QPixmap( Opie::Core::OResource::loadPixmap( QString("%1/background").arg(skinPath) ) ); + imgUp = new QImage( Opie::Core::OResource::loadImage( QString("%1/skin_up").arg(skinPath) ) ); + imgDn = new QImage( Opie::Core::OResource::loadImage( QString("%1/skin_down").arg(skinPath) ) ); imgButtonMask = new QImage( imgUp->width(), imgUp->height(), 8, 255 ); imgButtonMask->fill( 0 ); for ( int i = 0; i < 10; i++ ) { QString filename = QString(getenv("OPIEDIR")) + "/pics/" + skinPath + "/skin_mask_" + skin_mask_file_names[i] + ".png"; masks[i] = new QBitmap( filename ); if ( !masks[i]->isNull() ) { QImage imgMask = masks[i]->convertToImage(); uchar **dest = imgButtonMask->jumpTable(); for ( int y = 0; y < imgUp->height(); y++ ) { uchar *line = dest[y]; for ( int x = 0; x < imgUp->width(); x++ ) if ( !qRed( imgMask.pixel( x, y ) ) ) line[x] = i + 1; } } } for ( int i = 0; i < 11; i++ ) { buttonPixUp[i] = NULL; buttonPixDown[i] = NULL; |