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

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

#include "kbrokeragepagedecl.h"

#include <ntqvariant.h>
#include <kmymoney/kmymoneycurrencyselector.h>
#include <kactivelabel.h>
#include <ntqcheckbox.h>
#include <ntqframe.h>
#include <ntqlabel.h>
#include <klineedit.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    kActiveLabel14 = new KActiveLabel( this, "kActiveLabel14" );
    kActiveLabel14->setFocusPolicy( KActiveLabel::NoFocus );
    KBrokeragePageDeclLayout->addWidget( kActiveLabel14 );

    m_createBrokerageButton = new TQCheckBox( this, "m_createBrokerageButton" );
    KBrokeragePageDeclLayout->addWidget( m_createBrokerageButton );

    m_currencyFrame = new TQFrame( this, "m_currencyFrame" );
    m_currencyFrame->setEnabled( false );
    m_currencyFrame->setFrameShape( TQFrame::NoFrame );
    m_currencyFrame->setFrameShadow( TQFrame::Raised );
    m_currencyFrameLayout = new TQHBoxLayout( m_currencyFrame, 0, 6, "m_currencyFrameLayout"); 

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

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

    layout8->addWidget( textLabel1, 0, 0 );

    m_brokerageCurrency = new KMyMoneyCurrencySelector( m_currencyFrame, "m_brokerageCurrency" );
    m_brokerageCurrency->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)3, (TQSizePolicy::SizeType)0, 0, 0, m_brokerageCurrency->sizePolicy().hasHeightForWidth() ) );

    layout8->addWidget( m_brokerageCurrency, 0, 1 );

    m_accountNumberLabel = new TQLabel( m_currencyFrame, "m_accountNumberLabel" );

    layout8->addWidget( m_accountNumberLabel, 1, 0 );

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

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

    m_ibanLabel = new TQLabel( m_currencyFrame, "m_ibanLabel" );

    layout8->addWidget( m_ibanLabel, 2, 0 );

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

    layout8->addWidget( m_iban, 2, 1 );
    m_currencyFrameLayout->addLayout( layout8 );
    spacer2 = new TQSpacerItem( 30, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    m_currencyFrameLayout->addItem( spacer2 );
    KBrokeragePageDeclLayout->addWidget( m_currencyFrame );
    spacer20 = new TQSpacerItem( 21, 30, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    KBrokeragePageDeclLayout->addItem( spacer20 );
    languageChange();
    resize( TQSize(594, 398).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( m_createBrokerageButton, TQ_SIGNAL( toggled(bool) ), m_currencyFrame, TQ_SLOT( setEnabled(bool) ) );

    // tab order
    setTabOrder( m_createBrokerageButton, m_brokerageCurrency );
    setTabOrder( m_brokerageCurrency, m_accountNumber );
    setTabOrder( m_accountNumber, m_iban );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KBrokeragePageDecl::languageChange()
{
    kActiveLabel14->setText( tr2i18n( "Does this investment account have a brokerage account?<p>\n"
"\n"
"<b>Check</b> the mark if this investment account has an associated account for money that is not invested.<br>\n"
"\n"
"<b>Uncheck</b> it if you don't use this account for active stock brokerage. You should also uncheck it if this account is not maintained by a bank or broker." ) );
    m_createBrokerageButton->setText( tr2i18n( "Create brokerage account" ) );
    textLabel1->setText( tr2i18n( "Currency" ) );
    m_accountNumberLabel->setText( tr2i18n( "Account number" ) );
    m_ibanLabel->setText( tr2i18n( "IBAN" ) );
}

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

TQMetaObject *KBrokeragePageDecl::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KBrokeragePageDecl( "KBrokeragePageDecl", &KBrokeragePageDecl::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

TQMetaObject* KBrokeragePageDecl::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(
	"KBrokeragePageDecl", parentObject,
	slot_tbl, 1,
	0, 0,
#ifndef TQT_NO_PROPERTIES
	0, 0,
	0, 0,
#endif // TQT_NO_PROPERTIES
	0, 0 );
    cleanUp_KBrokeragePageDecl.setMetaObject( metaObj );
#ifdef TQT_THREAD_SUPPORT
    if (tqt_sharedMetaObjectMutex) tqt_sharedMetaObjectMutex->unlock();
#endif // TQT_THREAD_SUPPORT
    return metaObj;
}

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

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

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

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

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