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

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

#include "mainsettingswidget.h"

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

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

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

    textLabel1_2 = new TQLabel( groupBox1, "textLabel1_2" );
    groupBox1Layout->addWidget( textLabel1_2 );

    kcfg_hintHideTime = new TQComboBox( false, groupBox1, "kcfg_hintHideTime" );
    groupBox1Layout->addWidget( kcfg_hintHideTime );
    MainSettingsWidgetLayout->addWidget( groupBox1 );

    groupBox3 = new TQGroupBox( this, "groupBox3" );
    groupBox3->setColumnLayout(0, TQt::Vertical );
    groupBox3->layout()->setSpacing( 6 );
    groupBox3->layout()->setMargin( 11 );
    groupBox3Layout = new TQVBoxLayout( groupBox3->layout() );
    groupBox3Layout->setAlignment( TQt::AlignTop );

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

    textLabel1 = new TQLabel( groupBox3, "textLabel1" );
    layout2->addWidget( textLabel1 );

    cboxTranslation = new TQComboBox( false, groupBox3, "cboxTranslation" );
    layout2->addWidget( cboxTranslation );
    groupBox3Layout->addLayout( layout2 );
    MainSettingsWidgetLayout->addWidget( groupBox3 );

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

    kcfg_useStandardFonts = new TQCheckBox( this, "kcfg_useStandardFonts" );
    layout2_2->addWidget( kcfg_useStandardFonts );

    getFontsButton = new TQPushButton( this, "getFontsButton" );
    layout2_2->addWidget( getFontsButton );
    MainSettingsWidgetLayout->addLayout( layout2_2 );

    kcfg_useSounds = new TQCheckBox( this, "kcfg_useSounds" );
    MainSettingsWidgetLayout->addWidget( kcfg_useSounds );
    spacer1_2 = new TQSpacerItem( 16, 16, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    MainSettingsWidgetLayout->addItem( spacer1_2 );
    languageChange();
    resize( TQSize(281, 239).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( kcfg_hintHideTime, kcfg_useSounds );

    // buddies
    textLabel1->setBuddy( cboxTranslation );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void MainSettingsWidget::languageChange()
{
    setCaption( tr2i18n( "General" ) );
    TQWhatsThis::add( this, tr2i18n( "This setting allows you to set the length of time that Kanagram's hint bubble is shown." ) );
    groupBox1->setTitle( tr2i18n( "Hints" ) );
    textLabel1_2->setText( tr2i18n( "Auto-hide hints after:" ) );
    kcfg_hintHideTime->clear();
    kcfg_hintHideTime->insertItem( tr2i18n( "Do Not Auto-Hide Hints" ) );
    kcfg_hintHideTime->insertItem( tr2i18n( "3 Seconds" ) );
    kcfg_hintHideTime->insertItem( tr2i18n( "5 Seconds" ) );
    kcfg_hintHideTime->insertItem( tr2i18n( "7 Seconds" ) );
    kcfg_hintHideTime->insertItem( tr2i18n( "9 Seconds" ) );
    groupBox3->setTitle( tr2i18n( "Vocabulary Options" ) );
    textLabel1->setText( tr2i18n( "Play using:" ) );
    kcfg_useStandardFonts->setText( tr2i18n( "Use standard fonts" ) );
    TQWhatsThis::add( kcfg_useStandardFonts, tr2i18n( "Uses a standard font for the chalkboard/interface." ) );
    getFontsButton->setText( tr2i18n( "Get Chalk Font" ) );
    kcfg_useSounds->setText( tr2i18n( "Use sou&nds" ) );
    TQWhatsThis::add( kcfg_useSounds, tr2i18n( "Turns sounds on/off." ) );
}

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

TQMetaObject *MainSettingsWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_MainSettingsWidget( "MainSettingsWidget", &MainSettingsWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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