/****************************************************************************
** Form implementation generated from reading ui file './codecconf.ui'
**
** Created: Sun May 27 15:58:57 2001
**      by:  The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "./codecconf_p.h"

#include <qdial.h>
#include <qheader.h>
#include <qlabel.h>
#include <qlcdnumber.h>
#include <qlistbox.h>
#include <qlistview.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qvariant.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <qimage.h>
#include <qpixmap.h>


/* 
 *  Constructs a CodecConfigDialog which is a child of 'parent', with the 
 *  name 'name' and widget flags set to 'f' 
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  TRUE to construct a modal dialog.
 */
CodecConfigDialog::CodecConfigDialog( QWidget* parent,  const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "CodecConfigDialog" );
    resize( 341, 312 ); 
    setCaption( tr( "Configure video codec" ) );

    TextLabel1 = new QLabel( this, "TextLabel1" );
    TextLabel1->setGeometry( QRect( 10, 10, 131, 20 ) ); 
    TextLabel1->setText( tr( "Select video codec" ) );

    TextLabel4 = new QLabel( this, "TextLabel4" );
    TextLabel4->setGeometry( QRect( 160, 10, 131, 21 ) ); 
    TextLabel4->setText( tr( "Codec attributes" ) );

    QWidget* privateLayoutWidget = new QWidget( this, "Layout3" );
    privateLayoutWidget->setGeometry( QRect( 161, 270, 168, 28 ) ); 
    Layout3 = new QGridLayout( privateLayoutWidget ); 
    Layout3->setSpacing( 6 );
    Layout3->setMargin( 0 );

    PushButton21 = new QPushButton( privateLayoutWidget, "PushButton21" );
    PushButton21->setText( tr( "Cancel" ) );

    Layout3->addWidget( PushButton21, 0, 1 );

    PushButton22 = new QPushButton( privateLayoutWidget, "PushButton22" );
    PushButton22->setText( tr( "Ok" ) );

    Layout3->addWidget( PushButton22, 0, 0 );

    QWidget* privateLayoutWidget_2 = new QWidget( this, "Layout4" );
    privateLayoutWidget_2->setGeometry( QRect( 172, 191, 154, 71 ) ); 
    Layout4 = new QGridLayout( privateLayoutWidget_2 ); 
    Layout4->setSpacing( 6 );
    Layout4->setMargin( 0 );

    LCDNumber2 = new QLCDNumber( privateLayoutWidget_2, "LCDNumber2" );
    LCDNumber2->setSegmentStyle( QLCDNumber::Flat );
    LCDNumber2->setNumDigits( 3 );
    LCDNumber2->setProperty( "intValue", 5 );

    Layout4->addWidget( LCDNumber2, 1, 1 );

    TextLabel3 = new QLabel( privateLayoutWidget_2, "TextLabel3" );
    TextLabel3->setText( tr( "Key frame frequency" ) );

    Layout4->addMultiCellWidget( TextLabel3, 0, 0, 0, 1 );

    _pKeyframe = new QDial( privateLayoutWidget_2, "_pKeyframe" );
    _pKeyframe->setMaxValue( 200 );
    _pKeyframe->setValue( 5 );
    _pKeyframe->setMinValue( 1 );

    Layout4->addWidget( _pKeyframe, 1, 0 );

    QWidget* privateLayoutWidget_3 = new QWidget( this, "Layout1" );
    privateLayoutWidget_3->setGeometry( QRect( 12, 191, 139, 71 ) ); 
    Layout1 = new QGridLayout( privateLayoutWidget_3 ); 
    Layout1->setSpacing( 6 );
    Layout1->setMargin( 0 );

    TextLabel2 = new QLabel( privateLayoutWidget_3, "TextLabel2" );
    TextLabel2->setText( tr( "Quality" ) );

    Layout1->addMultiCellWidget( TextLabel2, 0, 0, 0, 1 );

    LCDNumber1 = new QLCDNumber( privateLayoutWidget_3, "LCDNumber1" );
    LCDNumber1->setFrameShadow( QLCDNumber::Raised );
    LCDNumber1->setSegmentStyle( QLCDNumber::Flat );
    LCDNumber1->setNumDigits( 3 );
    LCDNumber1->setProperty( "intValue", 95 );

    Layout1->addWidget( LCDNumber1, 1, 1 );

    _pQuality = new QDial( privateLayoutWidget_3, "_pQuality" );
    _pQuality->setMaxValue( 100 );
    _pQuality->setValue( 95 );

    Layout1->addWidget( _pQuality, 1, 0 );

    _listCodecs = new QListBox( this, "_listCodecs" );
    _listCodecs->insertItem( tr( "DivX ;-)" ) );
    _listCodecs->insertItem( tr( "MS MPEG-4" ) );
    _listCodecs->insertItem( tr( "Indeo Video 5.0" ) );
    _listCodecs->insertItem( tr( "Indeo Video 4.1" ) );
    _listCodecs->insertItem( tr( "Indeo Video 3.2" ) );
    _listCodecs->insertItem( tr( "Cinepak" ) );
    _listCodecs->insertItem( tr( "I263" ) );
    _listCodecs->setGeometry( QRect( 10, 40, 141, 141 ) ); 

    _tabAttr = new QListView( this, "_tabAttr" );
    _tabAttr->addColumn( tr( "Attribute" ) );
    _tabAttr->addColumn( tr( "Value" ) );
    QListViewItem * item = new QListViewItem( _tabAttr, 0 );
    item->setText( 0, tr( "Item" ) );
    item->setText( 1, tr( "Subitem" ) );

    _tabAttr->setGeometry( QRect( 170, 40, 157, 104 ) ); 

    _about = new QPushButton( this, "_about" );
    _about->setGeometry( QRect( 171, 154, 156, 26 ) ); 
    _about->setText( tr( "About video codec..." ) );

    // signals and slots connections
    connect( PushButton22, SIGNAL( clicked() ), this, SLOT( accept() ) );
    connect( PushButton21, SIGNAL( clicked() ), this, SLOT( reject() ) );
    connect( _pKeyframe, SIGNAL( valueChanged(int) ), LCDNumber2, SLOT( display(int) ) );
    connect( _pQuality, SIGNAL( valueChanged(int) ), LCDNumber1, SLOT( display(int) ) );
    connect( _tabAttr, SIGNAL( doubleClicked(QListViewItem*) ), this, SLOT( change_attr(QListViewItem*) ) );
    connect( _about, SIGNAL( clicked() ), this, SLOT( about_clicked() ) );
}

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

void CodecConfigDialog::change_attr(QListViewItem*)
{
    qWarning( "CodecConfigDialog::change_attr(QListViewItem*): Not implemented yet!" );
}

void CodecConfigDialog::about_clicked()
{
    qWarning( "CodecConfigDialog::about_clicked(): Not implemented yet!" );
}

