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

#include <qbuttongroup.h>
#include <qcheckbox.h>
#include <qcombobox.h>
#include <qgroupbox.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qspinbox.h>
#include <qtabwidget.h>
#include <qwidget.h>
#include <qlayout.h>
#include <qvariant.h>
#include <qtooltip.h>
#include <qwhatsthis.h>

/* 
 *  Constructs a VidcapConfigDialog 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.
 */
VidcapConfigDialog::VidcapConfigDialog( QWidget* parent,  const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "VidcapConfigDialog" );
    resize( 390, 280 ); 
    setCaption( tr( "QtVidcap configuration" ) );
    setSizeGripEnabled( TRUE );
    setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, sizePolicy().hasHeightForWidth() ) );
    setMinimumSize( QSize( 390, 280 ) );

    tabWidget = new QTabWidget( this, "tabWidget" );
    tabWidget->setGeometry( QRect( 5, 2, 380, 236 ) ); 

    Widget35 = new QWidget( tabWidget, "Widget35" );

    QWidget* privateLayoutWidget = new QWidget( Widget35, "Layout29" );
    privateLayoutWidget->setGeometry( QRect( 15, 10, 349, 188 ) ); 
    Layout29 = new QGridLayout( privateLayoutWidget ); 
    Layout29->setSpacing( 6 );
    Layout29->setMargin( 0 );

    _Colorspace = new QComboBox( FALSE, privateLayoutWidget, "_Colorspace" );
    QWhatsThis::add(  _Colorspace, tr( "Resolutions higher than 384x288 aren't supported." ) );

    Layout29->addWidget( _Colorspace, 4, 1 );

    _Resolution = new QComboBox( FALSE, privateLayoutWidget, "_Resolution" );
    QWhatsThis::add(  _Resolution, tr( "Resolutions higher than 384x288 aren't supported." ) );

    Layout29->addWidget( _Resolution, 3, 1 );

    TextLabel8_2 = new QLabel( privateLayoutWidget, "TextLabel8_2" );
    TextLabel8_2->setText( tr( "Capture color space:" ) );

    Layout29->addWidget( TextLabel8_2, 4, 0 );

    TextLabel7 = new QLabel( privateLayoutWidget, "TextLabel7" );
    TextLabel7->setText( tr( "BTTV capture device:" ) );

    Layout29->addWidget( TextLabel7, 0, 0 );

    TextLabel6 = new QLabel( privateLayoutWidget, "TextLabel6" );
    TextLabel6->setText( tr( "Video channel:" ) );

    Layout29->addWidget( TextLabel6, 1, 0 );

    TextLabel1_3 = new QLabel( privateLayoutWidget, "TextLabel1_3" );
    TextLabel1_3->setText( tr( "Color mode:" ) );

    Layout29->addWidget( TextLabel1_3, 2, 0 );

    _CapDevice = new QLineEdit( privateLayoutWidget, "_CapDevice" );
    _CapDevice->setText( tr( "" ) );
    QWhatsThis::add(  _CapDevice, tr( "Do not change default value ( /dev/video ) unless you exactly know what you're doing." ) );

    Layout29->addWidget( _CapDevice, 0, 1 );

    _VideoColorMode = new QComboBox( FALSE, privateLayoutWidget, "_VideoColorMode" );

    Layout29->addWidget( _VideoColorMode, 2, 1 );

    TextLabel8 = new QLabel( privateLayoutWidget, "TextLabel8" );
    TextLabel8->setText( tr( "Resolution:" ) );

    Layout29->addWidget( TextLabel8, 3, 0 );

    _VideoChannel = new QComboBox( FALSE, privateLayoutWidget, "_VideoChannel" );

    Layout29->addWidget( _VideoChannel, 1, 1 );
    tabWidget->insertTab( Widget35, tr( "Capture device" ) );

    Widget36 = new QWidget( tabWidget, "Widget36" );

    QWidget* privateLayoutWidget_2 = new QWidget( Widget36, "Layout7" );
    privateLayoutWidget_2->setGeometry( QRect( 10, 10, 354, 39 ) ); 
    Layout7 = new QHBoxLayout( privateLayoutWidget_2 ); 
    Layout7->setSpacing( 6 );
    Layout7->setMargin( 0 );

    TextLabel9 = new QLabel( privateLayoutWidget_2, "TextLabel9" );
    TextLabel9->setText( tr( "Destination file:" ) );
    Layout7->addWidget( TextLabel9 );

    _FileName = new QLineEdit( privateLayoutWidget_2, "_FileName" );
    Layout7->addWidget( _FileName );

    _ChangeFile = new QPushButton( privateLayoutWidget_2, "_ChangeFile" );
    _ChangeFile->setText( tr( "Change..." ) );
    Layout7->addWidget( _ChangeFile );

    QWidget* privateLayoutWidget_3 = new QWidget( Widget36, "Layout9" );
    privateLayoutWidget_3->setGeometry( QRect( 9, 48, 354, 149 ) ); 
    Layout9 = new QGridLayout( privateLayoutWidget_3 ); 
    Layout9->setSpacing( 6 );
    Layout9->setMargin( 0 );

    qewdwedew = new QGroupBox( privateLayoutWidget_3, "qewdwedew" );
    qewdwedew->setTitle( tr( "Frame rate" ) );

    QWidget* privateLayoutWidget_4 = new QWidget( qewdwedew, "Layout8" );
    privateLayoutWidget_4->setGeometry( QRect( 49, 14, 279, 37 ) ); 
    Layout8 = new QGridLayout( privateLayoutWidget_4 ); 
    Layout8->setSpacing( 6 );
    Layout8->setMargin( 0 );

    _fps = new QSpinBox( privateLayoutWidget_4, "_fps" );
    _fps->setMinValue( 1 );
    _fps->setMaxValue( 30 );
    _fps->setValue( 25 );

    Layout8->addWidget( _fps, 0, 0 );

    TextLabel1_2 = new QLabel( privateLayoutWidget_4, "TextLabel1_2" );
    TextLabel1_2->setText( tr( "frames per second" ) );

    Layout8->addWidget( TextLabel1_2, 0, 1 );

    Layout9->addWidget( qewdwedew, 1, 0 );

    GroupBox1 = new QGroupBox( privateLayoutWidget_3, "GroupBox1" );
    GroupBox1->setTitle( tr( "Segmentation" ) );
    QToolTip::add(  GroupBox1, tr( "" ) );
    QWhatsThis::add(  GroupBox1, tr( "Segmentation allows to write more than 2 Gb of data ( limit for an AVI file ) during one session. When it's turned on, program will create a sequence of AVI files, automatically switching them when their sizes become larger than user-specified value." ) );

    QWidget* privateLayoutWidget_5 = new QWidget( GroupBox1, "Layout7" );
    privateLayoutWidget_5->setGeometry( QRect( 9, 19, 326, 46 ) ); 
    Layout7_2 = new QGridLayout( privateLayoutWidget_5 ); 
    Layout7_2->setSpacing( 6 );
    Layout7_2->setMargin( 0 );

    TextLabel10 = new QLabel( privateLayoutWidget_5, "TextLabel10" );
    TextLabel10->setText( tr( "Segment size ( Kbytes ):" ) );

    Layout7_2->addWidget( TextLabel10, 1, 0 );

    _HaveSegmented = new QCheckBox( privateLayoutWidget_5, "_HaveSegmented" );
    _HaveSegmented->setText( tr( "Write segmented file" ) );

    Layout7_2->addWidget( _HaveSegmented, 0, 0 );

    _SegmentSize = new QLineEdit( privateLayoutWidget_5, "_SegmentSize" );
    _SegmentSize->setEnabled( FALSE );

    Layout7_2->addWidget( _SegmentSize, 1, 1 );

    Layout9->addWidget( GroupBox1, 0, 0 );
    tabWidget->insertTab( Widget36, tr( "Destination file" ) );

    Widget37 = new QWidget( tabWidget, "Widget37" );

    GroupBox5 = new QGroupBox( Widget37, "GroupBox5" );
    GroupBox5->setGeometry( QRect( 10, 100, 355, 94 ) ); 
    GroupBox5->setTitle( tr( "Audio format" ) );

    QWidget* privateLayoutWidget_6 = new QWidget( GroupBox5, "Layout8" );
    privateLayoutWidget_6->setGeometry( QRect( 12, 20, 333, 64 ) ); 
    Layout8_2 = new QGridLayout( privateLayoutWidget_6 ); 
    Layout8_2->setSpacing( 6 );
    Layout8_2->setMargin( 0 );

    TextLabel18 = new QLabel( privateLayoutWidget_6, "TextLabel18" );
    TextLabel18->setText( tr( "Sample size:" ) );

    Layout8_2->addWidget( TextLabel18, 1, 2 );

    TextLabel17 = new QLabel( privateLayoutWidget_6, "TextLabel17" );
    TextLabel17->setText( tr( "Frequency:" ) );

    Layout8_2->addWidget( TextLabel17, 1, 0 );

    TextLabel19 = new QLabel( privateLayoutWidget_6, "TextLabel19" );
    TextLabel19->setText( tr( "Channels:" ) );

    Layout8_2->addWidget( TextLabel19, 0, 2 );

    _listSamp = new QComboBox( FALSE, privateLayoutWidget_6, "_listSamp" );
    _listSamp->insertItem( tr( "16 bit" ) );
    _listSamp->insertItem( tr( "8 bit" ) );
    _listSamp->setEnabled( FALSE );

    Layout8_2->addWidget( _listSamp, 1, 3 );

    _HaveAudio = new QCheckBox( privateLayoutWidget_6, "_HaveAudio" );
    _HaveAudio->setText( tr( "Capture audio" ) );

    Layout8_2->addMultiCellWidget( _HaveAudio, 0, 0, 0, 1 );

    _listFreq = new QComboBox( FALSE, privateLayoutWidget_6, "_listFreq" );
    _listFreq->insertItem( tr( "48000 Hz" ) );
    _listFreq->insertItem( tr( "44100 Hz" ) );
    _listFreq->insertItem( tr( "22050 Hz" ) );
    _listFreq->insertItem( tr( "11025 Hz" ) );
    _listFreq->setEnabled( FALSE );

    Layout8_2->addWidget( _listFreq, 1, 1 );

    _listChan = new QComboBox( FALSE, privateLayoutWidget_6, "_listChan" );
    _listChan->insertItem( tr( "Mono" ) );
    _listChan->insertItem( tr( "Stereo" ) );
    _listChan->setEnabled( FALSE );

    Layout8_2->addWidget( _listChan, 0, 3 );

    GroupBox4 = new QGroupBox( Widget37, "GroupBox4" );
    GroupBox4->setGeometry( QRect( 10, 10, 353, 89 ) ); 
    GroupBox4->setTitle( tr( "Video compression format" ) );

    QWidget* privateLayoutWidget_7 = new QWidget( GroupBox4, "Layout12" );
    privateLayoutWidget_7->setGeometry( QRect( 11, 30, 335, 41 ) ); 
    Layout12 = new QHBoxLayout( privateLayoutWidget_7 ); 
    Layout12->setSpacing( 6 );
    Layout12->setMargin( 0 );

    TextLabel15 = new QLabel( privateLayoutWidget_7, "TextLabel15" );
    TextLabel15->setText( tr( "Current format:" ) );
    TextLabel15->setFrameShape( QLabel::NoFrame );
    TextLabel15->setFrameShadow( QLabel::Plain );
    Layout12->addWidget( TextLabel15 );

    _codecName = new QLabel( privateLayoutWidget_7, "_codecName" );
    _codecName->setText( tr( "" ) );
    _codecName->setFrameShadow( QLabel::Sunken );
    _codecName->setFrameShape( QLabel::Panel );
    _codecName->setAlignment( int( QLabel::AlignCenter ) );
    Layout12->addWidget( _codecName );

    _ChangeCodec = new QPushButton( privateLayoutWidget_7, "_ChangeCodec" );
    _ChangeCodec->setText( tr( "Change..." ) );
    Layout12->addWidget( _ChangeCodec );
    tabWidget->insertTab( Widget37, tr( "File format" ) );

    Widget38 = new QWidget( tabWidget, "Widget38" );

    ButtonGroup1 = new QButtonGroup( Widget38, "ButtonGroup1" );
    ButtonGroup1->setGeometry( QRect( 13, 11, 348, 178 ) ); 
    ButtonGroup1->setTitle( tr( "Limit capture process by:" ) );

    QWidget* privateLayoutWidget_8 = new QWidget( ButtonGroup1, "Layout8" );
    privateLayoutWidget_8->setGeometry( QRect( 15, 26, 318, 139 ) ); 
    Layout8_3 = new QGridLayout( privateLayoutWidget_8 ); 
    Layout8_3->setSpacing( 6 );
    Layout8_3->setMargin( 0 );

    _chkFileSize = new QCheckBox( privateLayoutWidget_8, "_chkFileSize" );
    _chkFileSize->setText( tr( "File size" ) );

    Layout8_3->addWidget( _chkFileSize, 1, 0 );

    _timeLimit = new QLineEdit( privateLayoutWidget_8, "_timeLimit" );
    _timeLimit->setEnabled( FALSE );

    Layout8_3->addWidget( _timeLimit, 0, 1 );

    _sizeLimit = new QLineEdit( privateLayoutWidget_8, "_sizeLimit" );
    _sizeLimit->setEnabled( FALSE );

    Layout8_3->addWidget( _sizeLimit, 1, 1 );

    TextLabel1 = new QLabel( privateLayoutWidget_8, "TextLabel1" );
    TextLabel1->setText( tr( "seconds" ) );

    Layout8_3->addWidget( TextLabel1, 0, 2 );

    _chkTime = new QCheckBox( privateLayoutWidget_8, "_chkTime" );
    _chkTime->setText( tr( "Time" ) );

    Layout8_3->addWidget( _chkTime, 0, 0 );

    TextLabel2 = new QLabel( privateLayoutWidget_8, "TextLabel2" );
    TextLabel2->setText( tr( "Kbytes" ) );

    Layout8_3->addWidget( TextLabel2, 1, 2 );
    tabWidget->insertTab( Widget38, tr( "Limits" ) );

    QWidget* privateLayoutWidget_9 = new QWidget( this, "Layout10" );
    privateLayoutWidget_9->setGeometry( QRect( 17, 239, 361, 32 ) ); 
    Layout10 = new QHBoxLayout( privateLayoutWidget_9 ); 
    Layout10->setSpacing( 6 );
    Layout10->setMargin( 0 );

    buttonApply = new QPushButton( privateLayoutWidget_9, "buttonApply" );
    buttonApply->setText( tr( "&Apply" ) );
    buttonApply->setAutoDefault( TRUE );
    buttonApply->setEnabled( TRUE );
    Layout10->addWidget( buttonApply );

    buttonOk = new QPushButton( privateLayoutWidget_9, "buttonOk" );
    buttonOk->setText( tr( "&OK" ) );
    buttonOk->setAutoDefault( TRUE );
    buttonOk->setDefault( TRUE );
    Layout10->addWidget( buttonOk );

    buttonCancel = new QPushButton( privateLayoutWidget_9, "buttonCancel" );
    buttonCancel->setText( tr( "&Cancel" ) );
    buttonCancel->setAutoDefault( TRUE );
    Layout10->addWidget( buttonCancel );

    // signals and slots connections
    connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
    connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );
    connect( _HaveAudio, SIGNAL( toggled(bool) ), this, SLOT( toggle_audio(bool) ) );
    connect( _HaveSegmented, SIGNAL( toggled(bool) ), this, SLOT( toggle_segmented(bool) ) );
    connect( _ChangeFile, SIGNAL( clicked() ), this, SLOT( change_filename() ) );
    connect( _ChangeCodec, SIGNAL( clicked() ), this, SLOT( change_codec() ) );
    connect( _chkTime, SIGNAL( toggled(bool) ), this, SLOT( toggle_limittime(bool) ) );
    connect( _chkFileSize, SIGNAL( toggled(bool) ), this, SLOT( toggle_limitsize(bool) ) );
}

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

void VidcapConfigDialog::change_codec()
{
    qWarning( "VidcapConfigDialog::change_codec(): Not implemented yet!" );
}

void VidcapConfigDialog::change_filename()
{
    qWarning( "VidcapConfigDialog::change_filename(): Not implemented yet!" );
}

void VidcapConfigDialog::toggle_audio(bool)
{
    qWarning( "VidcapConfigDialog::toggle_audio(bool): Not implemented yet!" );
}

void VidcapConfigDialog::toggle_limitsize(bool)
{
    qWarning( "VidcapConfigDialog::toggle_limitsize(bool): Not implemented yet!" );
}

void VidcapConfigDialog::toggle_limittime(bool)
{
    qWarning( "VidcapConfigDialog::toggle_limittime(bool): Not implemented yet!" );
}

void VidcapConfigDialog::toggle_segmented(bool)
{
    qWarning( "VidcapConfigDialog::toggle_segmented(bool): Not implemented yet!" );
}

