Diffstat (limited to 'noncore/multimedia/opieplayer2/mediawidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/mediawidget.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/noncore/multimedia/opieplayer2/mediawidget.cpp b/noncore/multimedia/opieplayer2/mediawidget.cpp index db16b44..d60dc0d 100644 --- a/noncore/multimedia/opieplayer2/mediawidget.cpp +++ b/noncore/multimedia/opieplayer2/mediawidget.cpp | |||
@@ -36,24 +36,27 @@ MediaWidget::MediaWidget( PlayListWidget &_playList, MediaPlayerState &_mediaPla | |||
36 | } | 36 | } |
37 | 37 | ||
38 | MediaWidget::~MediaWidget() | 38 | MediaWidget::~MediaWidget() |
39 | { | 39 | { |
40 | } | 40 | } |
41 | 41 | ||
42 | void MediaWidget::setupButtons( const SkinButtonInfo *skinInfo, uint buttonCount, | 42 | void MediaWidget::setupButtons( const SkinButtonInfo *skinInfo, uint buttonCount, |
43 | const QString &imagePrefix, const QSize &buttonAreaSize ) | 43 | const QString &imagePrefix, const QSize &buttonAreaSize ) |
44 | { | 44 | { |
45 | buttonMask = QImage( buttonAreaSize, 8, 255 ); | 45 | buttonMask = QImage( buttonAreaSize, 8, 255 ); |
46 | buttonMask.fill( 0 ); | 46 | buttonMask.fill( 0 ); |
47 | 47 | ||
48 | buttons.clear(); | ||
49 | buttons.reserve( buttonCount ); | ||
50 | |||
48 | for ( uint i = 0; i < buttonCount; ++i ) { | 51 | for ( uint i = 0; i < buttonCount; ++i ) { |
49 | Button button = setupButton( skinInfo[ i ], imagePrefix ); | 52 | Button button = setupButton( skinInfo[ i ], imagePrefix ); |
50 | buttons.push_back( button ); | 53 | buttons.push_back( button ); |
51 | } | 54 | } |
52 | } | 55 | } |
53 | 56 | ||
54 | MediaWidget::Button MediaWidget::setupButton( const SkinButtonInfo &buttonInfo, const QString &imagePrefix ) | 57 | MediaWidget::Button MediaWidget::setupButton( const SkinButtonInfo &buttonInfo, const QString &imagePrefix ) |
55 | { | 58 | { |
56 | Button button; | 59 | Button button; |
57 | button.command = buttonInfo.command; | 60 | button.command = buttonInfo.command; |
58 | button.type = buttonInfo.type; | 61 | button.type = buttonInfo.type; |
59 | 62 | ||