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

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

#include "ktouchprefkeyboardlayout.h"

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

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

    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 );

    kcfg_ShowAnimation = new TQCheckBox( groupBox1, "kcfg_ShowAnimation" );
    groupBox1Layout->addWidget( kcfg_ShowAnimation );

    kcfg_HideKeyboard = new TQCheckBox( groupBox1, "kcfg_HideKeyboard" );
    groupBox1Layout->addWidget( kcfg_HideKeyboard );
    spacer2 = new TQSpacerItem( 20, 16, TQSizePolicy::Minimum, TQSizePolicy::Fixed );
    groupBox1Layout->addItem( spacer2 );

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

    kcfg_OverrideKeyboardFont = new TQCheckBox( groupBox1, "kcfg_OverrideKeyboardFont" );
    layout1->addWidget( kcfg_OverrideKeyboardFont );

    textLabel1 = new TQLabel( groupBox1, "textLabel1" );
    layout1->addWidget( textLabel1 );

    kcfg_KeyboardFont = new TDEFontRequester( groupBox1, "kcfg_KeyboardFont" );
    layout1->addWidget( kcfg_KeyboardFont );
    groupBox1Layout->addLayout( layout1 );
    KTouchPrefKeyboardLayoutLayout->addWidget( groupBox1 );
    spacer14 = new TQSpacerItem( 20, 30, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    KTouchPrefKeyboardLayoutLayout->addItem( spacer14 );
    languageChange();
    resize( TQSize(498, 249).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KTouchPrefKeyboardLayout::languageChange()
{
    setCaption( tr2i18n( "Keyboard Settings" ) );
    groupBox1->setTitle( TQString::null );
    kcfg_ShowAnimation->setText( tr2i18n( "Highlight &keys on keyboard" ) );
    TQToolTip::add( kcfg_ShowAnimation, tr2i18n( "Show on the keyboards the keys you have to type" ) );
    TQWhatsThis::add( kcfg_ShowAnimation, tr2i18n( "This highlights on the keyboard the key you have to type next. It is easier to type when this is checked." ) );
    kcfg_HideKeyboard->setText( tr2i18n( "Hide keyboard" ) );
    kcfg_OverrideKeyboardFont->setText( tr2i18n( "Override keyboard fonts" ) );
    TQToolTip::add( kcfg_OverrideKeyboardFont, tr2i18n( "If checked you can specify your own keyboard font instead of the predefined one of the keyboard layout." ) );
    TQWhatsThis::add( kcfg_OverrideKeyboardFont, tr2i18n( "Every keyboard layout may specify its own font. If the predefined font of a certain keyboard layout does not work or you would like to have your own, check this button. You may then choose your own font that will be used to draw the characters on the keys." ) );
    textLabel1->setText( tr2i18n( "Font for keys on keyboard:" ) );
}

void KTouchPrefKeyboardLayout::fontChooseBtnClicked()
{
    tqWarning( "KTouchPrefKeyboardLayout::fontChooseBtnClicked(): Not implemented yet" );
}

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

TQMetaObject *KTouchPrefKeyboardLayout::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KTouchPrefKeyboardLayout( "KTouchPrefKeyboardLayout", &KTouchPrefKeyboardLayout::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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