#include "simapi.h"
/****************************************************************************
** Form implementation generated from reading ui file './remotecfgbase.ui'
**
** Created: вт мар 30 17:51:15 2004
**      by: The User Interface Compiler ($Id: qt/main.cpp   3.1.2   edited Dec 19 11:45 $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "remotecfgbase.h"

#include <qvariant.h>
#include <qwidget.h>
#include <qbuttongroup.h>
#include <qradiobutton.h>
#include <qlineedit.h>
#include <qlabel.h>
#include <qspinbox.h>
#include <qcheckbox.h>
#include <qframe.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <qimage.h>
#include <qpixmap.h>

static const char* const img0_remotecfgbase[] = { 
"22 22 2 1",
". c None",
"# c #a4c610",
"........######........",
".....###########......",
"....##############....",
"...################...",
"..######......######..",
"..#####........#####..",
".#####.......#..#####.",
".####.......###..####.",
"####.......#####..####",
"####......#####...####",
"####....#######...####",
"####....######....####",
"####...########...####",
".####.##########..####",
".####..####.#########.",
".#####..##...########.",
"..#####.......#######.",
"..######......######..",
"...###################",
"....##################",
"......###########.###.",
"........######.....#.."};


/* 
 *  Constructs a RemoteConfigBase as a child of 'parent', with the 
 *  name 'name' and widget flags set to 'f'.
 */
RemoteConfigBase::RemoteConfigBase( QWidget* parent, const char* name, WFlags fl )
    : QWidget( parent, name, fl ),
      image0( (const char **) img0_remotecfgbase )
{
    if ( !name )
	setName( "RemoteCfg" );
    RemoteCfgLayout = new QVBoxLayout( this, 11, 6, "RemoteCfgLayout"); 

    grpRemote = new QButtonGroup( this, "grpRemote" );
    grpRemote->setProperty( "lineWidth", 0 );
    grpRemote->setColumnLayout(0, Qt::Vertical );
    grpRemote->layout()->setSpacing( 6 );
    grpRemote->layout()->setMargin( 11 );
    grpRemoteLayout = new QGridLayout( grpRemote->layout() );
    grpRemoteLayout->setAlignment( Qt::AlignTop );

    btnUNIX = new QRadioButton( grpRemote, "btnUNIX" );
    grpRemote->insert( btnUNIX, 1 );

    grpRemoteLayout->addMultiCellWidget( btnUNIX, 0, 0, 0, 2 );

    edtPath = new QLineEdit( grpRemote, "edtPath" );

    grpRemoteLayout->addMultiCellWidget( edtPath, 1, 1, 0, 2 );

    lblPort = new QLabel( grpRemote, "lblPort" );

    grpRemoteLayout->addWidget( lblPort, 4, 0 );

    edtPort = new QSpinBox( grpRemote, "edtPort" );
    edtPort->setProperty( "maxValue", 65535 );
    edtPort->setProperty( "minValue", 1 );

    grpRemoteLayout->addWidget( edtPort, 4, 1 );
    QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    grpRemoteLayout->addItem( spacer, 4, 2 );

    btnTCP = new QRadioButton( grpRemote, "btnTCP" );
    grpRemote->insert( btnTCP, 2 );

    grpRemoteLayout->addMultiCellWidget( btnTCP, 3, 3, 0, 2 );

    chkTCP = new QCheckBox( grpRemote, "chkTCP" );

    grpRemoteLayout->addMultiCellWidget( chkTCP, 2, 2, 0, 2 );
    RemoteCfgLayout->addWidget( grpRemote );

    Line1 = new QFrame( this, "Line1" );
    Line1->setProperty( "frameStyle", QFrame::VLine | QFrame::Sunken );
    RemoteCfgLayout->addWidget( Line1 );

    chkIE = new QCheckBox( this, "chkIE" );
    RemoteCfgLayout->addWidget( chkIE );
    QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
    RemoteCfgLayout->addItem( spacer_2 );
    languageChange();
    resize( QSize(367, 216).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void RemoteConfigBase::languageChange()
{
    setProperty( "caption", i18n( "Form1" ) );
    grpRemote->setProperty( "title", QString::null );
    btnUNIX->setProperty( "text", i18n( "Use &UNIX socket" ) );
    lblPort->setProperty( "text", i18n( "Port:" ) );
    btnTCP->setProperty( "text", i18n( "Use &TCP socket" ) );
    chkTCP->setProperty( "text", i18n( "Use &TCP socket" ) );
    chkIE->setProperty( "text", i18n( "Enable IE context emnu extension" ) );
}

#include "remotecfgbase.moc"
