GnuCashew ~ GnuCash Enabled Web
GCW
CentralWidget.h
Go to the documentation of this file.
1 #line 2 "src/Gui/CentralWidget.h"
2 
3 #ifndef __GUI_CENTRALWIDGET_H___
4 #define __GUI_CENTRALWIDGET_H___
5 
6 #include <Wt/WContainerWidget.h>
7 #include <Wt/WGridLayout.h>
8 #include <Wt/WTabWidget.h>
9 
10 #include "AccountsTreeView.h"
11 #include "AccountRegister.h"
12 #include "Customer/MainWidget.h"
13 
14 namespace GCW {
15  namespace Gui {
16  class AccountsTreeView;
17 
18 /*!
19 ** \brief Main GnuCashew Central Widget
20 **
21 ** This widget acts as a 'tab widget manager' for controlling
22 ** what views (widgets) are presented to the user in the main
23 ** central display widget. The central widget fills up the
24 ** lion's share of the MainWidget area.
25 **
26 ** \ref see also; MainWidget
27 **
28 */
30 : public Wt::WContainerWidget
31 {
32  public:
33 
34  CentralWidget();
35 
36  auto tabWidget() -> Wt::WTabWidget * { return m_tabWidget; }
39 
40  auto open_AccountRegister ( const std::string & _accountGuid )-> void;
41  auto open_CustomersWidget ( )-> void;
42  auto open_EmployeesWidget ( )-> void;
43  auto open_CustomerReportWidget ( const std::string & _customerGuid )-> void;
44  auto open_BillPayWidget ( )-> void;
45  auto open_TablesWidget ( )-> void;
46 
47  /*!
48  ** \brief Index of Tab matching 'text'
49  **
50  ** Return the index of the tab with the
51  ** matching text.
52  **
53  ** This is used when opening new windows. When opening a new window, the
54  ** system will first check if the window is already open. For instance,
55  ** if the "Customers Widget" is requested, the system will first check, by
56  ** way of "tab-name" if there is a tab that is already open. If so, the
57  ** user is switched to the open tab, rather than creating a new tab.
58  **
59  */
60  auto tabIndex( const std::string & _text )-> int ;
61 
62  auto test()-> void ;
63 
64  private:
65 
66  Wt::WGridLayout * m_gridLayout = nullptr ;
67  Wt::WTabWidget * m_tabWidget = nullptr ;
70 
71 }; // endclass CentralWidget
72 
73  } // endnamespace Gui {
74 } // endnamespace GCW {
75 
76 #endif // end#ifndef __CENTRALWIDGET_H___
77 
78 
Main GnuCashew Central Widget.
Definition: CentralWidget.h:31
auto tabWidget() -> Wt::WTabWidget *
Definition: CentralWidget.h:36
auto open_BillPayWidget() -> void
auto customersWidget() -> GCW::Gui::Customer::MainWidget *
Definition: CentralWidget.h:38
auto open_AccountRegister(const std::string &_accountGuid) -> void
auto open_EmployeesWidget() -> void
GCW::Gui::AccountsTreeView * m_accountsTreeView
Definition: CentralWidget.h:68
auto tabIndex(const std::string &_text) -> int
Index of Tab matching 'text'.
auto accountsTreeView() -> GCW::Gui::AccountsTreeView *
Definition: CentralWidget.h:37
Wt::WGridLayout * m_gridLayout
Definition: CentralWidget.h:66
CentralWidget()
Central Widget.
auto open_CustomerReportWidget(const std::string &_customerGuid) -> void
auto open_TablesWidget() -> void
auto open_CustomersWidget() -> void
Wt::WTabWidget * m_tabWidget
Definition: CentralWidget.h:67
GCW::Gui::Customer::MainWidget * m_customersWidget
Definition: CentralWidget.h:69
Customer Overview.
Definition: MainWidget.h:23
Definition: App.h:17