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

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

#include "yhconfigwidget.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqtabwidget.h>
#include <ntqcheckbox.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqspinbox.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqcombobox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    tabWidget2 = new TQTabWidget( this, "tabWidget2" );

    tab = new TQWidget( tabWidget2, "tab" );
    tabLayout = new TQVBoxLayout( tab, 11, 6, "tabLayout"); 

    chkUseTooltip = new TQCheckBox( tab, "chkUseTooltip" );
    tabLayout->addWidget( chkUseTooltip );

    chkUseCovers = new TQCheckBox( tab, "chkUseCovers" );
    tabLayout->addWidget( chkUseCovers );

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

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

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

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

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

    spinPopupTimeout = new TQSpinBox( groupBox1, "spinPopupTimeout" );
    spinPopupTimeout->setMaxValue( 600 );
    spinPopupTimeout->setMinValue( 1 );
    spinPopupTimeout->setValue( 5 );

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

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

    groupBox1Layout->addMultiCellWidget( chkUsePopup, 0, 0, 0, 1 );
    tabLayout->addWidget( groupBox1 );

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

    rbStateAnim = new TQRadioButton( buttonGroup1, "rbStateAnim" );
    rbStateAnim->setEnabled( false );

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

    rbStateFlashing = new TQRadioButton( buttonGroup1, "rbStateFlashing" );

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

    rbStateStatic = new TQRadioButton( buttonGroup1, "rbStateStatic" );
    rbStateStatic->setChecked( false );

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

    rbStateNone = new TQRadioButton( buttonGroup1, "rbStateNone" );

    buttonGroup1Layout->addWidget( rbStateNone, 1, 1 );
    tabLayout->addWidget( buttonGroup1 );
    spacer1 = new TQSpacerItem( 20, 81, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    tabLayout->addItem( spacer1 );
    tabWidget2->insertTab( tab, TQString::fromLatin1("") );

    tab_2 = new TQWidget( tabWidget2, "tab_2" );
    tabLayout_2 = new TQVBoxLayout( tab_2, 11, 6, "tabLayout_2"); 

    grpMiddleMouse = new TQButtonGroup( tab_2, "grpMiddleMouse" );
    grpMiddleMouse->setColumnLayout(0, TQt::Vertical );
    grpMiddleMouse->layout()->setSpacing( 6 );
    grpMiddleMouse->layout()->setMargin( 11 );
    grpMiddleMouseLayout = new TQVBoxLayout( grpMiddleMouse->layout() );
    grpMiddleMouseLayout->setAlignment( TQt::AlignTop );

    rbHideShowPlaylist = new TQRadioButton( grpMiddleMouse, "rbHideShowPlaylist" );
    grpMiddleMouseLayout->addWidget( rbHideShowPlaylist );

    rbPlayPause = new TQRadioButton( grpMiddleMouse, "rbPlayPause" );
    grpMiddleMouseLayout->addWidget( rbPlayPause );
    tabLayout_2->addWidget( grpMiddleMouse );

    grpMwheel = new TQButtonGroup( tab_2, "grpMwheel" );
    grpMwheel->setColumnLayout(0, TQt::Vertical );
    grpMwheel->layout()->setSpacing( 6 );
    grpMwheel->layout()->setMargin( 11 );
    grpMwheelLayout = new TQVBoxLayout( grpMwheel->layout() );
    grpMwheelLayout->setAlignment( TQt::AlignTop );

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

    lblModifier = new TQLabel( grpMwheel, "lblModifier" );
    layout1->addWidget( lblModifier );

    cmbModifier = new TQComboBox( false, grpMwheel, "cmbModifier" );
    layout1->addWidget( cmbModifier );
    grpMwheelLayout->addLayout( layout1 );

    lblAction = new TQLabel( grpMwheel, "lblAction" );
    grpMwheelLayout->addWidget( lblAction );

    rbActNothing = new TQRadioButton( grpMwheel, "rbActNothing" );
    grpMwheelLayout->addWidget( rbActNothing );

    rbActVolume = new TQRadioButton( grpMwheel, "rbActVolume" );
    grpMwheelLayout->addWidget( rbActVolume );

    rbActTrack = new TQRadioButton( grpMwheel, "rbActTrack" );
    grpMwheelLayout->addWidget( rbActTrack );
    tabLayout_2->addWidget( grpMwheel );
    spacer6 = new TQSpacerItem( 20, 21, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    tabLayout_2->addItem( spacer6 );
    tabWidget2->insertTab( tab_2, TQString::fromLatin1("") );
    YHConfigWidgetLayout->addWidget( tabWidget2 );
    languageChange();
    resize( TQSize(371, 379).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( tabWidget2, chkUseTooltip );
    setTabOrder( chkUseTooltip, chkUseCovers );
    setTabOrder( chkUseCovers, chkUsePopup );
    setTabOrder( chkUsePopup, spinPopupTimeout );
    setTabOrder( spinPopupTimeout, chkPopupButtons );
    setTabOrder( chkPopupButtons, rbStateAnim );
    setTabOrder( rbStateAnim, rbStateFlashing );
    setTabOrder( rbStateFlashing, rbStateStatic );
    setTabOrder( rbStateStatic, rbStateNone );
    setTabOrder( rbStateNone, rbHideShowPlaylist );
    setTabOrder( rbHideShowPlaylist, rbPlayPause );
    setTabOrder( rbPlayPause, cmbModifier );
    setTabOrder( cmbModifier, rbActNothing );
    setTabOrder( rbActNothing, rbActVolume );
    setTabOrder( rbActVolume, rbActTrack );

    // buddies
    lblPopupTimeout->setBuddy( spinPopupTimeout );
    lblModifier->setBuddy( cmbModifier );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void YHConfigWidget::languageChange()
{
    chkUseTooltip->setText( tr2i18n( "Show a &tooltip for the current track" ) );
    chkUseCovers->setText( tr2i18n( "Show &covers in popup window and tooltip" ) );
    groupBox1->setTitle( tr2i18n( "Popup Window" ) );
    lblPopupTimeout->setText( tr2i18n( "Display popup window t&ime:" ) );
    chkPopupButtons->setText( tr2i18n( "Show &buttons in popup window" ) );
    spinPopupTimeout->setSuffix( tr2i18n( "s", "Seconds" ) );
    chkUsePopup->setText( tr2i18n( "Announce tracks with a &popup window" ) );
    buttonGroup1->setTitle( tr2i18n( "State Icon Display" ) );
    rbStateAnim->setText( tr2i18n( "&Animated" ) );
    rbStateFlashing->setText( tr2i18n( "&Flashing" ) );
    rbStateStatic->setText( tr2i18n( "&Static" ) );
    rbStateNone->setText( tr2i18n( "&None" ) );
    tabWidget2->changeTab( tab, tr2i18n( "&General" ) );
    grpMiddleMouse->setTitle( tr2i18n( "Middle Mouse Button Action" ) );
    rbHideShowPlaylist->setText( tr2i18n( "Hide / Show play&list" ) );
    rbPlayPause->setText( tr2i18n( "&Play / Pause" ) );
    grpMwheel->setTitle( tr2i18n( "Mouse &Wheel" ) );
    lblModifier->setText( tr2i18n( "&Keyboard modifier:" ) );
    lblAction->setText( tr2i18n( "Action:" ) );
    rbActNothing->setText( tr2i18n( "&Nothing" ) );
    rbActVolume->setText( tr2i18n( "Change v&olume" ) );
    rbActTrack->setText( tr2i18n( "Switch &track" ) );
    tabWidget2->changeTab( tab_2, tr2i18n( "Ad&vanced" ) );
}

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

TQMetaObject *YHConfigWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_YHConfigWidget( "YHConfigWidget", &YHConfigWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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