KCategoriesView Class Reference

This class contains the implementation of the categories view. More...

#include <kcategoriesview.h>

Inheritance diagram for KCategoriesView:

KCategoriesViewDecl QWidget
Collaboration diagram for KCategoriesView:

Collaboration graph
[legend]

List of all members.

Public Slots

void slotLoadAccounts (void)
void show (void)
void polish (void)

Signals

void selectObject (const MyMoneyObject &)
void openContextMenu (const MyMoneyObject &obj)
void openObject (const MyMoneyObject &obj)
void reparent (const MyMoneyAccount &acc, const MyMoneyAccount &parent)

Public Member Functions

 KCategoriesView (QWidget *parent=0, const char *name=0)
virtual ~KCategoriesView ()

Protected Slots

void slotUpdateProfit (void)
void slotExpandCollapse (void)

Protected Member Functions

void loadAccounts (void)
bool loadSubAccounts (KMyMoneyAccountTreeItem *parent, const QStringList &accountList)

Private Member Functions

const QPixmap accountImage (const MyMoneyAccount::accountTypeE type) const

Private Attributes

QMap< QString, MyMoneySecuritym_securityMap
QMap< QString, unsigned long > m_transactionCountMap
KMyMoneyAccountTreeItemm_incomeItem
KMyMoneyAccountTreeItemm_expenseItem
KListViewSearchLineWidgetm_searchWidget
bool m_needReload
 set if a view needs to be reloaded during show()


Detailed Description

Author:
Michael Edwardes, Thomas Baumgart
While named "categories view", this view actually displays all accounts that are children of the global "Income" and "Expense" accounts. Even though categories are internally just accounts as well, the distinction between categories and accounts in the user interface is done for better usability and clarity.

The main functionality in the categories view is actually implemented in the KMyMoneyAccountTree. Signals from user actions are connect to other signals/slots in KCategoriesView and relayed to KMyMoneyView. A typical example is the selectObject() signal that eventually results in enabling/disabling the user actions for the categories view.

For the categories view three user actions are important (all created in kmymoney2.cpp): category_new, category_edit and category_delete. They are accessible from either the main menu or the context menu.


Constructor & Destructor Documentation

KCategoriesView::KCategoriesView ( QWidget parent = 0,
const char *  name = 0 
)

virtual KCategoriesView::~KCategoriesView (  )  [virtual]


Member Function Documentation

void KCategoriesView::slotLoadAccounts ( void   )  [slot]

void KCategoriesView::show ( void   )  [slot]

Override the base class behaviour to include all updates that happened in the meantime.

void KCategoriesView::polish ( void   )  [slot]

Override the base class behaviour to restore the layout. Do not do this in show() because show() itself may change the layout in undesired ways.

void KCategoriesView::loadAccounts ( void   )  [protected]

bool KCategoriesView::loadSubAccounts ( KMyMoneyAccountTreeItem parent,
const QStringList &  accountList 
) [protected]

void KCategoriesView::slotUpdateProfit ( void   )  [protected, slot]

void KCategoriesView::slotExpandCollapse ( void   )  [protected, slot]

const QPixmap KCategoriesView::accountImage ( const MyMoneyAccount::accountTypeE  type  )  const [private]

This method returns an icon according to the account type passed in the argument type.

Parameters:
type account type as defined in MyMoneyAccount::accountTypeE

void KCategoriesView::selectObject ( const MyMoneyObject  )  [signal]

This signal serves as proxy for KMyMoneyAccountTree::selectObject()

void KCategoriesView::openContextMenu ( const MyMoneyObject obj  )  [signal]

void KCategoriesView::openObject ( const MyMoneyObject obj  )  [signal]

This signal will be emitted when the left mouse button is double clicked (actually the KDE executed setting is used) on an account.

void KCategoriesView::reparent ( const MyMoneyAccount acc,
const MyMoneyAccount parent 
) [signal]

This signal is emitted, when the user selected to reparent the account acc to be a subordinate account of parent.

Parameters:
acc const reference to account to be reparented
parent const reference to new parent account


Member Data Documentation

QMap<QString, unsigned long> KCategoriesView::m_transactionCountMap [private]

Search widget for the list


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

Generated on Wed Jan 26 13:05:55 2011 for KMyMoney by  doxygen 1.5.6