summaryrefslogtreecommitdiff
path: root/noncore/multimedia/opieplayer2/videowidget.cpp
Side-by-side diff
Diffstat (limited to 'noncore/multimedia/opieplayer2/videowidget.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp
index 9782b68..f59772e 100644
--- a/noncore/multimedia/opieplayer2/videowidget.cpp
+++ b/noncore/multimedia/opieplayer2/videowidget.cpp
@@ -65,31 +65,31 @@ const char * const skinV_mask_file_names[7] = {
}
VideoWidget::VideoWidget( PlayListWidget &playList, MediaPlayerState &mediaPlayerState, QWidget* parent, const char* name )
: MediaWidget( playList, mediaPlayerState, parent, name ), scaledWidth( 0 ), scaledHeight( 0 )
{
setCaption( tr("OpiePlayer - Video") );
Button defaultButton;
Button toggleButton = defaultButton;
toggleButton.type = ToggleButton;
- buttons.insert( 0, toggleButton ); // play
- buttons.insert( 1, toggleButton ); // stop
- buttons.insert( 2, toggleButton ); // next
- buttons.insert( 3, toggleButton ); // previous
- buttons.insert( 4, toggleButton ); // volUp
- buttons.insert( 5, toggleButton ); // volDown
- buttons.insert( 6, toggleButton ); // fullscreen
+ buttons.push_back( toggleButton ); // play
+ buttons.push_back( toggleButton ); // stop
+ buttons.push_back( toggleButton ); // next
+ buttons.push_back( toggleButton ); // previous
+ buttons.push_back( toggleButton ); // volUp
+ buttons.push_back( toggleButton ); // volDown
+ buttons.push_back( toggleButton ); // fullscreen
videoFrame = new XineVideoWidget ( this, "Video frame" );
connect ( videoFrame, SIGNAL( videoResized ( const QSize & )), this, SIGNAL( videoResized ( const QSize & )));
connect ( videoFrame, SIGNAL( clicked () ), this, SLOT ( backToNormal() ) );
Config cfg("OpiePlayer");
cfg.setGroup("Options");
skin = cfg.readEntry("Skin","default");
QString skinPath = "opieplayer2/skins/" + skin;
backgroundPixmap = QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) );
@@ -234,25 +234,25 @@ void VideoWidget::updateSlider( long i, long max ) {
int val = int((double)i * width / max);
if ( !mediaPlayerState.isFullscreen() && !videoSliderBeingMoved ) {
if ( slider->value() != val ) {
slider->setValue( val );
}
if ( slider->maxValue() != width ) {
slider->setMaxValue( width );
}
}
}
void VideoWidget::mouseMoveEvent( QMouseEvent *event ) {
- for ( unsigned int i = 0; i < buttons.count(); i++ ) {
+ for ( unsigned int i = 0; i < buttons.size(); i++ ) {
Button &button = buttons[ i ];
if ( event->state() == QMouseEvent::LeftButton ) {
// The test to see if the mouse click is inside the button or not
bool isOnButton = isOverButton( event->pos() - upperLeftOfButtonMask, i );
if ( isOnButton && !button.isHeld ) {
button.isHeld = TRUE;
toggleButton( button );
switch (i) {