KMyMoneyAccountTreeBudgetItem Class Reference

#include <kmymoneyaccounttreebudget.h>

Inheritance diagram for KMyMoneyAccountTreeBudgetItem:

KMyMoneyAccountTreeBaseItem KListViewItem
Collaboration diagram for KMyMoneyAccountTreeBudgetItem:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 KMyMoneyAccountTreeBudgetItem (KMyMoneyAccountTreeBudgetItem *parent, const MyMoneyAccount &account, const MyMoneyBudget &budget, const QValueList< MyMoneyPrice > &price=QValueList< MyMoneyPrice >(), const MyMoneySecurity &security=MyMoneySecurity())
 KMyMoneyAccountTreeBudgetItem (KListView *parent, const MyMoneyAccount &account, const MyMoneyBudget &budget, const MyMoneySecurity &security=MyMoneySecurity(), const QString &name=QString())
 ~KMyMoneyAccountTreeBudgetItem ()
void setBudget (const MyMoneyBudget &budget)

Protected Member Functions

MyMoneyMoney balance () const

Private Attributes

MyMoneyBudget m_budget


Constructor & Destructor Documentation

KMyMoneyAccountTreeBudgetItem::KMyMoneyAccountTreeBudgetItem ( KMyMoneyAccountTreeBudgetItem parent,
const MyMoneyAccount account,
const MyMoneyBudget budget,
const QValueList< MyMoneyPrice > &  price = QValueListMyMoneyPrice >(),
const MyMoneySecurity security = MyMoneySecurity() 
)

Constructor to be used to construct an account entry object for a budget.

Parameters:
parent pointer to the parent KAccountListView object this entry should be added to.
account const reference to MyMoneyAccount for which the KListView entry is constructed
budget const reference to the budget to which the account belongs
price price to be used to calculate value (defaults to 1) This is used for accounts denominated in foreign currencies or stocks
security const reference to the security used to show the value. Usually one should pass MyMoneyFile::baseCurrency() here.

KMyMoneyAccountTreeBudgetItem::KMyMoneyAccountTreeBudgetItem ( KListView parent,
const MyMoneyAccount account,
const MyMoneyBudget budget,
const MyMoneySecurity security = MyMoneySecurity(),
const QString &  name = QString() 
)

Constructor to be used to construct an account entry object for a budget.

Parameters:
parent pointer to the parent KAccountListView object this entry should be added to.
account const reference to MyMoneyAccount for which the KListView entry is constructed
budget const reference to the budget to which the account belongs
security const reference to the security used to show the value. Usually one should pass MyMoneyFile::baseCurrency() here.
name name of the account to be used instead of the one stored with account If empty, the one stored with account will be used. Default: empty

KMyMoneyAccountTreeBudgetItem::~KMyMoneyAccountTreeBudgetItem (  ) 


Member Function Documentation

void KMyMoneyAccountTreeBudgetItem::setBudget ( const MyMoneyBudget budget  ) 

MyMoneyMoney KMyMoneyAccountTreeBudgetItem::balance (  )  const [protected, virtual]

Returns the current balance of this account.

This is a pure virtual function, to allow subclasses to calculate the balance in different ways.

Parent items in the tree will only be recomputed if the balance() for a son changes.

Parameters:
account Account to get the balance for
Returns:
Balance of this account

Implements KMyMoneyAccountTreeBaseItem.


Member Data Documentation


The documentation for this class was generated from the following file:

Generated on Wed Jan 26 13:07:52 2011 for KMyMoney by  doxygen 1.5.6