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

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

#include "connectionwidget.h"

#include <ntqvariant.h>
#include <ntqlabel.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a ConnectionWidget as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
ConnectionWidget::ConnectionWidget( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "NewConnectWidget" );
    NewConnectWidgetLayout = new TQGridLayout( this, 1, 1, 0, 6, "NewConnectWidgetLayout"); 

    TextLabel5 = new TQLabel( this, "TextLabel5" );
    TextLabel5->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, TextLabel5->sizePolicy().hasHeightForWidth() ) );
    TQFont TextLabel5_font(  TextLabel5->font() );
    TextLabel5_font.setPointSize( 13 );
    TextLabel5_font.setBold( true );
    TextLabel5->setFont( TextLabel5_font ); 
    TextLabel5->setIndent( 0 );

    NewConnectWidgetLayout->addMultiCellWidget( TextLabel5, 0, 0, 1, 2 );

    mainTextLabel = new TQLabel( this, "mainTextLabel" );
    mainTextLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)0, 0, 0, mainTextLabel->sizePolicy().hasHeightForWidth() ) );
    mainTextLabel->setLineWidth( -1 );
    mainTextLabel->setMargin( 0 );
    mainTextLabel->setMidLineWidth( 5 );
    mainTextLabel->setTextFormat( TQLabel::AutoText );
    mainTextLabel->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter | TQLabel::AlignLeft ) );
    mainTextLabel->setIndent( 0 );

    NewConnectWidgetLayout->addMultiCellWidget( mainTextLabel, 1, 1, 1, 2 );

    pixmapLabel = new TQLabel( this, "pixmapLabel" );
    pixmapLabel->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, pixmapLabel->sizePolicy().hasHeightForWidth() ) );
    pixmapLabel->setMinimumSize( TQSize( 108, 318 ) );
    pixmapLabel->setMaximumSize( TQSize( 108, 318 ) );
    pixmapLabel->setFrameShape( TQLabel::WinPanel );
    pixmapLabel->setFrameShadow( TQLabel::Sunken );
    pixmapLabel->setLineWidth( 0 );
    pixmapLabel->setMargin( 0 );
    pixmapLabel->setScaledContents( true );
    pixmapLabel->setIndent( 0 );

    NewConnectWidgetLayout->addMultiCellWidget( pixmapLabel, 0, 5, 0, 0 );

    remoteHost = new TQLabel( this, "remoteHost" );
    TQFont remoteHost_font(  remoteHost->font() );
    remoteHost_font.setBold( true );
    remoteHost->setFont( remoteHost_font ); 

    NewConnectWidgetLayout->addWidget( remoteHost, 3, 2 );

    cbAllowRemoteControl = new TQCheckBox( this, "cbAllowRemoteControl" );
    cbAllowRemoteControl->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, cbAllowRemoteControl->sizePolicy().hasHeightForWidth() ) );

    NewConnectWidgetLayout->addMultiCellWidget( cbAllowRemoteControl, 5, 5, 1, 2 );

    TextLabel1 = new TQLabel( this, "TextLabel1" );
    TQFont TextLabel1_font(  TextLabel1->font() );
    TextLabel1_font.setBold( true );
    TextLabel1->setFont( TextLabel1_font ); 

    NewConnectWidgetLayout->addWidget( TextLabel1, 3, 1 );
    spacer23 = new TQSpacerItem( 20, 84, TQSizePolicy::Minimum, TQSizePolicy::Minimum );
    NewConnectWidgetLayout->addItem( spacer23, 4, 1 );
    spacer22 = new TQSpacerItem( 20, 80, TQSizePolicy::Minimum, TQSizePolicy::Minimum );
    NewConnectWidgetLayout->addItem( spacer22, 2, 1 );
    languageChange();
    resize( TQSize(521, 328).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void ConnectionWidget::languageChange()
{
    TextLabel5->setText( tr2i18n( "Attention" ) );
    mainTextLabel->setText( tr2i18n( "Somebody is requesting a connection to your computer. Granting this will allow the remote user to watch your desktop. " ) );
    remoteHost->setText( tr2i18n( "123.234.123.234" ) );
    cbAllowRemoteControl->setText( tr2i18n( "Allow remote user to &control keyboard and mouse" ) );
    TQWhatsThis::add( cbAllowRemoteControl, tr2i18n( "If you turn this option on, the remote user can enter keystrokes and use your mouse pointer. This gives them full control over your computer, so be careful. When the option is disabled the remote user can only watch your screen." ) );
    TextLabel1->setText( tr2i18n( "Remote system:" ) );
}

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

TQMetaObject *ConnectionWidget::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_ConnectionWidget( "ConnectionWidget", &ConnectionWidget::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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