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

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

#include "userinfodecl.h"

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

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

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

    UserInfoDeclLayout->addMultiCellWidget( kActiveLabel1, 0, 0, 0, 3 );

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

    UserInfoDeclLayout->addMultiCellWidget( m_userNameEdit, 1, 1, 1, 3 );

    TextLabel3 = new TQLabel( this, "TextLabel3" );
    TextLabel3->setMinimumSize( TQSize( 100, 0 ) );

    UserInfoDeclLayout->addWidget( TextLabel3, 3, 0 );

    TextLabel4 = new TQLabel( this, "TextLabel4" );
    TextLabel4->setMinimumSize( TQSize( 100, 0 ) );

    UserInfoDeclLayout->addWidget( TextLabel4, 4, 0 );

    TextLabel2 = new TQLabel( this, "TextLabel2" );
    TextLabel2->setMinimumSize( TQSize( 100, 0 ) );

    UserInfoDeclLayout->addWidget( TextLabel2, 2, 0 );

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

    UserInfoDeclLayout->addMultiCellWidget( m_streetEdit, 2, 2, 1, 3 );

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

    UserInfoDeclLayout->addMultiCellWidget( m_emailEdit, 6, 6, 1, 3 );

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

    UserInfoDeclLayout->addMultiCellWidget( m_townEdit, 3, 3, 1, 3 );

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

    UserInfoDeclLayout->addMultiCellWidget( m_telephoneEdit, 5, 5, 1, 3 );

    TextLabel7 = new TQLabel( this, "TextLabel7" );
    TextLabel7->setMinimumSize( TQSize( 100, 0 ) );

    UserInfoDeclLayout->addWidget( TextLabel7, 6, 0 );

    TextLabel6 = new TQLabel( this, "TextLabel6" );
    TextLabel6->setMinimumSize( TQSize( 100, 0 ) );

    UserInfoDeclLayout->addWidget( TextLabel6, 5, 0 );

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

    UserInfoDeclLayout->addWidget( TextLabel1, 1, 0 );

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

    m_loadAddressButton = new KPushButton( this, "m_loadAddressButton" );
    layout22->addWidget( m_loadAddressButton );
    spacer11 = new TQSpacerItem( 305, 21, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout22->addItem( spacer11 );

    UserInfoDeclLayout->addMultiCellLayout( layout22, 7, 7, 0, 3 );
    spacer5 = new TQSpacerItem( 20, 16, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    UserInfoDeclLayout->addItem( spacer5, 8, 2 );

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

    UserInfoDeclLayout->addWidget( m_countyEdit, 4, 1 );

    TextLabel5 = new TQLabel( this, "TextLabel5" );
    TextLabel5->setMinimumSize( TQSize( 100, 0 ) );

    UserInfoDeclLayout->addWidget( TextLabel5, 4, 2 );

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

    UserInfoDeclLayout->addWidget( m_postcodeEdit, 4, 3 );
    languageChange();
    resize( TQSize(603, 374).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( m_userNameEdit, m_streetEdit );
    setTabOrder( m_streetEdit, m_townEdit );
    setTabOrder( m_townEdit, m_countyEdit );
    setTabOrder( m_countyEdit, m_postcodeEdit );
    setTabOrder( m_postcodeEdit, m_telephoneEdit );
    setTabOrder( m_telephoneEdit, m_emailEdit );
    setTabOrder( m_emailEdit, m_loadAddressButton );
    setTabOrder( m_loadAddressButton, kActiveLabel1 );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void UserInfoDecl::languageChange()
{
    kActiveLabel1->setText( tr2i18n( "<p>Use the fields below to enter some information about yourself.</p>\n"
"\n"
"<p>All information is optional and only used to personalize your KMyMoney file.</p>" ) );
    TextLabel3->setText( tr2i18n( "Town:" ) );
    TextLabel4->setText( tr2i18n( "County/State:" ) );
    TextLabel2->setText( tr2i18n( "Street:" ) );
    TextLabel7->setText( tr2i18n( "Email:" ) );
    TextLabel6->setText( tr2i18n( "Telephone:" ) );
    TextLabel1->setText( tr2i18n( "Your name:" ) );
    m_loadAddressButton->setText( tr2i18n( "Load from Addressbook" ) );
    TextLabel5->setText( tr2i18n( "Postal Code:" ) );
}

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

TQMetaObject *UserInfoDecl::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_UserInfoDecl( "UserInfoDecl", &UserInfoDecl::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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