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

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

#include "Options4.h"

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

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

    opt_crossfade = new TQButtonGroup( this, "opt_crossfade" );
    opt_crossfade->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, opt_crossfade->sizePolicy().hasHeightForWidth() ) );
    opt_crossfade->setMinimumSize( TQSize( 0, 180 ) );
    opt_crossfade->setFrameShape( TQButtonGroup::GroupBoxPanel );
    opt_crossfade->setFrameShadow( TQButtonGroup::Sunken );
    opt_crossfade->setColumnLayout(0, TQt::Vertical );
    opt_crossfade->layout()->setSpacing( 6 );
    opt_crossfade->layout()->setMargin( 11 );
    opt_crossfadeLayout = new TQGridLayout( opt_crossfade->layout() );
    opt_crossfadeLayout->setAlignment( TQt::AlignTop );

    radioButtonNormalPlayback = new TQRadioButton( opt_crossfade, "radioButtonNormalPlayback" );
    radioButtonNormalPlayback->setChecked( true );

    opt_crossfadeLayout->addMultiCellWidget( radioButtonNormalPlayback, 0, 0, 0, 1 );

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

    trackDelayLengthLabel = new TQLabel( opt_crossfade, "trackDelayLengthLabel" );
    trackDelayLengthLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)1, 0, 0, trackDelayLengthLabel->sizePolicy().hasHeightForWidth() ) );
    trackDelayLengthLabel->setMinimumSize( TQSize( 150, 0 ) );
    layout11->addWidget( trackDelayLengthLabel );

    kcfg_TrackDelayLength = new TQSpinBox( opt_crossfade, "kcfg_TrackDelayLength" );
    kcfg_TrackDelayLength->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 0, 0, kcfg_TrackDelayLength->sizePolicy().hasHeightForWidth() ) );
    kcfg_TrackDelayLength->setMinimumSize( TQSize( 160, 0 ) );
    kcfg_TrackDelayLength->setMaxValue( 10000 );
    kcfg_TrackDelayLength->setLineStep( 100 );
    kcfg_TrackDelayLength->setValue( 0 );
    layout11->addWidget( kcfg_TrackDelayLength );

    opt_crossfadeLayout->addLayout( layout11, 1, 1 );

    kcfg_Crossfade = new TQRadioButton( opt_crossfade, "kcfg_Crossfade" );
    kcfg_Crossfade->setChecked( false );

    opt_crossfadeLayout->addMultiCellWidget( kcfg_Crossfade, 2, 2, 0, 1 );

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

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

    crossfadeLengthLabel = new TQLabel( opt_crossfade, "crossfadeLengthLabel" );
    crossfadeLengthLabel->setEnabled( false );
    crossfadeLengthLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)1, 0, 0, crossfadeLengthLabel->sizePolicy().hasHeightForWidth() ) );
    crossfadeLengthLabel->setMinimumSize( TQSize( 150, 0 ) );
    layout7->addWidget( crossfadeLengthLabel );

    crossfadeDropdownText = new TQLabel( opt_crossfade, "crossfadeDropdownText" );
    crossfadeDropdownText->setEnabled( false );
    crossfadeDropdownText->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)1, 0, 0, crossfadeDropdownText->sizePolicy().hasHeightForWidth() ) );
    crossfadeDropdownText->setMinimumSize( TQSize( 150, 0 ) );
    layout7->addWidget( crossfadeDropdownText );
    layout9->addLayout( layout7 );

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

    kcfg_CrossfadeLength = new TQSpinBox( opt_crossfade, "kcfg_CrossfadeLength" );
    kcfg_CrossfadeLength->setEnabled( false );
    kcfg_CrossfadeLength->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)4, 0, 0, kcfg_CrossfadeLength->sizePolicy().hasHeightForWidth() ) );
    kcfg_CrossfadeLength->setMinimumSize( TQSize( 50, 0 ) );
    kcfg_CrossfadeLength->setMaxValue( 99999999 );
    kcfg_CrossfadeLength->setMinValue( 100 );
    kcfg_CrossfadeLength->setLineStep( 100 );
    kcfg_CrossfadeLength->setValue( 100 );
    layout8->addWidget( kcfg_CrossfadeLength );

    kcfg_CrossfadeType = new TQComboBox( false, opt_crossfade, "kcfg_CrossfadeType" );
    kcfg_CrossfadeType->setEnabled( false );
    kcfg_CrossfadeType->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)4, 0, 0, kcfg_CrossfadeType->sizePolicy().hasHeightForWidth() ) );
    kcfg_CrossfadeType->setMinimumSize( TQSize( 50, 0 ) );
    kcfg_CrossfadeType->setDuplicatesEnabled( false );
    layout8->addWidget( kcfg_CrossfadeType );
    layout9->addLayout( layout8 );

    opt_crossfadeLayout->addLayout( layout9, 3, 1 );
    spacer76 = new TQSpacerItem( 16, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    opt_crossfadeLayout->addItem( spacer76, 3, 0 );

    Options4Layout->addWidget( opt_crossfade, 0, 0 );

    kcfg_FadeoutOnExit = new TQCheckBox( this, "kcfg_FadeoutOnExit" );

    Options4Layout->addWidget( kcfg_FadeoutOnExit, 2, 0 );

    kcfg_ResumePlayback = new TQCheckBox( this, "kcfg_ResumePlayback" );

    Options4Layout->addWidget( kcfg_ResumePlayback, 3, 0 );
    spacer2 = new TQSpacerItem( 31, 30, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    Options4Layout->addItem( spacer2, 4, 0 );

    opt_crossfade_2 = new TQButtonGroup( this, "opt_crossfade_2" );
    opt_crossfade_2->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, opt_crossfade_2->sizePolicy().hasHeightForWidth() ) );
    opt_crossfade_2->setMinimumSize( TQSize( 0, 120 ) );
    opt_crossfade_2->setFrameShape( TQButtonGroup::GroupBoxPanel );
    opt_crossfade_2->setFrameShadow( TQButtonGroup::Sunken );
    opt_crossfade_2->setColumnLayout(0, TQt::Vertical );
    opt_crossfade_2->layout()->setSpacing( 6 );
    opt_crossfade_2->layout()->setMargin( 11 );
    opt_crossfade_2Layout = new TQGridLayout( opt_crossfade_2->layout() );
    opt_crossfade_2Layout->setAlignment( TQt::AlignTop );

    radioButtonNormalPlayback_2 = new TQRadioButton( opt_crossfade_2, "radioButtonNormalPlayback_2" );
    radioButtonNormalPlayback_2->setChecked( true );

    opt_crossfade_2Layout->addMultiCellWidget( radioButtonNormalPlayback_2, 0, 0, 0, 1 );
    spacer76_2 = new TQSpacerItem( 16, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    opt_crossfade_2Layout->addItem( spacer76_2, 2, 0 );

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

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

    fadeoutLengthLabel = new TQLabel( opt_crossfade_2, "fadeoutLengthLabel" );
    fadeoutLengthLabel->setEnabled( false );
    fadeoutLengthLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)4, (TQSizePolicy::SizeType)1, 0, 0, fadeoutLengthLabel->sizePolicy().hasHeightForWidth() ) );
    fadeoutLengthLabel->setMinimumSize( TQSize( 150, 0 ) );
    layout7_2->addWidget( fadeoutLengthLabel );
    layout9_2->addLayout( layout7_2 );

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

    kcfg_FadeoutLength = new TQSpinBox( opt_crossfade_2, "kcfg_FadeoutLength" );
    kcfg_FadeoutLength->setEnabled( false );
    kcfg_FadeoutLength->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)4, 0, 0, kcfg_FadeoutLength->sizePolicy().hasHeightForWidth() ) );
    kcfg_FadeoutLength->setMinimumSize( TQSize( 50, 0 ) );
    kcfg_FadeoutLength->setMaxValue( 99999999 );
    kcfg_FadeoutLength->setMinValue( 100 );
    kcfg_FadeoutLength->setLineStep( 100 );
    kcfg_FadeoutLength->setValue( 100 );
    layout8_2->addWidget( kcfg_FadeoutLength );
    layout9_2->addLayout( layout8_2 );

    opt_crossfade_2Layout->addLayout( layout9_2, 2, 1 );

    kcfg_Fadeout = new TQRadioButton( opt_crossfade_2, "kcfg_Fadeout" );
    kcfg_Fadeout->setChecked( false );

    opt_crossfade_2Layout->addMultiCellWidget( kcfg_Fadeout, 1, 1, 0, 1 );

    Options4Layout->addWidget( opt_crossfade_2, 1, 0 );
    languageChange();
    resize( TQSize(455, 447).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( radioButtonNormalPlayback, TQ_SIGNAL( toggled(bool) ), kcfg_TrackDelayLength, TQ_SLOT( setEnabled(bool) ) );
    connect( kcfg_Crossfade, TQ_SIGNAL( toggled(bool) ), kcfg_CrossfadeLength, TQ_SLOT( setEnabled(bool) ) );
    connect( radioButtonNormalPlayback, TQ_SIGNAL( toggled(bool) ), trackDelayLengthLabel, TQ_SLOT( setEnabled(bool) ) );
    connect( kcfg_Crossfade, TQ_SIGNAL( toggled(bool) ), crossfadeLengthLabel, TQ_SLOT( setEnabled(bool) ) );
    connect( kcfg_Crossfade, TQ_SIGNAL( toggled(bool) ), crossfadeDropdownText, TQ_SLOT( setEnabled(bool) ) );
    connect( kcfg_Crossfade, TQ_SIGNAL( toggled(bool) ), kcfg_CrossfadeType, TQ_SLOT( setEnabled(bool) ) );
    connect( kcfg_Fadeout, TQ_SIGNAL( toggled(bool) ), fadeoutLengthLabel, TQ_SLOT( setEnabled(bool) ) );
    connect( kcfg_Fadeout, TQ_SIGNAL( toggled(bool) ), kcfg_FadeoutLength, TQ_SLOT( setEnabled(bool) ) );

    // buddies
    trackDelayLengthLabel->setBuddy( kcfg_TrackDelayLength );
    crossfadeLengthLabel->setBuddy( kcfg_CrossfadeLength );
    crossfadeDropdownText->setBuddy( kcfg_CrossfadeType );
    fadeoutLengthLabel->setBuddy( kcfg_FadeoutLength );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void Options4::languageChange()
{
    opt_crossfade->setTitle( tr2i18n( "&Transition" ) );
    TQWhatsThis::add( opt_crossfade, tr2i18n( "<b>Transition Behavior</b>\n"
"<p>During playback, when Amarok transitions between tracks, it can either proceed to the next track instantly (with configurable gap), or crossfade (with configurable fade period).</p>" ) );
    radioButtonNormalPlayback->setText( tr2i18n( "&No crossfading" ) );
    TQToolTip::add( radioButtonNormalPlayback, tr2i18n( "Enable normal track transition. You may insert a gap of silence between tracks." ) );
    trackDelayLengthLabel->setText( tr2i18n( "Insert &gap:" ) );
    kcfg_TrackDelayLength->setSuffix( tr2i18n( " ms" ) );
    TQToolTip::add( kcfg_TrackDelayLength, tr2i18n( "Silence between tracks, in milliseconds." ) );
    kcfg_Crossfade->setText( tr2i18n( "&Crossfading" ) );
    TQToolTip::add( kcfg_Crossfade, tr2i18n( "Enable crossfading between tracks." ) );
    crossfadeLengthLabel->setText( tr2i18n( "Crosso&ver duration:" ) );
    crossfadeDropdownText->setText( tr2i18n( "Crossfa&de:" ) );
    kcfg_CrossfadeLength->setSuffix( tr2i18n( " ms" ) );
    TQToolTip::add( kcfg_CrossfadeLength, tr2i18n( "The length of the crossfade between tracks, in milliseconds." ) );
    kcfg_CrossfadeType->clear();
    kcfg_CrossfadeType->insertItem( tr2i18n( "Always" ) );
    kcfg_CrossfadeType->insertItem( tr2i18n( "On Automatic Track Change Only" ) );
    kcfg_CrossfadeType->insertItem( tr2i18n( "On Manual Track Change Only" ) );
    TQToolTip::add( kcfg_CrossfadeType, tr2i18n( "Select when you want crossfading to occur" ) );
    TQWhatsThis::add( kcfg_CrossfadeType, tr2i18n( "Select when you want crossfading to occur" ) );
    kcfg_FadeoutOnExit->setText( tr2i18n( "Fade out on e&xit" ) );
    TQToolTip::add( kcfg_FadeoutOnExit, tr2i18n( "If checked, Amarok will fade out the music on program exit." ) );
    kcfg_ResumePlayback->setText( tr2i18n( "&Resume playback on start" ) );
    TQToolTip::add( kcfg_ResumePlayback, tr2i18n( "If checked, Amarok will<br>resume playback from where you left it the previous session -- just like a tape-player." ) );
    opt_crossfade_2->setTitle( tr2i18n( "&Fadeout" ) );
    TQWhatsThis::add( opt_crossfade_2, tr2i18n( "<b>Transition Behavior</b>\n"
"<p>During playback, when Amarok transitions between tracks, it can either proceed to the next track instantly (with configurable gap), or crossfade (with configurable fade period).</p>" ) );
    radioButtonNormalPlayback_2->setText( tr2i18n( "No &fadeout" ) );
    TQToolTip::add( radioButtonNormalPlayback_2, tr2i18n( "Disable fadeout. Music will stop immediately." ) );
    fadeoutLengthLabel->setText( tr2i18n( "Fadeout &duration:" ) );
    kcfg_FadeoutLength->setSuffix( tr2i18n( " ms" ) );
    TQToolTip::add( kcfg_FadeoutLength, tr2i18n( "The length of the fadeout, in milliseconds." ) );
    kcfg_Fadeout->setText( tr2i18n( "Fade&out" ) );
    TQToolTip::add( kcfg_Fadeout, tr2i18n( "Fade the music out when the Stop button is pressed." ) );
}

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

TQMetaObject *Options4::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_Options4( "Options4", &Options4::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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