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