author | simon <simon> | 2002-12-11 01:24:05 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-11 01:24:05 (UTC) |
commit | 3ec7f32d0924c737664a6ad4dfb43dc3c20605d0 (patch) (unidiff) | |
tree | bb9a9dcef582754293be5e1f7367c64e178c8243 | |
parent | d67ad1a6ef93d358beab268153cf2b0694e5f633 (diff) | |
download | opie-3ec7f32d0924c737664a6ad4dfb43dc3c20605d0.zip opie-3ec7f32d0924c737664a6ad4dfb43dc3c20605d0.tar.gz opie-3ec7f32d0924c737664a6ad4dfb43dc3c20605d0.tar.bz2 |
- make more use of the Resource::* api for loading the data
-rw-r--r-- | noncore/multimedia/opieplayer2/mediawidget.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/noncore/multimedia/opieplayer2/mediawidget.cpp b/noncore/multimedia/opieplayer2/mediawidget.cpp index c9d7db8..865ff91 100644 --- a/noncore/multimedia/opieplayer2/mediawidget.cpp +++ b/noncore/multimedia/opieplayer2/mediawidget.cpp | |||
@@ -67,17 +67,17 @@ MediaWidget::Button MediaWidget::setupButton( const SkinButtonInfo &buttonInfo, | |||
67 | 67 | ||
68 | button.mask = setupButtonMask( button.command, fileName ); | 68 | button.mask = setupButtonMask( button.command, fileName ); |
69 | 69 | ||
70 | return button; | 70 | return button; |
71 | } | 71 | } |
72 | 72 | ||
73 | QBitmap MediaWidget::setupButtonMask( const Command &command, const QString &fileName ) | 73 | QBitmap MediaWidget::setupButtonMask( const Command &command, const QString &fileName ) |
74 | { | 74 | { |
75 | QBitmap mask( fileName ); | 75 | QBitmap mask( Resource::findPixmap( fileName ) ); |
76 | if ( mask.isNull() ) | 76 | if ( mask.isNull() ) |
77 | return mask; | 77 | return mask; |
78 | 78 | ||
79 | QImage imgMask = mask.convertToImage(); | 79 | QImage imgMask = mask.convertToImage(); |
80 | uchar **dest = buttonMask.jumpTable(); | 80 | uchar **dest = buttonMask.jumpTable(); |
81 | for ( int y = 0; y < buttonMask.height(); y++ ) { | 81 | for ( int y = 0; y < buttonMask.height(); y++ ) { |
82 | uchar *line = dest[y]; | 82 | uchar *line = dest[y]; |
83 | for ( int x = 0; x < buttonMask.width(); x++ ) | 83 | for ( int x = 0; x < buttonMask.width(); x++ ) |
@@ -100,17 +100,17 @@ void MediaWidget::loadDefaultSkin( const SkinButtonInfo *skinInfo, uint buttonCo | |||
100 | void MediaWidget::loadSkin( const SkinButtonInfo *skinInfo, uint buttonCount, const QString &name, const QString &fileNameInfix ) | 100 | void MediaWidget::loadSkin( const SkinButtonInfo *skinInfo, uint buttonCount, const QString &name, const QString &fileNameInfix ) |
101 | { | 101 | { |
102 | QString skinPath = "opieplayer2/skins/" + name; | 102 | QString skinPath = "opieplayer2/skins/" + name; |
103 | backgroundPixmap = QPixmap( Resource::loadPixmap( QString( "%1/background" ).arg( skinPath ) ) ); | 103 | backgroundPixmap = QPixmap( Resource::loadPixmap( QString( "%1/background" ).arg( skinPath ) ) ); |
104 | buttonUpImage = QImage( Resource::loadImage( QString( "%1/skin%2_up" ).arg( skinPath ).arg( fileNameInfix ) ) ); | 104 | buttonUpImage = QImage( Resource::loadImage( QString( "%1/skin%2_up" ).arg( skinPath ).arg( fileNameInfix ) ) ); |
105 | buttonDownImage = QImage( Resource::loadImage( QString( "%1/skin%2_down" ).arg( skinPath ).arg( fileNameInfix ) ) ); | 105 | buttonDownImage = QImage( Resource::loadImage( QString( "%1/skin%2_down" ).arg( skinPath ).arg( fileNameInfix ) ) ); |
106 | 106 | ||
107 | setupButtons( skinInfo, buttonCount, | 107 | setupButtons( skinInfo, buttonCount, |
108 | QPEApplication::qpeDir() + "/pics/" + skinPath + QString::fromLatin1( "/skin%1_mask_" ).arg( fileNameInfix ), buttonUpImage.size() ); | 108 | skinPath + QString::fromLatin1( "/skin%1_mask_" ).arg( fileNameInfix ), buttonUpImage.size() ); |
109 | } | 109 | } |
110 | 110 | ||
111 | void MediaWidget::closeEvent( QCloseEvent * ) | 111 | void MediaWidget::closeEvent( QCloseEvent * ) |
112 | { | 112 | { |
113 | mediaPlayerState.setList(); | 113 | mediaPlayerState.setList(); |
114 | } | 114 | } |
115 | 115 | ||
116 | void MediaWidget::paintEvent( QPaintEvent *pe ) | 116 | void MediaWidget::paintEvent( QPaintEvent *pe ) |