#include <kdialog.h>
#include <klocale.h>
/****************************************************************************
** Form implementation generated from reading ui file './srkaddlanguagedialogbase.ui'
**
** Created: wo sep 6 18:04:46 2006
**      by: The User Interface Compiler ($Id: qt/main.cpp   3.3.6   edited Aug 31 2005 $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "srkaddlanguagedialogbase.h"

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

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

    textLabel1 = new QLabel( this, "textLabel1" );
    textLabel1->setAlignment( int( QLabel::AlignVCenter ) );
    SRKAddLanguageDialogBaseLayout->addWidget( textLabel1 );

    layout4 = new QHBoxLayout( 0, 0, 6, "layout4"); 
    spacer5 = new QSpacerItem( 21, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    layout4->addItem( spacer5 );

    languageCombo = new KLanguageButton( this, "languageCombo" );
    layout4->addWidget( languageCombo );
    spacer3 = new QSpacerItem( 230, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    layout4->addItem( spacer3 );
    SRKAddLanguageDialogBaseLayout->addLayout( layout4 );

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

    buttonOk = new QPushButton( this, "buttonOk" );
    buttonOk->setAutoDefault( TRUE );
    buttonOk->setDefault( TRUE );
    layout2->addWidget( buttonOk );

    buttonCancel = new QPushButton( this, "buttonCancel" );
    buttonCancel->setAutoDefault( TRUE );
    layout2->addWidget( buttonCancel );
    spacer2 = new QSpacerItem( 400, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
    layout2->addItem( spacer2 );
    SRKAddLanguageDialogBaseLayout->addLayout( layout2 );
    languageChange();
    resize( QSize(397, 106).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

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

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void SRKAddLanguageDialogBase::languageChange()
{
    setCaption( tr2i18n( "Add language" ) );
    textLabel1->setText( tr2i18n( "Please select the language to add:" ) );
    buttonOk->setText( tr2i18n( "&OK" ) );
    buttonOk->setAccel( QKeySequence( QString::null ) );
    buttonCancel->setText( tr2i18n( "C&ancel" ) );
    buttonCancel->setAccel( QKeySequence( tr2i18n( "Alt+A" ) ) );
}

#include "srkaddlanguagedialogbase.moc"
