GnuCashew ~ Web Application compatible with GnuCash sql data files.
GCW
Loading...
Searching...
No Matches
Gui/Customer/Invoices.cpp
Go to the documentation of this file.
1#line 2 "src/Gui/Customer/Invoices.cpp"
2
3#include <Wt/WHBoxLayout.h>
4
5#include "Invoices.h"
6
9{
10 // identify
11 addStyleClass( "Invoices" );
12
13 // layout
14 auto m_hlw = setLayout( std::make_unique< Wt::WHBoxLayout >() );
15
16 m_tableView = m_hlw-> addWidget( std::make_unique< Wt::WTableView >(), 1 );
17
18 std::vector< Wt::WFormModel::Field > fields =
19 {
24 };
25
26 m_model = std::make_shared< GCW::Eng::InvoicesModel >( fields );
27
28 m_tableView-> setModel( m_model );
29
32 {
33 std::cout << __FILE__ << ":" << __LINE__ << " " << _index.row() << std::endl;
34
35
36 });
37
38 auto delegate = m_tableView-> itemDelegate( 0 );
39
40 std::cout << __FILE__ << ":" << __LINE__ << " " << delegate << std::endl;
41
42} // endInvoices()
43
44auto
46setCustomerGuid( const std::string & _guid )-> void
47{
48 m_model-> setCustomerGuid( _guid );
49
50 std::cout << __FILE__ << ":" << __LINE__ << " " << m_model-> rowCount() << std::endl;
51
52 m_tableView-> setModel( m_model );
53
54} // endsetCustomerGuid( const std::string & _guid )-> void
55
56
57
auto setCustomerGuid(const std::string &_guid) -> void
std::shared_ptr< GCW::Eng::InvoicesModel > m_model
Widget * addNew(Args &&...args)
void setLayout(std::unique_ptr< WLayout > layout)
virtual void addWidget(std::unique_ptr< WWidget > widget)
EventSignal< WMouseEvent > & clicked()
virtual void addStyleClass(const WString &styleClass, bool force=false) override
const Wt::WFormModel::Field notes
const Wt::WFormModel::Field billing_id
const Wt::WFormModel::Field date_posted
const Wt::WFormModel::Field id