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

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

#include "wpuserinfowidget.h"

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

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

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

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

    lblComputerName = new TQLabel( this, "lblComputerName" );
    layout5->addWidget( lblComputerName );

    textLabel2_2 = new TQLabel( this, "textLabel2_2" );
    layout5->addWidget( textLabel2_2 );

    textLabel2 = new TQLabel( this, "textLabel2" );
    layout5->addWidget( textLabel2 );

    textLabel3 = new TQLabel( this, "textLabel3" );
    layout5->addWidget( textLabel3 );

    textLabel1 = new TQLabel( this, "textLabel1" );
    layout5->addWidget( textLabel1 );
    layout6->addLayout( layout5 );

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

    sComputerName = new KLineEdit( this, "sComputerName" );
    sComputerName->setReadOnly( true );
    layout4->addWidget( sComputerName );

    sComment = new KLineEdit( this, "sComment" );
    sComment->setReadOnly( true );
    layout4->addWidget( sComment );

    sWorkgroup = new KLineEdit( this, "sWorkgroup" );
    sWorkgroup->setReadOnly( true );
    layout4->addWidget( sWorkgroup );

    sOS = new KLineEdit( this, "sOS" );
    sOS->setReadOnly( true );
    layout4->addWidget( sOS );

    sServer = new KLineEdit( this, "sServer" );
    sServer->setReadOnly( true );
    layout4->addWidget( sServer );
    layout6->addLayout( layout4 );

    WPUserInfoWidgetLayout->addLayout( layout6, 0, 0 );
    languageChange();
    resize( TQSize(402, 175).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( sComputerName, sWorkgroup );
    setTabOrder( sWorkgroup, sOS );
    setTabOrder( sOS, sServer );

    // buddies
    lblComputerName->setBuddy( sComputerName );
    textLabel2->setBuddy( sWorkgroup );
    textLabel3->setBuddy( sOS );
    textLabel1->setBuddy( sServer );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void WPUserInfoWidget::languageChange()
{
    lblComputerName->setText( tr2i18n( "&Computer name:" ) );
    TQToolTip::add( lblComputerName, tr2i18n( "The hostname of the computer for this contact." ) );
    TQWhatsThis::add( lblComputerName, tr2i18n( "The hostname of the computer for this contact." ) );
    textLabel2_2->setText( tr2i18n( "Comment:" ) );
    textLabel2->setText( tr2i18n( "&Workgroup/domain:" ) );
    TQToolTip::add( textLabel2, tr2i18n( "The workgroup or domain the contact's computer is on." ) );
    TQWhatsThis::add( textLabel2, tr2i18n( "The workgroup or domain the contact's computer is on." ) );
    textLabel3->setText( tr2i18n( "Operating s&ystem:" ) );
    TQToolTip::add( textLabel3, tr2i18n( "The operating system the contact's computer is running." ) );
    TQWhatsThis::add( textLabel3, tr2i18n( "The operating system the contact's computer is running." ) );
    textLabel1->setText( tr2i18n( "Ser&ver software:" ) );
    TQToolTip::add( textLabel1, tr2i18n( "The software the contact's computer is running." ) );
    TQWhatsThis::add( textLabel1, tr2i18n( "The software the contact's computer is running." ) );
    TQToolTip::add( sComputerName, tr2i18n( "The hostname of the computer for this contact." ) );
    TQWhatsThis::add( sComputerName, tr2i18n( "The hostname of the computer for this contact." ) );
    TQToolTip::add( sComment, tr2i18n( "The comment of the computer for this contact." ) );
    TQWhatsThis::add( sComment, tr2i18n( "The comment of the computer for this contact." ) );
    TQToolTip::add( sWorkgroup, tr2i18n( "The workgroup or domain the contact's computer is on." ) );
    TQWhatsThis::add( sWorkgroup, tr2i18n( "The workgroup or domain the contact's computer is on." ) );
    TQToolTip::add( sOS, tr2i18n( "The operating system the contact's computer is running." ) );
    TQWhatsThis::add( sOS, tr2i18n( "The operating system the contact's computer is running." ) );
    TQToolTip::add( sServer, tr2i18n( "The software the contact's computer is running." ) );
    TQWhatsThis::add( sServer, tr2i18n( "The software the contact's computer is running." ) );
}

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

TQMetaObject *WPUserInfoWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_WPUserInfoWidget( "WPUserInfoWidget", &WPUserInfoWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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