FactDev
0.1
|
The ContributoriesTableModel class for a custom table for contributories widget. More...
#include <contributoriestablemodel.h>
Public Member Functions | |
ContributoriesTableModel (QObject *parent=0) | |
ContributoriesTableModel::ContributoriesTableModel Construct a ContributoriesTableModel. More... | |
int | rowCount (const QModelIndex &) const |
ContributoriesTableModel::rowCount Number of contributories row. More... | |
int | columnCount (const QModelIndex &) const |
ContributoriesTableModel::columnCount Number of column of a contributory. More... | |
QVariant | data (const QModelIndex &index, int role) const |
ContributoriesTableModel::data Obtains data of a specify cell. More... | |
QVariant | headerData (int section, Qt::Orientation orientation, int role) const |
ContributoriesTableModel::headerData Obtains header title of table. More... | |
bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) |
ContributoriesTableModel::setData Change data of a cell. More... | |
void | append (const Contributory &contributory) |
ContributoriesTableModel::append Add a new line in table. More... | |
void | remove (const int i) |
ContributoriesTableModel::remove Remove a line. More... | |
Qt::ItemFlags | flags (const QModelIndex &index) const |
ContributoriesTableModel::flags Differents table flags. More... | |
QList< Contributory > | getContributories () |
ContributoriesTableModel::getContributories Get all contributories of table. More... | |
int | count () |
ContributoriesTableModel::count Number of contributories in table. More... | |
double | getSumQuantity () const |
ContributoriesTableModel::getSumQuantity Return the sum of the hours of all contriburoies added. More... | |
void | clear () |
ContributoriesTableModel::clear Remove all contributories. | |
The ContributoriesTableModel class for a custom table for contributories widget.
Gui::Widgets::WdgModels::ContributoriesTableModel::ContributoriesTableModel | ( | QObject * | parent = 0 | ) |
ContributoriesTableModel::ContributoriesTableModel Construct a ContributoriesTableModel.
parent | Parent widget |
void Gui::Widgets::WdgModels::ContributoriesTableModel::append | ( | const Contributory & | contributory | ) |
ContributoriesTableModel::append Add a new line in table.
contributory | The new contributory |
int Gui::Widgets::WdgModels::ContributoriesTableModel::columnCount | ( | const QModelIndex & | ) | const |
ContributoriesTableModel::columnCount Number of column of a contributory.
int Gui::Widgets::WdgModels::ContributoriesTableModel::count | ( | ) |
ContributoriesTableModel::count Number of contributories in table.
QVariant Gui::Widgets::WdgModels::ContributoriesTableModel::data | ( | const QModelIndex & | index, |
int | role | ||
) | const |
ContributoriesTableModel::data Obtains data of a specify cell.
index | The cell who we want data |
role | The role of set |
Qt::ItemFlags Gui::Widgets::WdgModels::ContributoriesTableModel::flags | ( | const QModelIndex & | index | ) | const |
ContributoriesTableModel::flags Differents table flags.
index | The cell who we want to know flags |
QList< Contributory > Gui::Widgets::WdgModels::ContributoriesTableModel::getContributories | ( | ) |
ContributoriesTableModel::getContributories Get all contributories of table.
double Gui::Widgets::WdgModels::ContributoriesTableModel::getSumQuantity | ( | ) | const |
ContributoriesTableModel::getSumQuantity Return the sum of the hours of all contriburoies added.
QVariant Gui::Widgets::WdgModels::ContributoriesTableModel::headerData | ( | int | section, |
Qt::Orientation | orientation, | ||
int | role | ||
) | const |
ContributoriesTableModel::headerData Obtains header title of table.
section | The number of column |
orientation | The table orientation |
role |
void Gui::Widgets::WdgModels::ContributoriesTableModel::remove | ( | const int | i | ) |
ContributoriesTableModel::remove Remove a line.
i | The number of line to remove |
int Gui::Widgets::WdgModels::ContributoriesTableModel::rowCount | ( | const QModelIndex & | ) | const |
ContributoriesTableModel::rowCount Number of contributories row.
bool Gui::Widgets::WdgModels::ContributoriesTableModel::setData | ( | const QModelIndex & | index, |
const QVariant & | value, | ||
int | role = Qt::EditRole |
||
) |
ContributoriesTableModel::setData Change data of a cell.
index | The cell to change data |
value | The new value |
role | THe role of cell |