#include <transaction.h>
Public Member Functions | |
Transaction (Register *parent, const MyMoneyTransaction &transaction, const MyMoneySplit &split, int uniqueId) | |
virtual | ~Transaction () |
virtual const char * | className (void) |
bool | isSelectable (void) const |
bool | isSelected (void) const |
void | setSelected (bool selected) |
bool | canHaveFocus (void) const |
bool | hasFocus (void) const |
bool | hasEditorOpen (void) const |
virtual bool | isScheduled (void) const |
void | setFocus (bool focus, bool updateLens=true) |
bool | isErronous (void) const |
virtual const QDate & | sortPostDate (void) const |
virtual int | sortSamePostDate (void) const |
virtual const QDate & | sortEntryDate (void) const |
virtual const QString & | sortPayee (void) const |
virtual const MyMoneyMoney & | sortValue (void) const |
virtual const QString & | sortNumber (void) const |
virtual const QString & | sortEntryOrder (void) const |
virtual CashFlowDirection | sortType (void) const |
virtual const QString & | sortCategory (void) const |
virtual MyMoneySplit::reconcileFlagE | sortReconcileState (void) const |
virtual const QString & | id (void) const |
const MyMoneyTransaction & | transaction (void) const |
const MyMoneySplit & | split (void) const |
void | setBalance (const MyMoneyMoney &balance) |
const MyMoneyMoney & | balance (void) const |
virtual int | rowHeightHint (void) const |
virtual bool | paintRegisterCellSetup (QPainter *painter, int &row, int &col, QRect &cellRect, QRect &textRect, QColorGroup &cg, QBrush &brush) |
void | paintRegisterCellFocus (QPainter *painter, int row, int col, const QRect &r, const QColorGroup &cg) |
virtual void | paintRegisterCell (QPainter *painter, int row, int col, const QRect &r, bool selected, const QColorGroup &cg) |
virtual void | paintRegisterCellText (QPainter *painter, int row, int col, const QRect &r, const QColorGroup &cg, int align, const QString &txt) |
virtual void | paintRegisterCellBackground (QPainter *painter, int row, int col, const QRect &r, const QBrush &backgroundBrush) |
virtual void | paintRegisterGrid (QPainter *painter, int row, int col, const QRect &r, const QColorGroup &cg) const |
virtual void | paintRegisterIcons (QPainter *painter, int row, int col, const QRect &r, const QColorGroup &cg) |
virtual void | paintFormCell (QPainter *, int, int, const QRect &, bool, const QColorGroup &) |
virtual bool | formCellText (QString &, int &, int, int, QPainter *) |
virtual void | registerCellText (QString &, int &, int, int, QPainter *) |
virtual int | registerColWidth (int, const QFontMetrics &) |
void | registerCellText (QString &txt, int row, int col) |
virtual int | formRowHeight (int row) |
virtual int | formRowHeight (void) const |
virtual void | setupForm (KMyMoneyTransactionForm::TransactionForm *form) |
virtual void | setupFormPalette (QMap< QString, QWidget * > &editWidgets) |
virtual void | setupRegisterPalette (QMap< QString, QWidget * > &editWidgets) |
virtual void | loadTab (KMyMoneyTransactionForm::TransactionForm *form)=0 |
virtual void | arrangeWidgetsInForm (QMap< QString, QWidget * > &editWidgets)=0 |
virtual void | arrangeWidgetsInRegister (QMap< QString, QWidget * > &editWidgets)=0 |
virtual void | tabOrderInForm (QWidgetList &tabOrderWidgets) const =0 |
virtual void | tabOrderInRegister (QWidgetList &tabOrderWidgets) const =0 |
virtual KMyMoneyRegister::Action | actionType (void) const =0 |
QWidget * | focusWidget (QWidget *) const |
void | arrangeWidget (QTable *tbl, int row, int col, QWidget *w) const |
bool | haveNumberField (void) const |
bool | matches (const QString &) const |
virtual bool | maybeTip (const QPoint &relpos, int row, int col, QRect &r, QString &msg) |
virtual int | numRowsRegister (bool expanded) const =0 |
virtual int | numRowsRegister (void) const =0 |
void | leaveEditMode (void) |
void | startEditMode (void) |
virtual TransactionEditor * | createEditor (TransactionEditorContainer *regForm, const KMyMoneyRegister::SelectedTransactions &list, const QDate &lastPostDate)=0 |
virtual void | setVisible (bool visible) |
virtual void | setShowBalance (bool showBalance) |
virtual bool | showRowInForm (int row) const |
virtual void | setShowRowInForm (int row, bool show) |
virtual void | setReducedIntensity (bool reduced) |
Protected Member Functions | |
virtual void | markAsErronous (QPainter *p, int row, int col, const QRect &r) |
virtual void | markAttachment (QPainter *painter, int row, int col, const QRect &r) |
QString | reconcileState (bool text=true) const |
void | singleLineMemo (QString &txt, const MyMoneySplit &split) const |
virtual void | setupPalette (const QPalette &palette, QMap< QString, QWidget * > &editWidgets) |
Protected Attributes | |
MyMoneyTransaction | m_transaction |
MyMoneySplit | m_split |
MyMoneyAccount | m_account |
MyMoneyMoney | m_balance |
QTable * | m_form |
QString | m_category |
QString | m_payee |
QString | m_payeeHeader |
QString | m_categoryHeader |
QString | m_splitCurrencyId |
QString | m_uniqueId |
int | m_formRowHeight |
bool | m_selected |
bool | m_focus |
bool | m_erronous |
bool | m_inEdit |
bool | m_inRegisterEdit |
bool | m_showBalance |
bool | m_reducedIntensity |
KMyMoneyRegister::Transaction::Transaction | ( | Register * | parent, | |
const MyMoneyTransaction & | transaction, | |||
const MyMoneySplit & | split, | |||
int | uniqueId | |||
) |
virtual KMyMoneyRegister::Transaction::~Transaction | ( | ) | [inline, virtual] |
virtual const char* KMyMoneyRegister::Transaction::className | ( | void | ) | [inline, virtual] |
Implements KMyMoneyRegister::RegisterItem.
Reimplemented in KMyMoneyRegister::StdTransactionScheduled, KMyMoneyRegister::StdTransactionDownloaded, KMyMoneyRegister::InvestTransactionDownloaded, KMyMoneyRegister::StdTransactionMatched, KMyMoneyRegister::StdTransaction, and KMyMoneyRegister::InvestTransaction.
bool KMyMoneyRegister::Transaction::isSelectable | ( | void | ) | const [inline, virtual] |
Implements KMyMoneyRegister::RegisterItem.
Reimplemented in KMyMoneyRegister::StdTransactionScheduled.
bool KMyMoneyRegister::Transaction::isSelected | ( | void | ) | const [inline, virtual] |
Reimplemented from KMyMoneyRegister::RegisterItem.
void KMyMoneyRegister::Transaction::setSelected | ( | bool | selected | ) | [virtual] |
Reimplemented from KMyMoneyRegister::RegisterItem.
bool KMyMoneyRegister::Transaction::canHaveFocus | ( | void | ) | const [inline, virtual] |
Implements KMyMoneyRegister::RegisterItem.
Reimplemented in KMyMoneyRegister::StdTransactionScheduled.
bool KMyMoneyRegister::Transaction::hasFocus | ( | void | ) | const [inline, virtual] |
Reimplemented from KMyMoneyRegister::RegisterItem.
bool KMyMoneyRegister::Transaction::hasEditorOpen | ( | void | ) | const [inline, virtual] |
Reimplemented from KMyMoneyRegister::RegisterItem.
virtual bool KMyMoneyRegister::Transaction::isScheduled | ( | void | ) | const [inline, virtual] |
Reimplemented in KMyMoneyRegister::StdTransactionScheduled.
void KMyMoneyRegister::Transaction::setFocus | ( | bool | focus, | |
bool | updateLens = true | |||
) | [virtual] |
Reimplemented from KMyMoneyRegister::RegisterItem.
bool KMyMoneyRegister::Transaction::isErronous | ( | void | ) | const [inline, virtual] |
Implements KMyMoneyRegister::RegisterItem.
virtual const QDate& KMyMoneyRegister::Transaction::sortPostDate | ( | void | ) | const [inline, virtual] |
Reimplemented from KMyMoneyRegister::RegisterItem.
virtual int KMyMoneyRegister::Transaction::sortSamePostDate | ( | void | ) | const [inline, virtual] |
Implements KMyMoneyRegister::RegisterItem.
Reimplemented in KMyMoneyRegister::StdTransactionScheduled.
virtual const QDate& KMyMoneyRegister::Transaction::sortEntryDate | ( | void | ) | const [inline, virtual] |
Reimplemented from KMyMoneyRegister::RegisterItem.
virtual const QString& KMyMoneyRegister::Transaction::sortPayee | ( | void | ) | const [inline, virtual] |
Reimplemented from KMyMoneyRegister::RegisterItem.
virtual const MyMoneyMoney& KMyMoneyRegister::Transaction::sortValue | ( | void | ) | const [inline, virtual] |
Reimplemented from KMyMoneyRegister::RegisterItem.
virtual const QString& KMyMoneyRegister::Transaction::sortNumber | ( | void | ) | const [inline, virtual] |
Reimplemented from KMyMoneyRegister::RegisterItem.
virtual const QString& KMyMoneyRegister::Transaction::sortEntryOrder | ( | void | ) | const [inline, virtual] |
Reimplemented from KMyMoneyRegister::RegisterItem.
virtual CashFlowDirection KMyMoneyRegister::Transaction::sortType | ( | void | ) | const [inline, virtual] |
Reimplemented from KMyMoneyRegister::RegisterItem.
virtual const QString& KMyMoneyRegister::Transaction::sortCategory | ( | void | ) | const [inline, virtual] |
Reimplemented from KMyMoneyRegister::RegisterItem.
virtual MyMoneySplit::reconcileFlagE KMyMoneyRegister::Transaction::sortReconcileState | ( | void | ) | const [inline, virtual] |
Reimplemented from KMyMoneyRegister::RegisterItem.
virtual const QString& KMyMoneyRegister::Transaction::id | ( | void | ) | const [inline, virtual] |
Reimplemented from KMyMoneyRegister::RegisterItem.
const MyMoneyTransaction& KMyMoneyRegister::Transaction::transaction | ( | void | ) | const [inline] |
const MyMoneySplit& KMyMoneyRegister::Transaction::split | ( | void | ) | const [inline] |
void KMyMoneyRegister::Transaction::setBalance | ( | const MyMoneyMoney & | balance | ) | [inline] |
const MyMoneyMoney& KMyMoneyRegister::Transaction::balance | ( | void | ) | const [inline] |
virtual int KMyMoneyRegister::Transaction::rowHeightHint | ( | void | ) | const [virtual] |
Reimplemented from KMyMoneyRegister::RegisterItem.
virtual bool KMyMoneyRegister::Transaction::paintRegisterCellSetup | ( | QPainter * | painter, | |
int & | row, | |||
int & | col, | |||
QRect & | cellRect, | |||
QRect & | textRect, | |||
QColorGroup & | cg, | |||
QBrush & | brush | |||
) | [virtual] |
This method sets the general paramaters required for the painting of a cell in the register. These are:
painter | pointer to the QPainter object | |
row | vertical index of cell in register | |
col | horizontal index of cell in register | |
cellRect | ref to QRect object receiving the area information for the cell | |
textRect | ref to QRect object receiving the area information for the text | |
cg | ref to QColorGroup object receiving the color information to be used |
Reimplemented in KMyMoneyRegister::StdTransactionScheduled, KMyMoneyRegister::StdTransactionDownloaded, KMyMoneyRegister::InvestTransactionDownloaded, and KMyMoneyRegister::StdTransactionMatched.
void KMyMoneyRegister::Transaction::paintRegisterCellFocus | ( | QPainter * | painter, | |
int | row, | |||
int | col, | |||
const QRect & | r, | |||
const QColorGroup & | cg | |||
) |
paints the focus if the current cell defined by (row, col) has the focus.
painter | pointer to the QPainter object | |
row | vertical index of cell in register | |
col | horizontal index of cell in register | |
r | area covering the cell | |
cg | the color definitions to be used |
virtual void KMyMoneyRegister::Transaction::paintRegisterCell | ( | QPainter * | painter, | |
int | row, | |||
int | col, | |||
const QRect & | r, | |||
bool | selected, | |||
const QColorGroup & | cg | |||
) | [virtual] |
paints a cell of the register for the transaction. Uses paintRegisterCellSetup(), paintRegisterCellText() paintRegisterGrid(), paintRegisterIcons() and paintRegisterCellFocus() to actually do the job.
painter | pointer to the QPainter object | |
row | vertical index of cell in register | |
col | horizontal index of cell in register | |
r | area covering the cell | |
selected | unused but kept for compatibility | |
cg | the color definitions to be used |
Implements KMyMoneyRegister::RegisterItem.
virtual void KMyMoneyRegister::Transaction::paintRegisterCellText | ( | QPainter * | painter, | |
int | row, | |||
int | col, | |||
const QRect & | r, | |||
const QColorGroup & | cg, | |||
int | align, | |||
const QString & | txt | |||
) | [virtual] |
virtual void KMyMoneyRegister::Transaction::paintRegisterCellBackground | ( | QPainter * | painter, | |
int | row, | |||
int | col, | |||
const QRect & | r, | |||
const QBrush & | backgroundBrush | |||
) | [virtual] |
virtual void KMyMoneyRegister::Transaction::paintRegisterGrid | ( | QPainter * | painter, | |
int | row, | |||
int | col, | |||
const QRect & | r, | |||
const QColorGroup & | cg | |||
) | const [virtual] |
Reimplemented in KMyMoneyRegister::StdTransactionMatched.
virtual void KMyMoneyRegister::Transaction::paintRegisterIcons | ( | QPainter * | painter, | |
int | row, | |||
int | col, | |||
const QRect & | r, | |||
const QColorGroup & | cg | |||
) | [virtual] |
virtual void KMyMoneyRegister::Transaction::paintFormCell | ( | QPainter * | , | |
int | , | |||
int | , | |||
const QRect & | , | |||
bool | , | |||
const QColorGroup & | ||||
) | [virtual] |
Implements KMyMoneyRegister::RegisterItem.
virtual bool KMyMoneyRegister::Transaction::formCellText | ( | QString & | , | |
int & | , | |||
int | , | |||
int | , | |||
QPainter * | ||||
) | [inline, virtual] |
Reimplemented in KMyMoneyRegister::StdTransaction, and KMyMoneyRegister::InvestTransaction.
virtual void KMyMoneyRegister::Transaction::registerCellText | ( | QString & | , | |
int & | , | |||
int | , | |||
int | , | |||
QPainter * | ||||
) | [inline, virtual] |
virtual int KMyMoneyRegister::Transaction::registerColWidth | ( | int | , | |
const QFontMetrics & | ||||
) | [inline, virtual] |
Reimplemented in KMyMoneyRegister::StdTransaction, and KMyMoneyRegister::InvestTransaction.
void KMyMoneyRegister::Transaction::registerCellText | ( | QString & | txt, | |
int | row, | |||
int | col | |||
) |
Helper method for the above method.
virtual int KMyMoneyRegister::Transaction::formRowHeight | ( | int | row | ) | [virtual] |
virtual int KMyMoneyRegister::Transaction::formRowHeight | ( | void | ) | const [virtual] |
virtual void KMyMoneyRegister::Transaction::setupForm | ( | KMyMoneyTransactionForm::TransactionForm * | form | ) | [virtual] |
Reimplemented in KMyMoneyRegister::StdTransaction, and KMyMoneyRegister::InvestTransaction.
virtual void KMyMoneyRegister::Transaction::setupFormPalette | ( | QMap< QString, QWidget * > & | editWidgets | ) | [virtual] |
virtual void KMyMoneyRegister::Transaction::setupRegisterPalette | ( | QMap< QString, QWidget * > & | editWidgets | ) | [virtual] |
virtual void KMyMoneyRegister::Transaction::loadTab | ( | KMyMoneyTransactionForm::TransactionForm * | form | ) | [pure virtual] |
Implemented in KMyMoneyRegister::StdTransaction, and KMyMoneyRegister::InvestTransaction.
virtual void KMyMoneyRegister::Transaction::arrangeWidgetsInForm | ( | QMap< QString, QWidget * > & | editWidgets | ) | [pure virtual] |
Implemented in KMyMoneyRegister::StdTransaction, and KMyMoneyRegister::InvestTransaction.
virtual void KMyMoneyRegister::Transaction::arrangeWidgetsInRegister | ( | QMap< QString, QWidget * > & | editWidgets | ) | [pure virtual] |
Implemented in KMyMoneyRegister::StdTransaction, and KMyMoneyRegister::InvestTransaction.
virtual void KMyMoneyRegister::Transaction::tabOrderInForm | ( | QWidgetList & | tabOrderWidgets | ) | const [pure virtual] |
Implemented in KMyMoneyRegister::StdTransaction, and KMyMoneyRegister::InvestTransaction.
virtual void KMyMoneyRegister::Transaction::tabOrderInRegister | ( | QWidgetList & | tabOrderWidgets | ) | const [pure virtual] |
Implemented in KMyMoneyRegister::StdTransaction, and KMyMoneyRegister::InvestTransaction.
virtual KMyMoneyRegister::Action KMyMoneyRegister::Transaction::actionType | ( | void | ) | const [pure virtual] |
Implemented in KMyMoneyRegister::StdTransaction, and KMyMoneyRegister::InvestTransaction.
void KMyMoneyRegister::Transaction::arrangeWidget | ( | QTable * | tbl, | |
int | row, | |||
int | col, | |||
QWidget * | w | |||
) | const |
bool KMyMoneyRegister::Transaction::haveNumberField | ( | void | ) | const |
bool KMyMoneyRegister::Transaction::matches | ( | const QString & | ) | const [virtual] |
Implements KMyMoneyRegister::RegisterItem.
virtual bool KMyMoneyRegister::Transaction::maybeTip | ( | const QPoint & | relpos, | |
int | row, | |||
int | col, | |||
QRect & | r, | |||
QString & | msg | |||
) | [virtual] |
Checks if the mouse hovered over an area that has a tooltip associated with it. The mouse position is given in relative coordinates to the startRow and the row and col of the item are also passed as relative values.
If a tooltip shall be shown, this method presets the rectangle r with the area in register coordinates and msg with the string that will be passed to QToolTip::tip. true is returned in this case.
If no tooltip is available, false will be returned.
Reimplemented from KMyMoneyRegister::RegisterItem.
virtual int KMyMoneyRegister::Transaction::numRowsRegister | ( | bool | expanded | ) | const [pure virtual] |
This method returns the number of register rows required for a certain item in expanded (expanded
equals true) or collapsed (expanded
is false) mode.
expanded | returns number of maximum rows required for this item to display all information (used for ledger lens and register edit mode) or the minimum number of rows required. |
expanded
Implemented in KMyMoneyRegister::StdTransactionMatched, KMyMoneyRegister::StdTransaction, and KMyMoneyRegister::InvestTransaction.
virtual int KMyMoneyRegister::Transaction::numRowsRegister | ( | void | ) | const [pure virtual] |
This method returns the number of rows required to display this item in a Register
Reimplemented from KMyMoneyRegister::RegisterItem.
Implemented in KMyMoneyRegister::StdTransactionDownloaded, KMyMoneyRegister::InvestTransactionDownloaded, KMyMoneyRegister::StdTransaction, and KMyMoneyRegister::InvestTransaction.
void KMyMoneyRegister::Transaction::leaveEditMode | ( | void | ) |
void KMyMoneyRegister::Transaction::startEditMode | ( | void | ) |
virtual TransactionEditor* KMyMoneyRegister::Transaction::createEditor | ( | TransactionEditorContainer * | regForm, | |
const KMyMoneyRegister::SelectedTransactions & | list, | |||
const QDate & | lastPostDate | |||
) | [pure virtual] |
This method creates an editor for the transaction
Implemented in KMyMoneyRegister::StdTransaction, and KMyMoneyRegister::InvestTransaction.
virtual void KMyMoneyRegister::Transaction::setVisible | ( | bool | visible | ) | [virtual] |
Marks the item visible depending on visible and updates the underlying register object
Reimplemented from KMyMoneyRegister::RegisterItem.
virtual void KMyMoneyRegister::Transaction::setShowBalance | ( | bool | showBalance | ) | [virtual] |
virtual bool KMyMoneyRegister::Transaction::showRowInForm | ( | int | row | ) | const [inline, virtual] |
Return information if row should be shown (true ) or hidden (false ) in the form. Default is true.
Reimplemented in KMyMoneyRegister::StdTransaction.
virtual void KMyMoneyRegister::Transaction::setShowRowInForm | ( | int | row, | |
bool | show | |||
) | [inline, virtual] |
Control visibility of row in the transaction form. Only row 0 has an effect, others return true.
Reimplemented in KMyMoneyRegister::StdTransaction.
virtual void KMyMoneyRegister::Transaction::setReducedIntensity | ( | bool | reduced | ) | [inline, virtual] |
virtual void KMyMoneyRegister::Transaction::markAsErronous | ( | QPainter * | p, | |
int | row, | |||
int | col, | |||
const QRect & | r | |||
) | [protected, virtual] |
virtual void KMyMoneyRegister::Transaction::markAttachment | ( | QPainter * | painter, | |
int | row, | |||
int | col, | |||
const QRect & | r | |||
) | [protected, virtual] |
QString KMyMoneyRegister::Transaction::reconcileState | ( | bool | text = true |
) | const [protected] |
This method converts m_split.reconcileFlag() into a readable string
text | Return textual representation e.g. "Cleared" (true) or just a flag e.g. "C" (false). Defaults to textual representation. |
text
of the reconciliation state of the split void KMyMoneyRegister::Transaction::singleLineMemo | ( | QString & | txt, | |
const MyMoneySplit & | split | |||
) | const [protected] |
Helper method to reduce a multi line memo text into a single line.
txt | QString that will receive the single line memo text | |
split | const reference to the split to take the memo from |
virtual void KMyMoneyRegister::Transaction::setupPalette | ( | const QPalette & | palette, | |
QMap< QString, QWidget * > & | editWidgets | |||
) | [protected, virtual] |
MyMoneySplit KMyMoneyRegister::Transaction::m_split [protected] |
MyMoneyMoney KMyMoneyRegister::Transaction::m_balance [protected] |
QTable* KMyMoneyRegister::Transaction::m_form [protected] |
QString KMyMoneyRegister::Transaction::m_category [protected] |
QString KMyMoneyRegister::Transaction::m_payee [protected] |
QString KMyMoneyRegister::Transaction::m_payeeHeader [protected] |
QString KMyMoneyRegister::Transaction::m_categoryHeader [protected] |
QString KMyMoneyRegister::Transaction::m_splitCurrencyId [protected] |
QString KMyMoneyRegister::Transaction::m_uniqueId [protected] |
int KMyMoneyRegister::Transaction::m_formRowHeight [protected] |
bool KMyMoneyRegister::Transaction::m_selected [protected] |
bool KMyMoneyRegister::Transaction::m_focus [protected] |
bool KMyMoneyRegister::Transaction::m_erronous [protected] |
bool KMyMoneyRegister::Transaction::m_inEdit [protected] |
bool KMyMoneyRegister::Transaction::m_inRegisterEdit [protected] |
bool KMyMoneyRegister::Transaction::m_showBalance [protected] |
bool KMyMoneyRegister::Transaction::m_reducedIntensity [protected] |