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

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

#include "ktouchstatuslayout.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <ntqlcdnumber.h>
#include <ntqprogressbar.h>
#include <ntqlabel.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    GroupBox1 = new TQGroupBox( this, "GroupBox1" );
    GroupBox1->setColumnLayout(0, TQt::Vertical );
    GroupBox1->layout()->setSpacing( 2 );
    GroupBox1->layout()->setMargin( 11 );
    GroupBox1Layout = new TQVBoxLayout( GroupBox1->layout() );
    GroupBox1Layout->setAlignment( TQt::AlignTop );

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

    levelLCD = new TQLCDNumber( GroupBox1, "levelLCD" );
    levelLCD->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, levelLCD->sizePolicy().hasHeightForWidth() ) );
    levelLCD->setMinimumSize( TQSize( 0, 30 ) );
    levelLCD->setFrameShape( TQLCDNumber::NoFrame );
    levelLCD->setNumDigits( 3 );
    levelLCD->setMode( TQLCDNumber::Dec );
    levelLCD->setSegmentStyle( TQLCDNumber::Flat );
    layout2->addWidget( levelLCD );

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

    levelUpBtn = new TQPushButton( GroupBox1, "levelUpBtn" );
    levelUpBtn->setMaximumSize( TQSize( 20, 20 ) );
    levelUpBtn->setFocusPolicy( TQPushButton::NoFocus );
    layout2_2->addWidget( levelUpBtn );

    levelDownBtn = new TQPushButton( GroupBox1, "levelDownBtn" );
    levelDownBtn->setMaximumSize( TQSize( 20, 20 ) );
    levelDownBtn->setFocusPolicy( TQPushButton::NoFocus );
    layout2_2->addWidget( levelDownBtn );
    layout2->addLayout( layout2_2 );
    GroupBox1Layout->addLayout( layout2 );
    KTouchStatusLayoutLayout->addWidget( GroupBox1 );

    GroupBox11 = new TQGroupBox( this, "GroupBox11" );
    GroupBox11->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)5, 0, 0, GroupBox11->sizePolicy().hasHeightForWidth() ) );
    GroupBox11->setColumnLayout(0, TQt::Vertical );
    GroupBox11->layout()->setSpacing( 6 );
    GroupBox11->layout()->setMargin( 11 );
    GroupBox11Layout = new TQVBoxLayout( GroupBox11->layout() );
    GroupBox11Layout->setAlignment( TQt::AlignTop );
    spacer2 = new TQSpacerItem( 20, 2, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    GroupBox11Layout->addItem( spacer2 );

    speedLCD = new TQLCDNumber( GroupBox11, "speedLCD" );
    speedLCD->setMinimumSize( TQSize( 0, 30 ) );
    speedLCD->setFrameShape( TQLCDNumber::NoFrame );
    speedLCD->setNumDigits( 3 );
    speedLCD->setSegmentStyle( TQLCDNumber::Flat );
    GroupBox11Layout->addWidget( speedLCD );
    spacer3 = new TQSpacerItem( 20, 2, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    GroupBox11Layout->addItem( spacer3 );
    KTouchStatusLayoutLayout->addWidget( GroupBox11 );

    GroupBox12 = new TQGroupBox( this, "GroupBox12" );
    GroupBox12->setColumnLayout(0, TQt::Vertical );
    GroupBox12->layout()->setSpacing( 6 );
    GroupBox12->layout()->setMargin( 11 );
    GroupBox12Layout = new TQVBoxLayout( GroupBox12->layout() );
    GroupBox12Layout->setAlignment( TQt::AlignTop );
    spacer4 = new TQSpacerItem( 20, 2, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    GroupBox12Layout->addItem( spacer4 );

    correctnessBar = new TQProgressBar( GroupBox12, "correctnessBar" );
    GroupBox12Layout->addWidget( correctnessBar );
    spacer5 = new TQSpacerItem( 20, 2, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    GroupBox12Layout->addItem( spacer5 );
    KTouchStatusLayoutLayout->addWidget( GroupBox12 );

    GroupBox4 = new TQGroupBox( this, "GroupBox4" );
    GroupBox4->setColumnLayout(0, TQt::Vertical );
    GroupBox4->layout()->setSpacing( 6 );
    GroupBox4->layout()->setMargin( 11 );
    GroupBox4Layout = new TQVBoxLayout( GroupBox4->layout() );
    GroupBox4Layout->setAlignment( TQt::AlignTop );
    spacer6 = new TQSpacerItem( 20, 2, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    GroupBox4Layout->addItem( spacer6 );

    newCharsLabel = new TQLabel( GroupBox4, "newCharsLabel" );
    newCharsLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)5, 0, 0, newCharsLabel->sizePolicy().hasHeightForWidth() ) );
    TQFont newCharsLabel_font(  newCharsLabel->font() );
    newCharsLabel_font.setPointSize( 20 );
    newCharsLabel->setFont( newCharsLabel_font ); 
    newCharsLabel->setScaledContents( true );
    newCharsLabel->setAlignment( int( TQLabel::AlignCenter ) );
    GroupBox4Layout->addWidget( newCharsLabel );
    spacer7 = new TQSpacerItem( 20, 2, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    GroupBox4Layout->addItem( spacer7 );
    KTouchStatusLayoutLayout->addWidget( GroupBox4 );
    languageChange();
    resize( TQSize(661, 100).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KTouchStatusLayout::languageChange()
{
    GroupBox1->setTitle( tr2i18n( "Level" ) );
    TQToolTip::add( levelLCD, tr2i18n( "Current level" ) );
    TQWhatsThis::add( levelLCD, tr2i18n( "This shows which level you are at." ) );
    levelUpBtn->setText( tr2i18n( "+" ) );
    levelDownBtn->setText( tr2i18n( "-" ) );
    GroupBox11->setTitle( tr2i18n( "Speed" ) );
    TQToolTip::add( speedLCD, tr2i18n( "Characters/Minute" ) );
    TQWhatsThis::add( speedLCD, tr2i18n( "This shows how fast you are typing. It measures the typing speed in characters per minute." ) );
    GroupBox12->setTitle( tr2i18n( "Correctness" ) );
    TQToolTip::add( correctnessBar, tr2i18n( "How much are you typing correctly?" ) );
    TQWhatsThis::add( correctnessBar, tr2i18n( "This shows how correctly you are typing." ) );
    GroupBox4->setTitle( tr2i18n( "New Characters in This Level" ) );
    newCharsLabel->setText( tr2i18n( "new characters" ) );
}

void KTouchStatusLayout::levelForcedDown()
{
    tqWarning( "KTouchStatusLayout::levelForcedDown(): Not implemented yet" );
}

void KTouchStatusLayout::levelForcedUp()
{
    tqWarning( "KTouchStatusLayout::levelForcedUp(): Not implemented yet" );
}

void KTouchStatusLayout::showStatChanged(int)
{
    tqWarning( "KTouchStatusLayout::showStatChanged(int): Not implemented yet" );
}

void KTouchStatusLayout::runningStateChanged(int)
{
    tqWarning( "KTouchStatusLayout::runningStateChanged(int): Not implemented yet" );
}

void KTouchStatusLayout::startKTouch()
{
    tqWarning( "KTouchStatusLayout::startKTouch(): Not implemented yet" );
}

void KTouchStatusLayout::stopKTouch()
{
    tqWarning( "KTouchStatusLayout::stopKTouch(): Not implemented yet" );
}

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

TQMetaObject *KTouchStatusLayout::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KTouchStatusLayout( "KTouchStatusLayout", &KTouchStatusLayout::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* KTouchStatusLayout::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 = {"levelForcedDown", 0, 0 };
    static const TQUMethod slot_1 = {"levelForcedUp", 0, 0 };
    static const TQUParameter param_slot_2[] = {
	{ 0, &static_QUType_int, 0, TQUParameter::In }
    };
    static const TQUMethod slot_2 = {"showStatChanged", 1, param_slot_2 };
    static const TQUParameter param_slot_3[] = {
	{ 0, &static_QUType_int, 0, TQUParameter::In }
    };
    static const TQUMethod slot_3 = {"runningStateChanged", 1, param_slot_3 };
    static const TQUMethod slot_4 = {"startKTouch", 0, 0 };
    static const TQUMethod slot_5 = {"stopKTouch", 0, 0 };
    static const TQUMethod slot_6 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "levelForcedDown()", &slot_0, TQMetaData::Public },
	{ "levelForcedUp()", &slot_1, TQMetaData::Public },
	{ "showStatChanged(int)", &slot_2, TQMetaData::Public },
	{ "runningStateChanged(int)", &slot_3, TQMetaData::Public },
	{ "startKTouch()", &slot_4, TQMetaData::Public },
	{ "stopKTouch()", &slot_5, TQMetaData::Public },
	{ "languageChange()", &slot_6, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"KTouchStatusLayout", parentObject,
	slot_tbl, 7,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_KTouchStatusLayout.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

bool KTouchStatusLayout::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: levelForcedDown(); break;
    case 1: levelForcedUp(); break;
    case 2: showStatChanged((int)static_QUType_int.get(_o+1)); break;
    case 3: runningStateChanged((int)static_QUType_int.get(_o+1)); break;
    case 4: startKTouch(); break;
    case 5: stopKTouch(); break;
    case 6: languageChange(); break;
    default:
	return TQWidget::tqt_invoke( _id, _o );
    }
    return true;
}

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

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

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