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

The ProjectsTableModel class for a Project table. More...

#include <projectstablemodel.h>

Inheritance diagram for Gui::Widgets::WdgModels::ProjectsTableModel:

Public Member Functions

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

Detailed Description

The ProjectsTableModel class for a Project table.

Author
Florent Berbie
See Also
Project

Constructor & Destructor Documentation

Gui::Widgets::WdgModels::ProjectsTableModel::ProjectsTableModel ( )

ProjectsTableModel::ProjectsTableModel Construct a ProjectsTableModel.

Parameters
parentParent widget

Member Function Documentation

void Gui::Widgets::WdgModels::ProjectsTableModel::append ( const Project project)

ProjectsTableModel::append Add a new line in table.

Parameters
ProjectThe new Project
int Gui::Widgets::WdgModels::ProjectsTableModel::columnCount ( const QModelIndex &  ) const

ProjectsTableModel::columnCount Number of column of a Project.

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

ProjectsTableModel::count Number of projects in table.

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

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

ProjectsTableModel::flags Differents table flags.

Parameters
indexThe cell who we want to know flags
Returns
Flags
QList< Project > Gui::Widgets::WdgModels::ProjectsTableModel::getProjects ( void  ) const

ProjectsTableModel::getProjects Return the list of projects.

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

ProjectsTableModel::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::ProjectsTableModel::remove ( const int  i)

ProjectsTableModel::remove Remove a line.

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

ProjectsTableModel::rowCount Number of projects row.

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

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