1 #line 2 "src/Gui/BillPay/Table.cpp"
3 #include <Wt/WModelIndex.h>
4 #include <Wt/WStandardItem.h>
6 #include "../../Dbo/Accounts/Accounts.h"
23 setSortingEnabled (
false );
24 setSelectionBehavior ( Wt::SelectionBehavior::Rows );
25 setSelectionMode ( Wt::SelectionMode::Single );
26 setAlternatingRowColors (
true );
32 m_model = std::make_shared< Model >( _selectedMonth, _status );
44 for(
int col=0; col<
m_model-> columnCount(); col++ )
46 setColumnWidth ( col,
m_model-> columnDef(col).width );
47 setColumnAlignment( col,
m_model-> columnDef(col).alignment );
57 int selected_row = -1;
59 if( selectedIndexes().size() > 0 )
61 selected_row = selectedIndexes().begin()-> row();
64 m_model-> loadData( _month );
66 if( selected_row > -1 )
68 select( m_model-> index( selected_row, 0 ) );
std::shared_ptr< Model > m_model
Table(int _selectedMonth, const Status _status)
void setMonth(int _month)
std::string asStyleClass(Status _status)
Get Status as Style Class.