#include <kdialog.h>
#include <klocale.h>
/****************************************************************************
** Form implementation generated from reading ui file './srkvideopanelbase.ui'
**
** Created: wo sep 6 18:04:25 2006
**      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.6   edited Aug 31 2005 $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "srkvideopanelbase.h"

#include <qvariant.h>
#include <srkvideocontainer.h>
#include <qslider.h>
#include <qpushbutton.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>

/*
 *  Constructs a SRKVideoPanelBase as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
SRKVideoPanelBase::SRKVideoPanelBase( QWidget* parent, const char* name, WFlags fl )
    : QWidget( parent, name, fl )
{
    if ( !name )
	setName( "SRKVideoPanelBase" );
    setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, sizePolicy().hasHeightForWidth() ) );
    SRKVideoPanelBaseLayout = new QGridLayout( this, 1, 1, 11, 6, "SRKVideoPanelBaseLayout"); 

    videoContainer = new SRKVideoContainer( this, "videoContainer" );
    videoContainer->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, videoContainer->sizePolicy().hasHeightForWidth() ) );
    videoContainer->setMinimumSize( QSize( 0, 0 ) );

    SRKVideoPanelBaseLayout->addWidget( videoContainer, 0, 0 );

    slider = new QSlider( this, "slider" );
    slider->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, slider->sizePolicy().hasHeightForWidth() ) );
    slider->setTracking( TRUE );
    slider->setOrientation( QSlider::Horizontal );

    SRKVideoPanelBaseLayout->addWidget( slider, 1, 0 );

    layout4 = new QHBoxLayout( 0, 0, 6, "layout4"); 

    playButton = new QPushButton( this, "playButton" );
    playButton->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, playButton->sizePolicy().hasHeightForWidth() ) );
    layout4->addWidget( playButton );

    pauseButton = new QPushButton( this, "pauseButton" );
    pauseButton->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, pauseButton->sizePolicy().hasHeightForWidth() ) );
    layout4->addWidget( pauseButton );

    stopButton = new QPushButton( this, "stopButton" );
    stopButton->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, stopButton->sizePolicy().hasHeightForWidth() ) );
    layout4->addWidget( stopButton );
    spacer3 = new QSpacerItem( 409, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    layout4->addItem( spacer3 );

    layout3 = new QVBoxLayout( 0, 0, 6, "layout3"); 

    positionLbl = new QLabel( this, "positionLbl" );
    positionLbl->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
    layout3->addWidget( positionLbl );

    resolutionLbl = new QLabel( this, "resolutionLbl" );
    resolutionLbl->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
    layout3->addWidget( resolutionLbl );
    layout4->addLayout( layout3 );

    SRKVideoPanelBaseLayout->addLayout( layout4, 2, 0 );
    languageChange();
    resize( QSize(703, 661).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( stopButton, SIGNAL( clicked() ), this, SLOT( stop() ) );
    connect( pauseButton, SIGNAL( clicked() ), this, SLOT( pause() ) );
    connect( playButton, SIGNAL( clicked() ), this, SLOT( play() ) );
    connect( slider, SIGNAL( valueChanged(int) ), this, SLOT( updateImage(int) ) );

    // tab order
    setTabOrder( slider, playButton );
    setTabOrder( playButton, pauseButton );
    setTabOrder( pauseButton, stopButton );
}

/*
 *  Destroys the object and frees any allocated resources
 */
SRKVideoPanelBase::~SRKVideoPanelBase()
{
    // no need to delete child widgets, Qt does it all for us
}

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void SRKVideoPanelBase::languageChange()
{
    setCaption( tr2i18n( "Form1" ) );
    playButton->setText( tr2i18n( "Pla&y" ) );
    playButton->setAccel( QKeySequence( tr2i18n( "Alt+Y" ) ) );
    pauseButton->setText( tr2i18n( "P&ause" ) );
    pauseButton->setAccel( QKeySequence( tr2i18n( "Alt+A" ) ) );
    stopButton->setText( tr2i18n( "S&top" ) );
    stopButton->setAccel( QKeySequence( tr2i18n( "Alt+T" ) ) );
    positionLbl->setText( tr2i18n( "no video" ) );
    resolutionLbl->setText( tr2i18n( "no video" ) );
}

void SRKVideoPanelBase::updateImage(int)
{
    qWarning( "SRKVideoPanelBase::updateImage(int): Not implemented yet" );
}

void SRKVideoPanelBase::play()
{
    qWarning( "SRKVideoPanelBase::play(): Not implemented yet" );
}

void SRKVideoPanelBase::pause()
{
    qWarning( "SRKVideoPanelBase::pause(): Not implemented yet" );
}

void SRKVideoPanelBase::incPosition()
{
    qWarning( "SRKVideoPanelBase::incPosition(): Not implemented yet" );
}

void SRKVideoPanelBase::stop()
{
    qWarning( "SRKVideoPanelBase::stop(): Not implemented yet" );
}

#include "srkvideopanelbase.moc"
