GnuCashew ~ GnuCash Enabled Web
GCW
MainWidget.h
Go to the documentation of this file.
1 #line 2 "src/Gui/Customer/MainWidget.h"
2 
3 #ifndef __GUI_CUSTOMER_MAINWIDGET_H___
4 #define __GUI_CUSTOMER_MAINWIDGET_H___
5 
6 #include <Wt/WContainerWidget.h>
7 #include <Wt/WTableView.h>
8 
9 #include "../../Eng/CustomersModel.h"
10 #include "Invoices.h"
11 
12 namespace GCW {
13  namespace Gui {
14  namespace Customer {
15 
16 /*!
17 ** \brief Customer Overview
18 **
19 **
20 */
22 : public Wt::WContainerWidget
23 {
24  public:
26 
27  MainWidget();
28 
29  std::shared_ptr< Model > model () const { return m_model; }
30  Wt::WTableView * view () const { return m_view; }
31 
32  Wt::Signal< std::string > & doubleClicked() { return m_doubleClicked; }
33 
34  std::string selectedAccount() const;
35 
36  void editAccount( const std::string & _accountGuid );
38 
39  Wt::Json::Object toJson() const;
40  bool fromJson( const Wt::Json::Object & _jobj );
41 
42 
43  private:
44 
45  void setModel();
46  void doubleClicked( const Wt::WModelIndex & index, const Wt::WMouseEvent & event );
47 
48  Wt::WTableView * m_view = nullptr ;
49  std::shared_ptr< Model > m_model ;
50  std::vector< std::string > m_columns ;
51  Wt::Signal< std::string > m_doubleClicked ;
53 
54 }; // endclass MainWidget
55 
56  } // endnamespace Customer {
57  } // endnamespace Gui {
58 } // endnamespace GCW {
59 
60 #endif // end __GUI_CUSTOMER_MAINWIDGET_H___
61 
62 
Customer Overview.
Definition: MainWidget.h:23
Wt::Signal< std::string > & doubleClicked()
Definition: MainWidget.h:32
std::string selectedAccount() const
bool fromJson(const Wt::Json::Object &_jobj)
void editAccount(const std::string &_accountGuid)
std::shared_ptr< Model > m_model
Definition: MainWidget.h:49
Wt::WTableView * view() const
Definition: MainWidget.h:30
std::shared_ptr< Model > model() const
Definition: MainWidget.h:29
std::vector< std::string > m_columns
Definition: MainWidget.h:50
Wt::Signal< std::string > m_doubleClicked
Definition: MainWidget.h:51
Wt::Json::Object toJson() const
GCW::Gui::Customer::Invoices * m_invoicesView
Definition: MainWidget.h:52
Definition: App.h:17