#include <kptaccountsview.h>
Inherits KPlato::ViewBase.
Inheritance diagram for KPlato::AccountsView:
Public Slots | |
void | slotConfigure () |
Signals | |
void | configChanged () |
Public Member Functions | |
AccountsView (Project &project, View *view, QWidget *parent) | |
virtual void | setZoom (double zoom) |
virtual void | draw () |
void | print (KPrinter &printer) |
virtual bool | setContext (Context::Accountsview &context) |
virtual void | getContext (Context::Accountsview &context) const |
Protected Slots | |
void | slotUpdate () |
Protected Member Functions | |
void | getContextClosedItems (Context::Accountsview &context, QTreeWidgetItem *item) const |
void | setContextClosedItems (Context::Accountsview &context) |
Private Member Functions | |
void | init () |
void | initAccList (const AccountList &list) |
void | initAccSubItems (Account *acc, AccountItem *parent) |
void | initAccList (const AccountList &list, AccountItem *parent) |
void | createPeriods () |
void | clearPeriods () |
QString | periodText (int offset) |
Private Attributes | |
Project & | m_project |
Accounts & | m_accounts |
int | m_defaultFontSize |
QDate | m_date |
int | m_period |
bool | m_cumulative |
DoubleListViewBase * | m_dlv |
QStringList | m_periodTexts |
QPushButton * | m_changeBtn |
QLabel * | m_label |
Classes | |
class | AccountItem |
Definition at line 57 of file kptaccountsview.h.
Definition at line 88 of file kptaccountsview.cc.
References configChanged(), init(), m_changeBtn, m_cumulative, m_date, m_dlv, m_label, m_period, m_periodTexts, KPlato::DoubleListViewBase::setNameHeader(), slotConfigure(), and slotUpdate().
void KPlato::AccountsView::setZoom | ( | double | zoom | ) | [virtual] |
void KPlato::AccountsView::draw | ( | ) | [virtual] |
Reimplemented from KPlato::ViewBase.
Definition at line 141 of file kptaccountsview.cc.
References KPlato::Accounts::accountList(), getContextClosedItems(), initAccList(), m_accounts, m_dlv, KPlato::DoubleListViewBase::masterListView(), setContextClosedItems(), and slotUpdate().
Referenced by KPlato::View::updateView().
void KPlato::AccountsView::print | ( | KPrinter & | printer | ) |
Definition at line 350 of file kptaccountsview.cc.
References m_dlv, m_label, and KPlato::DoubleListViewBase::paintContents().
Referenced by KPlato::View::print().
bool KPlato::AccountsView::setContext | ( | Context::Accountsview & | context | ) | [virtual] |
Definition at line 375 of file kptaccountsview.cc.
References KPlato::Context::Accountsview::accountsviewsize, KPlato::Context::Accountsview::cumulative, KPlato::Context::Accountsview::date, m_cumulative, m_date, m_period, KPlato::Context::Accountsview::period, KPlato::Context::Accountsview::periodviewsize, and setContextClosedItems().
Referenced by KPlato::View::setContext().
void KPlato::AccountsView::getContext | ( | Context::Accountsview & | context | ) | const [virtual] |
Definition at line 406 of file kptaccountsview.cc.
References getContextClosedItems(), m_cumulative, m_date, m_dlv, m_period, and KPlato::DoubleListViewBase::masterListView().
Referenced by KPlato::View::getContext().
void KPlato::AccountsView::configChanged | ( | ) | [signal] |
Referenced by AccountsView(), and slotConfigure().
void KPlato::AccountsView::slotConfigure | ( | ) | [slot] |
Definition at line 433 of file kptaccountsview.cc.
References configChanged(), KPlato::AccountsviewConfigDialog::date(), KPlato::AccountsviewConfigDialog::isCumulative(), m_cumulative, m_date, m_period, m_periodTexts, and KPlato::AccountsviewConfigDialog::period().
Referenced by AccountsView().
void KPlato::AccountsView::slotUpdate | ( | ) | [protected, slot] |
Definition at line 208 of file kptaccountsview.cc.
References KPlato::DoubleListViewBase::calculate(), KPlato::EffortCostMap::cost(), KPlato::EffortCost::cost(), createPeriods(), m_accounts, m_cumulative, m_date, m_dlv, m_label, m_period, m_project, KPlato::DoubleListViewBase::masterItems(), periodText(), KPlato::Accounts::plannedCost(), KPlato::DoubleListViewBase::setSlaveLabels(), and KPlato::Project::startTime().
Referenced by AccountsView(), and draw().
void KPlato::AccountsView::getContextClosedItems | ( | Context::Accountsview & | context, | |
QTreeWidgetItem * | item | |||
) | const [protected] |
void KPlato::AccountsView::setContextClosedItems | ( | Context::Accountsview & | context | ) | [protected] |
Definition at line 391 of file kptaccountsview.cc.
References KPlato::Context::Accountsview::closedItems.
Referenced by draw(), and setContext().
void KPlato::AccountsView::init | ( | ) | [private] |
Definition at line 134 of file kptaccountsview.cc.
References KPlato::Accounts::accountList(), initAccList(), m_accounts, m_date, and m_period.
Referenced by AccountsView().
void KPlato::AccountsView::initAccList | ( | const AccountList & | list | ) | [private] |
Definition at line 151 of file kptaccountsview.cc.
References KPlato::DoubleListViewBase::clearLists(), createPeriods(), initAccSubItems(), m_dlv, and KPlato::DoubleListViewBase::masterListView().
Referenced by draw(), init(), and initAccSubItems().
void KPlato::AccountsView::initAccSubItems | ( | Account * | acc, | |
AccountItem * | parent | |||
) | [private] |
Definition at line 164 of file kptaccountsview.cc.
References KPlato::Account::accountList(), and initAccList().
Referenced by initAccList().
void KPlato::AccountsView::initAccList | ( | const AccountList & | list, | |
AccountItem * | parent | |||
) | [private] |
void KPlato::AccountsView::createPeriods | ( | ) | [private] |
Definition at line 203 of file kptaccountsview.cc.
References KPlato::DoubleListViewBase::createSlaveItems(), and m_dlv.
Referenced by initAccList(), and slotUpdate().
void KPlato::AccountsView::clearPeriods | ( | ) | [private] |
Definition at line 198 of file kptaccountsview.cc.
References KPlato::DoubleListViewBase::clearSlaveList(), and m_dlv.
QString KPlato::AccountsView::periodText | ( | int | offset | ) | [private] |
Definition at line 446 of file kptaccountsview.cc.
References m_periodTexts.
Referenced by slotUpdate().
Project& KPlato::AccountsView::m_project [private] |
Accounts& KPlato::AccountsView::m_accounts [private] |
int KPlato::AccountsView::m_defaultFontSize [private] |
Definition at line 114 of file kptaccountsview.h.
QDate KPlato::AccountsView::m_date [private] |
Definition at line 116 of file kptaccountsview.h.
Referenced by AccountsView(), getContext(), init(), setContext(), slotConfigure(), and slotUpdate().
int KPlato::AccountsView::m_period [private] |
Definition at line 117 of file kptaccountsview.h.
Referenced by AccountsView(), getContext(), init(), setContext(), slotConfigure(), and slotUpdate().
bool KPlato::AccountsView::m_cumulative [private] |
Definition at line 118 of file kptaccountsview.h.
Referenced by AccountsView(), getContext(), setContext(), slotConfigure(), and slotUpdate().
DoubleListViewBase* KPlato::AccountsView::m_dlv [private] |
Definition at line 120 of file kptaccountsview.h.
Referenced by AccountsView(), clearPeriods(), createPeriods(), draw(), getContext(), initAccList(), print(), and slotUpdate().
QStringList KPlato::AccountsView::m_periodTexts [private] |
Definition at line 122 of file kptaccountsview.h.
Referenced by AccountsView(), periodText(), and slotConfigure().
QPushButton* KPlato::AccountsView::m_changeBtn [private] |
QLabel* KPlato::AccountsView::m_label [private] |
Definition at line 124 of file kptaccountsview.h.
Referenced by AccountsView(), print(), and slotUpdate().