2 * Account.h - TaskJuggler
4 * Copyright (c) 2001, 2002, 2003, 2004 by Chris Schlaeger <cs@kde.org>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of version 2 of the GNU General Public License as
8 * published by the Free Software Foundation.
16 #include "AccountList.h"
17 #include "TransactionList.h"
22 * @short Stores all account related information.
23 * @author Chris Schlaeger <cs@kde.org>
25 class Account : public CoreAttributes
28 Account(Project* p, const QString& i, const QString& n, Account* pr,
29 AccountType at, const QString& df = QString::null, uint dl = 0);
32 virtual CAType getType() const { return CA_Account; }
34 Account* getParent() const { return static_cast<Account*>(parent); }
36 AccountListIterator getSubListIterator() const
38 return AccountListIterator(*sub);
43 void setAcctType(AccountType at) { acctType = at; }
44 AccountType getAcctType() const { return acctType; }
46 void credit(Transaction* t);
47 bool isGroup() const { return !sub->isEmpty(); }
49 double getBalance(int sc, time_t d) const;
50 double getVolume(int sc, const Interval& period) const;
53 TransactionList transactions;