GnuCashew ~ GnuCash Enabled Web
GCW
RawTableWidget.h
Go to the documentation of this file.
1 #line 2 "src/Gui/RawTableWidget.h"
2 
3 #ifndef __GUI_RAWTABLEWIDGET_H___
4 #define __GUI_RAWTABLEWIDGET_H___
5 
6 #include <Wt/WContainerWidget.h>
7 #include <Wt/Dbo/QueryModel.h>
8 #include <Wt/WPushButton.h>
9 #include <Wt/WLineEdit.h>
10 #include <Wt/WToolBar.h>
11 
12 //#include "../GnuCashew.h"
13 #include "TableView.h"
14 
15 
16 namespace GCW {
17  namespace Gui {
18 
19 /*!
20 ** \brief SlotsWidget
21 **
22 ** The 'slots' table is used to 'extend' data in the various areas, such as notes on
23 ** transactions and so forth.
24 **
25 */
26 template <class C>
28 : public Wt::WContainerWidget
29 {
30  private:
31 
32  public:
33 
34  /*!
35  ** \brief Model
36  **
37  ** An alias for the Model.
38  **
39  */
40  using Model = Wt::Dbo::QueryModel< typename C::Ptr >;
41 
42  /*!
43  ** \brief Constructor
44  **
45  */
46  RawTableWidget( const std::string & _viewName );
47 
48  /*!
49  ** \brief Table View
50  **
51  **
52  **
53  */
54  auto tableView ()-> GCW::Gui::TableView * { return m_tableView; }
55 
56  auto model ()-> std::shared_ptr< Model > { return m_model; }
57 
58  protected:
59 
60  auto load()-> void;
61 
62  private:
63 
64  auto loadData()-> void;
65 
66  std::shared_ptr< Model > m_model;
67  Wt::WToolBar * m_toolBar = nullptr;
69  Wt::WContainerWidget * m_statusBar = nullptr;
70 
71 }; // endclass RawTableWidget
72 
73  } // endnamespace Gui {
74 } // endnamespace GCW {
75 
76 #ifndef __GUI_RAWTABLEWIDGETIMPL_H___
77 #include "RawTableWidget_impl.h"
78 #endif // __GUI_RAWTABLEWIDGETIMPL_H___
79 
80 #endif // end __GUI_RAWTABLEWIDGET_H___
81 
82 
GCW::Gui::TableView * m_tableView
RawTableWidget(const std::string &_viewName)
Constructor.
auto model() -> std::shared_ptr< Model >
auto tableView() -> GCW::Gui::TableView *
Table View.
Wt::Dbo::QueryModel< typename C::Ptr > Model
Model.
std::shared_ptr< Model > m_model
Wt::WContainerWidget * m_statusBar
Wt::WToolBar * m_toolBar
Custom Table View Class.
Definition: TableView.h:24
Definition: App.h:17