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

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

#include "base_k3baudiotrackwidget.h"

#include <ntqvariant.h>
#include <k3bmsfedit.h>
#include <klineedit.h>
#include <ntqpushbutton.h>
#include <ntqtabwidget.h>
#include <ntqlabel.h>
#include <ntqframe.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

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

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

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

    m_editSongwriter = new KLineEdit( tab, "m_editSongwriter" );

    layout9->addWidget( m_editSongwriter, 4, 1 );

    textLabel4 = new TQLabel( tab, "textLabel4" );

    layout9->addWidget( textLabel4, 4, 0 );

    m_editArranger = new KLineEdit( tab, "m_editArranger" );

    layout9->addWidget( m_editArranger, 3, 1 );

    m_editComposer = new KLineEdit( tab, "m_editComposer" );

    layout9->addWidget( m_editComposer, 3, 3 );

    m_editMessage = new KLineEdit( tab, "m_editMessage" );

    layout9->addMultiCellWidget( m_editMessage, 5, 5, 1, 3 );

    line2 = new TQFrame( tab, "line2" );
    line2->setFrameShape( TQFrame::HLine );
    line2->setFrameShadow( TQFrame::Sunken );
    line2->setFrameShape( TQFrame::HLine );

    layout9->addMultiCellWidget( line2, 1, 1, 0, 3 );

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

    layout9->addMultiCellWidget( textLabel3, 2, 3, 0, 0 );

    textLabel5 = new TQLabel( tab, "textLabel5" );

    layout9->addMultiCellWidget( textLabel5, 2, 3, 2, 2 );

    textLabel8 = new TQLabel( tab, "textLabel8" );

    layout9->addWidget( textLabel8, 5, 0 );

    m_editTitle = new KLineEdit( tab, "m_editTitle" );

    layout9->addWidget( m_editTitle, 0, 1 );

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

    layout9->addWidget( textLabel2, 0, 2 );

    textLabel6 = new TQLabel( tab, "textLabel6" );

    layout9->addWidget( textLabel6, 4, 2 );

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

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

    m_editIsrc = new KLineEdit( tab, "m_editIsrc" );

    layout9->addWidget( m_editIsrc, 4, 3 );

    m_editPerformer = new KLineEdit( tab, "m_editPerformer" );

    layout9->addWidget( m_editPerformer, 0, 3 );
    tabLayout->addLayout( layout9 );
    spacer4 = new TQSpacerItem( 350, 50, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    tabLayout->addItem( spacer4 );
    m_mainTab->insertTab( tab, TQString::fromLatin1("") );

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

    m_checkPreemphasis = new TQCheckBox( tab_2, "m_checkPreemphasis" );
    tabLayout_2->addWidget( m_checkPreemphasis );

    m_checkCopyPermitted = new TQCheckBox( tab_2, "m_checkCopyPermitted" );
    tabLayout_2->addWidget( m_checkCopyPermitted );

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

    m_labelPostGap = new TQLabel( tab_2, "m_labelPostGap" );
    layout6->addWidget( m_labelPostGap );

    m_editPostGap = new K3bMsfEdit( tab_2, "m_editPostGap" );
    layout6->addWidget( m_editPostGap );
    spacer7 = new TQSpacerItem( 161, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout6->addItem( spacer7 );
    tabLayout_2->addLayout( layout6 );
    spacer3 = new TQSpacerItem( 41, 80, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    tabLayout_2->addItem( spacer3 );
    m_mainTab->insertTab( tab_2, TQString::fromLatin1("") );
    K3bAudioTrackWidgetLayout->addWidget( m_mainTab );
    languageChange();

    // tab order
    setTabOrder( m_editTitle, m_editPerformer );
    setTabOrder( m_editPerformer, m_editArranger );
    setTabOrder( m_editArranger, m_editComposer );
    setTabOrder( m_editComposer, m_editSongwriter );
    setTabOrder( m_editSongwriter, m_editIsrc );
    setTabOrder( m_editIsrc, m_editMessage );
    setTabOrder( m_editMessage, m_checkPreemphasis );
    setTabOrder( m_checkPreemphasis, m_checkCopyPermitted );

    // buddies
    textLabel4->setBuddy( m_editSongwriter );
    textLabel3->setBuddy( m_editArranger );
    textLabel5->setBuddy( m_editComposer );
    textLabel8->setBuddy( m_editMessage );
    textLabel2->setBuddy( m_editPerformer );
    textLabel6->setBuddy( m_editIsrc );
    textLabel1->setBuddy( m_editTitle );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void base_K3bAudioTrackWidget::languageChange()
{
    setCaption( tr2i18n( "K3bAudioTrackWidget" ) );
    textLabel4->setText( tr2i18n( "So&ngwriter:" ) );
    textLabel3->setText( tr2i18n( "&Arranger:" ) );
    textLabel5->setText( tr2i18n( "&Composer:" ) );
    textLabel8->setText( tr2i18n( "&Message:" ) );
    textLabel2->setText( tr2i18n( "&Performer:" ) );
    textLabel6->setText( tr2i18n( "&ISRC:" ) );
    textLabel1->setText( tr2i18n( "&Title:" ) );
    m_mainTab->changeTab( tab, tr2i18n( "C&D-Text" ) );
    m_checkPreemphasis->setText( tr2i18n( "Preemph&asis" ) );
    TQWhatsThis::add( m_checkPreemphasis, tr2i18n( "<p>Preemphasis is mainly used in audio processing. Higher frequencies in audio signals usually have lower amplitudes. This can lead to bad signal quality on noisy transmission because the high frequencies might become too weak. To avoid this effect, high frequencies are amplified before transmission (preemphasis); the receiver will then weaken them accordingly for playback." ) );
    m_checkCopyPermitted->setText( tr2i18n( "&Copy permitted" ) );
    m_labelPostGap->setText( tr2i18n( "Post-Gap:" ) );
    TQToolTip::add( m_editPostGap, tr2i18n( "Set the length of the track's post-gap" ) );
    TQWhatsThis::add( m_editPostGap, tr2i18n( "<p>On an audio CD each track (except for the last) can have a post-gap.\n"
"This does not mean that K3b adds an additional gap of silence to the track. This setting simply influences the display on a Hifi audio CD player. The part of an audio track that is marked as post-gap is counted backwards.\n"
"<p>This setting is irrelevant for most users as todays CD burners can put arbitrary audio data in the post-gap when burning in DAO mode.\n"
"<p><i>In other CD-burning applications the post-gap might be called the pre-gap. The pre-gap of track 2 is the same as the post-gap of track 1.\n"
"<p><b>Changing the post-gap does not change the length of the track!</b>\n"
"<p><b>When writing in TAO writing mode (not recommended for Audio CDs) the post-gap will most likely be muted and on some burners forced to 2 seconds.</b>" ) );
    m_mainTab->changeTab( tab_2, tr2i18n( "&Options" ) );
}

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

TQMetaObject *base_K3bAudioTrackWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_base_K3bAudioTrackWidget( "base_K3bAudioTrackWidget", &base_K3bAudioTrackWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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