summaryrefslogtreecommitdiff
authorsimon <simon>2002-12-11 17:16:17 (UTC)
committer simon <simon>2002-12-11 17:16:17 (UTC)
commit94461696cfdcf8cdbaabec1400300e546edc447e (patch) (side-by-side diff)
treebacef808031edb254214d04489d4a8e4df53cdb9
parent9f5e007f4859027eaeb989c620ec62fc698b44cc (diff)
downloadopie-94461696cfdcf8cdbaabec1400300e546edc447e.zip
opie-94461696cfdcf8cdbaabec1400300e546edc447e.tar.gz
opie-94461696cfdcf8cdbaabec1400300e546edc447e.tar.bz2
- expose information about the buttons
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.cpp12
-rw-r--r--noncore/multimedia/opieplayer2/audiowidget.h4
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp12
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.h2
4 files changed, 28 insertions, 2 deletions
diff --git a/noncore/multimedia/opieplayer2/audiowidget.cpp b/noncore/multimedia/opieplayer2/audiowidget.cpp
index 78079dd..4db444a 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.cpp
+++ b/noncore/multimedia/opieplayer2/audiowidget.cpp
@@ -102,24 +102,34 @@ AudioWidget::AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlaye
setLength( mediaPlayerState.length() );
setPosition( mediaPlayerState.position() );
setLooping( mediaPlayerState.isFullscreen() );
// setPaused( mediaPlayerState->paused() );
setPlaying( mediaPlayerState.isPlaying() );
}
AudioWidget::~AudioWidget() {
// mediaPlayerState->setPlaying(false);
}
+const MediaWidget::SkinButtonInfo *AudioWidget::skinInfo()
+{
+ return ::skinInfo;
+}
+
+const uint AudioWidget::buttonCount()
+{
+ return ::buttonCount;
+}
+
void AudioWidget::resizeEvent( QResizeEvent *e ) {
int h = height();
int w = width();
songInfo.setGeometry( QRect( 2, 2, w - 4, 20 ) );
slider.setFixedWidth( w - 110 );
slider.setGeometry( QRect( 15, h - 22, w - 90, 20 ) );
slider.setBackgroundOrigin( QWidget::ParentOrigin );
time.setGeometry( QRect( w - 85, h - 30, 70, 20 ) );
upperLeftOfButtonMask.rx() = ( w - buttonUpImage.width() ) / 2;
upperLeftOfButtonMask.ry() = (( h - buttonUpImage.height() ) / 2) - 10;
@@ -155,25 +165,25 @@ void AudioWidget::setDisplayType( MediaPlayerState::DisplayType mediaType ) {
if ( mediaType == MediaPlayerState::Audio ) {
// startTimer( 150 );
showMaximized();
return;
}
killTimers();
hide();
}
void AudioWidget::loadSkin()
{
- loadDefaultSkin( skinInfo, buttonCount );
+ loadDefaultSkin( ::skinInfo, ::buttonCount );
setBackgroundPixmap( backgroundPixmap );
songInfo.setFocusPolicy( QWidget::NoFocus );
// changeTextColor( &songInfo );
// songInfo.setBackgroundColor( QColor( 167, 212, 167 ));
// songInfo.setFrameStyle( QFrame::NoFrame);
songInfo.setFrameStyle( QFrame::WinPanel | QFrame::Sunken );
// songInfo.setForegroundColor(Qt::white);
slider.setFixedHeight( 20 );
slider.setMinValue( 0 );
diff --git a/noncore/multimedia/opieplayer2/audiowidget.h b/noncore/multimedia/opieplayer2/audiowidget.h
index 670fb45..75d4857 100644
--- a/noncore/multimedia/opieplayer2/audiowidget.h
+++ b/noncore/multimedia/opieplayer2/audiowidget.h
@@ -46,24 +46,28 @@
#include <opie/oticker.h>
#include "mediawidget.h"
class QPixmap;
class AudioWidget : public MediaWidget {
Q_OBJECT
public:
AudioWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent=0, const char* name=0 );
~AudioWidget();
void setTickerText( const QString &text ) { songInfo.setText( text ); }
+
+ static const MediaWidget::SkinButtonInfo *skinInfo();
+ static const uint buttonCount();
+
public slots:
void updateSlider( long, long );
void sliderPressed( );
void sliderReleased( );
void setLooping( bool b) { setToggleButton( Loop, b ); }
void setPosition( long );
void setSeekable( bool );
public:
virtual void setLength( long );
virtual void setPlaying( bool b) { setToggleButton( Play, b ); }
virtual void setDisplayType( MediaPlayerState::DisplayType displayType );
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp
index a8ff540..058730f 100644
--- a/noncore/multimedia/opieplayer2/videowidget.cpp
+++ b/noncore/multimedia/opieplayer2/videowidget.cpp
@@ -90,24 +90,34 @@ VideoWidget::VideoWidget( PlayListWidget &playList, MediaPlayerState &mediaPlaye
setLength( mediaPlayerState.length() );
setPosition( mediaPlayerState.position() );
setFullscreen( mediaPlayerState.isFullscreen() );
setPlaying( mediaPlayerState.isPlaying() );
}
VideoWidget::~VideoWidget()
{
}
+const MediaWidget::SkinButtonInfo *VideoWidget::skinInfo()
+{
+ return ::skinInfo;
+}
+
+const uint VideoWidget::buttonCount()
+{
+ return ::buttonCount;
+}
+
void VideoWidget::resizeEvent( QResizeEvent *e ) {
int h = height();
int w = width();
//int Vh = 160;
//int Vw = 220;
slider->setFixedWidth( w - 20 );
slider->setGeometry( QRect( 15, h - 22, w - 90, 20 ) );
slider->setBackgroundOrigin( QWidget::ParentOrigin );
slider->setFocusPolicy( QWidget::NoFocus );
slider->setBackgroundPixmap( backgroundPixmap );
@@ -148,25 +158,25 @@ void VideoWidget::setDisplayType( MediaPlayerState::DisplayType displayType )
makeVisible();
return;
}
// Effectively blank the view next time we show it so it looks nicer
scaledWidth = 0;
scaledHeight = 0;
hide();
}
void VideoWidget::loadSkin()
{
- loadDefaultSkin( skinInfo, buttonCount, "V" );
+ loadDefaultSkin( ::skinInfo, ::buttonCount, "V" );
setBackgroundPixmap( backgroundPixmap );
delete slider;
slider = new QSlider( Qt::Horizontal, this );
slider->setMinValue( 0 );
slider->setMaxValue( 1 );
slider->setBackgroundPixmap( backgroundPixmap );
//slider->setFocusPolicy( QWidget::NoFocus );
resizeEvent( 0 );
}
diff --git a/noncore/multimedia/opieplayer2/videowidget.h b/noncore/multimedia/opieplayer2/videowidget.h
index f434945..80e9356 100644
--- a/noncore/multimedia/opieplayer2/videowidget.h
+++ b/noncore/multimedia/opieplayer2/videowidget.h
@@ -41,24 +41,26 @@
#include "mediawidget.h"
class QPixmap;
class QSlider;
class VideoWidget : public MediaWidget {
Q_OBJECT
public:
VideoWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent=0, const char* name=0 );
~VideoWidget();
+ static const MediaWidget::SkinButtonInfo *skinInfo();
+ static const uint buttonCount();
XineVideoWidget* vidWidget();
public slots:
void updateSlider( long, long );
void sliderPressed( );
void sliderReleased( );
void setFullscreen( bool b );
virtual void makeVisible();
void backToNormal();
void setPosition( long );
public: