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

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

#include "base_k3baudiocdtextwidget.h"

#include <ntqvariant.h>
#include <klineedit.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqframe.h>
#include <ntqlabel.h>
#include <ntqtoolbutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    m_groupCdText = new TQGroupBox( this, "m_groupCdText" );
    m_groupCdText->setCheckable( true );
    m_groupCdText->setChecked( false );
    m_groupCdText->setColumnLayout(0, TQt::Vertical );
    m_groupCdText->layout()->setSpacing( 6 );
    m_groupCdText->layout()->setMargin( 11 );
    m_groupCdTextLayout = new TQVBoxLayout( m_groupCdText->layout() );
    m_groupCdTextLayout->setAlignment( TQt::AlignTop );

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

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

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

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

    m_editPerformer = new KLineEdit( frame3, "m_editPerformer" );
    layout4->addWidget( m_editPerformer );

    m_buttonCopyPerformer = new TQToolButton( frame3, "m_buttonCopyPerformer" );
    layout4->addWidget( m_buttonCopyPerformer );

    frame3Layout->addLayout( layout4, 2, 1 );

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

    m_editTitle = new KLineEdit( frame3, "m_editTitle" );
    layout5->addWidget( m_editTitle );

    m_buttonCopyTitle = new TQToolButton( frame3, "m_buttonCopyTitle" );
    layout5->addWidget( m_buttonCopyTitle );

    frame3Layout->addLayout( layout5, 1, 1 );

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

    frame3Layout->addWidget( textLabel1, 1, 0 );
    m_groupCdTextLayout->addWidget( frame3 );

    layout15 = new TQHBoxLayout( 0, 0, 6, "layout15"); 
    spacer3 = new TQSpacerItem( 0, 0, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout15->addItem( spacer3 );

    m_buttonMoreFields = new TQPushButton( m_groupCdText, "m_buttonMoreFields" );
    layout15->addWidget( m_buttonMoreFields );
    m_groupCdTextLayout->addLayout( layout15 );
    spacer1 = new TQSpacerItem( 21, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    m_groupCdTextLayout->addItem( spacer1 );
    K3bAudioCDTextWidgetLayout->addWidget( m_groupCdText );
    languageChange();

    // signals and slots connections
    connect( m_buttonCopyTitle, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotCopyTitle() ) );
    connect( m_buttonCopyPerformer, TQ_SIGNAL( clicked() ), this, TQ_SLOT( slotCopyPerformer() ) );

    // tab order
    setTabOrder( m_editTitle, m_editPerformer );

    // buddies
    textLabel2->setBuddy( m_editPerformer );
    textLabel1->setBuddy( m_editTitle );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void base_K3bAudioCdTextWidget::languageChange()
{
    setCaption( tr2i18n( "K3bAudioCDTextWidget" ) );
    m_groupCdText->setTitle( tr2i18n( "Write CD-Text" ) );
    TQToolTip::add( m_groupCdText, TQString::null );
    TQWhatsThis::add( m_groupCdText, tr2i18n( "<p><b>CD-Text</b>\n"
"<p>If this option is checked K3b uses some otherwise unused space on the Audio CD to store additional information, like the artist or the CD title.\n"
"<p>CD-Text is an extension to the audio CD standard introduced by Sony.\n"
"<p>CD-Text will only be usable on CD players that support this extension (mostly car CD players) and software like K3b, of course.\n"
"<p>Since a CD-Text-enhanced Audio CD will work in any Hifi CD or DVD player even if the player does not support CD-Text explicitly, enabling it is never a bad idea (just remember to fill in the CD-Text information)." ) );
    textLabel2->setText( tr2i18n( "Perf&ormer:" ) );
    m_buttonCopyPerformer->setText( tr2i18n( "..." ) );
    TQToolTip::add( m_buttonCopyPerformer, tr2i18n( "Copy to all tracks" ) );
    m_buttonCopyTitle->setText( tr2i18n( "..." ) );
    TQToolTip::add( m_buttonCopyTitle, tr2i18n( "Copy to all tracks" ) );
    textLabel1->setText( tr2i18n( "&Title:" ) );
    m_buttonMoreFields->setText( tr2i18n( "More Fiel&ds..." ) );
}

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

TQMetaObject *base_K3bAudioCdTextWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_base_K3bAudioCdTextWidget( "base_K3bAudioCdTextWidget", &base_K3bAudioCdTextWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* base_K3bAudioCdTextWidget::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 TQUMethod slot_1 = {"slotCopyTitle", 0, 0 };
    static const TQUMethod slot_2 = {"slotCopyPerformer", 0, 0 };
    static const TQUMethod slot_3 = {"slotCopyArranger", 0, 0 };
    static const TQUMethod slot_4 = {"slotCopyComposer", 0, 0 };
    static const TQUMethod slot_5 = {"slotCopySongwriter", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected },
	{ "slotCopyTitle()", &slot_1, TQMetaData::Protected },
	{ "slotCopyPerformer()", &slot_2, TQMetaData::Protected },
	{ "slotCopyArranger()", &slot_3, TQMetaData::Protected },
	{ "slotCopyComposer()", &slot_4, TQMetaData::Protected },
	{ "slotCopySongwriter()", &slot_5, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"base_K3bAudioCdTextWidget", parentObject,
	slot_tbl, 6,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_base_K3bAudioCdTextWidget.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool base_K3bAudioCdTextWidget::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: languageChange(); break;
    case 1: slotCopyTitle(); break;
    case 2: slotCopyPerformer(); break;
    case 3: slotCopyArranger(); break;
    case 4: slotCopyComposer(); break;
    case 5: slotCopySongwriter(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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