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

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

#include "encoderconfig.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqlistbox.h>
#include <ntqframe.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqlineedit.h>
#include <ntqspinbox.h>
#include <ntqslider.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "encoderconfig.ui.h"

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

    kcfg_currentEncoder = new TQListBox( this, "kcfg_currentEncoder" );

    EncoderConfigLayout->addMultiCellWidget( kcfg_currentEncoder, 0, 2, 0, 0 );

    addEncoder = new TQPushButton( this, "addEncoder" );

    EncoderConfigLayout->addMultiCellWidget( addEncoder, 0, 0, 1, 2 );

    removeEncoder = new TQPushButton( this, "removeEncoder" );

    EncoderConfigLayout->addMultiCellWidget( removeEncoder, 1, 1, 1, 2 );

    configureEncoder = new TQPushButton( this, "configureEncoder" );

    EncoderConfigLayout->addMultiCellWidget( configureEncoder, 2, 2, 1, 2 );

    line1 = new TQFrame( this, "line1" );
    line1->setFrameShape( TQFrame::HLine );
    line1->setFrameShadow( TQFrame::Sunken );
    line1->setFrameShape( TQFrame::HLine );

    EncoderConfigLayout->addMultiCellWidget( line1, 4, 4, 0, 2 );

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

    TextLabel2_2 = new TQLabel( GroupBox3, "TextLabel2_2" );
    GroupBox3Layout->addWidget( TextLabel2_2 );

    kcfg_fileFormat = new TQLineEdit( GroupBox3, "kcfg_fileFormat" );
    GroupBox3Layout->addWidget( kcfg_fileFormat );

    encoderWizardButton = new TQPushButton( GroupBox3, "encoderWizardButton" );
    GroupBox3Layout->addWidget( encoderWizardButton );

    EncoderConfigLayout->addMultiCellWidget( GroupBox3, 5, 5, 0, 2 );

    TextLabel1_2 = new TQLabel( this, "TextLabel1_2" );

    EncoderConfigLayout->addWidget( TextLabel1_2, 6, 0 );

    kcfg_numberOfCpus = new TQSpinBox( this, "kcfg_numberOfCpus" );
    kcfg_numberOfCpus->setMinValue( 1 );

    EncoderConfigLayout->addWidget( kcfg_numberOfCpus, 6, 1 );
    Spacer4_2 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    EncoderConfigLayout->addItem( Spacer4_2, 6, 2 );

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

    currentEncoderText = new TQLabel( this, "currentEncoderText" );
    layout2->addWidget( currentEncoderText );

    currentEncoderName = new TQLabel( this, "currentEncoderName" );
    currentEncoderName->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, currentEncoderName->sizePolicy().hasHeightForWidth() ) );
    currentEncoderName->setFrameShape( TQLabel::LineEditPanel );
    currentEncoderName->setFrameShadow( TQLabel::Sunken );
    currentEncoderName->setLineWidth( 1 );
    layout2->addWidget( currentEncoderName );

    EncoderConfigLayout->addMultiCellLayout( layout2, 3, 3, 0, 2 );
    Spacer3 = new TQSpacerItem( 20, 30, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    EncoderConfigLayout->addItem( Spacer3, 10, 0 );

    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_NiceLevel = new TQSlider( groupBox3, "kcfg_NiceLevel" );
    kcfg_NiceLevel->setMinValue( -19 );
    kcfg_NiceLevel->setMaxValue( 19 );
    kcfg_NiceLevel->setLineStep( 5 );
    kcfg_NiceLevel->setOrientation( TQSlider::Horizontal );
    kcfg_NiceLevel->setTickmarks( TQSlider::NoMarks );

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

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

    groupBox3Layout->addWidget( textLabel2, 1, 0 );

    textLabel3 = new TQLabel( groupBox3, "textLabel3" );
    textLabel3->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );

    groupBox3Layout->addWidget( textLabel3, 1, 2 );

    textLabel4 = new TQLabel( groupBox3, "textLabel4" );
    textLabel4->setAlignment( int( TQLabel::AlignCenter ) );

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

    EncoderConfigLayout->addMultiCellWidget( groupBox3, 9, 9, 0, 2 );
    languageChange();
    resize( TQSize(434, 349).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( kcfg_currentEncoder, TQ_SIGNAL( highlighted(const TQString&) ), currentEncoderName, TQ_SLOT( setText(const TQString&) ) );
    connect( encoderWizardButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( encoderWizard() ) );

    // tab order
    setTabOrder( kcfg_currentEncoder, addEncoder );
    setTabOrder( addEncoder, removeEncoder );
    setTabOrder( removeEncoder, configureEncoder );
    setTabOrder( configureEncoder, kcfg_fileFormat );
    setTabOrder( kcfg_fileFormat, encoderWizardButton );
    setTabOrder( encoderWizardButton, kcfg_numberOfCpus );

    // buddies
    TextLabel1_2->setBuddy( kcfg_numberOfCpus );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void EncoderConfig::languageChange()
{
    addEncoder->setText( tr2i18n( "&Add..." ) );
    removeEncoder->setText( tr2i18n( "&Remove" ) );
    configureEncoder->setText( tr2i18n( "&Configure..." ) );
    GroupBox3->setTitle( tr2i18n( "Encoded File Location" ) );
    TextLabel2_2->setText( tr2i18n( "Location:" ) );
    encoderWizardButton->setText( tr2i18n( "&Wizard" ) );
    TextLabel1_2->setText( tr2i18n( "&Number of wav files to encode at a time:" ) );
    currentEncoderText->setText( tr2i18n( "Current encoder:" ) );
    groupBox3->setTitle( tr2i18n( "Encoder Priority" ) );
    textLabel2->setText( tr2i18n( "Highest" ) );
    textLabel3->setText( tr2i18n( "Lowest" ) );
    textLabel4->setText( tr2i18n( "Normal" ) );
}

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

TQMetaObject *EncoderConfig::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_EncoderConfig( "EncoderConfig", &EncoderConfig::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* EncoderConfig::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 = {"encoderWizard", 0, 0 };
    static const TQUMethod slot_1 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "encoderWizard()", &slot_0, TQMetaData::Public },
	{ "languageChange()", &slot_1, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"EncoderConfig", parentObject,
	slot_tbl, 2,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_EncoderConfig.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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