#include <kdialog.h>
#include <tdelocale.h>

/****************************************************************************
** Form implementation generated from reading ui file 'hardwaretab.ui'
**
** Created by: The TQt user interface compiler (TQt 3.5.0)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "hardwaretab.h"

#include <ntqvariant.h>
#include <kurlrequester.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqcombobox.h>
#include <ntqcheckbox.h>
#include <ntqspinbox.h>
#include <ntqlineedit.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

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

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

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

    audioIO = new TQComboBox( false, groupBox4, "audioIO" );
    audioIO->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, audioIO->sizePolicy().hasHeightForWidth() ) );
    layout57->addWidget( audioIO );

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

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

    fullDuplex = new TQCheckBox( groupBox4, "fullDuplex" );
    fullDuplex->setChecked( true );
    layout31->addWidget( fullDuplex );

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

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

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

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

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

    layout4 = new TQHBoxLayout( 0, 0, 6, "layout4"); 
    spacer2 = new TQSpacerItem( 20, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout4->addItem( spacer2 );

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

    soundQuality = new TQComboBox( false, groupBox4, "soundQuality" );
    soundQuality->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, soundQuality->sizePolicy().hasHeightForWidth() ) );
    layout4->addWidget( soundQuality );
    spacer3 = new TQSpacerItem( 0, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout4->addItem( spacer3 );

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

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

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

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

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

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

    addOptions = new TQLineEdit( groupBox4, "addOptions" );
    addOptions->setEnabled( false );

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

    deviceName = new TQLineEdit( groupBox4, "deviceName" );
    deviceName->setEnabled( false );

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

    groupBox3 = new TQGroupBox( this, "groupBox3" );
    groupBox3->setColumnLayout(0, TQt::Vertical );
    groupBox3->layout()->setSpacing( 6 );
    groupBox3->layout()->setMargin( 11 );
    groupBox3Layout = new TQGridLayout( groupBox3->layout() );
    groupBox3Layout->setAlignment( TQt::AlignTop );

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

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

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

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

    midiDevice = new TQComboBox( false, groupBox3, "midiDevice" );
    midiDevice->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::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 TQSpacerItem( 20, 60, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    hardwareTabLayout->addItem( spacer17 );
    languageChange();
    resize( TQSize(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, TQt 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" ) );
    TQWhatsThis::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:" ) );
}

/****************************************************************************
** hardwareTab meta object code from reading C++ file 'hardwaretab.h'
**
** Created by: The TQt Meta Object Compiler version 26 (TQt 3.5.0)
** WARNING! All changes made in this file will be lost!
*****************************************************************************/

#undef TQT_NO_COMPAT
#include "hardwaretab.h"
#include <ntqmetaobject.h>
#include <ntqapplication.h>

#include <private/qucomextra_p.h>
#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26)
#error "This file was generated using the moc from 3.5.0. It"
#error "cannot be used with the include files from this version of TQt."
#error "(The moc has changed too much.)"
#endif

const char *hardwareTab::className() const
{
    return "hardwareTab";
}

TQMetaObject *hardwareTab::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_hardwareTab( "hardwareTab", &hardwareTab::staticMetaObject );

#ifndef TQT_NO_TRANSLATION
TQString hardwareTab::tr( const char *s, const char *c )
{
    if ( tqApp )
	return tqApp->translate( "hardwareTab", s, c, TQApplication::DefaultCodec );
    else
	return TQString::fromLatin1( s );
}
#ifndef TQT_NO_TRANSLATION_UTF8
TQString hardwareTab::trUtf8( const char *s, const char *c )
{
    if ( tqApp )
	return tqApp->translate( "hardwareTab", s, c, TQApplication::UnicodeUTF8 );
    else
	return TQString::fromUtf8( s );
}
#endif // TQT_NO_TRANSLATION_UTF8

#endif // TQT_NO_TRANSLATION

TQMetaObject* hardwareTab::staticMetaObject()
{
    if ( metaObj ) {
	return metaObj;
}
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->lock();
    if ( metaObj ) {
	if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
	return metaObj;
    }
#endif // TQT_THREAD_SUPPORT
    TQMetaObject* parentObject = TQWidget::staticMetaObject();
    static const TQUMethod slot_0 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"hardwareTab", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_hardwareTab.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

void* hardwareTab::tqt_cast( const char* clname )
{
    if ( !qstrcmp( clname, "hardwareTab" ) )
	return this;
    return TQWidget::tqt_cast( clname );
}

bool hardwareTab::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: languageChange(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

bool hardwareTab::tqt_emit( int _id, TQUObject* _o )
{
    return TQWidget::tqt_emit(_id,_o);
}
#ifndef TQT_NO_PROPERTIES

bool hardwareTab::tqt_property( int id, int f, TQVariant* v)
{
    return TQWidget::tqt_property( id, f, v);
}

bool hardwareTab::tqt_static_property( TQObject* , int , int , TQVariant* ){ return false; }
#endif // TQT_NO_PROPERTIES
