summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/skin.cpp8
-rw-r--r--noncore/multimedia/opieplayer2/skin.h2
2 files changed, 0 insertions, 10 deletions
diff --git a/noncore/multimedia/opieplayer2/skin.cpp b/noncore/multimedia/opieplayer2/skin.cpp
index d6f4080..a8f4ae9 100644
--- a/noncore/multimedia/opieplayer2/skin.cpp
+++ b/noncore/multimedia/opieplayer2/skin.cpp
@@ -65,56 +65,48 @@ private:
Skin::Skin( const QString &name, const QString &fileNameInfix )
: m_fileNameInfix( fileNameInfix )
{
init( name );
}
Skin::Skin( const QString &fileNameInfix )
: m_fileNameInfix( fileNameInfix )
{
init( defaultSkinName() );
}
Skin::~Skin()
{
SkinCache::self().store( m_skinPath, m_fileNameInfix, d );
}
void Skin::init( const QString &name )
{
m_skinPath = "opieplayer2/skins/" + name;
d = SkinCache::self().lookupAndTake( m_skinPath, m_fileNameInfix );
}
-void Skin::preload( const MediaWidget::SkinButtonInfo *skinButtonInfo, uint buttonCount )
-{
- backgroundPixmap();
- buttonUpImage();
- buttonDownImage();
- ( void )buttonMask( skinButtonInfo, buttonCount );
-}
-
QPixmap Skin::backgroundPixmap() const
{
if ( d->backgroundPixmap.isNull() )
d->backgroundPixmap = loadImage( QString( "%1/background" ).arg( m_skinPath ) );
return d->backgroundPixmap;
}
QImage Skin::buttonUpImage() const
{
if ( d->buttonUpImage.isNull() )
d->buttonUpImage = loadImage( QString( "%1/skin%2_up" ).arg( m_skinPath ).arg( m_fileNameInfix ) );
return d->buttonUpImage;
}
QImage Skin::buttonDownImage() const
{
if ( d->buttonDownImage.isNull() )
d->buttonDownImage = loadImage( QString( "%1/skin%2_down" ).arg( m_skinPath ).arg( m_fileNameInfix ) );
return d->buttonDownImage;
}
QImage Skin::buttonMask( const MediaWidget::SkinButtonInfo *skinButtonInfo, uint buttonCount ) const
{
if ( !d->buttonMask.isNull() )
diff --git a/noncore/multimedia/opieplayer2/skin.h b/noncore/multimedia/opieplayer2/skin.h
index 90062c2..bafebd3 100644
--- a/noncore/multimedia/opieplayer2/skin.h
+++ b/noncore/multimedia/opieplayer2/skin.h
@@ -17,50 +17,48 @@
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#ifndef SKIN_H
#define SKIN_H
#include <qstring.h>
#include <qimage.h>
#include <qobject.h>
#include "mediawidget.h"
struct SkinData;
class Skin
{
public:
Skin( const QString &name, const QString &fileNameInfix );
Skin( const QString &fileNameInfix );
~Skin();
- void preload( const MediaWidget::SkinButtonInfo *skinButtonInfo, uint buttonCount );
-
QPixmap backgroundPixmap() const;
QImage buttonUpImage() const;
QImage buttonDownImage() const;
QImage buttonMask( const MediaWidget::SkinButtonInfo *skinButtonInfo, uint buttonCount ) const;
QImage buttonMaskImage( const QString &fileName ) const;
static QString defaultSkinName();
private:
void init( const QString &name );
void addButtonToMask( int tag, const QImage &maskImage ) const;
static QImage loadImage( const QString &fileName );
QString m_fileNameInfix;
QString m_skinPath;
SkinData *d;
Skin( const Skin & );
Skin &operator=( const Skin & );