#include "simapi.h"
/****************************************************************************
** Form implementation generated from reading ui file './msnconfigbase.ui'
**
** Created: вт мар 30 17:42:21 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 "msnconfigbase.h"

#include <qvariant.h>
#include <qwidget.h>
#include <qpushbutton.h>
#include <qtabwidget.h>
#include <qlabel.h>
#include <qlineedit.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>

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

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


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

    tabCfg = new QTabWidget( this, "tabCfg" );

    tabMsn = new QWidget( tabCfg, "tabMsn" );
    tabMsnLayout = new QGridLayout( tabMsn, 1, 1, 11, 6, "tabMsnLayout"); 

    TextLabel5 = new QLabel( tabMsn, "TextLabel5" );
    TextLabel5->setProperty( "alignment", int( QLabel::AlignVCenter | QLabel::AlignRight ) );

    tabMsnLayout->addWidget( TextLabel5, 0, 0 );

    edtLogin = new QLineEdit( tabMsn, "edtLogin" );

    tabMsnLayout->addWidget( edtLogin, 0, 1 );

    TextLabel6 = new QLabel( tabMsn, "TextLabel6" );
    TextLabel6->setProperty( "alignment", int( QLabel::AlignVCenter | QLabel::AlignRight ) );

    tabMsnLayout->addWidget( TextLabel6, 1, 0 );

    edtPassword = new QLineEdit( tabMsn, "edtPassword" );
    edtPassword->setProperty( "echoMode", "Password" );

    tabMsnLayout->addWidget( edtPassword, 1, 1 );
    QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
    tabMsnLayout->addItem( spacer, 3, 0 );

    lnkReg = new LinkLabel( tabMsn, "lnkReg" );

    tabMsnLayout->addMultiCellWidget( lnkReg, 2, 2, 0, 1 );
    tabCfg->insertTab( tabMsn, QString("") );

    tab = new QWidget( tabCfg, "tab" );
    tabLayout = new QGridLayout( tab, 1, 1, 11, 6, "tabLayout"); 

    TextLabel1 = new QLabel( tab, "TextLabel1" );
    TextLabel1->setProperty( "alignment", int( QLabel::AlignVCenter | QLabel::AlignRight ) );

    tabLayout->addWidget( TextLabel1, 0, 0 );

    edtServer = new QLineEdit( tab, "edtServer" );

    tabLayout->addWidget( edtServer, 0, 1 );

    TextLabel2 = new QLabel( tab, "TextLabel2" );
    TextLabel2->setProperty( "alignment", int( QLabel::AlignVCenter | QLabel::AlignRight ) );

    tabLayout->addWidget( TextLabel2, 1, 0 );

    Layout1 = new QHBoxLayout( 0, 0, 6, "Layout1"); 

    edtPort = new QSpinBox( tab, "edtPort" );
    edtPort->setProperty( "maxValue", 65535 );
    edtPort->setProperty( "minValue", 1 );
    Layout1->addWidget( edtPort );
    QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    Layout1->addItem( spacer_2 );

    tabLayout->addLayout( Layout1, 1, 1 );

    TextLabel1_2 = new QLabel( tab, "TextLabel1_2" );

    tabLayout->addMultiCellWidget( TextLabel1_2, 2, 2, 0, 1 );

    Layout3 = new QHBoxLayout( 0, 0, 6, "Layout3"); 

    edtMinPort = new QSpinBox( tab, "edtMinPort" );
    edtMinPort->setProperty( "maxValue", 65534 );
    edtMinPort->setProperty( "minValue", 1024 );
    Layout3->addWidget( edtMinPort );

    TextLabel2_2 = new QLabel( tab, "TextLabel2_2" );
    Layout3->addWidget( TextLabel2_2 );

    edtMaxPort = new QSpinBox( tab, "edtMaxPort" );
    edtMaxPort->setProperty( "maxValue", 65534 );
    edtMaxPort->setProperty( "minValue", 1024 );
    Layout3->addWidget( edtMaxPort );
    QSpacerItem* spacer_3 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    Layout3->addItem( spacer_3 );

    tabLayout->addMultiCellLayout( Layout3, 3, 3, 0, 1 );

    chkHTTP = new QCheckBox( tab, "chkHTTP" );

    tabLayout->addMultiCellWidget( chkHTTP, 5, 5, 0, 1 );

    chkAuto = new QCheckBox( tab, "chkAuto" );

    tabLayout->addMultiCellWidget( chkAuto, 6, 6, 0, 1 );

    TextLabel1_4 = new QLabel( tab, "TextLabel1_4" );
    TextLabel1_4->setProperty( "sizePolicy", QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)1, 0, 0, TextLabel1_4->sizePolicy().hasHeightForWidth() ) );
    TextLabel1_4->setProperty( "alignment", int( QLabel::AlignVCenter | QLabel::AlignLeft ) );

    tabLayout->addMultiCellWidget( TextLabel1_4, 7, 7, 0, 1 );

    Line1 = new QFrame( tab, "Line1" );
    Line1->setProperty( "frameShape", "HLine" );
    Line1->setProperty( "frameShadow", "Sunken" );
    Line1->setProperty( "frameShape", QFrame::VLine );
    Line1->setProperty( "frameShape", "HLine" );

    tabLayout->addMultiCellWidget( Line1, 4, 4, 0, 1 );
    QSpacerItem* spacer_4 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
    tabLayout->addItem( spacer_4, 9, 0 );

    chkAuth = new QCheckBox( tab, "chkAuth" );

    tabLayout->addMultiCellWidget( chkAuth, 8, 8, 0, 1 );
    tabCfg->insertTab( tab, QString("") );
    Form2Layout->addWidget( tabCfg );
    languageChange();
    resize( QSize(302, 297).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void MSNConfigBase::languageChange()
{
    setProperty( "caption", i18n( "Form2" ) );
    TextLabel5->setProperty( "text", i18n( "Login:" ) );
    TextLabel6->setProperty( "text", i18n( "Password:" ) );
    tabCfg->changeTab( tabMsn, i18n( "&MSN" ) );
    TextLabel1->setProperty( "text", i18n( "Server:" ) );
    TextLabel2->setProperty( "text", i18n( "Port:" ) );
    TextLabel1_2->setProperty( "text", i18n( "Port range for direct connections:" ) );
    TextLabel2_2->setProperty( "text", i18n( "-" ) );
    chkHTTP->setProperty( "text", i18n( "Use &HTTP polling" ) );
    chkAuto->setProperty( "text", i18n( "&Automatically use HTTP pooling if proxy required" ) );
    TextLabel1_4->setProperty( "text", i18n( "Note: For HTTP-pooling using proxy setings for HTTP" ) );
    chkAuth->setProperty( "text", i18n( "&Automaticaly add contacts in accept list" ) );
    tabCfg->changeTab( tab, i18n( "&Network" ) );
}

#include "msnconfigbase.moc"
