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

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

#include "xineconfigbase.h"

#include <ntqvariant.h>
#include <kcombobox.h>
#include <knuminput.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqgroupbox.h>
#include <ntqlineedit.h>
#include <ntqcombobox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a XineConfigBase as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
XineConfigBase::XineConfigBase( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "XineConfigBase" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth() ) );
    XineConfigBaseLayout = new TQVBoxLayout( this, 0, 6, "XineConfigBaseLayout"); 

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

    xineLogo = new TQLabel( this, "xineLogo" );
    xineLogo->setPaletteForegroundColor( TQColor( 0, 0, 0 ) );
    xineLogo->setPaletteBackgroundColor( TQColor( 255, 255, 255 ) );
    xineLogo->setFrameShape( TQLabel::StyledPanel );
    xineLogo->setFrameShadow( TQLabel::Raised );
    xineLogo->setMargin( 1 );
    xineLogo->setAlignment( int( TQLabel::AlignCenter ) );
    layout11->addWidget( xineLogo );

    layout10 = new TQVBoxLayout( 0, 0, 6, "layout10"); 

    layout10_2 = new TQVBoxLayout( 0, 0, 6, "layout10_2"); 

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

    textLabel2 = new TQLabel( this, "textLabel2" );
    layout2->addWidget( textLabel2 );

    deviceComboBox = new KComboBox( false, this, "deviceComboBox" );
    layout2->addWidget( deviceComboBox );
    layout10_2->addLayout( layout2 );

    textLabel3 = new TQLabel( this, "textLabel3" );
    textLabel3->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, textLabel3->sizePolicy().hasHeightForWidth() ) );
    textLabel3->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) );
    layout10_2->addWidget( textLabel3 );

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

    textLabel2_3 = new TQLabel( alsaGroupBox, "textLabel2_3" );

    alsaGroupBoxLayout->addWidget( textLabel2_3, 0, 0 );

    textLabel3_3 = new TQLabel( alsaGroupBox, "textLabel3_3" );

    alsaGroupBoxLayout->addWidget( textLabel3_3, 1, 0 );

    textLabel4_2 = new TQLabel( alsaGroupBox, "textLabel4_2" );

    alsaGroupBoxLayout->addWidget( textLabel4_2, 0, 2 );

    chan5Label = new TQLabel( alsaGroupBox, "chan5Label" );

    alsaGroupBoxLayout->addWidget( chan5Label, 1, 2 );

    monoLineEdit = new TQLineEdit( alsaGroupBox, "monoLineEdit" );

    alsaGroupBoxLayout->addWidget( monoLineEdit, 0, 1 );

    stereoLineEdit = new TQLineEdit( alsaGroupBox, "stereoLineEdit" );

    alsaGroupBoxLayout->addWidget( stereoLineEdit, 1, 1 );

    chan4LineEdit = new TQLineEdit( alsaGroupBox, "chan4LineEdit" );

    alsaGroupBoxLayout->addWidget( chan4LineEdit, 0, 3 );

    chan5LineEdit = new TQLineEdit( alsaGroupBox, "chan5LineEdit" );

    alsaGroupBoxLayout->addWidget( chan5LineEdit, 1, 3 );
    layout10_2->addWidget( alsaGroupBox );

    ossGroupBox = new TQGroupBox( this, "ossGroupBox" );
    ossGroupBox->setColumnLayout(0, TQt::Vertical );
    ossGroupBox->layout()->setSpacing( 6 );
    ossGroupBox->layout()->setMargin( 11 );
    ossGroupBoxLayout = new TQHBoxLayout( ossGroupBox->layout() );
    ossGroupBoxLayout->setAlignment( TQt::AlignTop );

    textLabel1 = new TQLabel( ossGroupBox, "textLabel1" );
    ossGroupBoxLayout->addWidget( textLabel1 );

    ossDeviceComboBox = new TQComboBox( false, ossGroupBox, "ossDeviceComboBox" );
    ossGroupBoxLayout->addWidget( ossDeviceComboBox );
    layout10_2->addWidget( ossGroupBox );

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

    textLabel1_2 = new TQLabel( this, "textLabel1_2" );
    layout5->addWidget( textLabel1_2 );

    speakerComboBox = new TQComboBox( false, this, "speakerComboBox" );
    layout5->addWidget( speakerComboBox );
    layout10_2->addLayout( layout5 );

    groupBox1 = new TQGroupBox( this, "groupBox1" );
    groupBox1->setColumnLayout(0, TQt::Vertical );
    groupBox1->layout()->setSpacing( 6 );
    groupBox1->layout()->setMargin( 11 );
    groupBox1Layout = new TQVBoxLayout( groupBox1->layout() );
    groupBox1Layout->setAlignment( TQt::AlignTop );

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

    textLabel2_2 = new TQLabel( groupBox1, "textLabel2_2" );
    layout4->addWidget( textLabel2_2 );

    hostLineEdit = new TQLineEdit( groupBox1, "hostLineEdit" );
    layout4->addWidget( hostLineEdit );

    portIntBox = new KIntSpinBox( groupBox1, "portIntBox" );
    portIntBox->setMaxValue( 65534 );
    portIntBox->setMinValue( 1 );
    portIntBox->setValue( 60000 );
    layout4->addWidget( portIntBox );
    groupBox1Layout->addLayout( layout4 );

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

    textLabel3_2 = new TQLabel( groupBox1, "textLabel3_2" );
    layout2_2->addWidget( textLabel3_2 );

    userLineEdit = new TQLineEdit( groupBox1, "userLineEdit" );
    layout2_2->addWidget( userLineEdit );

    textLabel4 = new TQLabel( groupBox1, "textLabel4" );
    layout2_2->addWidget( textLabel4 );

    passLineEdit = new TQLineEdit( groupBox1, "passLineEdit" );
    passLineEdit->setEchoMode( TQLineEdit::Password );
    layout2_2->addWidget( passLineEdit );
    groupBox1Layout->addLayout( layout2_2 );
    layout10_2->addWidget( groupBox1 );

    audiocdGroupBox = new TQGroupBox( this, "audiocdGroupBox" );
    audiocdGroupBox->setColumnLayout(0, TQt::Vertical );
    audiocdGroupBox->layout()->setSpacing( 6 );
    audiocdGroupBox->layout()->setMargin( 11 );
    audiocdGroupBoxLayout = new TQHBoxLayout( audiocdGroupBox->layout() );
    audiocdGroupBoxLayout->setAlignment( TQt::AlignTop );

    layout11_2 = new TQVBoxLayout( 0, 0, 6, "layout11_2"); 

    textLabel2_3_2 = new TQLabel( audiocdGroupBox, "textLabel2_3_2" );
    layout11_2->addWidget( textLabel2_3_2 );

    textLabel2_2_2 = new TQLabel( audiocdGroupBox, "textLabel2_2_2" );
    layout11_2->addWidget( textLabel2_2_2 );

    textLabel2_3_2_2 = new TQLabel( audiocdGroupBox, "textLabel2_3_2_2" );
    layout11_2->addWidget( textLabel2_3_2_2 );
    audiocdGroupBoxLayout->addLayout( layout11_2 );

    layout12 = new TQVBoxLayout( 0, 0, 6, "layout12"); 

    audiocd_device = new TQLineEdit( audiocdGroupBox, "audiocd_device" );
    layout12->addWidget( audiocd_device );

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

    cddb_server = new TQLineEdit( audiocdGroupBox, "cddb_server" );
    layout10_3->addWidget( cddb_server );

    cddb_port = new KIntSpinBox( audiocdGroupBox, "cddb_port" );
    cddb_port->setMaxValue( 65534 );
    cddb_port->setMinValue( 1 );
    cddb_port->setValue( 60000 );
    layout10_3->addWidget( cddb_port );
    layout12->addLayout( layout10_3 );

    cddb_cache_dir = new TQLineEdit( audiocdGroupBox, "cddb_cache_dir" );
    layout12->addWidget( cddb_cache_dir );
    audiocdGroupBoxLayout->addLayout( layout12 );
    layout10_2->addWidget( audiocdGroupBox );
    layout10->addLayout( layout10_2 );
    spacer3 = new TQSpacerItem( 20, 16, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    layout10->addItem( spacer3 );
    layout11->addLayout( layout10 );
    XineConfigBaseLayout->addLayout( layout11 );
    languageChange();
    resize( TQSize(437, 458).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // buddies
    textLabel2->setBuddy( deviceComboBox );
    textLabel2_3->setBuddy( monoLineEdit );
    textLabel3_3->setBuddy( stereoLineEdit );
    textLabel4_2->setBuddy( chan4LineEdit );
    chan5Label->setBuddy( chan5LineEdit );
    textLabel1->setBuddy( ossDeviceComboBox );
    textLabel1_2->setBuddy( speakerComboBox );
    textLabel2_2->setBuddy( hostLineEdit );
    textLabel3_2->setBuddy( userLineEdit );
    textLabel4->setBuddy( passLineEdit );
    textLabel2_3_2->setBuddy( monoLineEdit );
    textLabel2_2_2->setBuddy( hostLineEdit );
    textLabel2_3_2_2->setBuddy( monoLineEdit );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void XineConfigBase::languageChange()
{
    setCaption( tr2i18n( "Xine Configure" ) );
    xineLogo->setText( TQString::null );
    textLabel2->setText( tr2i18n( "&Output plugin:" ) );
    textLabel3->setText( tr2i18n( "Sound device may be modified after the output plugin has been changed to ALSA or OSS." ) );
    alsaGroupBox->setTitle( tr2i18n( "ALSA Device Configuration" ) );
    textLabel2_3->setText( tr2i18n( "&Mono:" ) );
    textLabel3_3->setText( tr2i18n( "&Stereo:" ) );
    textLabel4_2->setText( tr2i18n( "&4 Channels:" ) );
    chan5Label->setText( tr2i18n( "&6 Channels:" ) );
    ossGroupBox->setTitle( tr2i18n( "OSS Device Configuration" ) );
    textLabel1->setText( tr2i18n( "&Device:" ) );
    textLabel1_2->setText( tr2i18n( "Speaker &arrangement:" ) );
    groupBox1->setTitle( tr2i18n( "HTTP Proxy for Streaming" ) );
    textLabel2_2->setText( tr2i18n( "&Host:" ) );
    textLabel3_2->setText( tr2i18n( "&User:" ) );
    textLabel4->setText( tr2i18n( "&Password:" ) );
    audiocdGroupBox->setTitle( tr2i18n( "Audio CD Configuration" ) );
    textLabel2_3_2->setText( tr2i18n( "Default device:" ) );
    textLabel2_2_2->setText( tr2i18n( "CDDB Server:" ) );
    textLabel2_3_2_2->setText( tr2i18n( "CDDB Cache dir:" ) );
    audiocd_device->setText( TQString::null );
    cddb_cache_dir->setText( TQString::null );
}

/****************************************************************************
** XineConfigBase meta object code from reading C++ file 'xineconfigbase.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 "xineconfigbase.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 *XineConfigBase::className() const
{
    return "XineConfigBase";
}

TQMetaObject *XineConfigBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_XineConfigBase( "XineConfigBase", &XineConfigBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* XineConfigBase::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(
	"XineConfigBase", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_XineConfigBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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