#include <kdialog.h>
#include <klocale.h>
/****************************************************************************
** Form implementation generated from reading ui file '/usr/src/ports/kdebase3/kdebase3-3.5.10-11.x86_64/src/kdebase-3.5.10/kcontrol/arts/hardwaretab.ui'
**
** Created by User Interface Compiler
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "hardwaretab.h"

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

/*
 *  Constructs a hardwareTab as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
hardwareTab::hardwareTab( QWidget* parent, const char* name, WFlags fl )
    : QWidget( parent, name, fl )
{
    if ( !name )
	setName( "hardwareTab" );
    hardwareTabLayout = new QVBoxLayout( this, 11, 6, "hardwareTabLayout"); 

    groupBox4 = new QGroupBox( this, "groupBox4" );
    groupBox4->setFrameShape( QGroupBox::GroupBoxPanel );
    groupBox4->setFrameShadow( QGroupBox::Sunken );
    groupBox4->setColumnLayout(0, Qt::Vertical );
    groupBox4->layout()->setSpacing( 6 );
    groupBox4->layout()->setMargin( 11 );
    groupBox4Layout = new QGridLayout( groupBox4->layout() );
    groupBox4Layout->setAlignment( Qt::AlignTop );

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

    textLabel3_2 = new QLabel( groupBox4, "textLabel3_2" );
    textLabel3_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)5, 0, 0, textLabel3_2->sizePolicy().hasHeightForWidth() ) );
    layout57->addWidget( textLabel3_2 );

    audioIO = new QComboBox( FALSE, groupBox4, "audioIO" );
    audioIO->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, audioIO->sizePolicy().hasHeightForWidth() ) );
    layout57->addWidget( audioIO );

    groupBox4Layout->addMultiCellLayout( layout57, 0, 0, 0, 1 );

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

    fullDuplex = new QCheckBox( groupBox4, "fullDuplex" );
    fullDuplex->setChecked( TRUE );
    layout31->addWidget( fullDuplex );

    groupBox4Layout->addMultiCellLayout( layout31, 1, 1, 0, 1 );

    customOptions = new QCheckBox( groupBox4, "customOptions" );

    groupBox4Layout->addWidget( customOptions, 5, 0 );

    customDevice = new QCheckBox( groupBox4, "customDevice" );

    groupBox4Layout->addWidget( customDevice, 4, 0 );

    layout4 = new QHBoxLayout( 0, 0, 6, "layout4"); 
    spacer2 = new QSpacerItem( 20, 20, QSizePolicy::Fixed, QSizePolicy::Minimum );
    layout4->addItem( spacer2 );

    textLabel2 = new QLabel( groupBox4, "textLabel2" );
    layout4->addWidget( textLabel2 );

    soundQuality = new QComboBox( FALSE, groupBox4, "soundQuality" );
    soundQuality->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, soundQuality->sizePolicy().hasHeightForWidth() ) );
    layout4->addWidget( soundQuality );
    spacer3 = new QSpacerItem( 0, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    layout4->addItem( spacer3 );

    groupBox4Layout->addMultiCellLayout( layout4, 3, 3, 0, 1 );

    customRate = new QCheckBox( groupBox4, "customRate" );

    groupBox4Layout->addWidget( customRate, 2, 0 );

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

    samplingRate = new QSpinBox( groupBox4, "samplingRate" );
    samplingRate->setEnabled( TRUE );
    samplingRate->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)0, 0, 0, samplingRate->sizePolicy().hasHeightForWidth() ) );
    samplingRate->setMaxValue( 99999 );
    samplingRate->setLineStep( 10 );
    samplingRate->setValue( 44100 );
    layout6->addWidget( samplingRate );
    spacer4 = new QSpacerItem( 0, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    layout6->addItem( spacer4 );

    groupBox4Layout->addLayout( layout6, 2, 1 );

    addOptions = new QLineEdit( groupBox4, "addOptions" );
    addOptions->setEnabled( FALSE );

    groupBox4Layout->addWidget( addOptions, 5, 1 );

    deviceName = new QLineEdit( groupBox4, "deviceName" );
    deviceName->setEnabled( FALSE );

    groupBox4Layout->addWidget( deviceName, 4, 1 );
    hardwareTabLayout->addWidget( groupBox4 );

    groupBox3 = new QGroupBox( this, "groupBox3" );
    groupBox3->setColumnLayout(0, Qt::Vertical );
    groupBox3->layout()->setSpacing( 6 );
    groupBox3->layout()->setMargin( 11 );
    groupBox3Layout = new QGridLayout( groupBox3->layout() );
    groupBox3Layout->setAlignment( Qt::AlignTop );

    midiUseMapper = new QCheckBox( groupBox3, "midiUseMapper" );

    groupBox3Layout->addWidget( midiUseMapper, 1, 0 );

    textLabel4 = new QLabel( groupBox3, "textLabel4" );

    groupBox3Layout->addWidget( textLabel4, 0, 0 );

    midiDevice = new QComboBox( FALSE, groupBox3, "midiDevice" );
    midiDevice->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, midiDevice->sizePolicy().hasHeightForWidth() ) );

    groupBox3Layout->addWidget( midiDevice, 0, 1 );

    midiMapper = new KURLRequester( groupBox3, "midiMapper" );
    midiMapper->setEnabled( FALSE );

    groupBox3Layout->addWidget( midiMapper, 1, 1 );
    hardwareTabLayout->addWidget( groupBox3 );
    spacer17 = new QSpacerItem( 20, 60, QSizePolicy::Minimum, QSizePolicy::Expanding );
    hardwareTabLayout->addItem( spacer17 );
    languageChange();
    resize( QSize(372, 357).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // buddies
    textLabel3_2->setBuddy( audioIO );
    textLabel2->setBuddy( soundQuality );
    textLabel4->setBuddy( deviceName );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void hardwareTab::languageChange()
{
    groupBox4->setTitle( tr2i18n( "Select && Configure your Audio Device" ) );
    textLabel3_2->setText( tr2i18n( "&Select the audio device:" ) );
    fullDuplex->setText( tr2i18n( "&Full duplex" ) );
    QWhatsThis::add( fullDuplex, tr2i18n( "This enables the soundserver to record and play sound at the same time. If you use applications like Internet telephony, voice recognition or similar, you probably want this." ) );
    customOptions->setText( tr2i18n( "Use other custom &options:" ) );
    customDevice->setText( tr2i18n( "Override &device location:" ) );
    textLabel2->setText( tr2i18n( "&Quality:" ) );
    soundQuality->clear();
    soundQuality->insertItem( tr2i18n( "Default" ) );
    soundQuality->insertItem( tr2i18n( "16 Bits (high)" ) );
    soundQuality->insertItem( tr2i18n( "8 Bits (low)" ) );
    customRate->setText( tr2i18n( "Use &custom sampling rate:" ) );
    samplingRate->setSuffix( tr2i18n( " Hz " ) );
    deviceName->setText( tr2i18n( "/dev/dsp" ) );
    groupBox3->setTitle( tr2i18n( "Select your MIDI Device" ) );
    midiUseMapper->setText( tr2i18n( "Use MIDI ma&pper:" ) );
    textLabel4->setText( tr2i18n( "Select the &MIDI device:" ) );
}

#include "hardwaretab.moc"
