FreeDebks  1.0.3
 All Classes Files Functions Variables Friends Pages
Public Member Functions | Private Attributes | List of all members
FdJournalFactory Class Reference

A QItemEditorFactory subclass to create editors for FdEntryItem. More...

#include <FdJournalFactory.hpp>

Public Member Functions

 FdJournalFactory (EntryItemType type, const FdTabCoa *coa)
QWidget * createEditor (QVariant::Type type, QWidget *parent) const

Private Attributes

EntryItemType mType
const FdTabCoa * mCoa

Detailed Description

A QItemEditorFactory subclass to create editors for FdEntryItem.

The data of FdEntryItem of type #DebitAccIdType, #DebitAccLabelType, #CreditAccIdType and #CreditAccLabelType has to match one id or label in the chart of accounts. This class provides a custom editor for these fields, that will help the user searching the correct value through a list.

Definition at line 15 of file FdJournalFactory.hpp.

Constructor & Destructor Documentation

FdJournalFactory::FdJournalFactory ( EntryItemType  type,
const FdTabCoa *  coa 
)

Definition at line 5 of file FdJournalFactory.cpp.

Member Function Documentation

QWidget * FdJournalFactory::createEditor ( QVariant::Type  type,
QWidget *  parent 
) const

Creates an editor to help users completing fields, by providing a completer. type can be of type #DebitAccIdType, #DebitAccLabelType, #CreditAccIdType or #CreditAccLabelType (note there is no difference between credit and debit type, only between id and label).

Retrieves data calling FdSubWindow::getAccountsIds() and FdSubWindow::getAccountsLabels().

Creates a QCompleter for a QLineEdit with the list retrieved previously.

Definition at line 12 of file FdJournalFactory.cpp.

Member Data Documentation

const FdTabCoa* FdJournalFactory::mCoa
private

Definition at line 20 of file FdJournalFactory.hpp.

EntryItemType FdJournalFactory::mType
private

Definition at line 19 of file FdJournalFactory.hpp.


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