GnuCashew ~ GnuCash Enabled Web
GCW
MainWidget.h
Go to the documentation of this file.
1 #line 2 "src/Gui/BillPay/MainWidget.h"
2 
3 #ifndef __GUI_BILLPAY_MAINWIDGET_H___
4 #define __GUI_BILLPAY_MAINWIDGET_H___
5 
6 #include <Wt/WGridLayout.h>
7 #include <Wt/WContainerWidget.h>
8 
9 #include "EditWidget.h"
10 #include "SummaryWidget.h"
11 #include "TableView.h"
12 #include "ToolBar.h"
13 
14 namespace GCW {
15  namespace Gui {
16  namespace BillPay {
17 
18 /*!
19 ** \brief Bill Pay Widget
20 **
21 **
22 */
24 : public Wt::WContainerWidget
25 {
26  public:
27 
28  MainWidget();
29 
30  private:
31 
32  auto buildContent()-> void ;
33  auto do_addClicked()-> void ;
34  auto do_editClicked()-> void ;
35  auto do_disabledClicked()-> void ;
36  auto do_summaryClicked()-> void ;
37  auto addClicked()-> void ;
38  auto editClicked( TableView * _table, Wt::WModelIndex _index )-> void ;
39  auto openEditor( const std::string & _bpGuid )-> void ;
40  auto buttonChanged( Wt::WRadioButton * _button )-> void ;
41  auto setMonth( int _month )-> void ;
42  auto refreshViews()-> void ;
43  auto importClicked()-> void ;
44  auto exportClicked()-> void ;
45 
46  std::unique_ptr< EditWidgetDialog > m_dialog ;
47 
48  /*
49  ** The edit widget gets loaded and unloaded for the
50  ** editing functions. Using an observing pointer
51  ** let's us know automatically when the editor is
52  ** open and when it's not.
53  **
54  */
55  Wt::Core::observing_ptr< EditWidget > m_editWidget ;
56 
57  ToolBar * m_toolBar = nullptr ;
58  TableView * m_pendingView = nullptr ;
59  TableView * m_paidView = nullptr ;
60  TableView * m_unpaidView = nullptr ;
61  TableView * m_disabledView = nullptr ;
63 
64  auto on_headerClicked( int _col, const Wt::WMouseEvent _me )-> void ;
65 
66  /*!
67  ** \brief Selected Index
68  **
69  ** When single-clicking through the interface, the currently selected
70  ** (clicked) item, so that if the 'edit' button is hit, we'll know
71  ** which was the last item clicked. This is important because there
72  ** are three possible table-views containing items, and we're never
73  ** sure which was the last table clicked in. So, on-click, in any of
74  ** the three tables, the clicked-item index will be stored here.
75  **
76  */
77  Wt::WModelIndex m_selectedIndex;
78  int m_selectedMonth = -1;
79 
80 // Wt::WGridLayout * m_gridLayout = nullptr ;
81  Wt::WHBoxLayout * m_hlw = nullptr ;
82 
83 }; // endclass MainWidget
84 
85  } // endnamespace BillPay {
86  } // endnamespace Gui {
87 } // endnamespace GCW {
88 
89 #endif // __GUI_BILLPAY_MAINWIDGET_H___
90 
91 
auto buttonChanged(Wt::WRadioButton *_button) -> void
Definition: MainWidget.cpp:246
Wt::WModelIndex m_selectedIndex
Selected Index.
Definition: MainWidget.h:77
Wt::WHBoxLayout * m_hlw
Definition: MainWidget.h:81
auto openEditor(const std::string &_bpGuid) -> void
Definition: MainWidget.cpp:157
auto editClicked(TableView *_table, Wt::WModelIndex _index) -> void
Definition: MainWidget.cpp:230
auto do_disabledClicked() -> void
Definition: MainWidget.cpp:270
auto do_summaryClicked() -> void
Definition: MainWidget.cpp:278
SummaryWidget * m_summaryView
Definition: MainWidget.h:62
auto setMonth(int _month) -> void
Definition: MainWidget.cpp:291
auto on_headerClicked(int _col, const Wt::WMouseEvent _me) -> void
Definition: MainWidget.cpp:332
Wt::Core::observing_ptr< EditWidget > m_editWidget
Definition: MainWidget.h:55
std::unique_ptr< EditWidgetDialog > m_dialog
Definition: MainWidget.h:46
Definition: App.h:17