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

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

#include "klatinsettings_vocabpage.h"

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

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

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

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

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

    kcfg_LatinToLang = new TQRadioButton( ButtonGroup, "kcfg_LatinToLang" );
    kcfg_LatinToLang->setChecked( true );
    layout10->addWidget( kcfg_LatinToLang );

    kcfg_LangToLatin = new TQRadioButton( ButtonGroup, "kcfg_LangToLatin" );
    layout10->addWidget( kcfg_LangToLatin );
    layout24->addLayout( layout10 );
    ButtonGroupLayout->addLayout( layout24 );

    VocabPageLayout->addWidget( ButtonGroup, 1, 0 );

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

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

    kcfg_DefaultFile = new KURLRequester( MiscGroup, "kcfg_DefaultFile" );
    layout6->addWidget( kcfg_DefaultFile );

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

    QuestionsLabel = new TQLabel( MiscGroup, "QuestionsLabel" );
    QuestionsLabel->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) );
    layout6_2->addWidget( QuestionsLabel );

    kcfg_NumOfQuestions = new KIntSpinBox( MiscGroup, "kcfg_NumOfQuestions" );
    kcfg_NumOfQuestions->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, kcfg_NumOfQuestions->sizePolicy().hasHeightForWidth() ) );
    kcfg_NumOfQuestions->setMaxValue( 50 );
    kcfg_NumOfQuestions->setValue( 10 );
    layout6_2->addWidget( kcfg_NumOfQuestions );
    layout6->addLayout( layout6_2 );

    MiscGroupLayout->addLayout( layout6, 0, 0 );

    VocabPageLayout->addWidget( MiscGroup, 0, 0 );
    languageChange();
    resize( TQSize(182, 203).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void VocabPage::languageChange()
{
    setCaption( tr2i18n( "Configure Vocabulary" ) );
    ButtonGroup->setTitle( tr2i18n( "Testing Style" ) );
    kcfg_LatinToLang->setText( tr2i18n( "To Latin" ) );
    TQToolTip::add( kcfg_LatinToLang, tr2i18n( "Question in your language and answers in Latin" ) );
    TQWhatsThis::add( kcfg_LatinToLang, tr2i18n( "Choose to be tested from your language to Latin, which means the word will be displayed in your language and you will have to choose from 4 Latin translations." ) );
    kcfg_LangToLatin->setText( tr2i18n( "From Latin" ) );
    TQToolTip::add( kcfg_LangToLatin, tr2i18n( "Question in Latin and answers in your language" ) );
    TQWhatsThis::add( kcfg_LangToLatin, tr2i18n( "Choose  to be tested from Latin to your language, which means the word will be displayed in Latin and you will have to choose from 4 translations in your language." ) );
    MiscGroup->setTitle( tr2i18n( "Miscellaneous" ) );
    TQToolTip::add( kcfg_DefaultFile, tr2i18n( "The file you are tested on in vocabulary" ) );
    TQWhatsThis::add( kcfg_DefaultFile, tr2i18n( "You can change the file you are tested on for the vocabulary section" ) );
    QuestionsLabel->setText( tr2i18n( "Number of questions:" ) );
    TQToolTip::add( QuestionsLabel, tr2i18n( "Set the number of questions you want to be tested on" ) );
    TQWhatsThis::add( QuestionsLabel, tr2i18n( "Here you can set the number of questions you want to be tested on. When this number is reached, a result dialog appears." ) );
    TQToolTip::add( kcfg_NumOfQuestions, tr2i18n( "Number of questions to be asked before ending" ) );
    TQWhatsThis::add( kcfg_NumOfQuestions, tr2i18n( "Numbers of questions to ask at a time" ) );
}

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

TQMetaObject *VocabPage::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_VocabPage( "VocabPage", &VocabPage::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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