GnuCashew ~ Web Application compatible with GnuCash sql data files.
GCW
Loading...
Searching...
No Matches
SummaryWidget.h
Go to the documentation of this file.
1#line 2 "src/Gui/BillPay/SummaryWidget.h"
2
3#ifndef __GUI_BILLPAY_SUMMARYWIDGET_H___
4#define __GUI_BILLPAY_SUMMARYWIDGET_H___
5
6#include <Wt/WContainerWidget.h>
7#include <Wt/WLabel.h>
8#include <Wt/WTemplate.h>
9#include <Wt/WText.h>
10#include <Wt/WTable.h>
11
12namespace GCW {
13 namespace Gui {
14 namespace BillPay {
15
16/*!
17** \brief Summary Widget
18**
19** Bill Pay Summary Widget
20**
21*/
24{
25 public:
26
28
29 auto showSummaryDetail( bool _state ) -> void ;
30
31 auto setDate( int _month, int _year ) -> void ;
32
33 /*
34 ** clicking on the pay-from account causes
35 ** an ID to be emitted allowing the table-view
36 ** to be positioned on the same item.
37 */
39
40 private:
41
42 /*
43 ** this builds the whole report
44 */
45 auto refreshReport() -> void ;
46
47
48 /*
49 ** this generates the report in to the
50 ** table provided.
51 */
53
54 /*
55 ** This formats the data in to a formatted HTML report suitable
56 ** for printing
57 */
58 auto outputReport() -> void ;
59
60 typedef struct DAYTOTAL_S
61 {
62 int day ;
63 std::string bank ;
66
67
68 /*!
69 ** \brief Summary Splits
70 **
71 ** This is a convenience class to help manipulate all
72 ** of the splits associated with a Summary View. It
73 ** facilitates the rapid query of the various values
74 ** that are needed for the summary report.
75 **
76 */
77 class Splits
78 {
79 public:
80
81 /*!
82 ** \brief ctor
83 **
84 ** The splits are manipulated by month, since the
85 ** summary report shows all of the split values
86 ** for that selected month.
87 **
88 */
89 Splits( int _month, int _year );
90
91 /*
92 ** this returns all the guids of all the splits found.
93 */
94 auto splitGuids () const-> const std::vector< std::string > & ;
95
96 /*
97 ** return all the days represented by all the splits
98 */
99 auto days() const-> std::set< int > ;
100
101 /*
102 ** return a list of payments made on a day
103 */
104 auto dayPayments( int _day ) const-> std::vector< std::string > ;
105
106 /*
107 ** return all the pay-froms represented
108 */
109 auto payFroms() const-> std::set< std::string > ;
110
111 /*
112 ** return all the days represented by this one payFrom account
113 */
114 auto payFromDays( const std::string & _payFrom ) const-> std::set< int > ;
115
116 /*
117 ** return all the payment splits that were paid from this
118 ** account and paid on this day
119 */
120 auto paymentSplits( const std::string & _payFrom, int _day ) const-> std::vector< std::string > ;
121
122 /*
123 ** selected month
124 */
125 int m_month = -1;
126
127 /*
128 ** selected year
129 */
130 int m_year = -1;
131
132 /*
133 ** splits found in selected month
134 */
135 std::vector< std::string > m_splitGuids;
136
137 }; // endclass Splits
138
139 int m_month = -1 ;
140 int m_year = -1 ;
146
147}; // endclass SummaryWidget
148
149 } // endnamespace BillPay {
150 } // endnamespace Gui {
151} // endnamespace GCW {
152
153#endif // __GUI_BILLPAY_SUMMARYWIDGET_H___
154
155
auto payFromDays(const std::string &_payFrom) const -> std::set< int >
auto payFroms() const -> std::set< std::string >
std::vector< std::string > m_splitGuids
auto splitGuids() const -> const std::vector< std::string > &
auto dayPayments(int _day) const -> std::vector< std::string >
auto paymentSplits(const std::string &_payFrom, int _day) const -> std::vector< std::string >
auto days() const -> std::set< int >
Wt::Signal< std::string > m_clicked
auto setDate(int _month, int _year) -> void
auto showSummaryDetail(bool _state) -> void
struct GCW::Gui::BillPay::SummaryWidget::DAYTOTAL_S DayTotal_t
auto clicked() -> Wt::Signal< std::string > &
auto generateReport(Wt::WTable *_table, bool _showDetail) -> void
Widget * addNew(Args &&...args)
#define GCW_NUMERIC
Internal Numeric Type.
Definition gcwglobal.h:40
Definition App.h:18