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

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

#include "base_k3boggvorbisencodersettingswidget.h"

#include <ntqvariant.h>
#include <knuminput.h>
#include <ntqpushbutton.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqlabel.h>
#include <ntqframe.h>
#include <ntqslider.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

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

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

    m_radioQualityLevel = new TQRadioButton( buttonGroup1, "m_radioQualityLevel" );
    m_radioQualityLevel->setChecked( true );
    layout7->addWidget( m_radioQualityLevel );

    m_labelQualityLevel = new TQLabel( buttonGroup1, "m_labelQualityLevel" );
    TQFont m_labelQualityLevel_font(  m_labelQualityLevel->font() );
    m_labelQualityLevel_font.setBold( true );
    m_labelQualityLevel->setFont( m_labelQualityLevel_font ); 
    m_labelQualityLevel->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
    layout7->addWidget( m_labelQualityLevel );
    buttonGroup1Layout->addLayout( layout7 );

    frame6 = new TQFrame( buttonGroup1, "frame6" );
    frame6->setFrameShape( TQFrame::NoFrame );
    frame6->setFrameShadow( TQFrame::Plain );
    frame6Layout = new TQHBoxLayout( frame6, 0, 6, "frame6Layout"); 
    spacer2_2 = new TQSpacerItem( 20, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    frame6Layout->addItem( spacer2_2 );

    layout8 = new TQGridLayout( 0, 1, 1, 0, 6, "layout8"); 

    m_slideQualityLevel = new TQSlider( frame6, "m_slideQualityLevel" );
    m_slideQualityLevel->setMinValue( -1 );
    m_slideQualityLevel->setMaxValue( 10 );
    m_slideQualityLevel->setPageStep( 3 );
    m_slideQualityLevel->setValue( 3 );
    m_slideQualityLevel->setOrientation( TQSlider::Horizontal );

    layout8->addMultiCellWidget( m_slideQualityLevel, 0, 0, 0, 1 );

    textLabel4 = new TQLabel( frame6, "textLabel4" );
    TQFont textLabel4_font(  textLabel4->font() );
    textLabel4_font.setItalic( true );
    textLabel4->setFont( textLabel4_font ); 
    textLabel4->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );

    layout8->addWidget( textLabel4, 1, 1 );

    textLabel3_2 = new TQLabel( frame6, "textLabel3_2" );
    TQFont textLabel3_2_font(  textLabel3_2->font() );
    textLabel3_2_font.setItalic( true );
    textLabel3_2->setFont( textLabel3_2_font ); 

    layout8->addWidget( textLabel3_2, 1, 0 );
    frame6Layout->addLayout( layout8 );
    buttonGroup1Layout->addWidget( frame6 );
    spacer9 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Fixed );
    buttonGroup1Layout->addItem( spacer9 );

    m_radioManual = new TQRadioButton( buttonGroup1, "m_radioManual" );
    buttonGroup1Layout->addWidget( m_radioManual );

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

    frame3 = new TQFrame( buttonGroup1, "frame3" );
    frame3->setEnabled( false );
    frame3->setFrameShape( TQFrame::NoFrame );
    frame3->setFrameShadow( TQFrame::Raised );
    frame3Layout = new TQGridLayout( frame3, 1, 1, 0, 6, "frame3Layout"); 

    m_checkBitrateUpper = new TQCheckBox( frame3, "m_checkBitrateUpper" );

    frame3Layout->addWidget( m_checkBitrateUpper, 0, 0 );

    m_checkBitrateLower = new TQCheckBox( frame3, "m_checkBitrateLower" );

    frame3Layout->addWidget( m_checkBitrateLower, 2, 0 );

    m_inputBitrateUpper = new KIntNumInput( frame3, "m_inputBitrateUpper" );
    m_inputBitrateUpper->setEnabled( false );
    m_inputBitrateUpper->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, m_inputBitrateUpper->sizePolicy().hasHeightForWidth() ) );

    frame3Layout->addWidget( m_inputBitrateUpper, 0, 1 );

    m_inputBitrateNominal = new KIntNumInput( frame3, "m_inputBitrateNominal" );
    m_inputBitrateNominal->setEnabled( false );
    m_inputBitrateNominal->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, m_inputBitrateNominal->sizePolicy().hasHeightForWidth() ) );

    frame3Layout->addWidget( m_inputBitrateNominal, 1, 1 );

    m_inputBitrateLower = new KIntNumInput( frame3, "m_inputBitrateLower" );
    m_inputBitrateLower->setEnabled( false );

    frame3Layout->addWidget( m_inputBitrateLower, 2, 1 );

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

    frame3Layout->addWidget( textLabel2, 1, 2 );

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

    frame3Layout->addWidget( textLabel3, 2, 2 );

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

    frame3Layout->addWidget( textLabel1, 0, 2 );

    m_checkBitrateNominal = new TQCheckBox( frame3, "m_checkBitrateNominal" );
    m_checkBitrateNominal->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 1, 0, m_checkBitrateNominal->sizePolicy().hasHeightForWidth() ) );

    frame3Layout->addWidget( m_checkBitrateNominal, 1, 0 );
    layout6->addWidget( frame3 );
    buttonGroup1Layout->addLayout( layout6 );
    Form1Layout->addWidget( buttonGroup1 );
    languageChange();
    resize( TQSize(335, 271).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( m_radioManual, TQ_SIGNAL( toggled(bool) ), frame3, TQ_SLOT( setEnabled(bool) ) );
    connect( m_checkBitrateUpper, TQ_SIGNAL( toggled(bool) ), m_inputBitrateUpper, TQ_SLOT( setEnabled(bool) ) );
    connect( m_checkBitrateNominal, TQ_SIGNAL( toggled(bool) ), m_inputBitrateNominal, TQ_SLOT( setEnabled(bool) ) );
    connect( m_checkBitrateLower, TQ_SIGNAL( toggled(bool) ), m_inputBitrateLower, TQ_SLOT( setEnabled(bool) ) );
    connect( m_radioQualityLevel, TQ_SIGNAL( toggled(bool) ), m_labelQualityLevel, TQ_SLOT( setEnabled(bool) ) );
    connect( m_radioQualityLevel, TQ_SIGNAL( toggled(bool) ), frame6, TQ_SLOT( setEnabled(bool) ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void base_K3bOggVorbisEncoderSettingsWidget::languageChange()
{
    buttonGroup1->setTitle( tr2i18n( "File Quality" ) );
    m_radioQualityLevel->setText( tr2i18n( "&Quality level:" ) );
    TQToolTip::add( m_radioQualityLevel, tr2i18n( "Controls the quality of the encoded files" ) );
    TQWhatsThis::add( m_radioQualityLevel, tr2i18n( "<p>Vorbis' audio quality is not best measured in kilobits per second, but on a scale from -1 to 10 called \"quality\". <p>For now, quality -1 is roughly equivalent to 45kbps average, 5 is roughly 160kbps, and 10 gives about 400kbps. Most people seeking very-near-CD-quality audio encode at a quality of 5 or, for lossless stereo coupling, 6. The default setting is quality 3, which at approximately 110kbps gives a smaller filesize and significantly better fidelity than .mp3 compression at 128kbps. <p><em>This explanation was copied from the www.vorbis.com FAQ.</em>" ) );
    m_labelQualityLevel->setText( tr2i18n( "textLabel1" ) );
    textLabel4->setText( tr2i18n( "high quality" ) );
    textLabel3_2->setText( tr2i18n( "small file" ) );
    m_radioManual->setText( tr2i18n( "M&anual settings:" ) );
    m_checkBitrateUpper->setText( tr2i18n( "&Upper bitrate:" ) );
    m_checkBitrateLower->setText( tr2i18n( "Lower &bitrate:" ) );
    textLabel2->setText( tr2i18n( "kbps" ) );
    textLabel3->setText( tr2i18n( "kbps" ) );
    textLabel1->setText( tr2i18n( "kbps" ) );
    m_checkBitrateNominal->setText( tr2i18n( "&Nominal bitrate:" ) );
}

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

TQMetaObject *base_K3bOggVorbisEncoderSettingsWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_base_K3bOggVorbisEncoderSettingsWidget( "base_K3bOggVorbisEncoderSettingsWidget", &base_K3bOggVorbisEncoderSettingsWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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