GnuCashew ~ Web Application compatible with GnuCash sql data files.
GCW
Loading...
Searching...
No Matches
Editor.h
Go to the documentation of this file.
1#line 2 "src/Gui/AccountRegister/Editor.h"
2
3#ifndef __GUI_ACCOUNTREGISTER_EDITOR_H___
4#define __GUI_ACCOUNTREGISTER_EDITOR_H___
5
6#include <Wt/Json/Object.h>
7#include <Wt/WBatchEditProxyModel.h>
8#include <Wt/WContainerWidget.h>
9#include <Wt/WSortFilterProxyModel.h>
10#include <Wt/WStandardItem.h>
11#include <Wt/WStandardItemModel.h>
12#include <Wt/WItemDelegate.h>
13#include <Wt/WPopupMenu.h>
14
15#include "../../GnuCashew.h"
16#include "../TableView.h"
17#include "Model.h"
18
19namespace GCW {
20 namespace Gui {
21 namespace AccountRegister {
22 class DelegateHeader ;
23 class DelegateDate ;
24 class DelegateSuggestion ;
25 class DelegateSuggestion ;
26 class DelegateAccount ;
27 class DelegateReconcile ;
28 class DelegateValue ;
29 class DelegateValue ;
30 class DelegateBalance ;
31
32
33/*!
34** \brief Account Register Editor
35**
36** This object is a controller for editing of line items in the Account Register. The editor
37** is a local(friend?) to the account register object that provides the delegates for the
38** table view, and manipulates the delegates in relation to each other so as to be able to
39** handle tabbing, up and down arrowing, and so on, within the table view, and keeping all
40** the editors open, and saving them correctly when the user is done bla bla bla.
41*/
42class Editor
43{
44 public:
45
46 /*!
47 ** \brief Empty ctor
48 */
49 Editor();
50
51 /*!
52 ** \brief ctor for TableView
53 **
54 ** This constructor connects the editor directly to
55 ** the table view. It automatically grabs the
56 ** delegates.
57 */
58 Editor( GCW::Gui::TableView * _tableView );
59
60 /*!
61 ** \brief Apply Delegates
62 **
63 ** This will create and apply the delegates to the table.
64 **
65 */
66 static auto applyDelegates( GCW::Gui::TableView * _tableView )-> void ;
67
68 /*!
69 ** \brief Table View
70 */
72
73 /*!
74 ** \brief Edit Row
75 */
76 auto editRow( Wt::WModelIndex _index )-> void ;
77
78 auto setDirty( Wt::WModelIndex _index ) const-> void ;
79
80 /*!
81 ** \brief Delegate Handles
82 **
83 ** These functions return the cast< Delegate > value so the correct
84 ** delegate can be accessed
85 */
86 auto delegateHeader ()-> std::shared_ptr< DelegateHeader > ; //
87 auto delegateDate ()-> std::shared_ptr< DelegateDate > ; // 0
88 auto delegateNum ()-> std::shared_ptr< DelegateSuggestion > ; // 1
89 auto delegateMemo ()-> std::shared_ptr< DelegateSuggestion > ; // 2
90 auto delegateAcct ()-> std::shared_ptr< DelegateAccount > ; // 3
91 auto delegateReco ()-> std::shared_ptr< DelegateReconcile > ; // 4
92 auto delegateDr ()-> std::shared_ptr< DelegateValue > ; // 5
93 auto delegateCr ()-> std::shared_ptr< DelegateValue > ; // 6
94 auto delegateBal ()-> std::shared_ptr< DelegateBalance > ; // 7
95
96 private:
97
98 auto model( Wt::WModelIndex _index )-> Model * ;
99
102
103}; // endclass Editor
104
105 } // endnamespace AccountRegister {
106 } // endnamespace Gui {
107} // endnamespace GCW {
108
109#endif // end __GUI_ACCOUNTREGISTER_EDITOR_H___
110
111
112
Account Register Editor.
Definition Editor.h:43
auto delegateNum() -> std::shared_ptr< DelegateSuggestion >
Definition Editor.cpp:79
auto delegateMemo() -> std::shared_ptr< DelegateSuggestion >
Definition Editor.cpp:90
GCW::Gui::TableView * m_tableView
Definition Editor.h:101
auto tableView() -> GCW::Gui::TableView *
Table View.
Definition Editor.h:71
auto model(Wt::WModelIndex _index) -> Model *
Definition Editor.cpp:48
auto setDirty(Wt::WModelIndex _index) const -> void
Definition Editor.cpp:256
auto delegateDate() -> std::shared_ptr< DelegateDate >
Definition Editor.cpp:68
auto delegateCr() -> std::shared_ptr< DelegateValue >
Definition Editor.cpp:134
auto editRow(Wt::WModelIndex _index) -> void
Edit Row.
Definition Editor.cpp:172
auto delegateBal() -> std::shared_ptr< DelegateBalance >
Definition Editor.cpp:145
auto delegateHeader() -> std::shared_ptr< DelegateHeader >
Delegate Handles.
Definition Editor.cpp:57
auto delegateDr() -> std::shared_ptr< DelegateValue >
Definition Editor.cpp:123
auto delegateAcct() -> std::shared_ptr< DelegateAccount >
Definition Editor.cpp:101
auto delegateReco() -> std::shared_ptr< DelegateReconcile >
Definition Editor.cpp:112
static auto applyDelegates(GCW::Gui::TableView *_tableView) -> void
Apply Delegates.
Definition Editor.cpp:156
Account Register Model.
Definition Model.h:30
Custom Table View Class.
Definition TableView.h:25
Definition App.h:18