Diffstat (limited to 'core/multimedia/opieplayer/videowidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/multimedia/opieplayer/videowidget.cpp | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/core/multimedia/opieplayer/videowidget.cpp b/core/multimedia/opieplayer/videowidget.cpp index 3bce996..97997f9 100644 --- a/core/multimedia/opieplayer/videowidget.cpp +++ b/core/multimedia/opieplayer/videowidget.cpp | |||
@@ -19,6 +19,8 @@ | |||
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #include <qpe/resource.h> | 20 | #include <qpe/resource.h> |
21 | #include <qpe/mediaplayerplugininterface.h> | 21 | #include <qpe/mediaplayerplugininterface.h> |
22 | #include <qpe/config.h> | ||
23 | |||
22 | #include <qwidget.h> | 24 | #include <qwidget.h> |
23 | #include <qpainter.h> | 25 | #include <qpainter.h> |
24 | #include <qpixmap.h> | 26 | #include <qpixmap.h> |
@@ -67,16 +69,25 @@ static const int numButtons = (sizeof(videoButtons)/sizeof(MediaButton)); | |||
67 | VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) : | 69 | VideoWidget::VideoWidget(QWidget* parent, const char* name, WFlags f) : |
68 | QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 ) { | 70 | QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 ) { |
69 | setCaption( tr("OpiePlayer") ); | 71 | setCaption( tr("OpiePlayer") ); |
70 | setBackgroundPixmap( Resource::loadPixmap( "opieplayer/metalFinish" ) ); | 72 | Config cfg("OpiePlayer"); |
71 | pixmaps[0] = new QPixmap( Resource::loadPixmap( "opieplayer/mediaButton0a" ) ); | 73 | cfg.setGroup("VideoWidget"); |
72 | pixmaps[1] = new QPixmap( Resource::loadPixmap( "opieplayer/mediaButton0b" ) ); | 74 | |
73 | pixmaps[2] = new QPixmap( Resource::loadPixmap( "opieplayer/mediaControls0" ) ); | 75 | QString backgroundPix, Button0aPix, Button0bPix, controlsPix; |
76 | backgroundPix=cfg.readEntry( "backgroundPix", "opieplayer/metalFinish"); | ||
77 | Button0aPix=cfg.readEntry( "Button0aPix", "opieplayer/mediaButton0a"); | ||
78 | Button0bPix=cfg.readEntry( "Button0bPix","opieplayer/mediaButton0b"); | ||
79 | controlsPix=cfg.readEntry( "controlsPix","opieplayer/mediaControls0" ); | ||
80 | |||
81 | setBackgroundPixmap( Resource::loadPixmap( backgroundPix) ); | ||
82 | pixmaps[0] = new QPixmap( Resource::loadPixmap( Button0aPix ) ); | ||
83 | pixmaps[1] = new QPixmap( Resource::loadPixmap( Button0bPix ) ); | ||
84 | pixmaps[2] = new QPixmap( Resource::loadPixmap( controlsPix) ); | ||
74 | currentFrame = new QImage( 220 + 2, 160, (QPixmap::defaultDepth() == 16) ? 16 : 32 ); | 85 | currentFrame = new QImage( 220 + 2, 160, (QPixmap::defaultDepth() == 16) ? 16 : 32 ); |
75 | 86 | ||
76 | slider = new QSlider( Qt::Horizontal, this ); | 87 | slider = new QSlider( Qt::Horizontal, this ); |
77 | slider->setMinValue( 0 ); | 88 | slider->setMinValue( 0 ); |
78 | slider->setMaxValue( 1 ); | 89 | slider->setMaxValue( 1 ); |
79 | slider->setBackgroundPixmap( Resource::loadPixmap( "opieplayer/metalFinish" ) ); | 90 | slider->setBackgroundPixmap( Resource::loadPixmap( backgroundPix ) ); |
80 | slider->setFocusPolicy( QWidget::NoFocus ); | 91 | slider->setFocusPolicy( QWidget::NoFocus ); |
81 | slider->setGeometry( QRect( 7, 250, 220, 20 ) ); | 92 | slider->setGeometry( QRect( 7, 250, 220, 20 ) ); |
82 | 93 | ||