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

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

#include "statuswidget.h"

#include <ntqvariant.h>
#include <ntqlabel.h>
#include <ntqlcdnumber.h>
#include <ntqframe.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a StatusWidget which is a child of 'parent', with the
 *  name 'name'.' 
 */
StatusWidget::StatusWidget( TQWidget* parent,  const char* name )
    : TQFrame( parent, name )
{
    if ( !name )
	setName( "StatusWidget" );
    setFrameShape( TQFrame::Box );
    setFrameShadow( TQFrame::Raised );
    setMargin( 2 );
    setMidLineWidth( 4 );
    StatusWidgetLayout = new TQGridLayout( this, 1, 1, 11, 6, "StatusWidgetLayout"); 
    spacer1 = new TQSpacerItem( 20, 41, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    StatusWidgetLayout->addItem( spacer1, 4, 5 );
    spacer2 = new TQSpacerItem( 90, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    StatusWidgetLayout->addItem( spacer2, 0, 0 );

    wins = new TQLabel( this, "wins" );
    wins->setAlignment( int( TQLabel::AlignCenter ) );

    StatusWidgetLayout->addWidget( wins, 0, 1 );

    draws = new TQLabel( this, "draws" );
    draws->setAlignment( int( TQLabel::AlignCenter ) );

    StatusWidgetLayout->addWidget( draws, 0, 2 );

    loses = new TQLabel( this, "loses" );
    loses->setAlignment( int( TQLabel::AlignCenter ) );

    StatusWidgetLayout->addWidget( loses, 0, 3 );

    num = new TQLabel( this, "num" );
    num->setAlignment( int( TQLabel::AlignCenter ) );

    StatusWidgetLayout->addWidget( num, 0, 4 );

    bk = new TQLabel( this, "bk" );
    bk->setAlignment( int( TQLabel::AlignCenter ) );

    StatusWidgetLayout->addWidget( bk, 0, 5 );

    p1_name = new TQLabel( this, "p1_name" );

    StatusWidgetLayout->addWidget( p1_name, 2, 0 );

    p1_w = new TQLCDNumber( this, "p1_w" );
    p1_w->setLineWidth( 0 );
    p1_w->setNumDigits( 2 );

    StatusWidgetLayout->addWidget( p1_w, 2, 1 );

    p1_d = new TQLCDNumber( this, "p1_d" );
    p1_d->setLineWidth( 0 );
    p1_d->setNumDigits( 2 );

    StatusWidgetLayout->addWidget( p1_d, 2, 2 );

    p1_l = new TQLCDNumber( this, "p1_l" );
    p1_l->setLineWidth( 0 );
    p1_l->setNumDigits( 2 );

    StatusWidgetLayout->addWidget( p1_l, 2, 3 );

    p1_n = new TQLCDNumber( this, "p1_n" );
    p1_n->setLineWidth( 0 );
    p1_n->setNumDigits( 2 );

    StatusWidgetLayout->addWidget( p1_n, 2, 4 );

    p1_b = new TQLCDNumber( this, "p1_b" );
    p1_b->setLineWidth( 0 );
    p1_b->setNumDigits( 2 );

    StatusWidgetLayout->addWidget( p1_b, 2, 5 );

    p2_d = new TQLCDNumber( this, "p2_d" );
    p2_d->setLineWidth( 0 );
    p2_d->setNumDigits( 2 );

    StatusWidgetLayout->addWidget( p2_d, 3, 2 );

    p2_b = new TQLCDNumber( this, "p2_b" );
    p2_b->setLineWidth( 0 );
    p2_b->setNumDigits( 2 );

    StatusWidgetLayout->addWidget( p2_b, 3, 5 );

    p2_l = new TQLCDNumber( this, "p2_l" );
    p2_l->setLineWidth( 0 );
    p2_l->setNumDigits( 2 );

    StatusWidgetLayout->addWidget( p2_l, 3, 3 );

    p2_n = new TQLCDNumber( this, "p2_n" );
    p2_n->setLineWidth( 0 );
    p2_n->setNumDigits( 2 );

    StatusWidgetLayout->addWidget( p2_n, 3, 4 );

    p2_w = new TQLCDNumber( this, "p2_w" );
    p2_w->setLineWidth( 0 );
    p2_w->setNumDigits( 2 );

    StatusWidgetLayout->addWidget( p2_w, 3, 1 );

    p2_name = new TQLabel( this, "p2_name" );

    StatusWidgetLayout->addWidget( p2_name, 3, 0 );

    line1 = new TQFrame( this, "line1" );
    line1->setFrameShape( TQFrame::HLine );
    line1->setFrameShadow( TQFrame::Raised );
    line1->setFrameShape( TQFrame::HLine );

    StatusWidgetLayout->addMultiCellWidget( line1, 1, 1, 0, 5 );
    languageChange();
    resize( TQSize(304, 120).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void StatusWidget::languageChange()
{
    wins->setText( tr2i18n( "W" ) );
    draws->setText( tr2i18n( "D" ) );
    loses->setText( tr2i18n( "L" ) );
    num->setText( tr2i18n( "No" ) );
    bk->setText( tr2i18n( "Bk" ) );
    p1_name->setText( tr2i18n( "Player 1" ) );
    p2_name->setText( tr2i18n( "Player 2" ) );
}

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

TQMetaObject *StatusWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_StatusWidget( "StatusWidget", &StatusWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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