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

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

#include "kbudgetvaluesdecl.h"

#include <ntqvariant.h>
#include <kmymoney/kmymoneyedit.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqwidgetstack.h>
#include <kpushbutton.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>

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

    m_amount10 = new kMyMoneyEdit( this, "m_amount10" );
    m_amount10->setProperty( "resetButtonVisibility", TQVariant( false ) );

    KBudgetValuesDeclLayout->addWidget( m_amount10, 3, 5 );

    m_amount6 = new kMyMoneyEdit( this, "m_amount6" );
    m_amount6->setProperty( "resetButtonVisibility", TQVariant( false ) );

    KBudgetValuesDeclLayout->addWidget( m_amount6, 5, 3 );

    m_amount5 = new kMyMoneyEdit( this, "m_amount5" );
    m_amount5->setProperty( "resetButtonVisibility", TQVariant( false ) );

    KBudgetValuesDeclLayout->addWidget( m_amount5, 4, 3 );

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

    KBudgetValuesDeclLayout->addWidget( m_label6, 5, 2 );

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

    KBudgetValuesDeclLayout->addWidget( m_label8, 1, 4 );

    m_amount9 = new kMyMoneyEdit( this, "m_amount9" );
    m_amount9->setProperty( "resetButtonVisibility", TQVariant( false ) );

    KBudgetValuesDeclLayout->addWidget( m_amount9, 2, 5 );

    m_amount11 = new kMyMoneyEdit( this, "m_amount11" );
    m_amount11->setProperty( "resetButtonVisibility", TQVariant( false ) );

    KBudgetValuesDeclLayout->addWidget( m_amount11, 4, 5 );

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

    KBudgetValuesDeclLayout->addWidget( m_label12, 5, 4 );

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

    KBudgetValuesDeclLayout->addWidget( m_label10, 3, 4 );

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

    KBudgetValuesDeclLayout->addWidget( m_label7, 0, 4 );

    m_amount3 = new kMyMoneyEdit( this, "m_amount3" );
    m_amount3->setProperty( "resetButtonVisibility", TQVariant( false ) );

    KBudgetValuesDeclLayout->addWidget( m_amount3, 2, 3 );

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

    KBudgetValuesDeclLayout->addWidget( m_label4, 3, 2 );

    m_amount12 = new kMyMoneyEdit( this, "m_amount12" );
    m_amount12->setProperty( "resetButtonVisibility", TQVariant( false ) );

    KBudgetValuesDeclLayout->addWidget( m_amount12, 5, 5 );

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

    KBudgetValuesDeclLayout->addWidget( m_label3, 2, 2 );

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

    KBudgetValuesDeclLayout->addWidget( m_label1, 0, 2 );

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

    KBudgetValuesDeclLayout->addWidget( m_label2, 1, 2 );

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

    KBudgetValuesDeclLayout->addWidget( m_label5, 4, 2 );

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

    KBudgetValuesDeclLayout->addWidget( m_label11, 4, 4 );

    m_amount4 = new kMyMoneyEdit( this, "m_amount4" );
    m_amount4->setProperty( "resetButtonVisibility", TQVariant( false ) );

    KBudgetValuesDeclLayout->addWidget( m_amount4, 3, 3 );

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

    KBudgetValuesDeclLayout->addWidget( m_label9, 2, 4 );

    m_amount8 = new kMyMoneyEdit( this, "m_amount8" );
    m_amount8->setProperty( "resetButtonVisibility", TQVariant( false ) );

    KBudgetValuesDeclLayout->addWidget( m_amount8, 1, 5 );

    m_amount2 = new kMyMoneyEdit( this, "m_amount2" );
    m_amount2->setProperty( "resetButtonVisibility", TQVariant( false ) );

    KBudgetValuesDeclLayout->addWidget( m_amount2, 1, 3 );

    m_amount7 = new kMyMoneyEdit( this, "m_amount7" );
    m_amount7->setProperty( "resetButtonVisibility", TQVariant( false ) );

    KBudgetValuesDeclLayout->addWidget( m_amount7, 0, 5 );

    m_firstItemStack = new TQWidgetStack( this, "m_firstItemStack" );

    m_monthlyPage = new TQWidget( m_firstItemStack, "m_monthlyPage" );
    m_monthlyPageLayout = new TQHBoxLayout( m_monthlyPage, 0, 6, "m_monthlyPageLayout"); 

    m_amountMonthly = new kMyMoneyEdit( m_monthlyPage, "m_amountMonthly" );
    m_amountMonthly->setProperty( "resetButtonVisibility", TQVariant( false ) );
    m_monthlyPageLayout->addWidget( m_amountMonthly );
    m_firstItemStack->addWidget( m_monthlyPage, 0 );

    m_yearlyPage = new TQWidget( m_firstItemStack, "m_yearlyPage" );
    m_yearlyPageLayout = new TQHBoxLayout( m_yearlyPage, 0, 6, "m_yearlyPageLayout"); 

    m_amountYearly = new kMyMoneyEdit( m_yearlyPage, "m_amountYearly" );
    m_amountYearly->setProperty( "resetButtonVisibility", TQVariant( false ) );
    m_yearlyPageLayout->addWidget( m_amountYearly );
    m_firstItemStack->addWidget( m_yearlyPage, 1 );

    m_individualPage = new TQWidget( m_firstItemStack, "m_individualPage" );
    m_individualPageLayout = new TQHBoxLayout( m_individualPage, 0, 6, "m_individualPageLayout"); 

    m_amount1 = new kMyMoneyEdit( m_individualPage, "m_amount1" );
    m_amount1->setProperty( "resetButtonVisibility", TQVariant( false ) );
    m_individualPageLayout->addWidget( m_amount1 );
    m_firstItemStack->addWidget( m_individualPage, 2 );

    KBudgetValuesDeclLayout->addWidget( m_firstItemStack, 0, 3 );

    layout12 = new TQVBoxLayout( 0, 0, 6, "layout12"); 

    m_clearButton = new KPushButton( this, "m_clearButton" );
    layout12->addWidget( m_clearButton );
    spacer7 = new TQSpacerItem( 20, 21, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    layout12->addItem( spacer7 );

    KBudgetValuesDeclLayout->addMultiCellLayout( layout12, 0, 5, 1, 1 );

    m_periodGroup = new TQButtonGroup( this, "m_periodGroup" );
    m_periodGroup->setColumnLayout(0, TQt::Vertical );
    m_periodGroup->layout()->setSpacing( 6 );
    m_periodGroup->layout()->setMargin( 11 );
    m_periodGroupLayout = new TQVBoxLayout( m_periodGroup->layout() );
    m_periodGroupLayout->setAlignment( TQt::AlignTop );

    m_monthlyButton = new TQRadioButton( m_periodGroup, "m_monthlyButton" );
    m_periodGroupLayout->addWidget( m_monthlyButton );

    m_yearlyButton = new TQRadioButton( m_periodGroup, "m_yearlyButton" );
    m_periodGroupLayout->addWidget( m_yearlyButton );

    m_individualButton = new TQRadioButton( m_periodGroup, "m_individualButton" );
    m_periodGroupLayout->addWidget( m_individualButton );
    spacer10 = new TQSpacerItem( 20, 21, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
    m_periodGroupLayout->addItem( spacer10 );

    KBudgetValuesDeclLayout->addMultiCellWidget( m_periodGroup, 0, 5, 0, 0 );
    languageChange();
    resize( TQSize(553, 188).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // tab order
    setTabOrder( m_monthlyButton, m_yearlyButton );
    setTabOrder( m_yearlyButton, m_individualButton );
    setTabOrder( m_individualButton, m_clearButton );
    setTabOrder( m_clearButton, m_amount1 );
    setTabOrder( m_amount1, m_amountMonthly );
    setTabOrder( m_amountMonthly, m_amountYearly );
    setTabOrder( m_amountYearly, m_amount2 );
    setTabOrder( m_amount2, m_amount3 );
    setTabOrder( m_amount3, m_amount4 );
    setTabOrder( m_amount4, m_amount5 );
    setTabOrder( m_amount5, m_amount6 );
    setTabOrder( m_amount6, m_amount7 );
    setTabOrder( m_amount7, m_amount8 );
    setTabOrder( m_amount8, m_amount9 );
    setTabOrder( m_amount9, m_amount10 );
    setTabOrder( m_amount10, m_amount11 );
    setTabOrder( m_amount11, m_amount12 );
}

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

/*
 *  Sets the strings of the subwidgets using the current
 *  language.
 */
void KBudgetValuesDecl::languageChange()
{
    m_label6->setText( tr2i18n( "xxx" ) );
    m_label8->setText( tr2i18n( "xxx" ) );
    m_label12->setText( tr2i18n( "xxx" ) );
    m_label10->setText( tr2i18n( "xxx" ) );
    m_label7->setText( tr2i18n( "xxx" ) );
    m_label4->setText( tr2i18n( "xxx" ) );
    m_label3->setText( tr2i18n( "xxx" ) );
    m_label1->setText( tr2i18n( "xxx" ) );
    m_label2->setText( tr2i18n( "xxx" ) );
    m_label5->setText( tr2i18n( "xxx" ) );
    m_label11->setText( tr2i18n( "xxx" ) );
    m_label9->setText( tr2i18n( "xxx" ) );
    m_clearButton->setText( TQString::null );
    m_periodGroup->setTitle( tr2i18n( "Period" ) );
    m_monthlyButton->setText( tr2i18n( "Monthly" ) );
    m_yearlyButton->setText( tr2i18n( "Yearly" ) );
    m_individualButton->setText( tr2i18n( "Individual" ) );
}

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

TQMetaObject *KBudgetValuesDecl::metaObj = 0;
static TQMetaObjectCleanUp cleanUp_KBudgetValuesDecl( "KBudgetValuesDecl", &KBudgetValuesDecl::staticMetaObject );

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

#endif // TQT_NO_TRANSLATION

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

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

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

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

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

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