#include <kdialog.h>
#include <tdelocale.h>

/****************************************************************************
** Form implementation generated from reading ui file 'tdeselectdatabasedlgdecl.ui'
**
** Created by: The TQt user interface compiler (TQt 3.5.0)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "tdeselectdatabasedlgdecl.h"

#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqgroupbox.h>
#include <kactivelabel.h>
#include <ntqlistbox.h>
#include <ntqlineedit.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a TDESelectDatabaseDlgDecl as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 *  The qdialog will by default be modeless, unless you set 'modal' to
 *  true to construct a modal qdialog.
 */
TDESelectDatabaseDlgDecl::TDESelectDatabaseDlgDecl( TQWidget* parent, const char* name, bool modal, WFlags fl )
    : TQDialog( parent, name, modal, fl )
{
    if ( !name )
	setName( "TDESelectDatabaseDlgDecl" );
    TDESelectDatabaseDlgDeclLayout = new TQVBoxLayout( this, 11, 6, "TDESelectDatabaseDlgDeclLayout"); 

    groupBox6 = new TQGroupBox( this, "groupBox6" );
    groupBox6->setColumnLayout(0, TQt::Vertical );
    groupBox6->layout()->setSpacing( 6 );
    groupBox6->layout()->setMargin( 11 );
    groupBox6Layout = new TQVBoxLayout( groupBox6->layout() );
    groupBox6Layout->setAlignment( TQt::AlignTop );

    kActiveLabel1 = new KActiveLabel( groupBox6, "kActiveLabel1" );
    TQFont kActiveLabel1_font(  kActiveLabel1->font() );
    kActiveLabel1_font.setPointSize( 10 );
    kActiveLabel1_font.setBold( true );
    kActiveLabel1->setFont( kActiveLabel1_font ); 
    kActiveLabel1->setFocusPolicy( KActiveLabel::NoFocus );
    groupBox6Layout->addWidget( kActiveLabel1 );
    TDESelectDatabaseDlgDeclLayout->addWidget( groupBox6 );

    groupBox1 = new TQGroupBox( this, "groupBox1" );
    groupBox1->setColumnLayout(0, TQt::Vertical );
    groupBox1->layout()->setSpacing( 6 );
    groupBox1->layout()->setMargin( 11 );
    groupBox1Layout = new TQVBoxLayout( groupBox1->layout() );
    groupBox1Layout->setAlignment( TQt::AlignTop );

    listDrivers = new TQListBox( groupBox1, "listDrivers" );
    groupBox1Layout->addWidget( listDrivers );
    TDESelectDatabaseDlgDeclLayout->addWidget( groupBox1 );

    groupBox2 = new TQGroupBox( this, "groupBox2" );
    groupBox2->setColumnLayout(0, TQt::Vertical );
    groupBox2->layout()->setSpacing( 6 );
    groupBox2->layout()->setMargin( 11 );
    groupBox2Layout = new TQVBoxLayout( groupBox2->layout() );
    groupBox2Layout->setAlignment( TQt::AlignTop );

    textDbName = new TQLineEdit( groupBox2, "textDbName" );
    groupBox2Layout->addWidget( textDbName );
    TDESelectDatabaseDlgDeclLayout->addWidget( groupBox2 );

    groupBox3 = new TQGroupBox( this, "groupBox3" );
    groupBox3->setColumnLayout(0, TQt::Vertical );
    groupBox3->layout()->setSpacing( 6 );
    groupBox3->layout()->setMargin( 11 );
    groupBox3Layout = new TQVBoxLayout( groupBox3->layout() );
    groupBox3Layout->setAlignment( TQt::AlignTop );

    textHostName = new TQLineEdit( groupBox3, "textHostName" );
    groupBox3Layout->addWidget( textHostName );
    TDESelectDatabaseDlgDeclLayout->addWidget( groupBox3 );

    groupBox4 = new TQGroupBox( this, "groupBox4" );
    groupBox4->setColumnLayout(0, TQt::Vertical );
    groupBox4->layout()->setSpacing( 6 );
    groupBox4->layout()->setMargin( 11 );
    groupBox4Layout = new TQVBoxLayout( groupBox4->layout() );
    groupBox4Layout->setAlignment( TQt::AlignTop );

    textUserName = new TQLineEdit( groupBox4, "textUserName" );
    groupBox4Layout->addWidget( textUserName );
    TDESelectDatabaseDlgDeclLayout->addWidget( groupBox4 );

    groupBoxPassword = new TQGroupBox( this, "groupBoxPassword" );
    groupBoxPassword->setColumnLayout(0, TQt::Vertical );
    groupBoxPassword->layout()->setSpacing( 6 );
    groupBoxPassword->layout()->setMargin( 11 );
    groupBoxPasswordLayout = new TQVBoxLayout( groupBoxPassword->layout() );
    groupBoxPasswordLayout->setAlignment( TQt::AlignTop );

    textPassword = new TQLineEdit( groupBoxPassword, "textPassword" );
    textPassword->setEchoMode( TQLineEdit::Password );
    groupBoxPasswordLayout->addWidget( textPassword );
    TDESelectDatabaseDlgDeclLayout->addWidget( groupBoxPassword );

    checkPreLoad = new TQCheckBox( this, "checkPreLoad" );
    TDESelectDatabaseDlgDeclLayout->addWidget( checkPreLoad );

    layout3 = new TQHBoxLayout( 0, 0, 6, "layout3"); 

    buttonHelp = new TQPushButton( this, "buttonHelp" );
    layout3->addWidget( buttonHelp );
    spacer3 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout3->addItem( spacer3 );

    buttonSQL = new TQPushButton( this, "buttonSQL" );
    layout3->addWidget( buttonSQL );
    spacer2 = new TQSpacerItem( 31, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout3->addItem( spacer2 );

    buttonOK = new TQPushButton( this, "buttonOK" );
    buttonOK->setDefault( true );
    layout3->addWidget( buttonOK );

    buttonCancel = new TQPushButton( this, "buttonCancel" );
    layout3->addWidget( buttonCancel );
    TDESelectDatabaseDlgDeclLayout->addLayout( layout3 );
    languageChange();
    resize( TQSize(449, 640).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( buttonOK, TQ_SIGNAL( released() ), this, TQ_SLOT( accept() ) );
    connect( buttonCancel, TQ_SIGNAL( released() ), this, TQ_SLOT( reject() ) );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void TDESelectDatabaseDlgDecl::languageChange()
{
    setCaption( tr2i18n( "KMyMoney - Select Database" ) );
    groupBox6->setTitle( tr2i18n( "CAUTION!" ) );
    kActiveLabel1->setText( tr2i18n( "<font color=\"#ff2727\">This software is still in an experimental stage, and there are still some known response time problems. Please be patient; we are working on them.\n"
"As always, please make sure you have adequate backups of your data.</font>" ) );
    groupBox1->setTitle( tr2i18n( "Database Type" ) );
    groupBox2->setTitle( tr2i18n( "Database Name" ) );
    groupBox3->setTitle( tr2i18n( "Host Name" ) );
    groupBox4->setTitle( tr2i18n( "User Name" ) );
    groupBoxPassword->setTitle( tr2i18n( "Password" ) );
    checkPreLoad->setText( tr2i18n( "Preload &all data" ) );
    buttonHelp->setText( tr2i18n( "Help" ) );
    buttonSQL->setText( tr2i18n( "&Generate SQL" ) );
    buttonOK->setText( tr2i18n( "OK" ) );
    buttonCancel->setText( tr2i18n( "Ca&ncel" ) );
}

/****************************************************************************
** TDESelectDatabaseDlgDecl meta object code from reading C++ file 'tdeselectdatabasedlgdecl.h'
**
** Created by: The TQt Meta Object Compiler version 26 (TQt 3.5.0)
** WARNING! All changes made in this file will be lost!
*****************************************************************************/

#undef TQT_NO_COMPAT
#include "tdeselectdatabasedlgdecl.h"
#include <ntqmetaobject.h>
#include <ntqapplication.h>

#include <private/qucomextra_p.h>
#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26)
#error "This file was generated using the moc from 3.5.0. It"
#error "cannot be used with the include files from this version of TQt."
#error "(The moc has changed too much.)"
#endif

const char *TDESelectDatabaseDlgDecl::className() const
{
    return "TDESelectDatabaseDlgDecl";
}

TQMetaObject *TDESelectDatabaseDlgDecl::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_TDESelectDatabaseDlgDecl( "TDESelectDatabaseDlgDecl", &TDESelectDatabaseDlgDecl::staticMetaObject );

#ifndef TQT_NO_TRANSLATION
TQString TDESelectDatabaseDlgDecl::tr( const char *s, const char *c )
{
    if ( tqApp )
	return tqApp->translate( "TDESelectDatabaseDlgDecl", s, c, TQApplication::DefaultCodec );
    else
	return TQString::fromLatin1( s );
}
#ifndef TQT_NO_TRANSLATION_UTF8
TQString TDESelectDatabaseDlgDecl::trUtf8( const char *s, const char *c )
{
    if ( tqApp )
	return tqApp->translate( "TDESelectDatabaseDlgDecl", s, c, TQApplication::UnicodeUTF8 );
    else
	return TQString::fromUtf8( s );
}
#endif // TQT_NO_TRANSLATION_UTF8

#endif // TQT_NO_TRANSLATION

TQMetaObject* TDESelectDatabaseDlgDecl::staticMetaObject()
{
    if ( metaObj ) {
	return metaObj;
}
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->lock();
    if ( metaObj ) {
	if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
	return metaObj;
    }
#endif // TQT_THREAD_SUPPORT
    TQMetaObject* parentObject = TQDialog::staticMetaObject();
    static const TQUMethod slot_0 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"TDESelectDatabaseDlgDecl", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_TDESelectDatabaseDlgDecl.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

void* TDESelectDatabaseDlgDecl::tqt_cast( const char* clname )
{
    if ( !qstrcmp( clname, "TDESelectDatabaseDlgDecl" ) )
	return this;
    return TQDialog::tqt_cast( clname );
}

bool TDESelectDatabaseDlgDecl::tqt_invoke( int _id, TQUObject* _o )
{
    switch ( _id - staticMetaObject()->slotOffset() ) {
    case 0: languageChange(); break;
    default:
	return TQDialog::tqt_invoke( _id, _o );
    }
    return true;
}

bool TDESelectDatabaseDlgDecl::tqt_emit( int _id, TQUObject* _o )
{
    return TQDialog::tqt_emit(_id,_o);
}
#ifndef TQT_NO_PROPERTIES

bool TDESelectDatabaseDlgDecl::tqt_property( int id, int f, TQVariant* v)
{
    return TQDialog::tqt_property( id, f, v);
}

bool TDESelectDatabaseDlgDecl::tqt_static_property( TQObject* , int , int , TQVariant* ){ return false; }
#endif // TQT_NO_PROPERTIES
