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

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

#include "statistics.h"

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

/*
 *  Constructs a Statistics as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The qdialog will by default be modeless, unless you set 'modal' to
 *  true to construct a modal qdialog.
 */
Statistics::Statistics( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "Statistics" );
    StatisticsLayout = new TQGridLayout( this, 1, 1, 11, 6, "StatisticsLayout"); 

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

    StatisticsLayout->addMultiCellWidget( line1, 1, 1, 0, 5 );
    spacer1 = new TQSpacerItem( 20, 16, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    StatisticsLayout->addItem( spacer1, 5, 2 );

    p2_lost = new TQLCDNumber( this, "p2_lost" );

    StatisticsLayout->addWidget( p2_lost, 4, 3 );

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

    StatisticsLayout->addMultiCellWidget( p1_name, 2, 3, 0, 0 );

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

    StatisticsLayout->addWidget( Name, 0, 0 );

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

    StatisticsLayout->addWidget( won, 0, 1 );

    p2_drawn = new TQLCDNumber( this, "p2_drawn" );

    StatisticsLayout->addWidget( p2_drawn, 4, 2 );

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

    StatisticsLayout->addWidget( lost, 0, 3 );

    p2_aborted = new TQLCDNumber( this, "p2_aborted" );

    StatisticsLayout->addWidget( p2_aborted, 4, 4 );

    p2_sum = new TQLCDNumber( this, "p2_sum" );

    StatisticsLayout->addWidget( p2_sum, 4, 5 );

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

    StatisticsLayout->addWidget( sum, 0, 5 );

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

    StatisticsLayout->addWidget( aborted, 0, 4 );

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

    pushButton1 = new TQPushButton( this, "pushButton1" );
    layout1->addWidget( pushButton1 );
    spacer2 = new TQSpacerItem( 51, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout1->addItem( spacer2 );

    pushButton2 = new TQPushButton( this, "pushButton2" );
    layout1->addWidget( pushButton2 );

    StatisticsLayout->addMultiCellLayout( layout1, 6, 6, 0, 5 );

    p1_won = new TQLCDNumber( this, "p1_won" );

    StatisticsLayout->addWidget( p1_won, 3, 1 );

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

    StatisticsLayout->addWidget( p2_name, 4, 0 );

    p2_won = new TQLCDNumber( this, "p2_won" );

    StatisticsLayout->addWidget( p2_won, 4, 1 );

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

    StatisticsLayout->addWidget( drawn, 0, 2 );

    p1_drawn = new TQLCDNumber( this, "p1_drawn" );

    StatisticsLayout->addWidget( p1_drawn, 3, 2 );

    p1_lost = new TQLCDNumber( this, "p1_lost" );

    StatisticsLayout->addWidget( p1_lost, 3, 3 );

    p1_aborted = new TQLCDNumber( this, "p1_aborted" );

    StatisticsLayout->addWidget( p1_aborted, 3, 4 );

    p1_sum = new TQLCDNumber( this, "p1_sum" );

    StatisticsLayout->addWidget( p1_sum, 3, 5 );
    languageChange();
    resize( TQSize(439, 164).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( pushButton1, TQ_SIGNAL( clicked() ), this, TQ_SLOT( reject() ) );
    connect( pushButton2, TQ_SIGNAL( clicked() ), this, TQ_SLOT( accept() ) );

    // tab order
    setTabOrder( pushButton2, pushButton1 );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void Statistics::languageChange()
{
    setCaption( tr2i18n( "Statistics" ) );
    p1_name->setText( tr2i18n( "Player 1" ) );
    Name->setText( tr2i18n( "Name" ) );
    won->setText( tr2i18n( "Won" ) );
    lost->setText( tr2i18n( "Lost" ) );
    sum->setText( tr2i18n( "Sum" ) );
    aborted->setText( tr2i18n( "Aborted" ) );
    pushButton1->setText( tr2i18n( "Clear All Statistics" ) );
    pushButton2->setText( tr2i18n( "&Close" ) );
    p2_name->setText( tr2i18n( "Player 2" ) );
    drawn->setText( tr2i18n( "Drawn" ) );
}

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

TQMetaObject *Statistics::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_Statistics( "Statistics", &Statistics::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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