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

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

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

    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 );

    GpgGenLayout->addMultiCellLayout( Layout1, 4, 4, 0, 1 );

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

    GpgGenLayout->addWidget( TextLabel3, 1, 0 );

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

    GpgGenLayout->addWidget( TextLabel4, 2, 0 );

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

    GpgGenLayout->addWidget( TextLabel2, 0, 0 );

    edtName = new QLineEdit( this, "edtName" );

    GpgGenLayout->addWidget( edtName, 0, 1 );

    edtComment = new QLineEdit( this, "edtComment" );

    GpgGenLayout->addWidget( edtComment, 2, 1 );

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

    GpgGenLayout->addWidget( cmbMail, 1, 1 );

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

    GpgGenLayout->addMultiCellWidget( lblProcess, 3, 3, 0, 1 );
    languageChange();
    resize( QSize(389, 183).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( edtName, cmbMail );
    setTabOrder( cmbMail, edtComment );
    setTabOrder( edtComment, buttonOk );
    setTabOrder( buttonOk, buttonCancel );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void GpgGenBase::languageChange()
{
    setProperty( "caption", i18n( "Generate key" ) );
    buttonOk->setProperty( "text", i18n( "&OK" ) );
    buttonCancel->setProperty( "text", i18n( "&Cancel" ) );
    TextLabel3->setProperty( "text", i18n( "EMail:" ) );
    TextLabel4->setProperty( "text", i18n( "Comment:" ) );
    TextLabel2->setProperty( "text", i18n( "Name:" ) );
    lblProcess->setProperty( "text", QString::null );
}

#include "gpggenbase.moc"
