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

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

#include "vocabeditwidget.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqlineedit.h>
#include <ntqlistbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

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

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

    btnSave = new TQPushButton( this, "btnSave" );
    layout6->addWidget( btnSave );

    btnClose = new TQPushButton( this, "btnClose" );
    layout6->addWidget( btnClose );

    layout7->addLayout( layout6, 1, 0 );

    layout8 = new TQVBoxLayout( 0, 0, 6, "layout8"); 

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

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

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

    txtVocabName = new TQLineEdit( this, "txtVocabName" );

    layout5->addWidget( txtVocabName, 0, 1 );

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

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

    txtDescription = new TQLineEdit( this, "txtDescription" );

    layout5->addWidget( txtDescription, 1, 1 );
    layout8->addLayout( layout5 );

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

    layout6_2 = new TQVBoxLayout( 0, 0, 6, "layout6_2"); 

    btnRemoveWord = new TQPushButton( this, "btnRemoveWord" );
    layout6_2->addWidget( btnRemoveWord );

    btnNewWord = new TQPushButton( this, "btnNewWord" );
    layout6_2->addWidget( btnNewWord );
    layout7_2->addLayout( layout6_2 );

    lboxWords = new TQListBox( this, "lboxWords" );
    layout7_2->addWidget( lboxWords );
    layout8->addLayout( layout7_2 );

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

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

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

    txtHint = new TQLineEdit( this, "txtHint" );

    layout4->addWidget( txtHint, 1, 1 );

    txtWord = new TQLineEdit( this, "txtWord" );

    layout4->addWidget( txtWord, 0, 1 );

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

    layout4->addWidget( textLabel4, 1, 0 );
    layout8->addLayout( layout4 );

    layout7->addLayout( layout8, 0, 0 );

    VocabEditWidgetLayout->addLayout( layout7, 0, 0 );
    languageChange();
    resize( TQSize(394, 369).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( txtVocabName, txtDescription );
    setTabOrder( txtDescription, btnRemoveWord );
    setTabOrder( btnRemoveWord, btnNewWord );
    setTabOrder( btnNewWord, txtWord );
    setTabOrder( txtWord, txtHint );
    setTabOrder( txtHint, btnSave );
    setTabOrder( btnSave, btnClose );
    setTabOrder( btnClose, lboxWords );

    // buddies
    textLabel2->setBuddy( txtDescription );
    textLabel1->setBuddy( txtVocabName );
    textLabel3->setBuddy( txtWord );
    textLabel4->setBuddy( txtHint );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void VocabEditWidget::languageChange()
{
    setCaption( tr2i18n( "Vocabulary Editor" ) );
    btnSave->setText( tr2i18n( "Save" ) );
    btnClose->setText( tr2i18n( "Close" ) );
    textLabel2->setText( tr2i18n( "Description:" ) );
    TQWhatsThis::add( textLabel2, tr2i18n( "The description of the vocabulary. If you're creating a new vocabulary, add a description so that users of your vocabulary will know what kinds of words it contains." ) );
    textLabel1->setText( tr2i18n( "Vocabulary name:" ) );
    TQWhatsThis::add( textLabel1, tr2i18n( "The name of the vocabulary you are editing." ) );
    btnRemoveWord->setText( tr2i18n( "Remove Word" ) );
    TQWhatsThis::add( btnRemoveWord, tr2i18n( "Removes the selected word." ) );
    btnNewWord->setText( tr2i18n( "New Word" ) );
    TQWhatsThis::add( btnNewWord, tr2i18n( "Creates a new word." ) );
    TQWhatsThis::add( lboxWords, tr2i18n( "The list of words in the vocabulary." ) );
    textLabel3->setText( tr2i18n( "Word:" ) );
    TQWhatsThis::add( textLabel3, tr2i18n( "The selected word. This box allows you to edit the selected word." ) );
    textLabel4->setText( tr2i18n( "Hint:" ) );
    TQWhatsThis::add( textLabel4, tr2i18n( "The selected hint. Add a hint to aid in guessing the word." ) );
}

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

TQMetaObject *VocabEditWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_VocabEditWidget( "VocabEditWidget", &VocabEditWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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