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

#include <qvariant.h>
#include <qwidget.h>
#include <qtabwidget.h>
#include <qlabel.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <qimage.h>
#include <qpixmap.h>

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

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


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

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

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

    lblPict = new QLabel( tab, "lblPict" );
    lblPict->setProperty( "sizePolicy", QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, 0, 0, lblPict->sizePolicy().hasHeightForWidth() ) );
    lblPict->setProperty( "alignment", int( QLabel::AlignCenter ) );

    tabLayout->addMultiCellWidget( lblPict, 0, 0, 0, 1 );

    btnClear = new QPushButton( tab, "btnClear" );

    tabLayout->addWidget( btnClear, 1, 1 );

    edtPict = new EditFile( tab, "edtPict" );
    edtPict->setProperty( "sizePolicy", QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)5, 0, 0, edtPict->sizePolicy().hasHeightForWidth() ) );

    tabLayout->addWidget( edtPict, 1, 0 );
    tabPict->insertTab( tab, QString("") );
    PictureConfigLayout->addWidget( tabPict );
    languageChange();
    resize( QSize(460, 324).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void JabberPictureBase::languageChange()
{
    setProperty( "caption", i18n( "Form1" ) );
    lblPict->setProperty( "text", QString::null );
    btnClear->setProperty( "text", i18n( "&Clear" ) );
    tabPict->changeTab( tab, i18n( "&Photo" ) );
}

#include "jabberpicturebase.moc"
