GnuCashew ~ GnuCash Enabled Web
GCW
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 
8 Invoices()
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 
30  m_tableView->
31  clicked().connect( [&]( Wt::WModelIndex _index, Wt::WMouseEvent _event )
32  {
33  std::cout << __FILE__ << ":" << __LINE__ << " " << _index.row() << std::endl;
34 
35 
36  });
37 
38 } // endInvoices()
39 
40 auto
42 setCustomerGuid( const std::string & _guid )-> void
43 {
44  m_model-> setCustomerGuid( _guid );
45 
46  std::cout << __FILE__ << ":" << __LINE__ << " " << m_model-> rowCount() << std::endl;
47 
48  m_tableView-> setModel( m_model );
49 
50 } // endsetCustomerGuid( const std::string & _guid )-> void
51 
52 
53 
auto setCustomerGuid(const std::string &_guid) -> void
Definition: Invoices.cpp:42
std::shared_ptr< GCW::Eng::InvoicesModel > m_model
Definition: Invoices.h:33
Wt::WTableView * m_tableView
Definition: Invoices.h:32
const Wt::WFormModel::Field notes
Definition: Definition.h:20
const Wt::WFormModel::Field billing_id
Definition: Definition.h:26
const Wt::WFormModel::Field date_posted
Definition: Definition.h:19
const Wt::WFormModel::Field id
Definition: Definition.h:17