FactDev  0.1
Gui::Widgets::Delegates::ProjectComboDelegate Class Reference

The ProjectComboDelegate class. More...

#include <projectcombodelegate.h>

Inheritance diagram for Gui::Widgets::Delegates::ProjectComboDelegate:
Gui::Widgets::Delegates::ComboBoxDelegate

Public Member Functions

 ProjectComboDelegate (QSharedPointer< Models::Customer > c, QObject *parent=0)
 ProjectComboDelegate::ProjectComboDelegate. More...
 
QWidget * createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
 ProjectComboDelegate:createEditor Return a ComboBox specified by index item defined by the parent widget and style option which are used to control how the editor widgets appears. More...
 
void paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
 ProjectComboDelegate::paint Renders the delegate using the given painter and style option for the item specified by index More...
 
void removeInCombo (QList< int > &l)
 ProjectComboDelegate::removeInCombo Remove the items contained in the list l into the current ComboBox.
 
QMap< int, Models::ProjectgetProjects () const
 ProjectComboDelegate::getProjects Return a list of projects linked to a Customer ID. More...
 
bool isLocked () const
 ProjectComboDelegate::isLocked Return TRUE if is locked else FALSE. More...
 
void setLocked (bool locked)
 ProjectComboDelegate::setLocked Change the state of the lock by a new value locked More...
 
- Public Member Functions inherited from Gui::Widgets::Delegates::ComboBoxDelegate
 ComboBoxDelegate (QObject *parent=0)
 ComboBoxDelegate::ComboBoxDelegate Construct a ComboBoxDelegate. More...
 
void setEditorData (QWidget *editor, const QModelIndex &index) const
 ComboBoxDelegate::setEditorData Sets the data to be displayed and edited by the editor from the data model item specified by the model index More...
 
void setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const
 ComboBoxDelegate::setModelData Gets data from the editor widget and stores it in the specified model at the item index More...
 
void updateEditorGeometry (QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const
 ComboBoxDelegate::updateEditorGeometry Update the editor for the item specified by index according to the style option given. More...
 

Detailed Description

Constructor & Destructor Documentation

Gui::Widgets::Delegates::ProjectComboDelegate::ProjectComboDelegate ( QSharedPointer< Models::Customer c,
QObject *  parent = 0 
)

Member Function Documentation

QWidget * Gui::Widgets::Delegates::ProjectComboDelegate::createEditor ( QWidget *  parent,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
virtual

ProjectComboDelegate:createEditor Return a ComboBox specified by index item defined by the parent widget and style option which are used to control how the editor widgets appears.

Parameters
parentWidget parent
optionOption style
indexIndex for editing
Returns
ComboBox

Implements Gui::Widgets::Delegates::ComboBoxDelegate.

QMap< int, Models::Project > Gui::Widgets::Delegates::ProjectComboDelegate::getProjects ( ) const

ProjectComboDelegate::getProjects Return a list of projects linked to a Customer ID.

Returns
Projets of a Customer
bool Gui::Widgets::Delegates::ProjectComboDelegate::isLocked ( ) const

ProjectComboDelegate::isLocked Return TRUE if is locked else FALSE.

Returns
boolean
void Gui::Widgets::Delegates::ProjectComboDelegate::paint ( QPainter *  painter,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
virtual

ProjectComboDelegate::paint Renders the delegate using the given painter and style option for the item specified by index

Parameters
parentWidget parent
optionOption style
indexIndex for editing

Implements Gui::Widgets::Delegates::ComboBoxDelegate.

void Gui::Widgets::Delegates::ProjectComboDelegate::setLocked ( bool  locked)

ProjectComboDelegate::setLocked Change the state of the lock by a new value locked

Parameters
locked

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