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

The ProjectContributoriesTableModel class Table model of contributories linked to projets. More...

#include <projectcontributoriestablemodel.h>

Inheritance diagram for Gui::Widgets::WdgModels::ProjectContributoriesTableModel:

Public Member Functions

 ProjectContributoriesTableModel (QObject *parent=0)
 ProjectContributoriesTableModel::ProjectContributoriesTableModel Construct a ProjectContributoriesTableModel. More...
 
int rowCount (const QModelIndex &) const
 ProjectContributoriesTableModel::rowCount Number of contributories row. More...
 
int columnCount (const QModelIndex &) const
 ProjectContributoriesTableModel::columnCount Number of column of a contributory. More...
 
QVariant data (const QModelIndex &index, int role) const
 ProjectContributoriesTableModel::data Obtains data of a specify cell. More...
 
QVariant headerData (int section, Qt::Orientation orientation, int role) const
 ProjectContributoriesTableModel::headerData Obtains header title of table. More...
 
bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
 ProjectContributoriesTableModel::setData Change data of a cell. More...
 
Qt::ItemFlags flags (const QModelIndex &index) const
 ProjectContributoriesTableModel::flags Differents table flags. More...
 
void append (QPair< Models::Project *, Models::Rate > p)
 ProjectContributoriesTableModel::append Add a new rate p to a Project. More...
 
void append ()
 ProjectContributoriesTableModel::append Add the current element to the list.
 
bool allProjectsChosen ()
 ProjectContributoriesTableModel::allProjectsChosen Return TRUE if all projects have been selected else FALSE. More...
 
QList< int > & getSelectedProjects ()
 ProjectContributoriesTableModel::getSelectedProjects Return the list of the Project id which are selected. More...
 
void remove (int index)
 ProjectContributoriesTableModel::remove Remove the element to the index More...
 
QPair< Models::Project
*, Models::Rate
getProject (const int row)
 ProjectContributoriesTableModel::getProject Return the project and it rate linked which correspond to the row More...
 
QList< QPair< Models::Project
*, Models::Rate > > 
getProjects (void)
 ProjectContributoriesTableModel::getProjects Return a list of the set of projects and their rates linked. More...
 

Detailed Description

The ProjectContributoriesTableModel class Table model of contributories linked to projets.

Author
Antoine de Roquemaurel

Constructor & Destructor Documentation

Gui::Widgets::WdgModels::ProjectContributoriesTableModel::ProjectContributoriesTableModel ( QObject *  parent = 0)

Member Function Documentation

bool Gui::Widgets::WdgModels::ProjectContributoriesTableModel::allProjectsChosen ( )

ProjectContributoriesTableModel::allProjectsChosen Return TRUE if all projects have been selected else FALSE.

Returns
boolean All projects selected
void Gui::Widgets::WdgModels::ProjectContributoriesTableModel::append ( QPair< Models::Project *, Models::Rate p)

ProjectContributoriesTableModel::append Add a new rate p to a Project.

Parameters
p
int Gui::Widgets::WdgModels::ProjectContributoriesTableModel::columnCount ( const QModelIndex &  ) const

ProjectContributoriesTableModel::columnCount Number of column of a contributory.

Returns
The number of column
QVariant Gui::Widgets::WdgModels::ProjectContributoriesTableModel::data ( const QModelIndex &  index,
int  role 
) const

ProjectContributoriesTableModel::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::ProjectContributoriesTableModel::flags ( const QModelIndex &  index) const

ProjectContributoriesTableModel::flags Differents table flags.

Parameters
indexThe cell who we want to know flags
Returns
Flags
QPair< Models::Project *, Models::Rate > Gui::Widgets::WdgModels::ProjectContributoriesTableModel::getProject ( const int  row)

ProjectContributoriesTableModel::getProject Return the project and it rate linked which correspond to the row

Parameters
rowRow of the project to get
Returns
a Project and it rate
QList< QPair< Models::Project *, Models::Rate > > Gui::Widgets::WdgModels::ProjectContributoriesTableModel::getProjects ( void  )

ProjectContributoriesTableModel::getProjects Return a list of the set of projects and their rates linked.

Returns
List of Projects and Rates linked
QList< int > & Gui::Widgets::WdgModels::ProjectContributoriesTableModel::getSelectedProjects ( )

ProjectContributoriesTableModel::getSelectedProjects Return the list of the Project id which are selected.

Returns
List of ID Project
QVariant Gui::Widgets::WdgModels::ProjectContributoriesTableModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role 
) const

ProjectContributoriesTableModel::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::ProjectContributoriesTableModel::remove ( int  index)

ProjectContributoriesTableModel::remove Remove the element to the index

Parameters
indexIndex of the element to remove
int Gui::Widgets::WdgModels::ProjectContributoriesTableModel::rowCount ( const QModelIndex &  ) const

ProjectContributoriesTableModel::rowCount Number of contributories row.

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

ProjectContributoriesTableModel::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: