KPlato::Account Class Reference

#include <kptaccount.h>

List of all members.

Public Member Functions

 Account ()
 Account (QString name, QString description=QString::null)
 ~Account ()
QString name () const
void setName (QString name)
QString description () const
void setDescription (QString desc)
bool isElement () const
Accountslist () const
void setList (Accounts *list)
Accountparent () const
void setParent (Account *parent)
void clear ()
void append (Account *account)
void take (Account *account)
void insertChildren ()
bool load (QDomElement &element, Project &project)
void save (QDomElement &element) const
const QList< Account * > & accountList () const
AccountfindAccount () const
AccountfindAccount (const QString &id) const
bool removeId ()
bool removeId (const QString &id)
bool insertId ()
bool insertId (Account *account)
void append (CostPlace *cp)
const QList< CostPlace * > & costPlaces () const
Account::CostPlacefindCostPlace (const Node &node) const
CostPlacefindRunning (const Node &node) const
void removeRunning (const Node &node)
void addRunning (Node &node)
CostPlacefindStartup (const Node &node) const
void removeStartup (const Node &node)
void addStartup (Node &node)
CostPlacefindShutdown (const Node &node) const
void removeShutdown (const Node &node)
void addShutdown (Node &node)
void deleteCostPlace (CostPlace *cp)
void printDebug (QString indent)

Private Attributes

QString m_name
QString m_description
Accountsm_list
Accountm_parent
QList< Account * > m_accountList
QList< CostPlace * > m_costPlaces

Classes

class  CostPlace


Detailed Description

Account holds one account. An account can have any number of sub-accounts. Account names must be unique.

Definition at line 48 of file kptaccount.h.


Constructor & Destructor Documentation

KPlato::Account::Account (  ) 

Constructor.

Definition at line 34 of file kptaccount.cc.

Referenced by load().

KPlato::Account::Account ( QString  name,
QString  description = QString::null 
)

Definition at line 44 of file kptaccount.cc.

KPlato::Account::~Account (  ) 

Destructor.

Definition at line 54 of file kptaccount.cc.

References KPlato::Accounts::accountDeleted(), findAccount(), m_accountList, m_costPlaces, m_list, and removeId().


Member Function Documentation

QString KPlato::Account::name (  )  const [inline]

Definition at line 68 of file kptaccount.h.

References m_name.

Referenced by KPlato::AccountsPanel::addItems(), KPlato::TaskCostPanel::buildCommand(), KPlato::Accounts::insertId(), KPlato::RenameAccountCmd::RenameAccountCmd(), KPlato::AccountsPanel::save(), KPlato::Accounts::save(), KPlato::TaskCostPanel::setStartValues(), and KPlato::Accounts::take().

void KPlato::Account::setName ( QString  name  ) 

Definition at line 70 of file kptaccount.cc.

References findAccount(), insertId(), m_name, and removeId().

Referenced by KPlato::RenameAccountCmd::execute(), and KPlato::RenameAccountCmd::unexecute().

QString KPlato::Account::description (  )  const [inline]

Definition at line 71 of file kptaccount.h.

References m_description.

Referenced by KPlato::AccountsView::AccountItem::AccountItem(), KPlato::AccountsPanel::addItems(), KPlato::ModifyAccountDescriptionCmd::ModifyAccountDescriptionCmd(), and KPlato::AccountsPanel::save().

void KPlato::Account::setDescription ( QString  desc  )  [inline]

Definition at line 72 of file kptaccount.h.

References m_description.

Referenced by KPlato::ModifyAccountDescriptionCmd::execute(), and KPlato::ModifyAccountDescriptionCmd::unexecute().

bool KPlato::Account::isElement (  )  const [inline]

Definition at line 74 of file kptaccount.h.

References m_accountList.

Referenced by KPlato::AccountsPanel::addItems().

Accounts* KPlato::Account::list (  )  const [inline]

Definition at line 76 of file kptaccount.h.

References m_list.

Referenced by KPlato::AccountsPanel::addItems(), load(), and setList().

void KPlato::Account::setList ( Accounts list  )  [inline]

Definition at line 77 of file kptaccount.h.

References list(), and m_list.

Referenced by KPlato::Accounts::append(), append(), and insertChildren().

Account* KPlato::Account::parent (  )  const [inline]

Definition at line 78 of file kptaccount.h.

References m_parent.

Referenced by KPlato::RemoveAccountCmd::execute(), setParent(), KPlato::Accounts::take(), take(), and KPlato::RemoveAccountCmd::unexecute().

void KPlato::Account::setParent ( Account parent  )  [inline]

Definition at line 79 of file kptaccount.h.

References m_parent, and parent().

Referenced by KPlato::Accounts::append(), append(), and insertChildren().

void KPlato::Account::clear (  )  [inline]

Definition at line 80 of file kptaccount.h.

References m_accountList.

void KPlato::Account::append ( Account account  ) 

Definition at line 78 of file kptaccount.cc.

References insertId(), m_accountList, m_list, setList(), and setParent().

Referenced by addRunning(), addShutdown(), addStartup(), KPlato::AddAccountCmd::execute(), load(), and KPlato::RemoveAccountCmd::unexecute().

void KPlato::Account::take ( Account account  ) 

Definition at line 95 of file kptaccount.cc.

References m_accountList, m_list, parent(), KPlato::Accounts::take(), and take().

Referenced by KPlato::RemoveAccountCmd::execute(), KPlato::Accounts::take(), take(), and KPlato::AddAccountCmd::unexecute().

void KPlato::Account::insertChildren (  ) 

Definition at line 86 of file kptaccount.cc.

References insertChildren(), insertId(), m_accountList, m_list, setList(), and setParent().

Referenced by KPlato::Accounts::append(), and insertChildren().

bool KPlato::Account::load ( QDomElement &  element,
Project project 
)

Definition at line 111 of file kptaccount.cc.

References Account(), append(), list(), m_accountList, m_description, and m_name.

void KPlato::Account::save ( QDomElement &  element  )  const

Definition at line 140 of file kptaccount.cc.

References m_accountList, m_costPlaces, m_description, m_name, save(), and KPlato::Account::CostPlace::save().

Referenced by KPlato::Accounts::save(), and save().

const QList<Account*>& KPlato::Account::accountList (  )  const [inline]

Definition at line 88 of file kptaccount.h.

References m_accountList.

Referenced by KPlato::AccountsPanel::addItems(), and KPlato::AccountsView::initAccSubItems().

Account* KPlato::Account::findAccount (  )  const [inline]

Definition at line 90 of file kptaccount.h.

References m_name.

Referenced by setName(), and ~Account().

Account * KPlato::Account::findAccount ( const QString &  id  )  const

Definition at line 235 of file kptaccount.cc.

References KPlato::Accounts::findAccount(), and m_list.

bool KPlato::Account::removeId (  )  [inline]

Definition at line 92 of file kptaccount.h.

References m_name.

Referenced by setName(), and ~Account().

bool KPlato::Account::removeId ( const QString &  id  ) 

Definition at line 241 of file kptaccount.cc.

References m_list, and KPlato::Accounts::removeId().

bool KPlato::Account::insertId (  ) 

Definition at line 245 of file kptaccount.cc.

Referenced by append(), insertChildren(), and setName().

bool KPlato::Account::insertId ( Account account  ) 

Definition at line 249 of file kptaccount.cc.

References KPlato::Accounts::insertId(), and m_list.

void KPlato::Account::append ( CostPlace cp  )  [inline]

Definition at line 145 of file kptaccount.h.

References m_costPlaces.

const QList<CostPlace*>& KPlato::Account::costPlaces (  )  const [inline]

Definition at line 146 of file kptaccount.h.

References m_costPlaces.

Referenced by KPlato::Accounts::plannedCost().

Account::CostPlace * KPlato::Account::findCostPlace ( const Node node  )  const

Definition at line 153 of file kptaccount.cc.

References m_costPlaces, and KPlato::Account::CostPlace::node().

Referenced by addRunning(), addShutdown(), addStartup(), findRunning(), findShutdown(), and findStartup().

Account::CostPlace * KPlato::Account::findRunning ( const Node node  )  const

Definition at line 162 of file kptaccount.cc.

References findCostPlace(), and KPlato::Account::CostPlace::running().

Referenced by KPlato::Accounts::findRunningAccount(), and removeRunning().

void KPlato::Account::removeRunning ( const Node node  ) 

Definition at line 167 of file kptaccount.cc.

References deleteCostPlace(), findRunning(), KPlato::Account::CostPlace::isEmpty(), and KPlato::Account::CostPlace::setRunning().

Referenced by KPlato::NodeModifyRunningAccountCmd::execute(), KPlato::NodeModifyRunningAccountCmd::unexecute(), and KPlato::Node::~Node().

void KPlato::Account::addRunning ( Node node  ) 

Definition at line 177 of file kptaccount.cc.

References append(), findCostPlace(), and KPlato::Account::CostPlace::setRunning().

Referenced by KPlato::NodeModifyRunningAccountCmd::execute(), and KPlato::NodeModifyRunningAccountCmd::unexecute().

Account::CostPlace * KPlato::Account::findStartup ( const Node node  )  const

Definition at line 186 of file kptaccount.cc.

References findCostPlace(), and KPlato::Account::CostPlace::startup().

Referenced by KPlato::Accounts::findStartupAccount(), and removeStartup().

void KPlato::Account::removeStartup ( const Node node  ) 

Definition at line 191 of file kptaccount.cc.

References deleteCostPlace(), findStartup(), KPlato::Account::CostPlace::isEmpty(), and KPlato::Account::CostPlace::setStartup().

Referenced by KPlato::NodeModifyStartupAccountCmd::execute(), KPlato::NodeModifyStartupAccountCmd::unexecute(), and KPlato::Node::~Node().

void KPlato::Account::addStartup ( Node node  ) 

Definition at line 201 of file kptaccount.cc.

References append(), findCostPlace(), and KPlato::Account::CostPlace::setStartup().

Referenced by KPlato::NodeModifyStartupAccountCmd::execute(), and KPlato::NodeModifyStartupAccountCmd::unexecute().

Account::CostPlace * KPlato::Account::findShutdown ( const Node node  )  const

Definition at line 211 of file kptaccount.cc.

References findCostPlace(), and KPlato::Account::CostPlace::shutdown().

Referenced by KPlato::Accounts::findShutdownAccount(), and removeShutdown().

void KPlato::Account::removeShutdown ( const Node node  ) 

Definition at line 216 of file kptaccount.cc.

References deleteCostPlace(), findShutdown(), KPlato::Account::CostPlace::isEmpty(), and KPlato::Account::CostPlace::setShutdown().

Referenced by KPlato::NodeModifyShutdownAccountCmd::execute(), KPlato::NodeModifyShutdownAccountCmd::unexecute(), and KPlato::Node::~Node().

void KPlato::Account::addShutdown ( Node node  ) 

Definition at line 226 of file kptaccount.cc.

References append(), findCostPlace(), and KPlato::Account::CostPlace::setShutdown().

Referenced by KPlato::NodeModifyShutdownAccountCmd::execute(), and KPlato::NodeModifyShutdownAccountCmd::unexecute().

void KPlato::Account::deleteCostPlace ( CostPlace cp  ) 

Definition at line 253 of file kptaccount.cc.

References m_costPlaces.

Referenced by removeRunning(), removeShutdown(), and removeStartup().

void KPlato::Account::printDebug ( QString  indent  ) 

Definition at line 514 of file kptaccount.cc.


Member Data Documentation

QString KPlato::Account::m_name [private]

Definition at line 159 of file kptaccount.h.

Referenced by findAccount(), load(), name(), removeId(), save(), and setName().

QString KPlato::Account::m_description [private]

Definition at line 160 of file kptaccount.h.

Referenced by description(), load(), save(), and setDescription().

Accounts* KPlato::Account::m_list [private]

Definition at line 161 of file kptaccount.h.

Referenced by append(), findAccount(), insertChildren(), insertId(), list(), removeId(), setList(), take(), and ~Account().

Account* KPlato::Account::m_parent [private]

Definition at line 162 of file kptaccount.h.

Referenced by parent(), and setParent().

QList<Account*> KPlato::Account::m_accountList [private]

Definition at line 163 of file kptaccount.h.

Referenced by accountList(), append(), clear(), insertChildren(), isElement(), load(), save(), take(), and ~Account().

QList<CostPlace*> KPlato::Account::m_costPlaces [private]

Definition at line 164 of file kptaccount.h.

Referenced by append(), costPlaces(), deleteCostPlace(), findCostPlace(), save(), and ~Account().


The documentation for this class was generated from the following files:
Generated on Wed Nov 22 23:21:43 2006 for KPlato by  doxygen 1.5.1-p1