#include <kgloballedgerview.h>
KGlobalLedgerView::KGlobalLedgerView | ( | QWidget * | parent = 0 , |
|
const char * | name = 0 | |||
) |
KGlobalLedgerView::~KGlobalLedgerView | ( | ) |
const QString KGlobalLedgerView::accountId | ( | void | ) | const [inline] |
This method returns the id of the currently selected account or QString() if none is selected.
bool KGlobalLedgerView::canCreateTransactions | ( | QString & | tooltip | ) | const |
Checks if new transactions can be created in the current context
tooltip | reference to string receiving the tooltip text which explains why the modify function is not available (in case of returning false ) |
true | Yes, view allows to create transactions (tooltip is not changed) | |
false | No, view does not support creation of transactions (tooltip is updated with message) |
bool KGlobalLedgerView::canModifyTransactions | ( | const KMyMoneyRegister::SelectedTransactions & | list, | |
QString & | tooltip | |||
) | const |
Checks if a list of transactions can be modified (edit/delete) in the current context
list | list of selected transactions | |
tooltip | reference to string receiving the tooltip text which explains why the modify function is not available (in case of returning false ) |
true | Yes, view allows to edit/delete transactions (tooltip is not changed) | |
false | No, view cannot edit/delete transactions (tooltip is updated with message) |
bool KGlobalLedgerView::canDuplicateTransactions | ( | const KMyMoneyRegister::SelectedTransactions & | list, | |
QString & | tooltip | |||
) | const |
bool KGlobalLedgerView::canEditTransactions | ( | const KMyMoneyRegister::SelectedTransactions & | list, | |
QString & | tooltip | |||
) | const |
Checks if the list of transactions can be edited in the current context
list | list of selected transactions | |
tooltip | reference to string receiving the tooltip text which explains why the edit function is not available (in case of returning false ) |
true
if edit operation is possible, false
if not TransactionEditor* KGlobalLedgerView::startEdit | ( | const KMyMoneyRegister::SelectedTransactions & | list | ) |
bool KGlobalLedgerView::selectEmptyTransaction | ( | void | ) |
Method to prepare the ledger view to create a new transaction. Returns if successful or not.
retval true Emtpy transaction selected. retval false Not successful (e.g. already editing a transaction)
void KGlobalLedgerView::show | ( | void | ) | [slot] |
void KGlobalLedgerView::slotLoadView | ( | void | ) | [slot] |
This method loads the view with data from the MyMoney engine.
bool KGlobalLedgerView::slotSelectAccount | ( | const QString & | accountId, | |
const QString & | transactionId = QString() | |||
) | [slot] |
This slot is used to select the correct ledger view type for the account specified by id
in a specific mode.
accountId | Internal id used for the account to show | |
transactionId | Internal id used for the transaction to select. Default is QString() which will select the last transaction in the ledger if not the same account |
true | selection of account referenced by id succeeded | |
false | selection of account failed |
bool KGlobalLedgerView::slotSelectAccount | ( | const MyMoneyObject & | acc | ) | [slot] |
This method is provided for convenience and acts as the method above.
void KGlobalLedgerView::slotSetReconcileAccount | ( | const MyMoneyAccount & | account = MyMoneyAccount() , |
|
const QDate & | reconciliationDate = QDate() , |
|||
const MyMoneyMoney & | endingBalance = MyMoneyMoney() | |||
) | [slot] |
Switch to reconciliation mode for account account. If account is MyMoneyAccount() (the default), reconciliation mode is turned off.
account | account for which reconciliation mode is activated. Default is MyMoneyAccount(). | |
reconciliationDate | date of statment | |
endingBalance | The calculated ending balance for the statement Default ist 0. |
void KGlobalLedgerView::slotSelectAllTransactions | ( | void | ) | [slot] |
Select all transactions in the ledger that are not hidden.
void KGlobalLedgerView::loadAccounts | ( | void | ) | [protected] |
This method reloads the account selection combo box of the view with all asset and liability accounts from the engine. If the account id of the current account held in m_accountId
is empty or if the referenced account does not exist in the engine, the first account found in the list will be made the current account.
void KGlobalLedgerView::clear | ( | void | ) | [protected] |
This method clears the register, form, transaction list. See
void KGlobalLedgerView::loadView | ( | void | ) | [protected] |
void KGlobalLedgerView::resizeEvent | ( | QResizeEvent * | ) | [protected] |
void KGlobalLedgerView::selectTransaction | ( | const QString & | id | ) | [protected] |
bool KGlobalLedgerView::focusNextPrevChild | ( | bool | next | ) | [protected] |
This method handles the focus of the keyboard. When in edit mode (m_inEditMode is true) the keyboard focus is handled according to the widgets that are referenced in m_tabOrderWidgets. If not in edit mode, the base class functionality is provided.
next | true if forward-tab, false if backward-tab was pressed by the user |
bool KGlobalLedgerView::eventFilter | ( | QObject * | o, | |
QEvent * | e | |||
) | [protected] |
bool KGlobalLedgerView::isReconciliationAccount | ( | void | ) | const [protected] |
Returns true if setReconciliationAccount() has been called for the current loaded account.
true | current account is in reconciliation mode | |
false | current account is not in reconciliation mode |
void KGlobalLedgerView::updateSummaryLine | ( | const QMap< QString, MyMoneyMoney > & | actBalance, | |
const QMap< QString, MyMoneyMoney > & | clearedBalance | |||
) | [protected] |
Updates the values on the summary line beneath the register with the given values. The contents shown differs between reconciliation mode and normal mode.
actBalance | map of account indexed values to be used as actual balance | |
clearedBalance | map of account indexed values to be used as cleared balance |
void KGlobalLedgerView::setupDefaultAction | ( | void | ) | [protected] |
setup the default action according to the current account type
void KGlobalLedgerView::slotLeaveEditMode | ( | const KMyMoneyRegister::SelectedTransactions & | list | ) | [protected, slot] |
void KGlobalLedgerView::slotNewTransaction | ( | void | ) | [protected, slot] |
void KGlobalLedgerView::slotNewTransaction | ( | KMyMoneyRegister::Action | ) | [protected, slot] |
void KGlobalLedgerView::slotUpdateViewPos | ( | void | ) | [protected, slot] |
Sets the contentsPos of the register to d->m_startPoint or makes the focus item visible if d->m_startPoint equals QPoint(-1, -1).
void KGlobalLedgerView::slotSortOptions | ( | void | ) | [protected, slot] |
void KGlobalLedgerView::slotToggleTransactionMark | ( | KMyMoneyRegister::Transaction * | t | ) | [protected, slot] |
void KGlobalLedgerView::slotKeepPostDate | ( | const QDate & | ) | [protected, slot] |
void KGlobalLedgerView::slotAboutToSelectItem | ( | KMyMoneyRegister::RegisterItem * | , | |
bool & | ||||
) | [protected, slot] |
void KGlobalLedgerView::accountSelected | ( | const MyMoneyObject & | ) | [signal] |
void KGlobalLedgerView::transactionsSelected | ( | const KMyMoneyRegister::SelectedTransactions & | ) | [signal] |
void KGlobalLedgerView::newTransaction | ( | void | ) | [signal] |
void KGlobalLedgerView::startEdit | ( | void | ) | [signal] |
void KGlobalLedgerView::endEdit | ( | void | ) | [signal] |
void KGlobalLedgerView::cancelOrEndEdit | ( | bool & | ) | [signal] |
void KGlobalLedgerView::reportGenerated | ( | const MyMoneyReport & | report | ) | [signal] |
This signal is emitted, when a new report has been generated. A 'generated' report is halfway between a default report and a custom report. It's created by the system in response to the user's request, and it's usually filtered to be a little more specific than the usual default reports.
The proper behaviour when getting this signal is to switch to the reports view and display the report. But it should NOT be added to the data file, unless the user customizes it further. That's because the user can always come back to the ledger UI to generate the report again.
report | reference to MyMoneyReport object that contains the report details |
void KGlobalLedgerView::openContextMenu | ( | void | ) | [signal] |
void KGlobalLedgerView::toggleReconciliationFlag | ( | void | ) | [signal] |
This signal is sent out, when the current selected transaction should be marked different
bool KGlobalLedgerView::canProcessTransactions | ( | const KMyMoneyRegister::SelectedTransactions & | list, | |
QString & | tooltip | |||
) | const [private] |
QDate KGlobalLedgerView::m_lastPostDate [static, protected] |
This member keeps the date that was used as the last posting date. It will be updated whenever the user modifies the post date and is used to preset the posting date when new transactions are created. This member is initialised to the current date when the program is started.
Private* const KGlobalLedgerView::d [private] |
Reimplemented from KMyMoneyViewBase.
QFrame* KGlobalLedgerView::m_toolbarFrame [private] |
QFrame* KGlobalLedgerView::m_registerFrame [private] |
QFrame* KGlobalLedgerView::m_buttonFrame [private] |
QFrame* KGlobalLedgerView::m_formFrame [private] |
QFrame* KGlobalLedgerView::m_summaryFrame [private] |
KToolBar* KGlobalLedgerView::m_toolbar [private] |
KToolBar* KGlobalLedgerView::m_buttonbar [private] |
MyMoneyAccount KGlobalLedgerView::m_account [private] |
This member holds the currently selected account
QValueList<QPair<MyMoneyTransaction, MyMoneySplit> > KGlobalLedgerView::m_transactionList [private] |
This member holds the transaction list
QLabel* KGlobalLedgerView::m_leftSummaryLabel [private] |
QLabel* KGlobalLedgerView::m_centerSummaryLabel [private] |
QLabel* KGlobalLedgerView::m_rightSummaryLabel [private] |
bool KGlobalLedgerView::m_needReload [private] |
bool KGlobalLedgerView::m_newAccountLoaded [private] |
bool KGlobalLedgerView::m_inEditMode [private] |
QWidgetList KGlobalLedgerView::m_tabOrderWidgets [private] |