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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

    tabLayout->addWidget( lblDisplay, 2, 0 );

    cmbDisplay = new QComboBox( FALSE, tab, "cmbDisplay" );

    tabLayout->addWidget( cmbDisplay, 2, 1 );
    QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
    tabLayout->addItem( spacer, 3, 1 );
    tabMain->insertTab( tab, QString("") );

    tab_2 = new QWidget( tabMain, "tab_2" );
    tabLayout_2 = new QVBoxLayout( tab_2, 11, 6, "tabLayout_2"); 

    TextLabel3 = new QLabel( tab_2, "TextLabel3" );
    tabLayout_2->addWidget( TextLabel3 );

    lstMails = new ListView( tab_2, "lstMails" );
    tabLayout_2->addWidget( lstMails );

    Layout9 = new QHBoxLayout( 0, 0, 6, "Layout9"); 
    QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    Layout9->addItem( spacer_2 );

    btnMailAdd = new QPushButton( tab_2, "btnMailAdd" );
    Layout9->addWidget( btnMailAdd );

    btnMailEdit = new QPushButton( tab_2, "btnMailEdit" );
    Layout9->addWidget( btnMailEdit );

    btnMailDelete = new QPushButton( tab_2, "btnMailDelete" );
    Layout9->addWidget( btnMailDelete );
    tabLayout_2->addLayout( Layout9 );

    TextLabel4 = new QLabel( tab_2, "TextLabel4" );
    tabLayout_2->addWidget( TextLabel4 );
    tabMain->insertTab( tab_2, QString("") );

    phonebook = new QWidget( tabMain, "phonebook" );
    phonebookLayout = new QVBoxLayout( phonebook, 11, 6, "phonebookLayout"); 

    TextLabel2 = new QLabel( phonebook, "TextLabel2" );
    phonebookLayout->addWidget( TextLabel2 );

    lstPhones = new ListView( phonebook, "lstPhones" );
    phonebookLayout->addWidget( lstPhones );

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

    lblCurrent = new QLabel( phonebook, "lblCurrent" );
    lblCurrent->setProperty( "sizePolicy", QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, 0, 0, lblCurrent->sizePolicy().hasHeightForWidth() ) );
    Layout4->addWidget( lblCurrent );

    cmbCurrent = new QComboBox( FALSE, phonebook, "cmbCurrent" );
    cmbCurrent->setProperty( "sizePolicy", QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, cmbCurrent->sizePolicy().hasHeightForWidth() ) );
    Layout4->addWidget( cmbCurrent );
    phonebookLayout->addLayout( Layout4 );

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

    lblStatus = new QLabel( phonebook, "lblStatus" );
    lblStatus->setProperty( "alignment", int( QLabel::AlignVCenter | QLabel::AlignRight ) );
    Layout5->addWidget( lblStatus );

    cmbStatus = new QComboBox( FALSE, phonebook, "cmbStatus" );
    Layout5->addWidget( cmbStatus );
    QSpacerItem* spacer_3 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    Layout5->addItem( spacer_3 );

    btnPhoneAdd = new QPushButton( phonebook, "btnPhoneAdd" );
    Layout5->addWidget( btnPhoneAdd );

    btnPhoneEdit = new QPushButton( phonebook, "btnPhoneEdit" );
    Layout5->addWidget( btnPhoneEdit );

    btnPhoneDelete = new QPushButton( phonebook, "btnPhoneDelete" );
    Layout5->addWidget( btnPhoneDelete );
    phonebookLayout->addLayout( Layout5 );

    TextLabel1 = new QLabel( phonebook, "TextLabel1" );
    phonebookLayout->addWidget( TextLabel1 );
    tabMain->insertTab( phonebook, QString("") );

    tabNotes = new QWidget( tabMain, "tabNotes" );
    tabNotesLayout = new QVBoxLayout( tabNotes, 11, 6, "tabNotesLayout"); 

    edtNotes = new QMultiLineEdit( tabNotes, "edtNotes" );
    tabNotesLayout->addWidget( edtNotes );
    tabMain->insertTab( tabNotes, QString("") );
    MainInfoLayout->addWidget( tabMain );
    languageChange();
    resize( QSize(469, 267).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void MainInfoBase::languageChange()
{
    setProperty( "caption", i18n( "Form1" ) );
    TextLabel5->setProperty( "text", i18n( "First name:" ) );
    TextLabel6->setProperty( "text", i18n( "Last name:" ) );
    lblDisplay->setProperty( "text", i18n( "Display:" ) );
    tabMain->changeTab( tab, i18n( "&Info" ) );
    TextLabel3->setProperty( "text", i18n( "Email addresses:" ) );
    btnMailAdd->setProperty( "text", i18n( "&Add" ) );
    btnMailEdit->setProperty( "text", i18n( "&Edit" ) );
    btnMailDelete->setProperty( "text", i18n( "&Delete" ) );
    TextLabel4->setProperty( "text", i18n( "Note:\n"
"You can change only those addresses which have entered.\n"
"It is impossible to change addresses which were received from the user." ) );
    tabMain->changeTab( tab_2, i18n( "&Mails" ) );
    TextLabel2->setProperty( "text", i18n( "Phones:" ) );
    lblCurrent->setProperty( "text", QString::null );
    lblStatus->setProperty( "text", i18n( "Phone Status:" ) );
    btnPhoneAdd->setProperty( "text", i18n( "&Add" ) );
    btnPhoneEdit->setProperty( "text", i18n( "&Edit" ) );
    btnPhoneDelete->setProperty( "text", i18n( "&Delete" ) );
    TextLabel1->setProperty( "text", i18n( "Note:\n"
"You can change only those numbers which have entered.\n"
"It is impossible to change numbers which were received from the user." ) );
    tabMain->changeTab( phonebook, i18n( "&Phones" ) );
    tabMain->changeTab( tabNotes, i18n( "&Notes" ) );
}

#include "maininfobase.moc"
