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

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

#include "kinstitutionpagedecl.h"

#include <ntqvariant.h>
#include <kactivelabel.h>
#include <ntqlabel.h>
#include <kcombobox.h>
#include <kpushbutton.h>
#include <klineedit.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

/*
 *  Constructs a KInstitutionPageDecl as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 */
KInstitutionPageDecl::KInstitutionPageDecl( TQWidget* parent, const char* name, WFlags fl )
    : TQWidget( parent, name, fl )
{
    if ( !name )
	setName( "KInstitutionPageDecl" );
    KInstitutionPageDeclLayout = new TQVBoxLayout( this, 0, 6, "KInstitutionPageDeclLayout"); 

    kActiveLabel1 = new KActiveLabel( this, "kActiveLabel1" );
    kActiveLabel1->setFocusPolicy( KActiveLabel::NoFocus );
    KInstitutionPageDeclLayout->addWidget( kActiveLabel1 );

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

    layout18 = new TQGridLayout( 0, 1, 1, 0, 6, "layout18"); 

    textLabel4 = new TQLabel( this, "textLabel4" );

    layout18->addWidget( textLabel4, 0, 0 );

    m_institutionComboBox = new KComboBox( false, this, "m_institutionComboBox" );

    layout18->addWidget( m_institutionComboBox, 0, 1 );

    m_newInstitutionButton = new KPushButton( this, "m_newInstitutionButton" );

    layout18->addWidget( m_newInstitutionButton, 0, 2 );

    textLabel5 = new TQLabel( this, "textLabel5" );

    layout18->addWidget( textLabel5, 1, 0 );

    m_accountNumber = new KLineEdit( this, "m_accountNumber" );

    layout18->addWidget( m_accountNumber, 1, 1 );

    textLabel1 = new TQLabel( this, "textLabel1" );

    layout18->addWidget( textLabel1, 2, 0 );

    m_iban = new KLineEdit( this, "m_iban" );

    layout18->addMultiCellWidget( m_iban, 2, 2, 1, 2 );
    layout19->addLayout( layout18 );
    spacer16 = new TQSpacerItem( 132, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout19->addItem( spacer16 );
    KInstitutionPageDeclLayout->addLayout( layout19 );
    spacer17 = new TQSpacerItem( 20, 40, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    KInstitutionPageDeclLayout->addItem( spacer17 );
    languageChange();
    resize( TQSize(586, 322).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KInstitutionPageDecl::languageChange()
{
    kActiveLabel1->setText( tr2i18n( "If this account is managed by an institution please select the institution from the list. If the institution does not exist yet, please choose the <b>New Institution</b> button to create it. Otherwise, leave this field empty.\n"
"Enter the account number used by the institution to identify the account." ) );
    textLabel4->setText( tr2i18n( "Institution" ) );
    TQToolTip::add( m_institutionComboBox, tr2i18n( "Select the institution which manages this account or leave empty" ) );
    m_newInstitutionButton->setText( tr2i18n( "New Institution" ) );
    textLabel5->setText( tr2i18n( "Account number" ) );
    TQWhatsThis::add( m_accountNumber, tr2i18n( "Accounts managed by an institution are usually referenced by a unique number the so called account number. Enter that number here.\n"
"\n"
"KMyMoney currently uses this number only for some online banking functions." ) );
    textLabel1->setText( tr2i18n( "IBAN" ) );
    TQToolTip::add( m_iban, tr2i18n( "Enter the International Bank Account Number into this field" ) );
    TQWhatsThis::add( m_iban, tr2i18n( "You can enter the IBAN (International Bank Account Number) into this field if you know it. Usually, people at your institution can tell you the number or it is printed on your statements.\n"
"\n"
"See also http://en.wikipedia.org/wiki/International_Bank_Account_Number for more information.\n"
"\n"
"KMyMoney keeps this field only for documentation purposes and does not use it otherwise." ) );
}

/****************************************************************************
** KInstitutionPageDecl meta object code from reading C++ file 'kinstitutionpagedecl.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 "kinstitutionpagedecl.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 *KInstitutionPageDecl::className() const
{
    return "KInstitutionPageDecl";
}

TQMetaObject *KInstitutionPageDecl::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KInstitutionPageDecl( "KInstitutionPageDecl", &KInstitutionPageDecl::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* KInstitutionPageDecl::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 = TQWidget::staticMetaObject();
    static const TQUMethod slot_0 = {"languageChange", 0, 0 };
    static const TQMetaData slot_tbl[] = {
	{ "languageChange()", &slot_0, TQMetaData::Protected }
    };
    metaObj = TQMetaObject::new_metaobject(
	"KInstitutionPageDecl", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_KInstitutionPageDecl.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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