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

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

/* 
 *  Constructs a LoginDialogBase 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.
 */
LoginDialogBase::LoginDialogBase( QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "Login" );
    setProperty( "sizeGripEnabled", QVariant( TRUE, 0 ) );
    LoginLayout = new QVBoxLayout( this, 11, 6, "LoginLayout"); 

    lblMessage = new QLabel( this, "lblMessage" );
    QFont lblMessage_font(  lblMessage->font() );
    lblMessage_font.setBold( TRUE );
    lblMessage->setFont( lblMessage_font ); 
    lblMessage->setProperty( "alignment", int( QLabel::AlignCenter ) );
    LoginLayout->addWidget( lblMessage );

    PLayout = new QGridLayout( 0, 1, 1, 0, 6, "PLayout"); 
    QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    PLayout->addItem( spacer, 1, 2 );

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

    PLayout->addWidget( lblPasswd, 1, 1 );

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

    PLayout->addWidget( TextLabel1, 0, 0 );

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

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

    cmbProfile = new QComboBox( FALSE, this, "cmbProfile" );
    cmbProfile->setProperty( "sizePolicy", QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)0, 0, 0, cmbProfile->sizePolicy().hasHeightForWidth() ) );
    Layout6->addWidget( cmbProfile );

    btnDelete = new QPushButton( this, "btnDelete" );
    Layout6->addWidget( btnDelete );

    PLayout->addMultiCellLayout( Layout6, 0, 0, 1, 2 );
    LoginLayout->addLayout( PLayout );

    chkSave = new QCheckBox( this, "chkSave" );
    LoginLayout->addWidget( chkSave );

    chkNoShow = new QCheckBox( this, "chkNoShow" );
    LoginLayout->addWidget( chkNoShow );
    QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
    LoginLayout->addItem( spacer_2 );

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

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

    buttonCancel = new QPushButton( this, "buttonCancel" );
    buttonCancel->setProperty( "autoDefault", QVariant( TRUE, 0 ) );
    Layout5->addWidget( buttonCancel );
    LoginLayout->addLayout( Layout5 );
    languageChange();
    resize( QSize(365, 194).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( cmbProfile, btnDelete );
    setTabOrder( btnDelete, chkSave );
    setTabOrder( chkSave, chkNoShow );
    setTabOrder( chkNoShow, buttonOk );
    setTabOrder( buttonOk, buttonCancel );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void LoginDialogBase::languageChange()
{
    setProperty( "caption", i18n( "Login" ) );
    lblMessage->setProperty( "text", QString::null );
    lblPasswd->setProperty( "text", i18n( "Passwords:" ) );
    TextLabel1->setProperty( "text", QString::null );
    lblProfile->setProperty( "text", i18n( "Profile:" ) );
    btnDelete->setProperty( "text", i18n( "&Delete" ) );
    chkSave->setProperty( "text", i18n( "&Save password" ) );
    chkNoShow->setProperty( "text", i18n( "&Do not show this window on startup" ) );
    buttonOk->setProperty( "text", i18n( "&OK" ) );
    buttonCancel->setProperty( "text", i18n( "&Cancel" ) );
}

#include "logindlgbase.moc"
