/****************************************************************************
** Form implementation generated from reading ui file 'AudioDialog.ui'
**
** Created: Fri Sep 15 16:55:56 2000
**      by:  The User Interface Compiler (uic)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "AudioDialogData.h"

#include <qbuttongroup.h>
#include <qcombobox.h>
#include <qgroupbox.h>
#include <qradiobutton.h>
#include <qlayout.h>
#include <qvariant.h>
#include <qtooltip.h>
#include <qwhatsthis.h>

/* 
 *  Constructs a AudioDialogData 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.
 */
AudioDialogData::AudioDialogData( QWidget* parent,  const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "AudioDialogData" );
    resize( 290, 155 ); 
    setMaximumSize( QSize( 290, 155 ) );
    setCaption( tr( "Audio configuration"  ) );
    setFocusPolicy( QDialog::NoFocus );

    GroupBox1 = new QGroupBox( this, "GroupBox1" );
    GroupBox1->setGeometry( QRect( 70, 90, 151, 51 ) ); 
    GroupBox1->setTitle( tr( "Frequency"  ) );
    GroupBox1->setFrameShadow( QGroupBox::Sunken );
    GroupBox1->setFrameShape( QGroupBox::Box );

    frequencyBox = new QComboBox( FALSE, GroupBox1, "frequencyBox" );
    frequencyBox->insertItem( tr( "8000" ) );
    frequencyBox->insertItem( tr( "11025" ) );
    frequencyBox->insertItem( tr( "16500" ) );
    frequencyBox->insertItem( tr( "22050" ) );
    frequencyBox->insertItem( tr( "27500" ) );
    frequencyBox->insertItem( tr( "32000" ) );
    frequencyBox->insertItem( tr( "37500" ) );
    frequencyBox->insertItem( tr( "44100" ) );
    frequencyBox->insertItem( tr( "48000" ) );
    frequencyBox->setGeometry( QRect( 10, 20, 131, 21 ) ); 
    frequencyBox->setCurrentItem( 3 );
    frequencyBox->setFocusPolicy( QComboBox::TabFocus );

    bitsGrp = new QButtonGroup( this, "bitsGrp" );
    bitsGrp->setGeometry( QRect( 10, 10, 130, 70 ) ); 
    bitsGrp->setTitle( tr( "Sample precision"  ) );
    bitsGrp->setExclusive( TRUE );

    bit16Btn = new QRadioButton( bitsGrp, "bit16Btn" );
    bit16Btn->setGeometry( QRect( 10, 40, 106, 19 ) ); 
    bit16Btn->setText( tr( "16-bit"  ) );

    bit8Btn = new QRadioButton( bitsGrp, "bit8Btn" );
    bit8Btn->setGeometry( QRect( 10, 20, 106, 19 ) ); 
    bit8Btn->setText( tr( "8-bit"  ) );

    channelsGrp = new QButtonGroup( this, "channelsGrp" );
    channelsGrp->setGeometry( QRect( 150, 10, 130, 70 ) ); 
    channelsGrp->setTitle( tr( "Channels"  ) );
    channelsGrp->setExclusive( TRUE );

    monoBtn = new QRadioButton( channelsGrp, "monoBtn" );
    monoBtn->setGeometry( QRect( 10, 20, 56, 19 ) ); 
    monoBtn->setText( tr( "Mono"  ) );

    stereoBtn = new QRadioButton( channelsGrp, "stereoBtn" );
    stereoBtn->setGeometry( QRect( 10, 40, 56, 19 ) ); 
    stereoBtn->setText( tr( "Stereo"  ) );

    // signals and slots connections
    connect( bitsGrp, SIGNAL( clicked(int) ), this, SLOT( setBitsPerSample(int) ) );
    connect( channelsGrp, SIGNAL( clicked(int) ), this, SLOT( setChannels(int) ) );
    connect( frequencyBox, SIGNAL( activated(int) ), this, SLOT( setFrequency(int) ) );

    // tab order
    setTabOrder( bit8Btn, bit16Btn );
    setTabOrder( bit16Btn, monoBtn );
    setTabOrder( monoBtn, stereoBtn );
    setTabOrder( stereoBtn, frequencyBox );
}

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

void AudioDialogData::setBitsPerSample(int)
{
    qWarning( "AudioDialogData::setBitsPerSample(int): Not implemented yet!" );
}

void AudioDialogData::setChannels(int)
{
    qWarning( "AudioDialogData::setChannels(int): Not implemented yet!" );
}

void AudioDialogData::setFrequency(int)
{
    qWarning( "AudioDialogData::setFrequency(int): Not implemented yet!" );
}

