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

#include <qvariant.h>
#include <qwidget.h>
#include <qpushbutton.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qcombobox.h>
#include <qspinbox.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <qimage.h>
#include <qpixmap.h>

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

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


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

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

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

    edtID = new QLineEdit( this, "edtID" );
    edtID->setProperty( "sizePolicy", QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, 0, 0, edtID->sizePolicy().hasHeightForWidth() ) );
    Layout10->addWidget( edtID );
    QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    Layout10->addItem( spacer );
    WeatherCfgLayout->addLayout( Layout10 );

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

    cmbLocation = new QComboBox( FALSE, this, "cmbLocation" );
    cmbLocation->setProperty( "sizePolicy", QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, cmbLocation->sizePolicy().hasHeightForWidth() ) );
    cmbLocation->setProperty( "editable", QVariant( TRUE, 0 ) );
    Layout9->addWidget( cmbLocation );

    btnSearch = new QPushButton( this, "btnSearch" );
    Layout9->addWidget( btnSearch );
    WeatherCfgLayout->addLayout( Layout9 );

    TextLabel1_4 = new QLabel( this, "TextLabel1_4" );
    WeatherCfgLayout->addWidget( TextLabel1_4 );

    lblLnk = new LinkLabel( this, "lblLnk" );
    WeatherCfgLayout->addWidget( lblLnk );

    Layout8 = new QGridLayout( 0, 1, 1, 0, 6, "Layout8"); 

    cmbUnits = new QComboBox( FALSE, this, "cmbUnits" );

    Layout8->addWidget( cmbUnits, 0, 1 );
    QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    Layout8->addItem( spacer_2, 0, 2 );

    edtDays = new QSpinBox( this, "edtDays" );
    edtDays->setProperty( "maxValue", 10 );

    Layout8->addWidget( edtDays, 1, 1 );

    TextLabel1_3 = new QLabel( this, "TextLabel1_3" );

    Layout8->addWidget( TextLabel1_3, 1, 0 );

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

    Layout8->addWidget( TextLabel1_2, 0, 0 );
    WeatherCfgLayout->addLayout( Layout8 );
    QSpacerItem* spacer_3 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
    WeatherCfgLayout->addItem( spacer_3 );
    languageChange();
    resize( QSize(337, 196).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void WeatherCfgBase::languageChange()
{
    setProperty( "caption", i18n( "Form1" ) );
    TextLabel1->setProperty( "text", i18n( "Location ID:" ) );
    btnSearch->setProperty( "text", i18n( "&Search" ) );
    TextLabel1_4->setProperty( "text", i18n( "You can enter ID as part URL for your location on weather.com" ) );
    cmbUnits->clear();
    cmbUnits->insertItem( i18n( "Metric" ) );
    cmbUnits->insertItem( i18n( "Standart" ) );
    TextLabel1_3->setProperty( "text", i18n( "Forecast days:" ) );
    TextLabel1_2->setProperty( "text", i18n( "Units:" ) );
}

#include "weathercfgbase.moc"
