GnuCashew ~ Web Application compatible with GnuCash sql data files.
GCW
Loading...
Searching...
No Matches
Prefrences.cpp
Go to the documentation of this file.
1#line 2 "src/Dbo/Prefrences.cpp"
2
3#include <Wt/Json/Parser.h>
4#include <Wt/Json/Object.h>
5#include <Wt/Json/Serializer.h>
6
7#include "../App.h"
8#include "Prefrences.h"
9
11
12
17
18auto
21{
22 Wt::Dbo::Transaction t( GCW::app()-> gnucashew_session() );
23
24 GCW::Dbo::Prefrences::Item retVal( GCW::Dbo::Vars::get( "prefrences", "system" ) );
25
26 return retVal;
27
28} // endget()
29
30auto
32reverseBalanceAccounts() const-> GCW::Dbo::Prefrences::ReverseBalanceAccounts
33{
34// return GCW::Dbo::Prefrences::ReverseBalanceAccounts::NONE;
35// return GCW::Dbo::Prefrences::ReverseBalanceAccounts::INCOME_EXPENSE;
37}
38
39auto
42{
44 return true;
45
46// if( _value == AccountRegisterHighlight::NORMAL )
47// return true;
48
49 return false;
50
51} // endaccountRegisterHighlight( AccountRegisterHighlight _value ) const-> bool
52
53auto
55askOnDeleteForever() const-> bool
56{
57 return true;
58
59} // endaskOnDelete() const-> bool
60
61auto
66
67auto
69askOnDeleteThisSession() const-> bool
70{
71 return m_askOnDeleteThisSession;
72
73} // endaskOnDelete() const-> bool
74
75auto
77setAskOnDeleteThisSession( bool _state )-> void
78{
79 m_askOnDeleteThisSession = _state ;
80}
81
82
Wt::Dbo::ptr< Item > Ptr
Definition BaseItem.h:39
Variables Item Class.
Definition Prefrences.h:76
auto reverseBalanceAccounts() const -> ReverseBalanceAccounts
auto askOnDeleteThisSession() const -> bool
Item(GCW::Dbo::Vars::Item::Ptr _varItem)
auto setAskOnDeleteForever(bool _state) -> void
auto setAskOnDeleteThisSession(bool _state) -> void
static bool m_askOnDeleteThisSession
Definition Prefrences.h:92
auto askOnDeleteForever() const -> bool
auto accountRegisterHighlight(AccountRegisterHighlight _value) const -> bool
ReverseBalanceAccounts
Reversed Balance Accounts.
Definition Prefrences.h:40
@ CREDIT
credit account balances are reversed
AccountRegisterHighlight
Account Register Highlighting.
Definition Prefrences.h:59
@ NEGVAL_EXTRA
extra handling - neg values are gold-background-full-line
auto get() -> GCW::Dbo::Prefrences::Item
auto get(const std::string &_keyValue, const std::string &_cfyValue="*", bool _add=true) -> GCW::Dbo::Vars::Item::Ptr
Definition Vars.cpp:16
Definition App.h:18
App * app()
Definition App.cpp:75