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

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

#include "base_k3blameencodersettingswidget.h"

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

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

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

    tab = new TQWidget( m_mainTab, "tab" );
    tabLayout = new TQHBoxLayout( tab, 11, 6, "tabLayout"); 

    m_groupVariableBitrate = new TQButtonGroup( tab, "m_groupVariableBitrate" );
    m_groupVariableBitrate->setColumnLayout(0, TQt::Vertical );
    m_groupVariableBitrate->layout()->setSpacing( 6 );
    m_groupVariableBitrate->layout()->setMargin( 11 );
    m_groupVariableBitrateLayout = new TQVBoxLayout( m_groupVariableBitrate->layout() );
    m_groupVariableBitrateLayout->setAlignment( TQt::AlignTop );

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

    m_radioQualityLevel = new TQRadioButton( m_groupVariableBitrate, "m_radioQualityLevel" );
    m_radioQualityLevel->setChecked( true );
    layout10->addWidget( m_radioQualityLevel );

    m_labelQualityLevel = new TQLabel( m_groupVariableBitrate, "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 ) );
    layout10->addWidget( m_labelQualityLevel );
    m_groupVariableBitrateLayout->addLayout( layout10 );

    m_qualityLevelFrame = new TQFrame( m_groupVariableBitrate, "m_qualityLevelFrame" );
    m_qualityLevelFrame->setFrameShape( TQFrame::StyledPanel );
    m_qualityLevelFrame->setFrameShadow( TQFrame::Plain );
    m_qualityLevelFrame->setLineWidth( 0 );
    m_qualityLevelFrameLayout = new TQHBoxLayout( m_qualityLevelFrame, 0, 0, "m_qualityLevelFrameLayout"); 
    spacer2_2 = new TQSpacerItem( 20, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    m_qualityLevelFrameLayout->addItem( spacer2_2 );

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

    textLabel4 = new TQLabel( m_qualityLevelFrame, "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 = new TQLabel( m_qualityLevelFrame, "textLabel3" );
    TQFont textLabel3_font(  textLabel3->font() );
    textLabel3_font.setItalic( true );
    textLabel3->setFont( textLabel3_font ); 

    layout8->addWidget( textLabel3, 1, 0 );

    m_sliderQuality = new TQSlider( m_qualityLevelFrame, "m_sliderQuality" );
    m_sliderQuality->setMaxValue( 9 );
    m_sliderQuality->setPageStep( 3 );
    m_sliderQuality->setValue( 3 );
    m_sliderQuality->setOrientation( TQSlider::Horizontal );

    layout8->addMultiCellWidget( m_sliderQuality, 0, 0, 0, 1 );
    m_qualityLevelFrameLayout->addLayout( layout8 );
    m_groupVariableBitrateLayout->addWidget( m_qualityLevelFrame );
    spacer9 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Fixed );
    m_groupVariableBitrateLayout->addItem( spacer9 );

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

    m_radioManual = new TQRadioButton( m_groupVariableBitrate, "m_radioManual" );
    layout12->addWidget( m_radioManual );

    m_labelManualSettings = new TQLabel( m_groupVariableBitrate, "m_labelManualSettings" );
    m_labelManualSettings->setEnabled( false );
    TQFont m_labelManualSettings_font(  m_labelManualSettings->font() );
    m_labelManualSettings_font.setBold( true );
    m_labelManualSettings->setFont( m_labelManualSettings_font ); 
    m_labelManualSettings->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
    layout12->addWidget( m_labelManualSettings );
    m_groupVariableBitrateLayout->addLayout( layout12 );

    layout11 = new TQHBoxLayout( 0, 0, 0, "layout11"); 
    spacer2_2_3 = new TQSpacerItem( 20, 5, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout11->addItem( spacer2_2_3 );

    m_buttonManualSettings = new TQPushButton( m_groupVariableBitrate, "m_buttonManualSettings" );
    m_buttonManualSettings->setEnabled( false );
    layout11->addWidget( m_buttonManualSettings );
    m_groupVariableBitrateLayout->addLayout( layout11 );
    tabLayout->addWidget( m_groupVariableBitrate );
    m_mainTab->insertTab( tab, TQString::fromLatin1("") );

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

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

    m_spinEncoderQuality = new KIntNumInput( groupBox1, "m_spinEncoderQuality" );
    groupBox1Layout->addWidget( m_spinEncoderQuality );

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

    textLabel1 = new TQLabel( groupBox1, "textLabel1" );
    TQFont textLabel1_font(  textLabel1->font() );
    textLabel1_font.setItalic( true );
    textLabel1->setFont( textLabel1_font ); 
    layout2->addWidget( textLabel1 );

    textLabel2 = new TQLabel( groupBox1, "textLabel2" );
    TQFont textLabel2_font(  textLabel2->font() );
    textLabel2_font.setItalic( true );
    textLabel2->setFont( textLabel2_font ); 
    textLabel2->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );
    layout2->addWidget( textLabel2 );
    groupBox1Layout->addLayout( layout2 );
    tabLayout_2->addWidget( groupBox1 );

    groupBox3 = new TQGroupBox( tab_2, "groupBox3" );
    groupBox3->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 1, groupBox3->sizePolicy().hasHeightForWidth() ) );
    groupBox3->setColumnLayout(0, TQt::Vertical );
    groupBox3->layout()->setSpacing( 6 );
    groupBox3->layout()->setMargin( 11 );
    groupBox3Layout = new TQVBoxLayout( groupBox3->layout() );
    groupBox3Layout->setAlignment( TQt::AlignTop );

    m_checkCopyright = new TQCheckBox( groupBox3, "m_checkCopyright" );
    groupBox3Layout->addWidget( m_checkCopyright );

    m_checkOriginal = new TQCheckBox( groupBox3, "m_checkOriginal" );
    groupBox3Layout->addWidget( m_checkOriginal );

    m_checkISO = new TQCheckBox( groupBox3, "m_checkISO" );
    groupBox3Layout->addWidget( m_checkISO );

    m_checkError = new TQCheckBox( groupBox3, "m_checkError" );
    groupBox3Layout->addWidget( m_checkError );
    tabLayout_2->addWidget( groupBox3 );
    m_mainTab->insertTab( tab_2, TQString::fromLatin1("") );
    Form1Layout->addWidget( m_mainTab );
    languageChange();
    resize( TQSize(337, 295).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( m_radioManual, TQ_SIGNAL( toggled(bool) ), m_buttonManualSettings, TQ_SLOT( setEnabled(bool) ) );
    connect( m_radioQualityLevel, TQ_SIGNAL( toggled(bool) ), m_qualityLevelFrame, TQ_SLOT( setEnabled(bool) ) );
    connect( m_radioQualityLevel, TQ_SIGNAL( toggled(bool) ), m_labelQualityLevel, TQ_SLOT( setEnabled(bool) ) );
    connect( m_radioManual, TQ_SIGNAL( toggled(bool) ), m_labelManualSettings, TQ_SLOT( setEnabled(bool) ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void base_K3bLameEncoderSettingsWidget::languageChange()
{
    m_groupVariableBitrate->setTitle( tr2i18n( "Quality Settings" ) );
    m_radioQualityLevel->setText( tr2i18n( "Preset:" ) );
    m_labelQualityLevel->setText( tr2i18n( "textLabel1" ) );
    textLabel4->setText( tr2i18n( "high quality" ) );
    textLabel3->setText( tr2i18n( "small file" ) );
    m_radioManual->setText( tr2i18n( "Manual settings:" ) );
    m_labelManualSettings->setText( tr2i18n( "textLabel2" ) );
    m_buttonManualSettings->setText( tr2i18n( "Change Settings..." ) );
    m_mainTab->changeTab( tab, tr2i18n( "Settings" ) );
    groupBox1->setTitle( tr2i18n( "Encoder Quality" ) );
    TQToolTip::add( m_spinEncoderQuality, tr2i18n( "Choose the noise shaping & psycho acoustic algorithm." ) );
    TQWhatsThis::add( m_spinEncoderQuality, tr2i18n( "<p>Bitrate is of course the main influence on quality. The higher the bitrate, the higher the quality. But for a given bitrate, we have a choice of algorithms to determine the best scalefactors and huffman encoding (noise shaping).\n"
"<p>The quality increases from 0 to 9 while the encoding speed drops.\n"
"<p>9 uses the slowest & best possible version of all algorithms.\n"
"<p><b>7 is the recommended setting</b> while 4 still produced reasonable quality at good speed.\n"
"<p>0 disables almost all algorithms including psy-model resulting in poor quality.\n"
"<p><b>This setting has no influence on the size of the resulting file.</b>" ) );
    textLabel1->setText( tr2i18n( "fast encoding" ) );
    textLabel2->setText( tr2i18n( "high quality" ) );
    groupBox3->setTitle( tr2i18n( "Options" ) );
    m_checkCopyright->setText( tr2i18n( "Mark copyrighted" ) );
    TQToolTip::add( m_checkCopyright, tr2i18n( "Mark the encoded file as being copyrighted." ) );
    m_checkOriginal->setText( tr2i18n( "Mark as original" ) );
    TQToolTip::add( m_checkOriginal, tr2i18n( "Mark the encoded file as being a copy." ) );
    m_checkISO->setText( tr2i18n( "Strict ISO compliance" ) );
    TQToolTip::add( m_checkISO, tr2i18n( "Enforce strict ISO compliance" ) );
    TQWhatsThis::add( m_checkISO, tr2i18n( "<p>If this option is checked LAME will enforce the 7680 bit limitation on total frame size.<br>\n"
"This  results  in  many  wasted bits for high bitrate encodings but will ensure strict ISO compatibility. This compatibility might be important for hardware players." ) );
    m_checkError->setText( tr2i18n( "Error protection" ) );
    TQToolTip::add( m_checkError, tr2i18n( "Turn on CRC error protection." ) );
    TQWhatsThis::add( m_checkError, tr2i18n( "<p>If this option is checked a cyclic redundancy check (CRC) code will be added to each frame, allowing transmission errors that could occur on the MP3 stream to be detected; however, it takes 16 bits per frame that would otherwise be used for encoding, thus slightly reducing the sound quality." ) );
    m_mainTab->changeTab( tab_2, tr2i18n( "Advanced" ) );
}

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

TQMetaObject *base_K3bLameEncoderSettingsWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_base_K3bLameEncoderSettingsWidget( "base_K3bLameEncoderSettingsWidget", &base_K3bLameEncoderSettingsWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

bool base_K3bLameEncoderSettingsWidget::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_K3bLameEncoderSettingsWidget::tqt_emit( int _id, TQUObject* _o )
{
    return TQWidget::tqt_emit(_id,_o);
}
#ifndef TQT_NO_PROPERTIES

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

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