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

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

#include "infodialog.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqlabel.h>
#include <ntqlineedit.h>
#include <ntqspinbox.h>
#include <ntqcombobox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a AlbumEditor 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.
 */
AlbumEditor::AlbumEditor( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "AlbumEditor" );
    setSizeGripEnabled( true );
    AlbumEditorLayout = new TQVBoxLayout( this, 11, 6, "AlbumEditorLayout"); 

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

    textLabel2 = new TQLabel( groupBox2, "textLabel2" );
    textLabel2->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );

    groupBox2Layout->addMultiCellWidget( textLabel2, 2, 3, 0, 0 );

    track_comment = new TQLineEdit( groupBox2, "track_comment" );

    groupBox2Layout->addWidget( track_comment, 3, 1 );

    trackLabel = new TQLabel( groupBox2, "trackLabel" );
    trackLabel->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );

    groupBox2Layout->addWidget( trackLabel, 1, 0 );

    track_title = new TQLineEdit( groupBox2, "track_title" );

    groupBox2Layout->addMultiCellWidget( track_title, 1, 2, 1, 1 );

    textLabel3 = new TQLabel( groupBox2, "textLabel3" );
    textLabel3->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );

    groupBox2Layout->addWidget( textLabel3, 0, 0 );

    track_artist = new TQLineEdit( groupBox2, "track_artist" );

    groupBox2Layout->addWidget( track_artist, 0, 1 );
    AlbumEditorLayout->addWidget( groupBox2 );

    groupBox1 = new TQGroupBox( this, "groupBox1" );
    groupBox1->setColumnLayout(0, TQt::Vertical );
    groupBox1->layout()->setSpacing( 6 );
    groupBox1->layout()->setMargin( 11 );
    groupBox1Layout = new TQGridLayout( groupBox1->layout() );
    groupBox1Layout->setAlignment( TQt::AlignTop );

    artist = new TQLineEdit( groupBox1, "artist" );

    groupBox1Layout->addWidget( artist, 1, 1 );

    TextLabel5 = new TQLabel( groupBox1, "TextLabel5" );
    TextLabel5->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );

    groupBox1Layout->addWidget( TextLabel5, 1, 0 );

    TextLabel6 = new TQLabel( groupBox1, "TextLabel6" );
    TextLabel6->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );

    groupBox1Layout->addWidget( TextLabel6, 2, 0 );

    album = new TQLineEdit( groupBox1, "album" );

    groupBox1Layout->addWidget( album, 2, 1 );

    year = new TQSpinBox( groupBox1, "year" );
    year->setMaxValue( 99999 );

    groupBox1Layout->addWidget( year, 3, 1 );

    TextLabel7 = new TQLabel( groupBox1, "TextLabel7" );
    TextLabel7->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );

    groupBox1Layout->addWidget( TextLabel7, 3, 0 );

    TextLabel1 = new TQLabel( groupBox1, "TextLabel1" );
    TextLabel1->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );

    groupBox1Layout->addWidget( TextLabel1, 4, 0 );

    genre = new TQComboBox( false, groupBox1, "genre" );

    groupBox1Layout->addWidget( genre, 4, 1 );

    textLabel1 = new TQLabel( groupBox1, "textLabel1" );
    textLabel1->setAlignment( int( TQLabel::AlignVCenter | TQLabel::AlignRight ) );

    groupBox1Layout->addWidget( textLabel1, 5, 0 );

    comment = new TQLineEdit( groupBox1, "comment" );

    groupBox1Layout->addWidget( comment, 5, 1 );
    AlbumEditorLayout->addWidget( groupBox1 );
    spacer1 = new TQSpacerItem( 20, 100, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    AlbumEditorLayout->addItem( spacer1 );

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

    buttonPrevious = new TQPushButton( this, "buttonPrevious" );
    layout2->addWidget( buttonPrevious );

    buttonNext = new TQPushButton( this, "buttonNext" );
    layout2->addWidget( buttonNext );

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

    buttonCancel = new TQPushButton( this, "buttonCancel" );
    buttonCancel->setAutoDefault( true );
    layout2->addWidget( buttonCancel );
    AlbumEditorLayout->addLayout( layout2 );
    languageChange();
    resize( TQSize(423, 365).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() ) );

    // tab order
    setTabOrder( track_artist, track_title );
    setTabOrder( track_title, track_comment );
    setTabOrder( track_comment, artist );
    setTabOrder( artist, album );
    setTabOrder( album, year );
    setTabOrder( year, genre );
    setTabOrder( genre, comment );
    setTabOrder( comment, buttonPrevious );
    setTabOrder( buttonPrevious, buttonNext );
    setTabOrder( buttonNext, buttonOk );
    setTabOrder( buttonOk, buttonCancel );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void AlbumEditor::languageChange()
{
    setCaption( tr2i18n( "Album Editor" ) );
    groupBox2->setTitle( tr2i18n( "Current Track" ) );
    textLabel2->setText( tr2i18n( "Comment:" ) );
    trackLabel->setText( tr2i18n( "Title:" ) );
    textLabel3->setText( tr2i18n( "Artist:" ) );
    groupBox1->setTitle( tr2i18n( "Album" ) );
    TextLabel5->setText( tr2i18n( "Artist:" ) );
    TextLabel6->setText( tr2i18n( "Album:" ) );
    TextLabel7->setText( tr2i18n( "Year:" ) );
    TextLabel1->setText( tr2i18n( "Genre:" ) );
    textLabel1->setText( tr2i18n( "Comment:" ) );
    buttonPrevious->setText( tr2i18n( "&Previous Track" ) );
    buttonNext->setText( tr2i18n( "&Next Track" ) );
    buttonOk->setText( tr2i18n( "&OK" ) );
    buttonCancel->setText( tr2i18n( "&Cancel" ) );
}

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

TQMetaObject *AlbumEditor::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_AlbumEditor( "AlbumEditor", &AlbumEditor::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* AlbumEditor::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 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"AlbumEditor", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_AlbumEditor.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool AlbumEditor::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: languageChange(); break;
    default:
	return TQDialog::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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