1 #line 2 "src/Eng/AccountRegisterModel.h"
3 #ifndef __ENG_ACCOUNTREGISTERMODEL_H___
4 #define __ENG_ACCOUNTREGISTERMODEL_H___
6 #include <Wt/WStandardItemModel.h>
8 #include "../GnuCashew.h"
22 :
public Wt::WStandardItemModel
24 using RowItem = std::vector< std::unique_ptr< Wt::WStandardItem > >;
64 auto isDeletable(
const Wt::WModelIndex & _index )-> bool ;
67 auto isEditable(
const Wt::WModelIndex & _index )-> bool ;
75 auto getSplitGuid(
const Wt::WModelIndex & _index )-> std::string ;
90 auto getDate(
const Wt::WModelIndex & _index )-> Wt::WDateTime;
96 auto getAction(
const Wt::WModelIndex & _index )-> std::string;
102 auto getDescription(
const Wt::WModelIndex & _index )-> std::string;
120 auto getReconcile(
const Wt::WModelIndex & _index )-> std::string;
184 auto setData(
const Wt::WModelIndex & _index,
const Wt::cpp17::any & _value, Wt::ItemDataRole _role )-> bool ;
211 auto getString(
const Wt::WModelIndex & _index,
int column )-> std::string;
213 auto saveToDisk(
const Wt::WModelIndex & _index )-> void ;
216 template <
typename T>
217 bool matchValue(
const Wt::cpp17::any & _any1,
const Wt::cpp17::any & _any2 )
219 auto v1 = Wt::cpp17::any_cast< T >( _any1 );
220 auto v2 = Wt::cpp17::any_cast< T >( _any2 );
auto getCredit(const Wt::WModelIndex &_index) -> GCW_NUMERIC
Get Credit value.
Wt::Signal< Wt::WModelIndex > m_goneDirty
auto getBalance(const Wt::WModelIndex &_index) -> GCW_NUMERIC
auto getDescription(const Wt::WModelIndex &_index) -> std::string
Get Description.
AccountRegisterModel(const std::string &_accountGuid="", bool _editable=true)
ctor
auto makeRow(const std::string &_splitGuid) -> RowItem
auto getTransferText(const Wt::WModelIndex &_index) -> std::string
Get Transfer Account Text.
auto setAccountGuid(const std::string &_accountGuid) -> void
auto reconciled() const -> GCW_NUMERIC
auto setDoubleLine(bool _doubleLine) -> void
auto getValue(const Wt::WModelIndex &_index) -> GCW_NUMERIC
Get Value (positive or negative)
auto goneDirty() -> Wt::Signal< Wt::WModelIndex > &
auto suggestionsFromColumn(int _column) const -> std::set< std::string >
Column Suggestions.
auto setData(const Wt::WModelIndex &_index, const Wt::cpp17::any &_value, Wt::ItemDataRole _role) -> bool
auto setViewMode(ViewMode _viewMode) -> void
auto getReconcile(const Wt::WModelIndex &_index) -> std::string
Get Reconciliation.
auto getDate(const Wt::WModelIndex &_index) -> Wt::WDateTime
Get Date from the index.
std::string m_accountGuid
Account GUID.
auto getString(const Wt::WModelIndex &_index, int column) -> std::string
auto isDeletable(const Wt::WModelIndex &_index) -> bool
Is Read Only.
auto future() const -> GCW_NUMERIC
Wt::WStandardItem * ColItem
auto getSplitGuid(const Wt::WModelIndex &_index) -> std::string
Get GUID from row.
auto getTransferGuid(const Wt::WModelIndex &_index) -> std::string
Get Transfer Account GUID.
auto refreshFromDisk() -> void
Refresh From Disk.
auto isEditable(int _row) -> bool
std::vector< std::unique_ptr< Wt::WStandardItem > > RowItem
auto getAction(const Wt::WModelIndex &_index) -> std::string
Get Action.
bool m_editable
Editable Indicator.
auto saveToDisk() -> void
auto cleared() const -> GCW_NUMERIC
auto getDebit(const Wt::WModelIndex &_index) -> GCW_NUMERIC
Get Debit value.
@ BASIC_LEDGER
basic one-line per transaction
@ AUTOSPLIT_LEDGER
one-line ledger that auto-opens to multi-line for each selected row
@ TRANSACTION_JOURNAL
self explanatory
auto getNumeric(const Wt::WModelIndex &_index) -> GCW_NUMERIC
Get numeric value.
auto present() const -> GCW_NUMERIC
auto viewMode() const -> ViewMode
auto projected() const -> GCW_NUMERIC
auto doubleLine() const -> bool
#define GCW_NUMERIC
Internal Numeric Type.