1#line 2 "src/Gui/AccountRegister/Model.h"
3#ifndef __ENG_ACCOUNTREGISTER_MODEL_H___
4#define __ENG_ACCOUNTREGISTER_MODEL_H___
6#include <Wt/WDateTime.h>
7#include <Wt/WStandardItemModel.h>
9#include "../Glb/gcwglobal.h"
14 namespace Transaction {
20 namespace AccountRegister {
32 :
public std::vector< std::unique_ptr< Wt::WStandardItem > >
155 auto getSplitRow(
const std::string & _guid )-> int ;
238 auto makeColumnSet(
const std::string & _splitGuid )-> ColumnSet ;
255 auto setStyleClass(
int _row,
const std::string & _class )-> void ;
263 template <
typename T>
264 bool matchValue(
const Wt::cpp17::any & _any1,
const Wt::cpp17::any & _any2 )
266 auto v1 = Wt::cpp17::any_cast< T >( _any1 ) ;
267 auto v2 = Wt::cpp17::any_cast< T >( _any2 ) ;
ColumnSet(Wt::WModelIndex _index)
@ BasicRow
basic Ledger row, everything on one line
@ BlankRow
blank row, used for doubleLine
@ Condensed
row is condensed (using reduced columns, for small displays)
@ SplitLine
one of the split lines following SplitRow
@ SplitRow
split Ledger row, multiple lines follow
@ EmptyRow
empty row, used for nothing, undefined (shouldn't happen?)
int m_splitCount
Accumulators.
auto isDeletable(const Wt::WModelIndex &_index) -> bool
Is Deletable.
auto getDate(const Wt::WModelIndex &_index) -> Wt::WDateTime
Get Date from the index.
auto viewMode() const -> ViewMode
auto setViewMode(ViewMode _viewMode) -> void
auto getValue(const Wt::WModelIndex &_index) -> GCW_NUMERIC
Get Value (positive or negative)
auto getReconcile(const Wt::WModelIndex &_index) -> std::string
Get Reconciliation.
auto isReadOnly() -> bool
auto future() const -> GCW_NUMERIC
auto setStyleClass(int _row, const std::string &_class) -> void
auto setAccountGuid(const std::string &_accountGuid) -> void
auto getDebit(const Wt::WModelIndex &_index) -> GCW_NUMERIC
Get Debit value.
auto getAction(const Wt::WModelIndex &_index) -> std::string
Get Action.
auto projected() const -> GCW_NUMERIC
auto getCredit(const Wt::WModelIndex &_index) -> GCW_NUMERIC
Get Credit value.
auto present() const -> GCW_NUMERIC
auto getString(const Wt::WModelIndex &_index, int column) -> std::string
auto applyDoubleLine() -> void
auto setReadOnly(bool _state)
auto cleared() const -> GCW_NUMERIC
auto reconciled() const -> GCW_NUMERIC
auto goneDirty() -> Wt::Signal< Wt::WModelIndex > &
std::string m_accountGuid
Account GUID.
auto getNumeric(const Wt::WModelIndex &_index) -> GCW_NUMERIC
Get numeric value.
auto splitCount() -> int
Split Count.
bool m_readOnly
Editable Indicator.
auto getSplitGuid(const Wt::WModelIndex &_index) -> std::string
Get GUID from index.
auto removeStyleClass(int _row, const std::string &_class) -> void
auto refreshFromDisk() -> void
Refresh From Disk.
auto getDescription(const Wt::WModelIndex &_index) -> std::string
Get Description.
auto getBalance(const Wt::WModelIndex &_index) -> GCW_NUMERIC
Get Balance (positive or negative)
auto getSplitRow(const std::string &_guid) -> int
Get Split Row.
auto getTransferGuid(const Wt::WModelIndex &_index) -> std::string
Get Transfer Account GUID.
auto setDoubleLine(bool _doubleLine) -> void
auto doubleLine() const -> bool
auto isJumpable(const Wt::WModelIndex &_index) -> bool
Is Jumpable.
auto setData(const Wt::WModelIndex &_index, const Wt::cpp17::any &_value, Wt::ItemDataRole _role) -> bool
auto makeColumnSet(const std::string &_splitGuid) -> ColumnSet
Wt::Signal< Wt::WModelIndex > m_goneDirty
auto saveToDisk() -> void
auto suggestionsFromColumn(int _column) const -> std::set< std::string >
Column Suggestions.
auto getTransferText(const Wt::WModelIndex &_index) -> std::string
Get Transfer Account Text.
#define GCW_NUMERIC
Internal Numeric Type.
@ BASIC_LEDGER
basic one-line per transaction