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 |
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.
FdJournalFactory::FdJournalFactory | ( | EntryItemType | type, |
const FdTabCoa * | coa | ||
) |
Definition at line 5 of file FdJournalFactory.cpp.
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.
|
private |
Definition at line 20 of file FdJournalFactory.hpp.
|
private |
Definition at line 19 of file FdJournalFactory.hpp.