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

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

#include "ktouchprefcolorslayout.h"

#include <ntqvariant.h>
#include <kcolorbutton.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 KTouchPrefColorsLayout as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
KTouchPrefColorsLayout::KTouchPrefColorsLayout( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "KTouchPrefColorsLayout" );
    KTouchPrefColorsLayoutLayout = new TQVBoxLayout( this, 0, 6, "KTouchPrefColorsLayoutLayout"); 

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

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

    textLabel2 = new TQLabel( groupBox5, "textLabel2" );
    layout3->addWidget( textLabel2 );
    spacer13 = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout3->addItem( spacer13 );

    kcfg_CurrentColorScheme = new TQComboBox( false, groupBox5, "kcfg_CurrentColorScheme" );
    layout3->addWidget( kcfg_CurrentColorScheme );
    groupBox5Layout->addLayout( layout3 );

    kcfg_CommonTypingLineColors = new TQCheckBox( groupBox5, "kcfg_CommonTypingLineColors" );
    groupBox5Layout->addWidget( kcfg_CommonTypingLineColors );

    colorsGroup = new TQGroupBox( groupBox5, "colorsGroup" );
    colorsGroup->setColumnLayout(0, TQt::Vertical );
    colorsGroup->layout()->setSpacing( 6 );
    colorsGroup->layout()->setMargin( 11 );
    colorsGroupLayout = new TQVBoxLayout( colorsGroup->layout() );
    colorsGroupLayout->setAlignment( TQt::AlignTop );

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

    kcfg_TeacherBackgroundColor = new KColorButton( colorsGroup, "kcfg_TeacherBackgroundColor" );
    kcfg_TeacherBackgroundColor->setMinimumSize( TQSize( 40, 0 ) );

    layout9->addWidget( kcfg_TeacherBackgroundColor, 0, 7 );

    textLabel1_3 = new TQLabel( colorsGroup, "textLabel1_3" );

    layout9->addWidget( textLabel1_3, 1, 0 );

    kcfg_TeacherTextColor = new KColorButton( colorsGroup, "kcfg_TeacherTextColor" );
    kcfg_TeacherTextColor->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, kcfg_TeacherTextColor->sizePolicy().hasHeightForWidth() ) );
    kcfg_TeacherTextColor->setMinimumSize( TQSize( 40, 0 ) );

    layout9->addWidget( kcfg_TeacherTextColor, 0, 4 );
    spacer16 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout9->addItem( spacer16, 0, 2 );
    spacer11_3 = new TQSpacerItem( 20, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout9->addItem( spacer11_3, 0, 5 );

    kcfg_StudentTextColor = new KColorButton( colorsGroup, "kcfg_StudentTextColor" );
    kcfg_StudentTextColor->setMinimumSize( TQSize( 40, 0 ) );

    layout9->addWidget( kcfg_StudentTextColor, 1, 4 );

    textLabel1_2 = new TQLabel( colorsGroup, "textLabel1_2" );

    layout9->addWidget( textLabel1_2, 0, 6 );

    kcfg_StudentBackgroundColor = new KColorButton( colorsGroup, "kcfg_StudentBackgroundColor" );
    kcfg_StudentBackgroundColor->setMinimumSize( TQSize( 40, 0 ) );

    layout9->addWidget( kcfg_StudentBackgroundColor, 1, 7 );

    textLabel1_4_2 = new TQLabel( colorsGroup, "textLabel1_4_2" );

    layout9->addWidget( textLabel1_4_2, 1, 3 );
    spacer5_2_2 = new TQSpacerItem( 20, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout9->addItem( spacer5_2_2, 1, 5 );

    textLabel1_4 = new TQLabel( colorsGroup, "textLabel1_4" );

    layout9->addWidget( textLabel1_4, 0, 3 );

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

    layout9->addMultiCellWidget( textLabel1, 0, 0, 0, 1 );
    spacer16_2 = new TQSpacerItem( 34, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout9->addMultiCell( spacer16_2, 1, 1, 1, 2 );

    textLabel1_2_2 = new TQLabel( colorsGroup, "textLabel1_2_2" );

    layout9->addWidget( textLabel1_2_2, 1, 6 );
    colorsGroupLayout->addLayout( layout9 );
    spacer13_2 = new TQSpacerItem( 20, 16, TQSizePolicy::Minimum, TQSizePolicy::Fixed );
    colorsGroupLayout->addItem( spacer13_2 );

    kcfg_ColorOnError = new TQCheckBox( colorsGroup, "kcfg_ColorOnError" );
    colorsGroupLayout->addWidget( kcfg_ColorOnError );

    layout4 = new TQHBoxLayout( 0, 0, 6, "layout4"); 
    spacer11 = new TQSpacerItem( 140, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout4->addItem( spacer11 );

    errorTextLabel = new TQLabel( colorsGroup, "errorTextLabel" );
    layout4->addWidget( errorTextLabel );

    kcfg_ErrorTextColor = new KColorButton( colorsGroup, "kcfg_ErrorTextColor" );
    kcfg_ErrorTextColor->setEnabled( true );
    kcfg_ErrorTextColor->setMinimumSize( TQSize( 40, 0 ) );
    kcfg_ErrorTextColor->setColor( TQColor( 170, 0, 0 ) );
    layout4->addWidget( kcfg_ErrorTextColor );
    spacer1 = new TQSpacerItem( 20, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
    layout4->addItem( spacer1 );

    errorBackgroundLabel = new TQLabel( colorsGroup, "errorBackgroundLabel" );
    layout4->addWidget( errorBackgroundLabel );

    kcfg_ErrorBackgroundColor = new KColorButton( colorsGroup, "kcfg_ErrorBackgroundColor" );
    kcfg_ErrorBackgroundColor->setEnabled( true );
    kcfg_ErrorBackgroundColor->setMinimumSize( TQSize( 40, 0 ) );
    kcfg_ErrorBackgroundColor->setColor( TQColor( 175, 0, 55 ) );
    layout4->addWidget( kcfg_ErrorBackgroundColor );
    colorsGroupLayout->addLayout( layout4 );
    groupBox5Layout->addWidget( colorsGroup );
    KTouchPrefColorsLayoutLayout->addWidget( groupBox5 );
    spacer17 = new TQSpacerItem( 20, 40, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    KTouchPrefColorsLayoutLayout->addItem( spacer17 );
    languageChange();
    resize( TQSize(467, 375).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( kcfg_TeacherTextColor, kcfg_TeacherBackgroundColor );
    setTabOrder( kcfg_TeacherBackgroundColor, kcfg_StudentTextColor );
    setTabOrder( kcfg_StudentTextColor, kcfg_StudentBackgroundColor );
    setTabOrder( kcfg_StudentBackgroundColor, kcfg_ColorOnError );
    setTabOrder( kcfg_ColorOnError, kcfg_ErrorTextColor );
    setTabOrder( kcfg_ErrorTextColor, kcfg_ErrorBackgroundColor );
    setTabOrder( kcfg_ErrorBackgroundColor, kcfg_CurrentColorScheme );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KTouchPrefColorsLayout::languageChange()
{
    setCaption( tr2i18n( "Color Settings" ) );
    groupBox5->setTitle( tr2i18n( "Color Scheme" ) );
    textLabel2->setText( tr2i18n( "Select color scheme:" ) );
    kcfg_CurrentColorScheme->clear();
    kcfg_CurrentColorScheme->insertItem( tr2i18n( "Black & White" ) );
    kcfg_CurrentColorScheme->insertItem( tr2i18n( "Classic" ) );
    kcfg_CurrentColorScheme->insertItem( tr2i18n( "Deep Blue" ) );
    kcfg_CurrentColorScheme->insertItem( tr2i18n( "Stripy" ) );
    TQToolTip::add( kcfg_CurrentColorScheme, tr2i18n( "Color scheme for displaying the keyboard" ) );
    TQWhatsThis::add( kcfg_CurrentColorScheme, tr2i18n( "You can choose here the color scheme for displaying the keyboard. <i>Black & White</i> will display all keyboard letters black on white, <i>Classic</i> will colorize the same color for each finger, <i>Deep Blue</i> will display the keyboard in different deep blue colors and <i>Stripy</i> will alternate blue and gray for letters corresponding to same finger." ) );
    kcfg_CommonTypingLineColors->setText( tr2i18n( "Use common typing line colors independent of color scheme" ) );
    colorsGroup->setTitle( tr2i18n( "Typing Line Colors" ) );
    kcfg_TeacherBackgroundColor->setText( TQString::null );
    TQToolTip::add( kcfg_TeacherBackgroundColor, tr2i18n( "The background for the teacher's line" ) );
    TQWhatsThis::add( kcfg_TeacherBackgroundColor, tr2i18n( "You can change here the background color for the teacher's line (the line of letters you have to type.)" ) );
    textLabel1_3->setText( tr2i18n( "Typing line" ) );
    kcfg_TeacherTextColor->setText( TQString::null );
    TQToolTip::add( kcfg_TeacherTextColor, tr2i18n( "The color for the teacher's line" ) );
    kcfg_StudentTextColor->setText( TQString::null );
    TQToolTip::add( kcfg_StudentTextColor, tr2i18n( "Change the text color for the student line" ) );
    TQWhatsThis::add( kcfg_StudentTextColor, tr2i18n( "Here you can change the color of the text you type in the student line." ) );
    textLabel1_2->setText( tr2i18n( "Background:" ) );
    kcfg_StudentBackgroundColor->setText( TQString::null );
    textLabel1_4_2->setText( tr2i18n( "Text:" ) );
    textLabel1_4->setText( tr2i18n( "Text:" ) );
    textLabel1->setText( tr2i18n( "Teacher's line" ) );
    textLabel1_2_2->setText( tr2i18n( "Background:" ) );
    kcfg_ColorOnError->setText( tr2i18n( "Use different color on error in typing line" ) );
    TQToolTip::add( kcfg_ColorOnError, tr2i18n( "If checked this shows your error using the colors below on the typing line" ) );
    errorTextLabel->setText( tr2i18n( "Text:" ) );
    kcfg_ErrorTextColor->setText( TQString::null );
    TQToolTip::add( kcfg_ErrorTextColor, tr2i18n( "Choose the text color for error in typing line" ) );
    TQWhatsThis::add( kcfg_ErrorTextColor, tr2i18n( "When you have checked 'Use different color on error in the typing line', you can then choose a color for the text of errors. You make an error when you type a wrong letter in the student line. This is a way to make your errors more visible." ) );
    errorBackgroundLabel->setText( tr2i18n( "Background:" ) );
    kcfg_ErrorBackgroundColor->setText( TQString::null );
    TQToolTip::add( kcfg_ErrorBackgroundColor, tr2i18n( "Choose the background color for error in typing line" ) );
    TQWhatsThis::add( kcfg_ErrorBackgroundColor, tr2i18n( "When you have checked 'Use different color on error in the typing line', you can then choose a color for the background of errors. You make an error when you type a wrong letter in the student line. This is a way to make your errors more visible." ) );
}

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

TQMetaObject *KTouchPrefColorsLayout::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KTouchPrefColorsLayout( "KTouchPrefColorsLayout", &KTouchPrefColorsLayout::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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