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

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

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


/* 
 *  Constructs a EditPhoneBase as a child of 'parent', with the 
 *  name 'name' and widget flags set to 'f'.
 *
 *  The dialog will by default be modeless, unless you set 'modal' to
 *  TRUE to construct a modal dialog.
 */
EditPhoneBase::EditPhoneBase( QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl ),
      image0( (const char **) img0_editphonebase )
{
    if ( !name )
	setName( "EditPhone" );
    setProperty( "sizeGripEnabled", QVariant( TRUE, 0 ) );
    EditPhoneLayout = new QVBoxLayout( this, 11, 6, "EditPhoneLayout"); 

    TextLabel2 = new QLabel( this, "TextLabel2" );
    EditPhoneLayout->addWidget( TextLabel2 );

    edtDetails = new QLineEdit( this, "edtDetails" );
    EditPhoneLayout->addWidget( edtDetails );

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

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

    cmbType = new QComboBox( FALSE, this, "cmbType" );
    Layout10->addWidget( cmbType );

    cmbName = new QComboBox( FALSE, this, "cmbName" );
    cmbName->setProperty( "sizePolicy", QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, cmbName->sizePolicy().hasHeightForWidth() ) );
    Layout10->addWidget( cmbName );
    EditPhoneLayout->addLayout( Layout10 );

    wndDetails = new QWidgetStack( this, "wndDetails" );
    EditPhoneLayout->addWidget( wndDetails );

    chkPublish = new QCheckBox( this, "chkPublish" );
    EditPhoneLayout->addWidget( chkPublish );

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

    buttonOk = new QPushButton( this, "buttonOk" );
    buttonOk->setProperty( "autoDefault", QVariant( TRUE, 0 ) );
    buttonOk->setProperty( "default", QVariant( TRUE, 0 ) );
    Layout1->addWidget( buttonOk );

    buttonCancel = new QPushButton( this, "buttonCancel" );
    buttonCancel->setProperty( "autoDefault", QVariant( TRUE, 0 ) );
    Layout1->addWidget( buttonCancel );
    EditPhoneLayout->addLayout( Layout1 );
    languageChange();
    resize( QSize(402, 242).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );
    connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );

    // tab order
    setTabOrder( edtDetails, cmbType );
    setTabOrder( cmbType, cmbName );
    setTabOrder( cmbName, chkPublish );
    setTabOrder( chkPublish, buttonOk );
    setTabOrder( buttonOk, buttonCancel );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void EditPhoneBase::languageChange()
{
    setProperty( "caption", i18n( "EditPhone" ) );
    TextLabel2->setProperty( "text", i18n( "Number details:" ) );
    TextLabel3->setProperty( "text", i18n( "Type:" ) );
    chkPublish->setProperty( "text", i18n( "&Publish" ) );
    buttonOk->setProperty( "text", i18n( "&OK" ) );
    buttonCancel->setProperty( "text", i18n( "&Cancel" ) );
}

#include "editphonebase.moc"
