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

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

#include "kloanschedulepagedecl.h"

#include <ntqvariant.h>
#include <kmymoney/kmymoneydateinput.h>
#include <kmymoney/kmymoneyedit.h>
#include <kmymoney/kmymoneycategory.h>
#include <ntqpushbutton.h>
#include <kactivelabel.h>
#include <ntqlabel.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    kActiveLabel2 = new KActiveLabel( this, "kActiveLabel2" );
    kActiveLabel2->setFocusPolicy( KActiveLabel::NoFocus );
    KLoanSchedulePageDeclLayout->addWidget( kActiveLabel2 );

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

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

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

    layout53->addWidget( textLabel7, 0, 0 );

    m_interestCategory = new KMyMoneyCategory( this, "m_interestCategory" );

    layout53->addWidget( m_interestCategory, 0, 1 );

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

    layout53->addWidget( textLabel8, 1, 0 );

    m_paymentAccount = new KMyMoneyCategory( this, "m_paymentAccount" );

    layout53->addWidget( m_paymentAccount, 1, 1 );

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

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

    layout52 = new TQHBoxLayout( 0, 0, 6, "layout52"); 
    spacer89 = new TQSpacerItem( 61, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
    layout52->addItem( spacer89 );

    m_firstPaymentDueDate = new kMyMoneyDateInput( this, "m_firstPaymentDueDate" );
    layout52->addWidget( m_firstPaymentDueDate );

    layout53->addLayout( layout52, 2, 1 );
    layout54->addLayout( layout53 );
    spacer4 = new TQSpacerItem( 41, 20, TQSizePolicy::Preferred, TQSizePolicy::Minimum );
    layout54->addItem( spacer4 );
    KLoanSchedulePageDeclLayout->addLayout( layout54 );
    spacer88 = new TQSpacerItem( 20, 21, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    KLoanSchedulePageDeclLayout->addItem( spacer88 );
    languageChange();
    resize( TQSize(545, 370).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KLoanSchedulePageDecl::languageChange()
{
    kActiveLabel2->setText( tr2i18n( "KMyMoney creates a schedule for this payment and reminds you whenever a payment must be made. Please select the account to/from which payments will be made and the category the interest will be assigned to.<p>\n"
"If you selected to record all payments this date has already been supplied. If you selected to record only this years payments, then the <b>First payment due date</b> is the date of the first payment made in this year." ) );
    textLabel7->setText( tr2i18n( "Interest category" ) );
    TQWhatsThis::add( m_interestCategory, tr2i18n( "The category the interest part of the payment will be assigned to. If you borrow money you usually have to pay interest, so this should be an expense category. If you lend the money, you receive the interest. In this case, select an income category here." ) );
    textLabel8->setText( tr2i18n( "Payment account" ) );
    TQWhatsThis::add( m_paymentAccount, tr2i18n( "Select the account from which you make your periodical payments or where you receive regular payments in case you lend the money. In most cases, this is a checking account." ) );
    textLabel1->setText( tr2i18n( "First payment due on" ) );
}

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

TQMetaObject *KLoanSchedulePageDecl::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KLoanSchedulePageDecl( "KLoanSchedulePageDecl", &KLoanSchedulePageDecl::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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