KPlato::Accounts Class Reference

#include <kptaccount.h>

List of all members.

Public Member Functions

 Accounts (Project &project)
 ~Accounts ()
AccountdefaultAccount () const
void setDefaultAccount (Account *account)
EffortCostMap plannedCost (const Account &account, const QDate &start, const QDate &end)
void clear ()
void append (Account *account)
void take (Account *account)
bool load (QDomElement &element, Project &project)
void save (QDomElement &element) const
QStringList costElements () const
QStringList nameList () const
const AccountListaccountList () const
AccountfindRunningAccount (const Node &node) const
AccountfindStartupAccount (const Node &node) const
AccountfindShutdownAccount (const Node &node) const
AccountfindAccount (const QString &id) const
bool insertId (Account *account)
bool removeId (const QString &id)
void accountDeleted (Account *account)
void printDebug (QString indent)

Private Attributes

Projectm_project
AccountList m_accountList
QHash< QString, Account * > m_idDict
Accountm_defaultAccount


Detailed Description

Accounts administrates all accounts.

Definition at line 179 of file kptaccount.h.


Constructor & Destructor Documentation

KPlato::Accounts::Accounts ( Project project  ) 

Definition at line 322 of file kptaccount.cc.

KPlato::Accounts::~Accounts (  ) 

Definition at line 330 of file kptaccount.cc.

References m_accountList.


Member Function Documentation

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

Definition at line 185 of file kptaccount.h.

References m_defaultAccount.

Referenced by KPlato::AccountsPanel::addItems(), and KPlato::RemoveAccountCmd::RemoveAccountCmd().

void KPlato::Accounts::setDefaultAccount ( Account account  )  [inline]

Definition at line 186 of file kptaccount.h.

References m_defaultAccount.

Referenced by KPlato::ModifyDefaultAccountCmd::execute(), KPlato::RemoveAccountCmd::execute(), KPlato::ModifyDefaultAccountCmd::unexecute(), and KPlato::RemoveAccountCmd::unexecute().

EffortCostMap KPlato::Accounts::plannedCost ( const Account account,
const QDate &  start,
const QDate &  end 
)

Definition at line 337 of file kptaccount.cc.

References KPlato::EffortCostMap::add(), KPlato::Account::costPlaces(), KPlato::Node::endTime(), m_defaultAccount, m_project, KPlato::Account::CostPlace::node(), KPlato::Project::nodeDict(), KPlato::Node::plannedEffortCostPrDay(), KPlato::Account::CostPlace::running(), KPlato::Node::runningAccount(), KPlato::Account::CostPlace::shutdown(), KPlato::Node::shutdownAccount(), KPlato::Node::shutdownCost(), KPlato::Node::startTime(), KPlato::Account::CostPlace::startup(), KPlato::Node::startupAccount(), KPlato::Node::startupCost(), and KPlato::Duration::zeroDuration.

Referenced by KPlato::AccountsView::slotUpdate().

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

Definition at line 190 of file kptaccount.h.

References m_accountList, and m_idDict.

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

Definition at line 380 of file kptaccount.cc.

References KPlato::Account::insertChildren(), insertId(), m_accountList, KPlato::Account::setList(), and KPlato::Account::setParent().

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

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

Definition at line 390 of file kptaccount.cc.

References m_accountList, KPlato::Account::name(), KPlato::Account::parent(), removeId(), and KPlato::Account::take().

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

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

Definition at line 405 of file kptaccount.cc.

References append(), findAccount(), and m_defaultAccount.

Referenced by KPlato::Project::load().

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

Definition at line 431 of file kptaccount.cc.

References m_accountList, m_defaultAccount, KPlato::Account::name(), and KPlato::Account::save().

Referenced by KPlato::Project::save().

QStringList KPlato::Accounts::costElements (  )  const

Definition at line 442 of file kptaccount.cc.

References m_idDict.

Referenced by KPlato::TaskCostPanel::TaskCostPanel().

QStringList KPlato::Accounts::nameList (  )  const

Definition at line 452 of file kptaccount.cc.

References m_idDict.

const AccountList& KPlato::Accounts::accountList (  )  const [inline]

Definition at line 200 of file kptaccount.h.

References m_accountList.

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

Account * KPlato::Accounts::findRunningAccount ( const Node node  )  const

Definition at line 456 of file kptaccount.cc.

References KPlato::Account::findRunning(), and m_idDict.

Referenced by KPlato::TaskCostPanel::setStartValues().

Account * KPlato::Accounts::findStartupAccount ( const Node node  )  const

Definition at line 464 of file kptaccount.cc.

References KPlato::Account::findStartup(), and m_idDict.

Referenced by KPlato::TaskCostPanel::setStartValues().

Account * KPlato::Accounts::findShutdownAccount ( const Node node  )  const

Definition at line 472 of file kptaccount.cc.

References KPlato::Account::findShutdown(), and m_idDict.

Referenced by KPlato::TaskCostPanel::setStartValues().

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

Definition at line 480 of file kptaccount.cc.

References m_idDict.

Referenced by KPlato::TaskCostPanel::buildCommand(), KPlato::AddAccountCmd::execute(), KPlato::Account::findAccount(), insertId(), load(), and KPlato::TaskCostPanel::ok().

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

Definition at line 488 of file kptaccount.cc.

References findAccount(), m_idDict, and KPlato::Account::name().

Referenced by append(), and KPlato::Account::insertId().

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

Definition at line 505 of file kptaccount.cc.

References m_idDict.

Referenced by KPlato::Account::removeId(), and take().

void KPlato::Accounts::accountDeleted ( Account account  )  [inline]

Definition at line 209 of file kptaccount.h.

References m_defaultAccount.

Referenced by KPlato::Account::~Account().

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

Definition at line 512 of file kptaccount.cc.


Member Data Documentation

Project& KPlato::Accounts::m_project [private]

Definition at line 212 of file kptaccount.h.

Referenced by plannedCost().

AccountList KPlato::Accounts::m_accountList [private]

Definition at line 213 of file kptaccount.h.

Referenced by accountList(), append(), clear(), save(), take(), and ~Accounts().

QHash<QString, Account*> KPlato::Accounts::m_idDict [private]

Definition at line 214 of file kptaccount.h.

Referenced by clear(), costElements(), findAccount(), findRunningAccount(), findShutdownAccount(), findStartupAccount(), insertId(), nameList(), and removeId().

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

Definition at line 216 of file kptaccount.h.

Referenced by accountDeleted(), defaultAccount(), load(), plannedCost(), save(), and setDefaultAccount().


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