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

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

#include "configWidgetUI.h"

#include <ntqvariant.h>
#include <kcolorbutton.h>
#include <kcombobox.h>
#include <klineedit.h>
#include <knuminput.h>
#include <kpushbutton.h>
#include <kurlrequester.h>
#include <tdefontrequester.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqcheckbox.h>
#include <ntqbuttongroup.h>
#include <ntqframe.h>
#include <ntqcombobox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

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

    textLabel2 = new TQLabel( groupBox1, "textLabel2" );

    groupBox1Layout->addWidget( textLabel2, 2, 0 );

    kcfg_BackColor = new KColorButton( groupBox1, "kcfg_BackColor" );

    groupBox1Layout->addWidget( kcfg_BackColor, 2, 1 );

    kcfg_Docking = new TQCheckBox( groupBox1, "kcfg_Docking" );

    groupBox1Layout->addMultiCellWidget( kcfg_Docking, 3, 3, 0, 1 );

    kcfg_TrackAnnouncement = new TQCheckBox( groupBox1, "kcfg_TrackAnnouncement" );
    kcfg_TrackAnnouncement->setEnabled( false );

    groupBox1Layout->addMultiCellWidget( kcfg_TrackAnnouncement, 4, 4, 0, 1 );
    spacer1 = new TQSpacerItem( 292, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    groupBox1Layout->addMultiCell( spacer1, 1, 2, 2, 2 );

    textLabel1 = new TQLabel( groupBox1, "textLabel1" );

    groupBox1Layout->addWidget( textLabel1, 1, 0 );

    kcfg_ledColor = new KColorButton( groupBox1, "kcfg_ledColor" );

    groupBox1Layout->addWidget( kcfg_ledColor, 1, 1 );

    kcfg_ledFont = new TDEFontRequester( groupBox1, "kcfg_ledFont" );
    TQFont kcfg_ledFont_font(  kcfg_ledFont->font() );
    kcfg_ledFont_font.setBold( true );
    kcfg_ledFont->setFont( kcfg_ledFont_font ); 

    groupBox1Layout->addMultiCellWidget( kcfg_ledFont, 0, 0, 1, 2 );

    textLabel1_2 = new TQLabel( groupBox1, "textLabel1_2" );

    groupBox1Layout->addWidget( textLabel1_2, 0, 0 );
    configWidgetUILayout->addWidget( groupBox1 );

    buttonGroup1 = new TQButtonGroup( this, "buttonGroup1" );
    buttonGroup1->setColumnLayout(0, TQt::Vertical );
    buttonGroup1->layout()->setSpacing( 6 );
    buttonGroup1->layout()->setMargin( 11 );
    buttonGroup1Layout = new TQGridLayout( buttonGroup1->layout() );
    buttonGroup1Layout->setAlignment( TQt::AlignTop );

    kcfg_SkipDelta = new KIntNumInput( buttonGroup1, "kcfg_SkipDelta" );
    kcfg_SkipDelta->setMinValue( 1 );
    kcfg_SkipDelta->setMaxValue( 1000 );

    buttonGroup1Layout->addWidget( kcfg_SkipDelta, 0, 1 );

    textLabel3 = new TQLabel( buttonGroup1, "textLabel3" );

    buttonGroup1Layout->addWidget( textLabel3, 0, 0 );

    kcfg_Autoplay = new TQCheckBox( buttonGroup1, "kcfg_Autoplay" );

    buttonGroup1Layout->addMultiCellWidget( kcfg_Autoplay, 1, 1, 0, 1 );

    kcfg_EjectOnFinish = new TQCheckBox( buttonGroup1, "kcfg_EjectOnFinish" );

    buttonGroup1Layout->addMultiCellWidget( kcfg_EjectOnFinish, 2, 2, 0, 1 );

    kcfg_StopExit = new TQCheckBox( buttonGroup1, "kcfg_StopExit" );

    buttonGroup1Layout->addMultiCellWidget( kcfg_StopExit, 3, 3, 0, 1 );
    spacer2 = new TQSpacerItem( 171, 81, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    buttonGroup1Layout->addMultiCell( spacer2, 0, 3, 2, 2 );
    configWidgetUILayout->addWidget( buttonGroup1 );

    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 );

    kcfg_cdDevice = new KURLComboRequester( groupBox3, "kcfg_cdDevice" );

    groupBox3Layout->addMultiCellWidget( kcfg_cdDevice, 0, 0, 0, 2 );

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

    groupBox3Layout->addWidget( textLabel5, 3, 0 );

    kcfg_DigitalPlayback = new TQCheckBox( groupBox3, "kcfg_DigitalPlayback" );
    kcfg_DigitalPlayback->setEnabled( true );
    kcfg_DigitalPlayback->setChecked( false );

    groupBox3Layout->addMultiCellWidget( kcfg_DigitalPlayback, 1, 1, 0, 2 );

    textLabel4 = new TQLabel( groupBox3, "textLabel4" );
    textLabel4->setIndent( 0 );

    groupBox3Layout->addMultiCellWidget( textLabel4, 2, 2, 0, 1 );

    kcfg_AudioDevice = new KURLRequester( groupBox3, "kcfg_AudioDevice" );

    groupBox3Layout->addMultiCellWidget( kcfg_AudioDevice, 3, 3, 1, 2 );

    audioSystemFrame = new TQFrame( groupBox3, "audioSystemFrame" );
    audioSystemFrame->setFrameShape( TQFrame::NoFrame );
    audioSystemFrame->setFrameShadow( TQFrame::Plain );

    groupBox3Layout->addWidget( audioSystemFrame, 2, 2 );
    configWidgetUILayout->addWidget( groupBox3 );

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

    kcfg_SelectEncoding = new TQCheckBox( groupBox9, "kcfg_SelectEncoding" );
    groupBox9Layout->addWidget( kcfg_SelectEncoding );

    kcfg_SelectedEncoding = new TQComboBox( false, groupBox9, "kcfg_SelectedEncoding" );
    kcfg_SelectedEncoding->setEnabled( true );
    kcfg_SelectedEncoding->setDuplicatesEnabled( false );
    groupBox9Layout->addWidget( kcfg_SelectedEncoding );
    configWidgetUILayout->addWidget( groupBox9 );
    spacer3 = new TQSpacerItem( 20, 45, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    configWidgetUILayout->addItem( spacer3 );
    languageChange();
    resize( TQSize(539, 605).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( kcfg_DigitalPlayback, TQ_SIGNAL( toggled(bool) ), this, TQ_SLOT( kcfg_DigitalPlayback_toggled(bool) ) );
    connect( kcfg_Docking, TQ_SIGNAL( toggled(bool) ), kcfg_TrackAnnouncement, TQ_SLOT( setEnabled(bool) ) );
    connect( kcfg_SelectEncoding, TQ_SIGNAL( toggled(bool) ), this, TQ_SLOT( kcfg_SelectEncoding_toggled(bool) ) );

    // tab order
    setTabOrder( kcfg_ledColor, kcfg_BackColor );
    setTabOrder( kcfg_BackColor, kcfg_Docking );
    setTabOrder( kcfg_Docking, kcfg_TrackAnnouncement );
    setTabOrder( kcfg_TrackAnnouncement, kcfg_SkipDelta );
    setTabOrder( kcfg_SkipDelta, kcfg_Autoplay );
    setTabOrder( kcfg_Autoplay, kcfg_EjectOnFinish );
    setTabOrder( kcfg_EjectOnFinish, kcfg_StopExit );
    setTabOrder( kcfg_StopExit, kcfg_cdDevice );
    setTabOrder( kcfg_cdDevice, kcfg_DigitalPlayback );
    setTabOrder( kcfg_DigitalPlayback, kcfg_AudioDevice );

    // buddies
    textLabel2->setBuddy( kcfg_BackColor );
    textLabel1->setBuddy( kcfg_ledColor );
    textLabel1_2->setBuddy( kcfg_ledFont );
    textLabel3->setBuddy( kcfg_SkipDelta );
    textLabel5->setBuddy( kcfg_AudioDevice );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void configWidgetUI::languageChange()
{
    groupBox1->setTitle( tr2i18n( "Interface" ) );
    textLabel2->setText( tr2i18n( "&Background color:" ) );
    kcfg_BackColor->setText( TQString::null );
    TQWhatsThis::add( kcfg_BackColor, tr2i18n( "The background color that will be used for the LCD display." ) );
    kcfg_Docking->setText( tr2i18n( "Show icon in &system tray" ) );
    TQWhatsThis::add( kcfg_Docking, tr2i18n( "When this option is selected an icon will appear in the system tray. Note that KsCD will <i>not</i> quit when the window is closed if a system tray icon is displayed. You may quit KsCD by clicking the Quit button or right-clicking on the system tray icon and selecting the appropriate entry." ) );
    kcfg_TrackAnnouncement->setText( tr2i18n( "Show &track announcement" ) );
    textLabel1->setText( tr2i18n( "&LCD color:" ) );
    kcfg_ledColor->setText( TQString::null );
    TQWhatsThis::add( kcfg_ledColor, tr2i18n( "The foreground color that will be used in the LCD display." ) );
    textLabel1_2->setText( tr2i18n( "LCD &font:" ) );
    buttonGroup1->setTitle( tr2i18n( "Play Options" ) );
    kcfg_SkipDelta->setSuffix( tr2i18n( " seconds" ) );
    kcfg_SkipDelta->setSpecialValueText( tr2i18n( "1 second" ) );
    TQWhatsThis::add( kcfg_SkipDelta, tr2i18n( "This option controls the number of seconds KsCD will skip when the skip forwards or backwards buttons are pressed." ) );
    textLabel3->setText( tr2i18n( "Skip &interval:" ) );
    kcfg_Autoplay->setText( tr2i18n( "Auto&play when CD inserted" ) );
    TQWhatsThis::add( kcfg_Autoplay, tr2i18n( "When this option is selected the CD will start playing automatically upon being inserted into the CD-ROM." ) );
    kcfg_EjectOnFinish->setText( tr2i18n( "&Eject CD when finished playing" ) );
    TQWhatsThis::add( kcfg_EjectOnFinish, tr2i18n( "When this option is selected the CD will automatically eject when it is finished." ) );
    kcfg_StopExit->setText( tr2i18n( "Stop playing CD on e&xit" ) );
    TQWhatsThis::add( kcfg_StopExit, tr2i18n( "When this option is selected the CD will automatically stop playing when quitting KsCD." ) );
    groupBox3->setTitle( tr2i18n( "CD-ROM &Device" ) );
    TQWhatsThis::add( kcfg_cdDevice, tr2i18n( "The CD-ROM device to use when playing CDs. This will typically look something like \"/dev/cdrom\". To have KsCD autodetect your CD-ROM, leave this field empty." ) );
    textLabel5->setText( tr2i18n( "Select audio de&vice:" ) );
    kcfg_DigitalPlayback->setText( tr2i18n( "&Use direct digital playback" ) );
    TQWhatsThis::add( kcfg_DigitalPlayback, tr2i18n( "When this option is selected KsCD will attempt to play the CD using direct digital playback. This option is useful if the CD-ROM is not connected directly to the sound output on the computer. Note that digital playback consumes more system resources than the normal method of playback." ) );
    textLabel4->setText( tr2i18n( "Select &audio backend:" ) );
    groupBox9->setTitle( tr2i18n( " Music Information Services " ) );
    kcfg_SelectEncoding->setText( tr2i18n( "Allow en&coding selection:" ) );
    TQWhatsThis::add( kcfg_SelectEncoding, tr2i18n( "When this option is selected, you have the ability to select encoding for the results of a CDDB request. The standard describes CDDB results as being strictly Latin1. This is not true, as non-English speaking users often use other 8-bit encodings." ) );
    kcfg_SelectedEncoding->clear();
    kcfg_SelectedEncoding->insertItem( tr2i18n( "AUTO" ) );
    kcfg_SelectedEncoding->insertItem( tr2i18n( "UTF-8" ) );
    kcfg_SelectedEncoding->insertItem( tr2i18n( "CP1250" ) );
    kcfg_SelectedEncoding->insertItem( tr2i18n( "CP1251" ) );
    kcfg_SelectedEncoding->insertItem( tr2i18n( "CP1252" ) );
    kcfg_SelectedEncoding->insertItem( tr2i18n( "CP1253" ) );
    kcfg_SelectedEncoding->insertItem( tr2i18n( "CP1254" ) );
    kcfg_SelectedEncoding->insertItem( tr2i18n( "CP1255" ) );
    kcfg_SelectedEncoding->insertItem( tr2i18n( "CP1256" ) );
    kcfg_SelectedEncoding->insertItem( tr2i18n( "CP1257" ) );
}

void configWidgetUI::kcfg_DigitalPlayback_toggled(bool)
{
    tqWarning( "configWidgetUI::kcfg_DigitalPlayback_toggled(bool): Not implemented yet" );
}

void configWidgetUI::kcfg_SelectEncoding_toggled(bool)
{
    tqWarning( "configWidgetUI::kcfg_SelectEncoding_toggled(bool): Not implemented yet" );
}

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

TQMetaObject *configWidgetUI::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_configWidgetUI( "configWidgetUI", &configWidgetUI::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* configWidgetUI::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 TQUParameter param_slot_0[] = {
	{ 0, &static_QUType_bool, 0, TQUParameter::In }
    };
    static const TQUMethod slot_0 = {"kcfg_DigitalPlayback_toggled", 1, param_slot_0 };
    static const TQUParameter param_slot_1[] = {
	{ 0, &static_QUType_bool, 0, TQUParameter::In }
    };
    static const TQUMethod slot_1 = {"kcfg_SelectEncoding_toggled", 1, param_slot_1 };
    static const TQUMethod slot_2 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "kcfg_DigitalPlayback_toggled(bool)", &slot_0, TQMetaData::Public },
	{ "kcfg_SelectEncoding_toggled(bool)", &slot_1, TQMetaData::Public },
	{ "languageChange()", &slot_2, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"configWidgetUI", parentObject,
	slot_tbl, 3,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_configWidgetUI.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool configWidgetUI::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: kcfg_DigitalPlayback_toggled((bool)static_QUType_bool.get(_o+1)); break;
    case 1: kcfg_SelectEncoding_toggled((bool)static_QUType_bool.get(_o+1)); break;
    case 2: languageChange(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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