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

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

#include "CommonEntryPageForm.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqframe.h>
#include <ntqlineedit.h>
#include <ntqcombobox.h>
#include <ntqlabel.h>
#include <ntqlistbox.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a CommonEntryPageForm as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
CommonEntryPageForm::CommonEntryPageForm( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "CommonEntryPageForm" );
    setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)3, 0, 0, sizePolicy().hasHeightForWidth() ) );
    CommonEntryPageFormLayout = new TQVBoxLayout( this, 0, 6, "CommonEntryPageFormLayout"); 

    asdf = new TQGroupBox( this, "asdf" );
    asdf->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)3, 0, 0, asdf->sizePolicy().hasHeightForWidth() ) );
    asdf->setColumnLayout(0, TQt::Vertical );
    asdf->layout()->setSpacing( 6 );
    asdf->layout()->setMargin( 11 );
    asdfLayout = new TQVBoxLayout( asdf->layout() );
    asdfLayout->setAlignment( TQt::AlignTop );

    Frame4 = new TQFrame( asdf, "Frame4" );
    Frame4->setFrameShape( TQFrame::NoFrame );
    Frame4->setFrameShadow( TQFrame::Plain );
    Frame4Layout = new TQGridLayout( Frame4, 1, 1, 11, 6, "Frame4Layout"); 

    expr_line = new TQLineEdit( Frame4, "expr_line" );
    expr_line->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)5, 0, 0, expr_line->sizePolicy().hasHeightForWidth() ) );

    Frame4Layout->addWidget( expr_line, 0, 1 );

    pronunce_line = new TQLineEdit( Frame4, "pronunce_line" );
    pronunce_line->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)5, 0, 0, pronunce_line->sizePolicy().hasHeightForWidth() ) );

    Frame4Layout->addWidget( pronunce_line, 2, 1 );

    lesson_box = new TQComboBox( false, Frame4, "lesson_box" );
    lesson_box->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 0, 0, lesson_box->sizePolicy().hasHeightForWidth() ) );

    Frame4Layout->addWidget( lesson_box, 1, 1 );

    expr_label = new TQLabel( Frame4, "expr_label" );

    Frame4Layout->addWidget( expr_label, 0, 0 );

    pronunce_label = new TQLabel( Frame4, "pronunce_label" );

    Frame4Layout->addWidget( pronunce_label, 2, 0 );

    lesson_label = new TQLabel( Frame4, "lesson_label" );

    Frame4Layout->addWidget( lesson_label, 1, 0 );

    b_LessDlg = new TQPushButton( Frame4, "b_LessDlg" );
    b_LessDlg->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, b_LessDlg->sizePolicy().hasHeightForWidth() ) );
    b_LessDlg->setMinimumSize( TQSize( 30, 0 ) );
    b_LessDlg->setMaximumSize( TQSize( 30, 30 ) );

    Frame4Layout->addWidget( b_LessDlg, 1, 2 );

    b_pronDlg = new TQPushButton( Frame4, "b_pronDlg" );
    b_pronDlg->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, b_pronDlg->sizePolicy().hasHeightForWidth() ) );
    b_pronDlg->setMinimumSize( TQSize( 30, 0 ) );
    b_pronDlg->setMaximumSize( TQSize( 30, 30 ) );

    Frame4Layout->addWidget( b_pronDlg, 2, 2 );
    asdfLayout->addWidget( Frame4 );

    type_label = new TQGroupBox( asdf, "type_label" );
    type_label->setColumnLayout(0, TQt::Vertical );
    type_label->layout()->setSpacing( 6 );
    type_label->layout()->setMargin( 11 );
    type_labelLayout = new TQHBoxLayout( type_label->layout() );
    type_labelLayout->setAlignment( TQt::AlignTop );

    type_box = new TQComboBox( false, type_label, "type_box" );
    type_box->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 0, 0, type_box->sizePolicy().hasHeightForWidth() ) );
    type_labelLayout->addWidget( type_box );
    Spacer2 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Minimum );
    type_labelLayout->addItem( Spacer2 );

    subtype_label = new TQLabel( type_label, "subtype_label" );
    type_labelLayout->addWidget( subtype_label );

    subtype_box = new TQComboBox( false, type_label, "subtype_box" );
    subtype_box->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 0, 0, subtype_box->sizePolicy().hasHeightForWidth() ) );
    type_labelLayout->addWidget( subtype_box );

    b_TypeDlg = new TQPushButton( type_label, "b_TypeDlg" );
    b_TypeDlg->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, b_TypeDlg->sizePolicy().hasHeightForWidth() ) );
    b_TypeDlg->setMinimumSize( TQSize( 30, 0 ) );
    b_TypeDlg->setMaximumSize( TQSize( 30, 30 ) );
    type_labelLayout->addWidget( b_TypeDlg );
    asdfLayout->addWidget( type_label );

    usage_label = new TQGroupBox( asdf, "usage_label" );
    usage_label->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, usage_label->sizePolicy().hasHeightForWidth() ) );
    usage_label->setColumnLayout(0, TQt::Vertical );
    usage_label->layout()->setSpacing( 6 );
    usage_label->layout()->setMargin( 11 );
    usage_labelLayout = new TQGridLayout( usage_label->layout() );
    usage_labelLayout->setAlignment( TQt::AlignTop );

    b_usageDlg = new TQPushButton( usage_label, "b_usageDlg" );
    b_usageDlg->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, b_usageDlg->sizePolicy().hasHeightForWidth() ) );
    b_usageDlg->setMinimumSize( TQSize( 30, 0 ) );
    b_usageDlg->setMaximumSize( TQSize( 30, 24 ) );

    usage_labelLayout->addWidget( b_usageDlg, 0, 2 );
    Spacer1 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Preferred );
    usage_labelLayout->addItem( Spacer1, 1, 2 );

    usage_box = new TQListBox( usage_label, "usage_box" );
    usage_box->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, usage_box->sizePolicy().hasHeightForWidth() ) );
    usage_box->setMaximumSize( TQSize( 32767, 90 ) );
    usage_box->setSelectionMode( TQListBox::Multi );

    usage_labelLayout->addMultiCellWidget( usage_box, 0, 1, 0, 0 );

    usage_line = new TQLabel( usage_label, "usage_line" );
    usage_line->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)5, 0, 0, usage_line->sizePolicy().hasHeightForWidth() ) );
    usage_line->setMinimumSize( TQSize( 0, 80 ) );
    usage_line->setFrameShape( TQLabel::WinPanel );
    usage_line->setFrameShadow( TQLabel::Sunken );
    usage_line->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignTop | TQLabel::AlignLeft ) );

    usage_labelLayout->addMultiCellWidget( usage_line, 0, 1, 1, 1 );
    asdfLayout->addWidget( usage_label );

    c_active = new TQCheckBox( asdf, "c_active" );
    asdfLayout->addWidget( c_active );
    CommonEntryPageFormLayout->addWidget( asdf );
    languageChange();
    resize( TQSize(516, 364).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( expr_line, lesson_box );
    setTabOrder( lesson_box, b_LessDlg );
    setTabOrder( b_LessDlg, pronunce_line );
    setTabOrder( pronunce_line, b_pronDlg );
    setTabOrder( b_pronDlg, type_box );
    setTabOrder( type_box, subtype_box );
    setTabOrder( subtype_box, b_TypeDlg );
    setTabOrder( b_TypeDlg, usage_box );
    setTabOrder( usage_box, b_usageDlg );
    setTabOrder( b_usageDlg, c_active );

    // buddies
    expr_label->setBuddy( expr_line );
    pronunce_label->setBuddy( pronunce_line );
    lesson_label->setBuddy( lesson_box );
    subtype_label->setBuddy( subtype_box );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void CommonEntryPageForm::languageChange()
{
    setCaption( tr2i18n( "-" ) );
    TQToolTip::add( this, tr2i18n( "Invokes lesson input dialog" ) );
    asdf->setTitle( tr2i18n( "Common Properties" ) );
    expr_label->setText( tr2i18n( "&Expression:" ) );
    pronunce_label->setText( tr2i18n( "&Pronunciation:" ) );
    lesson_label->setText( tr2i18n( "&Lesson:" ) );
    b_LessDlg->setText( tr2i18n( "-" ) );
    TQToolTip::add( b_LessDlg, tr2i18n( "Invokes input dialog for lessons" ) );
    b_pronDlg->setText( tr2i18n( "-" ) );
    TQToolTip::add( b_pronDlg, tr2i18n( "Invokes dialog page with characters from phonetic alphabet" ) );
    type_label->setTitle( tr2i18n( "T&ype" ) );
    subtype_label->setText( tr2i18n( "&Subtype:" ) );
    b_TypeDlg->setText( tr2i18n( "-" ) );
    TQToolTip::add( b_TypeDlg, tr2i18n( "Invokes input dialog for word types" ) );
    usage_label->setTitle( tr2i18n( "-" ) );
    b_usageDlg->setText( tr2i18n( "-" ) );
    TQToolTip::add( b_usageDlg, tr2i18n( "Invokes input dialog for usage labels" ) );
    c_active->setText( tr2i18n( "Acti&ve" ) );
}

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

TQMetaObject *CommonEntryPageForm::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_CommonEntryPageForm( "CommonEntryPageForm", &CommonEntryPageForm::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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