FactDev  0.1
Gui::Widgets::WdgModels::BillingsTableModel Class Reference

The BillingsTableModel class for a Billing table. More...

#include <billingstablemodel.h>

Inheritance diagram for Gui::Widgets::WdgModels::BillingsTableModel:

Public Member Functions

 BillingsTableModel ()
 BillingsTableModel::BillingsTableModel Construct a BillingsTableModel. More...
 
int rowCount (const QModelIndex &) const
 BillingsTableModel::rowCount Number of billings row. More...
 
int columnCount (const QModelIndex &) const
 BillingsTableModel::columnCount Number of column of a Billing. More...
 
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const
 BillingsTableModel::data Obtains data of a specify cell. More...
 
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
 BillingsTableModel::headerData Obtains header title of table. More...
 
bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
 BillingsTableModel::setData Change data of a cell. More...
 
void append (const Billing &billing)
 BillingsTableModel::append Add a new line in table. More...
 
void remove (const int i)
 BillingsTableModel::remove Remove a line. More...
 
Qt::ItemFlags flags (const QModelIndex &index) const
 BillingsTableModel::flags Differents table flags. More...
 
int count ()
 BillingsTableModel::count Number of billings in table. More...
 
QList< BillinggetBillings () const
 BillingsTableModel::getbillings Return the list of billings. More...
 

Detailed Description

The BillingsTableModel class for a Billing table.

Author
Florent Berbie
See Also
Billing

Constructor & Destructor Documentation

Gui::Widgets::WdgModels::BillingsTableModel::BillingsTableModel ( )

BillingsTableModel::BillingsTableModel Construct a BillingsTableModel.

Parameters
parentParent widget

Member Function Documentation

void Gui::Widgets::WdgModels::BillingsTableModel::append ( const Billing billing)

BillingsTableModel::append Add a new line in table.

Parameters
BillingThe new Billing
int Gui::Widgets::WdgModels::BillingsTableModel::columnCount ( const QModelIndex &  ) const

BillingsTableModel::columnCount Number of column of a Billing.

Returns
The number of column
int Gui::Widgets::WdgModels::BillingsTableModel::count ( )

BillingsTableModel::count Number of billings in table.

Returns
The number of billings
QVariant Gui::Widgets::WdgModels::BillingsTableModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const

BillingsTableModel::data Obtains data of a specify cell.

Parameters
indexThe cell who we want data
roleThe role of set
Returns
The data of cell
Qt::ItemFlags Gui::Widgets::WdgModels::BillingsTableModel::flags ( const QModelIndex &  index) const

BillingsTableModel::flags Differents table flags.

Parameters
indexThe cell who we want to know flags
Returns
Flags
QList< Billing > Gui::Widgets::WdgModels::BillingsTableModel::getBillings ( ) const

BillingsTableModel::getbillings Return the list of billings.

Returns
list of billings
QVariant Gui::Widgets::WdgModels::BillingsTableModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const

BillingsTableModel::headerData Obtains header title of table.

Parameters
sectionThe number of column
orientationThe table orientation
role
Returns
The Title header of column
void Gui::Widgets::WdgModels::BillingsTableModel::remove ( const int  i)

BillingsTableModel::remove Remove a line.

Parameters
iThe number of line to remove
int Gui::Widgets::WdgModels::BillingsTableModel::rowCount ( const QModelIndex &  ) const

BillingsTableModel::rowCount Number of billings row.

Returns
The number of billings
bool Gui::Widgets::WdgModels::BillingsTableModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role = Qt::EditRole 
)

BillingsTableModel::setData Change data of a cell.

Parameters
indexThe cell to change data
valueThe new value
roleThe role of cell
Returns
True if we could edit

The documentation for this class was generated from the following files: