GnuCashew ~ GnuCash Enabled Web
GCW
AccountEditor.h
Go to the documentation of this file.
1 #line 2 "src/Gui/AccountEditor.h"
2 
3 #ifndef __GUI_ACCOUNTEDITOR_H___
4 #define __GUI_ACCOUNTEDITOR_H___
5 
6 #include <Wt/WContainerWidget.h>
7 #include <Wt/WDialog.h>
8 #include <Wt/WLineEdit.h>
9 #include <Wt/WTabWidget.h>
10 #include <Wt/WTemplateFormView.h>
11 
12 #include "../GnuCashew.h"
13 #include "AccountsTreeView.h"
14 
15 namespace GCW {
16  namespace Gui {
17 
18 /*!
19 ** \brief Account Editor
20 **
21 */
23 : public Wt::WContainerWidget
24 {
25  class Tab1
26  : public Wt::WContainerWidget
27  {
28  public:
29 
30  Tab1( const std::string & _accountGuid );
31 
32  Wt::WLineEdit * m_name = nullptr ;
33  Wt::WLineEdit * m_code = nullptr ;
34  Wt::WLineEdit * m_desc = nullptr ;
36  Wt::WLineEdit * m_accountType = nullptr ;
37  Wt::WLineEdit * m_security = nullptr ;
38  Wt::WLineEdit * m_fraction = nullptr ;
39  Wt::WLineEdit * m_color = nullptr ;
40  Wt::WLineEdit * m_notes = nullptr ;
41  Wt::WLineEdit * m_placeholder = nullptr ;
42  Wt::WLineEdit * m_hidden = nullptr ;
43  Wt::WLineEdit * m_autoTransfer = nullptr ;
44  Wt::WLineEdit * m_taxRelated = nullptr ;
45  Wt::WLineEdit * m_openingBalance = nullptr ;
46 
47  std::string m_accountGuid;
48  };
49 
50  class Tab2
51  : public Wt::WContainerWidget
52  {
53  public:
54 
55  Tab2( const std::string & _accountGuid );
56 
57  std::string m_accountGuid;
58  };
59 
60  public:
61 
62  AccountEditor( const std::string & _accountGuid );
63 
64  Wt::WTabWidget * tabWidget() { return m_tabWidget; }
65 
66  auto t1()-> Tab1 * { return m_t1; }
67  auto t2()-> Tab2 * { return m_t2; }
68 
69  auto save ()-> Wt::Signal<> & { return m_save; }
70  auto cancel ()-> Wt::Signal<> & { return m_cancel; }
71 
72  private:
73 
74  auto do_help ()-> void;
75  auto do_cancel ()-> void;
76  auto do_ok ()-> void;
77 
78  std::string m_accountGuid ;
79  Wt::Signal<> m_save ;
80  Wt::Signal<> m_cancel ;
81  Wt::WTabWidget * m_tabWidget = nullptr ;
82  Tab1 * m_t1 = nullptr ;
83  Tab2 * m_t2 = nullptr ;
84 
85 }; // endclass AccountEditor
86 
88 : public Wt::WDialog
89 {
90  public:
91 
92  AccountEditorDialog( const std::string & _accountGuid );
93 
94  private:
95 
96 }; // endclass AccountEditorDialog
97 
98  } //endnamespace Gui {
99 } // endnamespace GCW {
100 
101 #endif // end __GUI_ACCOUNTSWIDGET_H___
102 
103 
104 
AccountEditorDialog(const std::string &_accountGuid)
Wt::WLineEdit * m_autoTransfer
Definition: AccountEditor.h:43
GCW::Gui::AccountsTreeView * m_parent
Definition: AccountEditor.h:35
Wt::WLineEdit * m_openingBalance
Definition: AccountEditor.h:45
Tab1(const std::string &_accountGuid)
Tab2(const std::string &_accountGuid)
auto save() -> Wt::Signal<> &
Definition: AccountEditor.h:69
Wt::WTabWidget * m_tabWidget
Definition: AccountEditor.h:81
auto t1() -> Tab1 *
Definition: AccountEditor.h:66
auto t2() -> Tab2 *
Definition: AccountEditor.h:67
AccountEditor(const std::string &_accountGuid)
Wt::WTabWidget * tabWidget()
Definition: AccountEditor.h:64
auto cancel() -> Wt::Signal<> &
Definition: AccountEditor.h:70
Definition: App.h:17