KPlato::AccountsPanel Class Reference

#include <kptaccountspanel.h>

Inherits KPlato::AccountsPanelBase.

Inheritance diagram for KPlato::AccountsPanel:

[legend]
List of all members.

Public Slots

void slotOk ()

Signals

void changed (bool)

Public Member Functions

 AccountsPanel (Accounts &acc, QWidget *parent=0)
KCommand * buildCommand (Part *part)
bool isUnique (QTreeWidgetItem *item)
void renameStopped (QTreeWidgetItem *item)

Protected Slots

void slotChanged ()
void slotSelectionChanged ()
void slotRemoveBtn ()
void slotNewBtn ()
void slotSubBtn ()
void slotActivated (int)
void slotItemChanged (QTreeWidgetItem *item, int col)
void slotRemoveItem (QTreeWidgetItem *i)

Protected Member Functions

void addItems (QTreeWidget *lv, Accounts &acc)
void addItems (QTreeWidgetItem *item, Account *acc)
void addElement (QTreeWidgetItem *item)
void removeElement (QString key)
void removeElement (QTreeWidgetItem *item)
void refreshDefaultAccount ()
KCommand * save (Part *part, Project &project)
KCommand * save (Part *part, Project &project, QTreeWidgetItem *item)

Private Attributes

Accountsm_accounts
QList< QTreeWidgetItem * > m_removedItems
Accountm_oldDefaultAccount
QHash< QString, QTreeWidgetItem * > m_elements
int m_currentIndex
QString m_renameText
QTreeWidgetItem * m_renameItem

Detailed Description

Definition at line 53 of file kptaccountspanel.h.


Constructor & Destructor Documentation

KPlato::AccountsPanel::AccountsPanel ( Accounts acc,
QWidget *  parent = 0 
)

Definition at line 77 of file kptaccountspanel.cc.

References addItems(), slotActivated(), slotItemChanged(), slotNewBtn(), slotRemoveBtn(), slotSelectionChanged(), and slotSubBtn().


Member Function Documentation

KCommand * KPlato::AccountsPanel::buildCommand ( Part part  ) 

Definition at line 274 of file kptaccountspanel.cc.

References KPlato::Part::getProject(), m_removedItems, and save().

Referenced by KPlato::AccountsDialog::buildCommand().

bool KPlato::AccountsPanel::isUnique ( QTreeWidgetItem *  item  ) 

Definition at line 214 of file kptaccountspanel.cc.

void KPlato::AccountsPanel::renameStopped ( QTreeWidgetItem *  item  ) 

void KPlato::AccountsPanel::changed ( bool   )  [signal]

Referenced by slotChanged(), and slotItemChanged().

void KPlato::AccountsPanel::slotOk (  )  [slot]

Definition at line 381 of file kptaccountspanel.cc.

Referenced by KPlato::AccountsDialog::slotOk().

void KPlato::AccountsPanel::slotChanged (  )  [protected, slot]

Definition at line 196 of file kptaccountspanel.cc.

References changed().

Referenced by slotActivated(), and slotRemoveBtn().

void KPlato::AccountsPanel::slotSelectionChanged (  )  [protected, slot]

Definition at line 200 of file kptaccountspanel.cc.

Referenced by AccountsPanel().

void KPlato::AccountsPanel::slotRemoveBtn (  )  [protected, slot]

Definition at line 225 of file kptaccountspanel.cc.

References slotChanged(), and slotRemoveItem().

Referenced by AccountsPanel().

void KPlato::AccountsPanel::slotNewBtn (  )  [protected, slot]

Definition at line 233 of file kptaccountspanel.cc.

Referenced by AccountsPanel().

void KPlato::AccountsPanel::slotSubBtn (  )  [protected, slot]

Definition at line 255 of file kptaccountspanel.cc.

Referenced by AccountsPanel().

void KPlato::AccountsPanel::slotActivated ( int   )  [protected, slot]

Definition at line 175 of file kptaccountspanel.cc.

References m_currentIndex, m_elements, and slotChanged().

Referenced by AccountsPanel().

void KPlato::AccountsPanel::slotItemChanged ( QTreeWidgetItem *  item,
int  col 
) [protected, slot]

Definition at line 170 of file kptaccountspanel.cc.

References changed().

Referenced by AccountsPanel().

void KPlato::AccountsPanel::slotRemoveItem ( QTreeWidgetItem *  i  )  [protected, slot]

Definition at line 354 of file kptaccountspanel.cc.

References KPlato::AccountItem::account, addElement(), m_removedItems, and removeElement().

Referenced by slotRemoveBtn().

void KPlato::AccountsPanel::addItems ( QTreeWidget *  lv,
Accounts acc 
) [protected]

Definition at line 100 of file kptaccountspanel.cc.

References KPlato::AccountItem::account, KPlato::Accounts::accountList(), addElement(), KPlato::Accounts::defaultAccount(), KPlato::Account::description(), KPlato::AccountItem::isDefault, KPlato::Account::isElement(), and KPlato::Account::name().

Referenced by AccountsPanel(), and addItems().

void KPlato::AccountsPanel::addItems ( QTreeWidgetItem *  item,
Account acc 
) [protected]

Definition at line 116 of file kptaccountspanel.cc.

References KPlato::AccountItem::account, KPlato::Account::accountList(), addElement(), addItems(), KPlato::Accounts::defaultAccount(), KPlato::Account::description(), KPlato::AccountItem::isDefault, KPlato::Account::isElement(), KPlato::Account::list(), and KPlato::Account::name().

void KPlato::AccountsPanel::addElement ( QTreeWidgetItem *  item  )  [protected]

Definition at line 130 of file kptaccountspanel.cc.

References m_elements, refreshDefaultAccount(), and removeElement().

Referenced by addItems(), and slotRemoveItem().

void KPlato::AccountsPanel::removeElement ( QString  key  )  [protected]

Definition at line 139 of file kptaccountspanel.cc.

References m_elements.

Referenced by addElement(), and slotRemoveItem().

void KPlato::AccountsPanel::removeElement ( QTreeWidgetItem *  item  )  [protected]

Definition at line 146 of file kptaccountspanel.cc.

References m_elements, and refreshDefaultAccount().

void KPlato::AccountsPanel::refreshDefaultAccount (  )  [protected]

Definition at line 152 of file kptaccountspanel.cc.

References m_currentIndex, and m_elements.

Referenced by addElement(), and removeElement().

KCommand * KPlato::AccountsPanel::save ( Part part,
Project project 
) [protected]

Definition at line 293 of file kptaccountspanel.cc.

Referenced by buildCommand(), and save().

KCommand * KPlato::AccountsPanel::save ( Part part,
Project project,
QTreeWidgetItem *  item 
) [protected]

Definition at line 306 of file kptaccountspanel.cc.

References KPlato::AccountItem::account, KPlato::Account::description(), m_accounts, m_elements, m_oldDefaultAccount, KPlato::Account::name(), and save().


Member Data Documentation

Accounts& KPlato::AccountsPanel::m_accounts [private]

Definition at line 90 of file kptaccountspanel.h.

Referenced by save().

QList<QTreeWidgetItem*> KPlato::AccountsPanel::m_removedItems [private]

Definition at line 92 of file kptaccountspanel.h.

Referenced by buildCommand(), and slotRemoveItem().

Account* KPlato::AccountsPanel::m_oldDefaultAccount [private]

Definition at line 93 of file kptaccountspanel.h.

Referenced by save().

QHash<QString, QTreeWidgetItem*> KPlato::AccountsPanel::m_elements [private]

Definition at line 94 of file kptaccountspanel.h.

Referenced by addElement(), refreshDefaultAccount(), removeElement(), save(), and slotActivated().

int KPlato::AccountsPanel::m_currentIndex [private]

Definition at line 95 of file kptaccountspanel.h.

Referenced by refreshDefaultAccount(), and slotActivated().

QString KPlato::AccountsPanel::m_renameText [private]

Definition at line 96 of file kptaccountspanel.h.

QTreeWidgetItem* KPlato::AccountsPanel::m_renameItem [private]

Definition at line 97 of file kptaccountspanel.h.


The documentation for this class was generated from the following files:
Generated on Wed Nov 22 23:21:43 2006 for KPlato by  doxygen 1.5.1-p1