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

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

#include "base_k3bexternalencodereditwidget.h"

#include <ntqvariant.h>
#include <kactivelabel.h>
#include <klineedit.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    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 );

    m_editExtension = new KLineEdit( groupBox3, "m_editExtension" );

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

    m_editName = new KLineEdit( groupBox3, "m_editName" );

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

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

    groupBox3Layout->addWidget( textLabel1, 0, 0 );

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

    groupBox3Layout->addWidget( textLabel3, 0, 1 );
    base_K3bExternalEncoderEditWidgetLayout->addWidget( groupBox3 );

    groupBox2 = new TQGroupBox( this, "groupBox2" );
    groupBox2->setColumnLayout(0, TQt::Vertical );
    groupBox2->layout()->setSpacing( 6 );
    groupBox2->layout()->setMargin( 11 );
    groupBox2Layout = new TQVBoxLayout( groupBox2->layout() );
    groupBox2Layout->setAlignment( TQt::AlignTop );

    kActiveLabel2 = new KActiveLabel( groupBox2, "kActiveLabel2" );
    groupBox2Layout->addWidget( kActiveLabel2 );

    m_editCommand = new KLineEdit( groupBox2, "m_editCommand" );
    m_editCommand->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)0, 0, 0, m_editCommand->sizePolicy().hasHeightForWidth() ) );
    groupBox2Layout->addWidget( m_editCommand );
    base_K3bExternalEncoderEditWidgetLayout->addWidget( groupBox2 );

    groupBox4 = new TQGroupBox( this, "groupBox4" );
    groupBox4->setColumnLayout(0, TQt::Vertical );
    groupBox4->layout()->setSpacing( 6 );
    groupBox4->layout()->setMargin( 11 );
    groupBox4Layout = new TQVBoxLayout( groupBox4->layout() );
    groupBox4Layout->setAlignment( TQt::AlignTop );

    m_checkSwapByteOrder = new TQCheckBox( groupBox4, "m_checkSwapByteOrder" );
    groupBox4Layout->addWidget( m_checkSwapByteOrder );

    m_checkWriteWaveHeader = new TQCheckBox( groupBox4, "m_checkWriteWaveHeader" );
    groupBox4Layout->addWidget( m_checkWriteWaveHeader );
    base_K3bExternalEncoderEditWidgetLayout->addWidget( groupBox4 );
    languageChange();
    resize( TQSize(529, 514).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( m_editName, m_editExtension );
    setTabOrder( m_editExtension, m_editCommand );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void base_K3bExternalEncoderEditWidget::languageChange()
{
    groupBox3->setTitle( tr2i18n( "General" ) );
    textLabel1->setText( tr2i18n( "Name:" ) );
    textLabel3->setText( tr2i18n( "Filename extension:" ) );
    groupBox2->setTitle( tr2i18n( "Command" ) );
    kActiveLabel2->setText( tr2i18n( "<p><b>Command</b><br>\n"
"Please insert the command used to encode the audio data. The command has to read raw little endian (see <em>Swap Byte Order</em>) 16bit stereo audio frames from stdin.\n"
"<p>The following strings will be replaced by K3b:<br>\n"
"<b>%f</b> - The filename of the resulting file. This is where the command has to write its output to.<br>\n"
"<em>The following refer to metadata stored for example in the ID3 tag of am mp3 file (Be aware that these values might be empty).</em><br>\n"
"<b>%t</b> - Title<br>\n"
"<b>%a</b> - Artist<br>\n"
"<b>%c</b> - Comment<br>\n"
"<b>%n</b> - Track number<br>\n"
"<b>%m</b> - Album Title<br>\n"
"<b>%r</b> - Album Artist<br>\n"
"<b>%x</b> - Album comment<br>\n"
"<b>%y</b> - Release Year" ) );
    groupBox4->setTitle( tr2i18n( "Options" ) );
    m_checkSwapByteOrder->setText( tr2i18n( "Swap &Byte Order" ) );
    TQToolTip::add( m_checkSwapByteOrder, tr2i18n( "Swap the byte order of the input data" ) );
    TQWhatsThis::add( m_checkSwapByteOrder, tr2i18n( "<p> If this option is checked K3b will swap the byte order of the input data. Thus, the command has to read big endian audio frames.\n"
"<p>If the resulting audio file sounds bad it is highly likely that the byte order is wrong and this option has to be checked." ) );
    m_checkWriteWaveHeader->setText( tr2i18n( "Write W&ave Header" ) );
    TQToolTip::add( m_checkWriteWaveHeader, tr2i18n( "Create a wave header for the input data" ) );
    TQWhatsThis::add( m_checkWriteWaveHeader, tr2i18n( "<p>If this option is checked K3b will write a wave header. This is useful in case the encoder application cannot read plain raw audio data." ) );
}

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

TQMetaObject *base_K3bExternalEncoderEditWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_base_K3bExternalEncoderEditWidget( "base_K3bExternalEncoderEditWidget", &base_K3bExternalEncoderEditWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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