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

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

#include "wizard.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqlineedit.h>
#include <ntqframe.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
#include "wizard.ui.h"

/*
 *  Constructs a fileWizard as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The qdialog will by default be modeless, unless you set 'modal' to
 *  true to construct a modal qdialog.
 */
fileWizard::fileWizard( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "fileWizard" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)1, 0, 0, sizePolicy().hasHeightForWidth() ) );
    fileWizardLayout = new TQVBoxLayout( this, 11, 6, "fileWizardLayout"); 

    TextLabel8 = new TQLabel( this, "TextLabel8" );
    TextLabel8->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)3, 0, 0, TextLabel8->sizePolicy().hasHeightForWidth() ) );
    TextLabel8->setTextFormat( TQLabel::RichText );
    TextLabel8->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignTop | TQLabel::AlignLeft ) );
    fileWizardLayout->addWidget( TextLabel8 );
    Spacer6 = new TQSpacerItem( 20, 16, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    fileWizardLayout->addItem( Spacer6 );

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

    TextLabel9 = new TQLabel( this, "TextLabel9" );
    Layout8->addWidget( TextLabel9 );

    fileFormat = new TQLineEdit( this, "fileFormat" );
    Layout8->addWidget( fileFormat );
    fileWizardLayout->addLayout( Layout8 );

    exampleLabel = new TQLabel( this, "exampleLabel" );
    fileWizardLayout->addWidget( exampleLabel );

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

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

    layout15->addWidget( artistButton, 0, 1 );

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

    layout15->addWidget( homeDirButton, 2, 2 );

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

    layout15->addWidget( trackNumberButton, 1, 3 );

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

    layout15->addWidget( extensionButton, 2, 1 );

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

    layout15->addWidget( trackTitleButton, 1, 0 );

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

    layout15->addWidget( trackCommentButton, 1, 2 );

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

    layout15->addWidget( genreButton, 2, 0 );

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

    layout15->addWidget( yearButton, 0, 3 );

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

    layout15->addWidget( albumButton, 0, 0 );

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

    layout15->addWidget( trackArtistButton, 1, 1 );

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

    layout15->addWidget( commentButton, 0, 2 );
    fileWizardLayout->addLayout( layout15 );

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

    Layout1 = new TQHBoxLayout( 0, 0, 6, "Layout1"); 
    Horizontal_Spacing2 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    Layout1->addItem( Horizontal_Spacing2 );

    buttonOk = new TQPushButton( this, "buttonOk" );
    buttonOk->setAutoDefault( true );
    buttonOk->setDefault( true );
    Layout1->addWidget( buttonOk );

    buttonCancel = new TQPushButton( this, "buttonCancel" );
    buttonCancel->setAutoDefault( true );
    Layout1->addWidget( buttonCancel );
    fileWizardLayout->addLayout( Layout1 );
    languageChange();
    resize( TQSize(582, 456).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( buttonOk, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );
    connect( buttonCancel, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
    connect( homeDirButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( homePressed() ) );
    connect( artistButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( artistPressed() ) );
    connect( trackNumberButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( trackNumberPressed() ) );
    connect( yearButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( yearPressed() ) );
    connect( extensionButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( extensionPressed() ) );
    connect( albumButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( albumPressed() ) );
    connect( trackTitleButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( trackTitlePressed() ) );
    connect( genreButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( genrePressed() ) );
    connect( fileFormat, TQ_SIGNAL( textChanged(const TQString&) ), this, TQ_SLOT( fileFormatTextChanged(const TQString&) ) );
    connect( trackArtistButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( trackArtistPressed() ) );
    connect( trackCommentButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( trackCommentPressed() ) );
    connect( commentButton, TQ_SIGNAL( clicked() ), this, TQ_SLOT( commentPressed() ) );

    // tab order
    setTabOrder( fileFormat, albumButton );
    setTabOrder( albumButton, artistButton );
    setTabOrder( artistButton, commentButton );
    setTabOrder( commentButton, yearButton );
    setTabOrder( yearButton, trackNumberButton );
    setTabOrder( trackNumberButton, trackArtistButton );
    setTabOrder( trackArtistButton, trackCommentButton );
    setTabOrder( trackCommentButton, trackTitleButton );
    setTabOrder( trackTitleButton, genreButton );
    setTabOrder( genreButton, extensionButton );
    setTabOrder( extensionButton, homeDirButton );
    setTabOrder( homeDirButton, buttonOk );
    setTabOrder( buttonOk, buttonCancel );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void fileWizard::languageChange()
{
    setCaption( tr2i18n( "File Location Wizard" ) );
    TextLabel8->setText( tr2i18n( "When files have finished being processed, they are saved based upon the <i>File Location</i>.  Information about the track should be used within that text.  There are eleven special words starting with a % that will be replaced with the corresponding track's information.  Each of the buttons below will insert its replacement word into the <i>File Location</i> where the cursor is.  Use at least one replacement string to make sure that the <i>File Location</i> is unique." ) );
    TextLabel9->setText( tr2i18n( "&File location:" ) );
    fileFormat->setText( tr2i18n( "~/%{extension}/%{artist}/%{album}/%{artist} - %{album}.m3u" ) );
    exampleLabel->setText( tr2i18n( "Example: ~/mp3/Staind/Lost Love/Staind - Lost Love.m3u" ) );
    artistButton->setText( tr2i18n( "&Artist" ) );
    homeDirButton->setText( tr2i18n( "&Home Folder" ) );
    trackNumberButton->setText( tr2i18n( "&Track Number" ) );
    extensionButton->setText( tr2i18n( "&Extension" ) );
    trackTitleButton->setText( tr2i18n( "Track T&itle" ) );
    trackCommentButton->setText( tr2i18n( "T&rack Comment" ) );
    genreButton->setText( tr2i18n( "&Genre" ) );
    yearButton->setText( tr2i18n( "&Year" ) );
    albumButton->setText( tr2i18n( "Al&bum" ) );
    trackArtistButton->setText( tr2i18n( "Trac&k Artist" ) );
    commentButton->setText( tr2i18n( "Co&mment" ) );
    buttonOk->setText( tr2i18n( "&OK" ) );
    buttonCancel->setText( tr2i18n( "&Cancel" ) );
}

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

TQMetaObject *fileWizard::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_fileWizard( "fileWizard", &fileWizard::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* fileWizard::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 = TQDialog::staticMetaObject();
    static const TQUMethod slot_0 = {"extensionPressed", 0, 0 };
    static const TQUMethod slot_1 = {"trackArtistPressed", 0, 0 };
    static const TQUMethod slot_2 = {"trackCommentPressed", 0, 0 };
    static const TQUMethod slot_3 = {"genrePressed", 0, 0 };
    static const TQUMethod slot_4 = {"albumPressed", 0, 0 };
    static const TQUMethod slot_5 = {"artistPressed", 0, 0 };
    static const TQUMethod slot_6 = {"commentPressed", 0, 0 };
    static const TQUParameter param_slot_7[] = {
	{ "text", &static_QUType_TQString, 0, TQUParameter::In }
    };
    static const TQUMethod slot_7 = {"fileFormatTextChanged", 1, param_slot_7 };
    static const TQUMethod slot_8 = {"languageChange", 0, 0 };
    static const TQUMethod slot_9 = {"homePressed", 0, 0 };
    static const TQUMethod slot_10 = {"trackTitlePressed", 0, 0 };
    static const TQUMethod slot_11 = {"trackNumberPressed", 0, 0 };
    static const TQUMethod slot_12 = {"yearPressed", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "extensionPressed()", &slot_0, TQMetaData::Public },
	{ "trackArtistPressed()", &slot_1, TQMetaData::Public },
	{ "trackCommentPressed()", &slot_2, TQMetaData::Public },
	{ "genrePressed()", &slot_3, TQMetaData::Public },
	{ "albumPressed()", &slot_4, TQMetaData::Public },
	{ "artistPressed()", &slot_5, TQMetaData::Public },
	{ "commentPressed()", &slot_6, TQMetaData::Public },
	{ "fileFormatTextChanged(const TQString&)", &slot_7, TQMetaData::Public },
	{ "languageChange()", &slot_8, TQMetaData::Protected },
	{ "homePressed()", &slot_9, TQMetaData::Private },
	{ "trackTitlePressed()", &slot_10, TQMetaData::Private },
	{ "trackNumberPressed()", &slot_11, TQMetaData::Private },
	{ "yearPressed()", &slot_12, TQMetaData::Private }
    };
    metaObj = TQMetaObject::new_metaobject(
	"fileWizard", parentObject,
	slot_tbl, 13,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_fileWizard.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool fileWizard::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: extensionPressed(); break;
    case 1: trackArtistPressed(); break;
    case 2: trackCommentPressed(); break;
    case 3: genrePressed(); break;
    case 4: albumPressed(); break;
    case 5: artistPressed(); break;
    case 6: commentPressed(); break;
    case 7: fileFormatTextChanged((const TQString&)static_QUType_TQString.get(_o+1)); break;
    case 8: languageChange(); break;
    case 9: homePressed(); break;
    case 10: trackTitlePressed(); break;
    case 11: trackNumberPressed(); break;
    case 12: yearPressed(); break;
    default:
	return TQDialog::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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