GnuCashew ~ Web Application compatible with GnuCash sql data files.
GCW
Loading...
Searching...
No Matches
ViewMode.h
Go to the documentation of this file.
1#line 2 "src/Gui/AccountRegister/ViewMode.h"
2
3#ifndef __ENG_ACCOUNTREGISTER_VIEWMODE_H___
4#define __ENG_ACCOUNTREGISTER_VIEWMODE_H___
5
6#include <Wt/WDateTime.h>
7#include <Wt/WStandardItemModel.h>
8
9namespace GCW {
10 namespace Gui {
11 namespace AccountRegister {
12
13/*!
14** \brief View Mode
15**
16** The View Mode defines how the data in the model is assembled. The simplest form is the
17** one-line register, which is also the most compact. The next mode is the Auto-Split
18** ledger. The auto-split ledger looks just like the one-line register except for the
19** line that is currently selected, which is formatted as a transaction-journal, but just for
20** that one selected line. The final format is the transaction-journal, which is like the
21** auto-split register but every row is already split out. The General Journal is the same
22** as the Transaction Journal but it shows every account, and does not compute balances.
23**
24*/
25enum class ViewMode
26{
27 /// basic one-line per transaction
29
30 /// one-line ledger that auto-opens to multi-line for each selected row
32
33 /// multi-line ledger for every row
35
36 /// multi-line ledger that shows all accounts and no balances
38
39}; // endenum class ViewMode
40
41/*
42** column definitions:
43**
44** 0,0 - date : transaction -> post_date
45** 0,1 - action : split -> action
46** 0,2 - description : transaction -> description
47** 0,3 - transfer : split -> {tx_guid 2nd split}
48** 0,4 - reconcile : split -> reconcile_state, reconcile_date
49** 0,5 - debit : split -> value_num, value_denom (+positive value)
50** 0,6 - credit : split -> value_num, value_denom (-negative value)
51** 1,2 - notes : split -> memo
52*/
53enum class Col : int
54{
55 DATE = 0,
56 ACTION = 1,
57 DESCRIPTION = 2,
58 TRANSFER = 3,
59 RECONCILE = 4,
60 DEBIT = 5,
61 CREDIT = 6,
62 BALANCE = 7,
63 NOTES = 2
64
65};
66
67constexpr int asInt( Col col ) noexcept
68{
69 return static_cast< int >( col );
70}
71
72 } // endnamespace AccountRegister {
73 } // endnamespace Gui {
74} // endnamespace GCW {
75
76#endif // #ifndef __ENG_ACCOUNTREGISTER_VIEWMODE_H___
77
78
constexpr int asInt(Col col) noexcept
Definition ViewMode.h:67
@ GENERAL_JOURNAL
multi-line ledger that shows all accounts and no balances
@ BASIC_LEDGER
basic one-line per transaction
@ AUTOSPLIT_LEDGER
one-line ledger that auto-opens to multi-line for each selected row
@ TRANSACTION_JOURNAL
multi-line ledger for every row
Definition App.h:18