#include "simapi.h"
/****************************************************************************
** Form implementation generated from reading ui file './yahoocfgbase.ui'
**
** Created: вт мар 30 18:24:32 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 "yahoocfgbase.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_yahoocfgbase[] = { 
"22 22 2 1",
". c None",
"# c #a4c610",
"........######........",
".....###########......",
"....##############....",
"...################...",
"..######......######..",
"..#####........#####..",
".#####.......#..#####.",
".####.......###..####.",
"####.......#####..####",
"####......#####...####",
"####....#######...####",
"####....######....####",
"####...########...####",
".####.##########..####",
".####..####.#########.",
".#####..##...########.",
"..#####.......#######.",
"..######......######..",
"...###################",
"....##################",
"......###########.###.",
"........######.....#.."};

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


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

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

    tabYahoo = new QWidget( tabCfg, "tabYahoo" );
    tabYahooLayout = new QGridLayout( tabYahoo, 1, 1, 11, 6, "tabYahooLayout"); 

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

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

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

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

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

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

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

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

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

    tabYahooLayout->addMultiCellWidget( lnkReg, 2, 2, 0, 1 );
    tabCfg->insertTab( tabYahoo, 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 );

    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 );

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

    tabLayout->addWidget( TextLabel2, 1, 0 );
    QSpacerItem* spacer_3 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
    tabLayout->addItem( spacer_3, 8, 0 );

    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 );

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

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

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

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

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

    tabLayout->addMultiCellWidget( Line3, 4, 4, 0, 1 );

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

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

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

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

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

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

    tabLayout->addMultiCellWidget( TextLabel1_2, 2, 2, 0, 1 );
    tabCfg->insertTab( tab, QString("") );
    Form2Layout->addWidget( tabCfg );
    languageChange();
    resize( QSize(390, 291).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( tabCfg, edtLogin );
    setTabOrder( edtLogin, edtPassword );
    setTabOrder( edtPassword, edtServer );
    setTabOrder( edtServer, edtPort );
    setTabOrder( edtPort, edtMinPort );
    setTabOrder( edtMinPort, edtMaxPort );
    setTabOrder( edtMaxPort, chkHTTP );
    setTabOrder( chkHTTP, chkAuto );
}

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

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

#include "yahoocfgbase.moc"
