|
|
|
#include <kdialog.h>
|
|
|
|
#include <tdelocale.h>
|
|
|
|
#ifndef KMM_I18N
|
|
|
|
#define KMM_I18N
|
|
|
|
inline TQString kmm_i18n(const char* msg, const char* ctx) { return i18n(ctx, msg); }
|
|
|
|
inline TQString kmm_i18n(const char* msg) { return i18n(msg); }
|
|
|
|
#endif
|
|
|
|
/****************************************************************************
|
|
|
|
** Form implementation generated from reading ui file '../../../kmymoney2/widgets/kbudgetvaluesdecl.ui'
|
|
|
|
**
|
|
|
|
** Created: Fri Feb 12 15:05:38 2010
|
|
|
|
**
|
|
|
|
** WARNING! All changes made in this file will be lost!
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#include "kbudgetvaluesdecl.h"
|
|
|
|
|
|
|
|
#include <tqvariant.h>
|
|
|
|
#include <kmymoney/kmymoneyedit.h>
|
|
|
|
#include <tqpushbutton.h>
|
|
|
|
#include <tqlabel.h>
|
|
|
|
#include <tqwidgetstack.h>
|
|
|
|
#include <kpushbutton.h>
|
|
|
|
#include <tqbuttongroup.h>
|
|
|
|
#include <tqradiobutton.h>
|
|
|
|
#include <tqlayout.h>
|
|
|
|
#include <tqtooltip.h>
|
|
|
|
#include <tqwhatsthis.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, Qt::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( kmm_i18n( "xxx" ) );
|
|
|
|
m_label8->setText( kmm_i18n( "xxx" ) );
|
|
|
|
m_label12->setText( kmm_i18n( "xxx" ) );
|
|
|
|
m_label10->setText( kmm_i18n( "xxx" ) );
|
|
|
|
m_label7->setText( kmm_i18n( "xxx" ) );
|
|
|
|
m_label4->setText( kmm_i18n( "xxx" ) );
|
|
|
|
m_label3->setText( kmm_i18n( "xxx" ) );
|
|
|
|
m_label1->setText( kmm_i18n( "xxx" ) );
|
|
|
|
m_label2->setText( kmm_i18n( "xxx" ) );
|
|
|
|
m_label5->setText( kmm_i18n( "xxx" ) );
|
|
|
|
m_label11->setText( kmm_i18n( "xxx" ) );
|
|
|
|
m_label9->setText( kmm_i18n( "xxx" ) );
|
|
|
|
m_clearButton->setText( TQString() );
|
|
|
|
m_periodGroup->setTitle( kmm_i18n( "Period" ) );
|
|
|
|
m_monthlyButton->setText( kmm_i18n( "Monthly" ) );
|
|
|
|
m_yearlyButton->setText( kmm_i18n( "Yearly" ) );
|
|
|
|
m_individualButton->setText( kmm_i18n( "Individual" ) );
|
|
|
|
}
|
|
|
|
|
|
|
|
#include "kbudgetvaluesdecl.moc"
|