From dadc34655c3ab961b0b0b94a10eaaba710f0b5e8 Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 4 Jul 2011 22:38:03 +0000 Subject: Added kmymoney git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kmymoney@1239792 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kmymoney2/widgets/kbudgetvaluesdecl.cpp | 257 ++++++++++++++++++++++++++++++++ 1 file changed, 257 insertions(+) create mode 100644 kmymoney2/widgets/kbudgetvaluesdecl.cpp (limited to 'kmymoney2/widgets/kbudgetvaluesdecl.cpp') diff --git a/kmymoney2/widgets/kbudgetvaluesdecl.cpp b/kmymoney2/widgets/kbudgetvaluesdecl.cpp new file mode 100644 index 0000000..43d71f5 --- /dev/null +++ b/kmymoney2/widgets/kbudgetvaluesdecl.cpp @@ -0,0 +1,257 @@ +#include +#include +#ifndef KMM_I18N +#define KMM_I18N +inline QString kmm_i18n(const char* msg, const char* ctx) { return i18n(ctx, msg); } +inline QString 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * Constructs a KBudgetValuesDecl as a child of 'parent', with the + * name 'name' and widget flags set to 'f'. + */ +KBudgetValuesDecl::KBudgetValuesDecl( QWidget* parent, const char* name, WFlags fl ) + : QWidget( parent, name, fl ) +{ + if ( !name ) + setName( "KBudgetValuesDecl" ); + KBudgetValuesDeclLayout = new QGridLayout( this, 1, 1, 0, 6, "KBudgetValuesDeclLayout"); + + m_amount10 = new kMyMoneyEdit( this, "m_amount10" ); + m_amount10->setProperty( "resetButtonVisibility", QVariant( FALSE, 0 ) ); + + KBudgetValuesDeclLayout->addWidget( m_amount10, 3, 5 ); + + m_amount6 = new kMyMoneyEdit( this, "m_amount6" ); + m_amount6->setProperty( "resetButtonVisibility", QVariant( FALSE, 0 ) ); + + KBudgetValuesDeclLayout->addWidget( m_amount6, 5, 3 ); + + m_amount5 = new kMyMoneyEdit( this, "m_amount5" ); + m_amount5->setProperty( "resetButtonVisibility", QVariant( FALSE, 0 ) ); + + KBudgetValuesDeclLayout->addWidget( m_amount5, 4, 3 ); + + m_label6 = new QLabel( this, "m_label6" ); + + KBudgetValuesDeclLayout->addWidget( m_label6, 5, 2 ); + + m_label8 = new QLabel( this, "m_label8" ); + + KBudgetValuesDeclLayout->addWidget( m_label8, 1, 4 ); + + m_amount9 = new kMyMoneyEdit( this, "m_amount9" ); + m_amount9->setProperty( "resetButtonVisibility", QVariant( FALSE, 0 ) ); + + KBudgetValuesDeclLayout->addWidget( m_amount9, 2, 5 ); + + m_amount11 = new kMyMoneyEdit( this, "m_amount11" ); + m_amount11->setProperty( "resetButtonVisibility", QVariant( FALSE, 0 ) ); + + KBudgetValuesDeclLayout->addWidget( m_amount11, 4, 5 ); + + m_label12 = new QLabel( this, "m_label12" ); + + KBudgetValuesDeclLayout->addWidget( m_label12, 5, 4 ); + + m_label10 = new QLabel( this, "m_label10" ); + + KBudgetValuesDeclLayout->addWidget( m_label10, 3, 4 ); + + m_label7 = new QLabel( this, "m_label7" ); + + KBudgetValuesDeclLayout->addWidget( m_label7, 0, 4 ); + + m_amount3 = new kMyMoneyEdit( this, "m_amount3" ); + m_amount3->setProperty( "resetButtonVisibility", QVariant( FALSE, 0 ) ); + + KBudgetValuesDeclLayout->addWidget( m_amount3, 2, 3 ); + + m_label4 = new QLabel( this, "m_label4" ); + + KBudgetValuesDeclLayout->addWidget( m_label4, 3, 2 ); + + m_amount12 = new kMyMoneyEdit( this, "m_amount12" ); + m_amount12->setProperty( "resetButtonVisibility", QVariant( FALSE, 0 ) ); + + KBudgetValuesDeclLayout->addWidget( m_amount12, 5, 5 ); + + m_label3 = new QLabel( this, "m_label3" ); + + KBudgetValuesDeclLayout->addWidget( m_label3, 2, 2 ); + + m_label1 = new QLabel( this, "m_label1" ); + + KBudgetValuesDeclLayout->addWidget( m_label1, 0, 2 ); + + m_label2 = new QLabel( this, "m_label2" ); + + KBudgetValuesDeclLayout->addWidget( m_label2, 1, 2 ); + + m_label5 = new QLabel( this, "m_label5" ); + + KBudgetValuesDeclLayout->addWidget( m_label5, 4, 2 ); + + m_label11 = new QLabel( this, "m_label11" ); + + KBudgetValuesDeclLayout->addWidget( m_label11, 4, 4 ); + + m_amount4 = new kMyMoneyEdit( this, "m_amount4" ); + m_amount4->setProperty( "resetButtonVisibility", QVariant( FALSE, 0 ) ); + + KBudgetValuesDeclLayout->addWidget( m_amount4, 3, 3 ); + + m_label9 = new QLabel( this, "m_label9" ); + + KBudgetValuesDeclLayout->addWidget( m_label9, 2, 4 ); + + m_amount8 = new kMyMoneyEdit( this, "m_amount8" ); + m_amount8->setProperty( "resetButtonVisibility", QVariant( FALSE, 0 ) ); + + KBudgetValuesDeclLayout->addWidget( m_amount8, 1, 5 ); + + m_amount2 = new kMyMoneyEdit( this, "m_amount2" ); + m_amount2->setProperty( "resetButtonVisibility", QVariant( FALSE, 0 ) ); + + KBudgetValuesDeclLayout->addWidget( m_amount2, 1, 3 ); + + m_amount7 = new kMyMoneyEdit( this, "m_amount7" ); + m_amount7->setProperty( "resetButtonVisibility", QVariant( FALSE, 0 ) ); + + KBudgetValuesDeclLayout->addWidget( m_amount7, 0, 5 ); + + m_firstItemStack = new QWidgetStack( this, "m_firstItemStack" ); + + m_monthlyPage = new QWidget( m_firstItemStack, "m_monthlyPage" ); + m_monthlyPageLayout = new QHBoxLayout( m_monthlyPage, 0, 6, "m_monthlyPageLayout"); + + m_amountMonthly = new kMyMoneyEdit( m_monthlyPage, "m_amountMonthly" ); + m_amountMonthly->setProperty( "resetButtonVisibility", QVariant( FALSE, 0 ) ); + m_monthlyPageLayout->addWidget( m_amountMonthly ); + m_firstItemStack->addWidget( m_monthlyPage, 0 ); + + m_yearlyPage = new QWidget( m_firstItemStack, "m_yearlyPage" ); + m_yearlyPageLayout = new QHBoxLayout( m_yearlyPage, 0, 6, "m_yearlyPageLayout"); + + m_amountYearly = new kMyMoneyEdit( m_yearlyPage, "m_amountYearly" ); + m_amountYearly->setProperty( "resetButtonVisibility", QVariant( FALSE, 0 ) ); + m_yearlyPageLayout->addWidget( m_amountYearly ); + m_firstItemStack->addWidget( m_yearlyPage, 1 ); + + m_individualPage = new QWidget( m_firstItemStack, "m_individualPage" ); + m_individualPageLayout = new QHBoxLayout( m_individualPage, 0, 6, "m_individualPageLayout"); + + m_amount1 = new kMyMoneyEdit( m_individualPage, "m_amount1" ); + m_amount1->setProperty( "resetButtonVisibility", QVariant( FALSE, 0 ) ); + m_individualPageLayout->addWidget( m_amount1 ); + m_firstItemStack->addWidget( m_individualPage, 2 ); + + KBudgetValuesDeclLayout->addWidget( m_firstItemStack, 0, 3 ); + + layout12 = new QVBoxLayout( 0, 0, 6, "layout12"); + + m_clearButton = new KPushButton( this, "m_clearButton" ); + layout12->addWidget( m_clearButton ); + spacer7 = new QSpacerItem( 20, 21, QSizePolicy::Minimum, QSizePolicy::Expanding ); + layout12->addItem( spacer7 ); + + KBudgetValuesDeclLayout->addMultiCellLayout( layout12, 0, 5, 1, 1 ); + + m_periodGroup = new QButtonGroup( this, "m_periodGroup" ); + m_periodGroup->setColumnLayout(0, Qt::Vertical ); + m_periodGroup->layout()->setSpacing( 6 ); + m_periodGroup->layout()->setMargin( 11 ); + m_periodGroupLayout = new QVBoxLayout( m_periodGroup->layout() ); + m_periodGroupLayout->setAlignment( Qt::AlignTop ); + + m_monthlyButton = new QRadioButton( m_periodGroup, "m_monthlyButton" ); + m_periodGroupLayout->addWidget( m_monthlyButton ); + + m_yearlyButton = new QRadioButton( m_periodGroup, "m_yearlyButton" ); + m_periodGroupLayout->addWidget( m_yearlyButton ); + + m_individualButton = new QRadioButton( m_periodGroup, "m_individualButton" ); + m_periodGroupLayout->addWidget( m_individualButton ); + spacer10 = new QSpacerItem( 20, 21, QSizePolicy::Minimum, QSizePolicy::Expanding ); + m_periodGroupLayout->addItem( spacer10 ); + + KBudgetValuesDeclLayout->addMultiCellWidget( m_periodGroup, 0, 5, 0, 0 ); + languageChange(); + resize( QSize(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, Qt 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( QString::null ); + 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" -- cgit v1.2.3