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

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

#include "exampleoptionsbase.h"

#include <ntqvariant.h>
#include <klineedit.h>
#include <kpushbutton.h>
#include <kurlrequester.h>
#include <ntqpushbutton.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqgroupbox.h>
#include <ntqlineedit.h>
#include <ntqlabel.h>
#include <ntqspinbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    buttonGroup3 = new TQButtonGroup( this, "buttonGroup3" );
    buttonGroup3->setColumnLayout(0, TQt::Vertical );
    buttonGroup3->layout()->setSpacing( 6 );
    buttonGroup3->layout()->setMargin( 11 );
    buttonGroup3Layout = new TQVBoxLayout( buttonGroup3->layout() );
    buttonGroup3Layout->setAlignment( TQt::AlignTop );

    m_fileTagsButton = new TQRadioButton( buttonGroup3, "m_fileTagsButton" );
    m_fileTagsButton->setChecked( false );
    buttonGroup3Layout->addWidget( m_fileTagsButton );

    m_exampleFile = new KURLRequester( buttonGroup3, "m_exampleFile" );
    m_exampleFile->setEnabled( false );
    m_exampleFile->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 1, 0, m_exampleFile->sizePolicy().hasHeightForWidth() ) );
    m_exampleFile->setMode( 24 );
    buttonGroup3Layout->addWidget( m_exampleFile );

    m_manualTagsButton = new TQRadioButton( buttonGroup3, "m_manualTagsButton" );
    m_manualTagsButton->setChecked( true );
    buttonGroup3Layout->addWidget( m_manualTagsButton );

    m_manualGroup = new TQGroupBox( buttonGroup3, "m_manualGroup" );
    m_manualGroup->setFlat( true );
    m_manualGroup->setColumnLayout(0, TQt::Vertical );
    m_manualGroup->layout()->setSpacing( 6 );
    m_manualGroup->layout()->setMargin( 11 );
    m_manualGroupLayout = new TQGridLayout( m_manualGroup->layout() );
    m_manualGroupLayout->setAlignment( TQt::AlignTop );

    m_exampleArtist = new TQLineEdit( m_manualGroup, "m_exampleArtist" );

    m_manualGroupLayout->addWidget( m_exampleArtist, 1, 1 );

    m_exampleTitle = new TQLineEdit( m_manualGroup, "m_exampleTitle" );

    m_manualGroupLayout->addWidget( m_exampleTitle, 0, 1 );

    m_exampleAlbum = new TQLineEdit( m_manualGroup, "m_exampleAlbum" );

    m_manualGroupLayout->addWidget( m_exampleAlbum, 2, 1 );

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

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

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

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

    m_exampleYear = new TQSpinBox( m_manualGroup, "m_exampleYear" );
    m_exampleYear->setMaxValue( 2006 );
    m_exampleYear->setMinValue( 1901 );
    m_exampleYear->setValue( 2004 );

    m_manualGroupLayout->addWidget( m_exampleYear, 5, 1 );

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

    m_manualGroupLayout->addWidget( textLabel3, 2, 0 );

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

    m_manualGroupLayout->addWidget( textLabel4, 3, 0 );

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

    m_manualGroupLayout->addWidget( textLabel5, 4, 0 );

    m_exampleTrack = new TQSpinBox( m_manualGroup, "m_exampleTrack" );
    m_exampleTrack->setValue( 1 );

    m_manualGroupLayout->addWidget( m_exampleTrack, 4, 1 );

    m_exampleGenre = new TQLineEdit( m_manualGroup, "m_exampleGenre" );

    m_manualGroupLayout->addWidget( m_exampleGenre, 3, 1 );

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

    m_manualGroupLayout->addWidget( textLabel6, 5, 0 );
    buttonGroup3Layout->addWidget( m_manualGroup );
    ExampleOptionsBaseLayout->addWidget( buttonGroup3 );
    languageChange();
    resize( TQSize(308, 334).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( m_manualTagsButton, TQ_SIGNAL( toggled(bool) ), m_manualGroup, TQ_SLOT( setEnabled(bool) ) );
    connect( m_fileTagsButton, TQ_SIGNAL( toggled(bool) ), m_exampleFile, TQ_SLOT( setEnabled(bool) ) );
    connect( m_fileTagsButton, TQ_SIGNAL( stateChanged(int) ), this, TQ_SLOT( exampleSelectionChanged() ) );
    connect( m_manualTagsButton, TQ_SIGNAL( stateChanged(int) ), this, TQ_SLOT( exampleSelectionChanged() ) );
    connect( m_exampleTitle, TQ_SIGNAL( textChanged(const TQString&) ), this, TQ_SLOT( exampleDataChanged() ) );
    connect( m_exampleArtist, TQ_SIGNAL( textChanged(const TQString&) ), this, TQ_SLOT( exampleDataChanged() ) );
    connect( m_exampleAlbum, TQ_SIGNAL( textChanged(const TQString&) ), this, TQ_SLOT( exampleDataChanged() ) );
    connect( m_exampleGenre, TQ_SIGNAL( textChanged(const TQString&) ), this, TQ_SLOT( exampleDataChanged() ) );
    connect( m_exampleTrack, TQ_SIGNAL( valueChanged(int) ), this, TQ_SLOT( exampleDataChanged() ) );
    connect( m_exampleYear, TQ_SIGNAL( valueChanged(int) ), this, TQ_SLOT( exampleDataChanged() ) );

    // tab order
    setTabOrder( m_exampleFile, m_manualTagsButton );
    setTabOrder( m_manualTagsButton, m_exampleTitle );
    setTabOrder( m_exampleTitle, m_exampleArtist );
    setTabOrder( m_exampleArtist, m_exampleAlbum );
    setTabOrder( m_exampleAlbum, m_exampleGenre );
    setTabOrder( m_exampleGenre, m_exampleTrack );
    setTabOrder( m_exampleTrack, m_exampleYear );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void ExampleOptionsBase::languageChange()
{
    setCaption( tr2i18n( "Example" ) );
    buttonGroup3->setTitle( tr2i18n( "Example Tag Selection" ) );
    m_fileTagsButton->setText( tr2i18n( "Get example tags from this file:" ) );
    m_manualTagsButton->setText( tr2i18n( "Enter example tags manually:" ) );
    m_manualGroup->setTitle( tr2i18n( "Example Tags" ) );
    m_exampleArtist->setText( tr2i18n( "Artist" ) );
    m_exampleTitle->setText( tr2i18n( "Title" ) );
    m_exampleAlbum->setText( tr2i18n( "Album" ) );
    textLabel1->setText( tr2i18n( "Title:" ) );
    textLabel2->setText( tr2i18n( "Artist:" ) );
    textLabel3->setText( tr2i18n( "Album:" ) );
    textLabel4->setText( tr2i18n( "Genre:" ) );
    textLabel5->setText( tr2i18n( "Track number:" ) );
    m_exampleGenre->setText( tr2i18n( "Genre" ) );
    textLabel6->setText( tr2i18n( "Year:" ) );
}

void ExampleOptionsBase::exampleSelectionChanged()
{
    tqWarning( "ExampleOptionsBase::exampleSelectionChanged(): Not implemented yet" );
}

void ExampleOptionsBase::exampleDataChanged()
{
    tqWarning( "ExampleOptionsBase::exampleDataChanged(): Not implemented yet" );
}

void ExampleOptionsBase::exampleFileChanged()
{
    tqWarning( "ExampleOptionsBase::exampleFileChanged(): Not implemented yet" );
}

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

TQMetaObject *ExampleOptionsBase::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_ExampleOptionsBase( "ExampleOptionsBase", &ExampleOptionsBase::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* ExampleOptionsBase::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 = {"exampleSelectionChanged", 0, 0 };
    static const TQUMethod slot_2 = {"exampleDataChanged", 0, 0 };
    static const TQUMethod slot_3 = {"exampleFileChanged", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected },
	{ "exampleSelectionChanged()", &slot_1, TQMetaData::Protected },
	{ "exampleDataChanged()", &slot_2, TQMetaData::Protected },
	{ "exampleFileChanged()", &slot_3, TQMetaData::Protected }
    };
    static const TQUMethod signal_0 = {"dataChanged", 0, 0 };
    static const TQUMethod signal_1 = {"fileChanged", 0, 0 };
    static const TQMetaData signal_tbl[] = {
	{ "dataChanged()", &signal_0, TQMetaData::Public },
	{ "fileChanged()", &signal_1, TQMetaData::Public }
    };
    metaObj = TQMetaObject::new_metaobject(
	"ExampleOptionsBase", parentObject,
	slot_tbl, 4,
	signal_tbl, 2,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_ExampleOptionsBase.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

// TQ_SIGNAL dataChanged
void ExampleOptionsBase::dataChanged()
{
    activate_signal( staticMetaObject()->signalOffset() + 0 );
}

// TQ_SIGNAL fileChanged
void ExampleOptionsBase::fileChanged()
{
    activate_signal( staticMetaObject()->signalOffset() + 1 );
}

bool ExampleOptionsBase::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: languageChange(); break;
    case 1: exampleSelectionChanged(); break;
    case 2: exampleDataChanged(); break;
    case 3: exampleFileChanged(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

bool ExampleOptionsBase::tqt_emit( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->signalOffset() ) {
    case 0: dataChanged(); break;
    case 1: fileChanged(); break;
    default:
	return TQWidget::tqt_emit(_id,_o);
    }
    return true;
}
#ifndef TQT_NO_PROPERTIES

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

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