kMyMoneySplitTable Class Reference

#include <kmymoneysplittable.h>

Inheritance diagram for kMyMoneySplitTable:

Collaboration diagram for kMyMoneySplitTable:

Collaboration graph

List of all members.

Public Slots

virtual void setCurrentCell (int row, int col)
virtual void setNumRows (int r)
QWidgetslotStartEdit (void)
void slotEndEdit (void)
void slotEndEditKeyboard (void)
void slotDeleteSplit (void)
void slotCancelEdit (void)
void slotDuplicateSplit (void)


void escapePressed (void)
void returnPressed (void)
void transactionChanged (const MyMoneyTransaction &t)
void createCategory (const QString &txt, QString &id)
void objectCreation (bool state)

Public Member Functions

 kMyMoneySplitTable (QWidget *parent=0, const char *name=0)
virtual ~kMyMoneySplitTable ()
void paintCell (QPainter *p, int row, int col, const QRect &r, bool)
void paintFocus (QPainter *p, const QRect &cr)
void setTransaction (const MyMoneyTransaction &t, const MyMoneySplit &s, const MyMoneyAccount &acc)
const MyMoneyTransactiontransaction (void) const
const QValueList< MyMoneySplitgetSplits (const MyMoneyTransaction &t) const
void setup (const QMap< QString, MyMoneyMoney > &priceInfo)

Protected Slots

virtual void columnWidthChanged (int col)
void slotSetFocus (int row, int col=0, int button=Qt::LeftButton, const QPoint &mousePos=QPoint(0, 0))
 move the focus to the selected row.
void slotUpdateData (const MyMoneyTransaction &t)
void slotLoadEditWidgets (void)

Protected Member Functions

void contentsMousePressEvent (QMouseEvent *e)
void contentsMouseReleaseEvent (QMouseEvent *e)
void contentsMouseDoubleClickEvent (QMouseEvent *e)
bool eventFilter (QObject *o, QEvent *e)
void endEdit (int row, int col, bool accept, bool replace)
void resizeEvent (QResizeEvent *)
QWidgetcreateEditWidgets (void)
void destroyEditWidgets (void)
virtual bool focusNextPrevChild (bool next)
void addToTabOrder (QWidget *w)
void setCurrentCell (int row)
void updateTransactionTableSize (void)
bool isEditMode (void) const
const QColor rowBackgroundColor (const int row) const
void endEdit (bool keyboardDriven)

Private Attributes

int m_currentRow
 the currently selected row (will be printed as selected)
int m_maxRows
 the number of rows filled with data
bool m_editMode
 indication if inline editing mode is on or not
MyMoneyTransaction m_transaction
MyMoneyAccount m_account
MyMoneySplit m_split
MyMoneySplit m_hiddenSplit
unsigned m_amountWidth
KPopupMenu * m_contextMenu
int m_contextMenuDelete
 keeps the id of the delete entry in the context menu
int m_contextMenuDuplicate
 keeps the id of the duplicate entry in the context menu
QGuardedPtr< KMyMoneyCategorym_editCategory
QGuardedPtr< kMyMoneyLineEditm_editMemo
QGuardedPtr< kMyMoneyEditm_editAmount
QWidgetList m_tabOrderWidgets
QGuardedPtr< QFramem_registerButtonFrame
QGuardedPtr< KPushButton > m_registerEnterButton
QGuardedPtr< KPushButton > m_registerCancelButton
QMap< QString, MyMoneyMoneym_priceInfo

Detailed Description

Thomas Baumgart

Constructor & Destructor Documentation

kMyMoneySplitTable::kMyMoneySplitTable ( QWidget parent = 0,
const char *  name = 0 

virtual kMyMoneySplitTable::~kMyMoneySplitTable (  )  [virtual]

Member Function Documentation

void kMyMoneySplitTable::paintCell ( QPainter *  p,
int  row,
int  col,
const QRect &  r,

void kMyMoneySplitTable::paintFocus ( QPainter *  p,
const QRect &  cr 

void kMyMoneySplitTable::setTransaction ( const MyMoneyTransaction t,
const MyMoneySplit s,
const MyMoneyAccount acc 

This method is used to load the widget with the information about the transaction t. The split referencing the account acc is not shown in the widget.

t reference to transaction to be shown/modified
s reference to split that is to be hidden
acc reference to account

const MyMoneyTransaction& kMyMoneySplitTable::transaction ( void   )  const [inline]

This method is used to retrieve the transaction from the widget.

const QValueList<MyMoneySplit> kMyMoneySplitTable::getSplits ( const MyMoneyTransaction t  )  const

Returns a list of MyMoneySplit objects. It contains all but the one referencing the account passed in setTransaction().

t reference to transaction
list of splits

void kMyMoneySplitTable::setup ( const QMap< QString, MyMoneyMoney > &  priceInfo  ) 

void kMyMoneySplitTable::contentsMousePressEvent ( QMouseEvent *  e  )  [protected]

void kMyMoneySplitTable::contentsMouseReleaseEvent ( QMouseEvent *  e  )  [protected]

void kMyMoneySplitTable::contentsMouseDoubleClickEvent ( QMouseEvent *  e  )  [protected]

bool kMyMoneySplitTable::eventFilter ( QObject o,
QEvent *  e 
) [protected]

void kMyMoneySplitTable::endEdit ( int  row,
int  col,
bool  accept,
bool  replace 
) [protected]

void kMyMoneySplitTable::resizeEvent ( QResizeEvent *   )  [protected]

QWidget* kMyMoneySplitTable::createEditWidgets ( void   )  [protected]

void kMyMoneySplitTable::destroyEditWidgets ( void   )  [protected]

virtual bool kMyMoneySplitTable::focusNextPrevChild ( bool  next  )  [protected, virtual]

This method handles the focus of the keyboard. When in edit mode (m_editCategory widget is visible) 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

void kMyMoneySplitTable::addToTabOrder ( QWidget w  )  [protected]

void kMyMoneySplitTable::setCurrentCell ( int  row  )  [inline, protected]

convenience function for setCurrentCell(int row, int col)

void kMyMoneySplitTable::updateTransactionTableSize ( void   )  [protected]

bool kMyMoneySplitTable::isEditMode ( void   )  const [protected]

This method returns the current state of the inline editing mode

true if inline edit mode is on, false otherwise

const QColor kMyMoneySplitTable::rowBackgroundColor ( const int  row  )  const [protected]

This method retuns the background color for a given row.

row the row in question
the color as QColor object

void kMyMoneySplitTable::endEdit ( bool  keyboardDriven  )  [protected]

virtual void kMyMoneySplitTable::setCurrentCell ( int  row,
int  col 
) [virtual, slot]

No descriptions

virtual void kMyMoneySplitTable::setNumRows ( int  r  )  [virtual, slot]

QWidget* kMyMoneySplitTable::slotStartEdit ( void   )  [slot]

void kMyMoneySplitTable::slotEndEdit ( void   )  [slot]

void kMyMoneySplitTable::slotEndEditKeyboard ( void   )  [slot]

void kMyMoneySplitTable::slotDeleteSplit ( void   )  [slot]

void kMyMoneySplitTable::slotCancelEdit ( void   )  [slot]

void kMyMoneySplitTable::slotDuplicateSplit ( void   )  [slot]

virtual void kMyMoneySplitTable::columnWidthChanged ( int  col  )  [protected, virtual, slot]

void kMyMoneySplitTable::slotSetFocus ( int  row,
int  col = 0,
int  button = Qt::LeftButton,
const QPoint &  mousePos = QPoint(0, 0) 
) [protected, slot]

void kMyMoneySplitTable::slotUpdateData ( const MyMoneyTransaction t  )  [protected, slot]

Calling this slot refills the widget with the data passed in the argument t.

t reference to transaction data

void kMyMoneySplitTable::slotLoadEditWidgets ( void   )  [protected, slot]

void kMyMoneySplitTable::escapePressed ( void   )  [signal]

This signal is emitted whenever the return key is pressed and the widget is not in edit mode.

void kMyMoneySplitTable::returnPressed ( void   )  [signal]

This signal is emitted whenever the return key is pressed and the widget is not in edit mode.

void kMyMoneySplitTable::transactionChanged ( const MyMoneyTransaction t  )  [signal]

This signal is emitted whenever the transaction data has been changed

t modified transaction data

void kMyMoneySplitTable::createCategory ( const QString &  txt,
QString &  id 
) [signal]

This signal is sent out, when a new category needs to be created

See also:
txt The name of the category to be created
id A connected slot should store the id of the created object in this variable

void kMyMoneySplitTable::objectCreation ( bool  state  )  [signal]

Signal is emitted, if any of the widgets enters (state equals true) or leaves (state equals false) object creation mode.

state Enter (true) or leave (false) object creation

Member Data Documentation

KPopupMenu* kMyMoneySplitTable::m_contextMenu [private]

This member keeps a pointer to the context menu

This member contains a pointer to the input widget for the category. The widget will be created and destroyed dynamically in createInputWidgets() and destroyInputWidgets().

This member contains a pointer to the input widget for the memo. The widget will be created and destroyed dynamically in createInputWidgets() and destroyInputWidgets().

This member contains a pointer to the input widget for the amount. The widget will be created and destroyed dynamically in createInputWidgets() and destroyInputWidgets().

This member keeps the tab order for the above widgets

QGuardedPtr<KPushButton> kMyMoneySplitTable::m_registerEnterButton [private]

QGuardedPtr<KPushButton> kMyMoneySplitTable::m_registerCancelButton [private]

The documentation for this class was generated from the following file:

Generated on Wed Jan 26 13:08:10 2011 for KMyMoney by  doxygen 1.5.6