te::qt::widgets::HighlightDelegate Class Reference

An specialization of QItemDelegate to be used with te::map::AbstractTable objects. More...

#include <HighlightDelegate.h>

Inheritance diagram for te::qt::widgets::HighlightDelegate:

Public Member Functions

QColor getColor ()
 Returns the color. More...
 
virtual const te::da::ObjectIdSetgetSelected () const
 Returns the identifiers of the rows highlighted. More...
 
 HighlightDelegate (QObject *parent=0)
 Constructor. More...
 
virtual void paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
 
virtual void setColor (const QColor &c)
 Update the color group. More...
 
virtual void setDataSet (te::da::DataSet *dset)
 Sets the current data set being used. This method DOES NOT take the ownership of the dset. More...
 
virtual void setObjectIdSet (const te::da::ObjectIdSet *objs)
 Sets the object id set. It WILL NOT TAKE the ownership of the objs. More...
 
void setPromoter (Promoter *promoter)
 Sets the promoter being used. More...
 
virtual ~HighlightDelegate ()
 Destructor. More...
 

Protected Attributes

QColor m_color
 Highlight color. More...
 
te::da::DataSetm_dset
 Pointer to the DataSet being used. More...
 
const te::da::ObjectIdSetm_objs
 Identifiers of the highlight object. More...
 
std::set< std::string > m_oids
 
Promoterm_promoter
 Pointer to the promoter being used. More...
 

Detailed Description

An specialization of QItemDelegate to be used with te::map::AbstractTable objects.

This class is used on QAbstractItemView that has a te::qt::widgets::DatSetModel as model to highlight some objects. Each identifier in the set of ids are rendering with a predefined color.

See also
QItemDelegate, te::qt::widgets::DataSetTableModel

Definition at line 64 of file HighlightDelegate.h.

Constructor & Destructor Documentation

te::qt::widgets::HighlightDelegate::HighlightDelegate ( QObject *  parent = 0)

Constructor.

Parameters
parentQObject parent.
virtual te::qt::widgets::HighlightDelegate::~HighlightDelegate ( )
virtual

Destructor.

Member Function Documentation

QColor te::qt::widgets::HighlightDelegate::getColor ( )

Returns the color.

Returns
Current color.
virtual const te::da::ObjectIdSet* te::qt::widgets::HighlightDelegate::getSelected ( ) const
virtual

Returns the identifiers of the rows highlighted.

Returns
The identifiers of the highlighted rows;
virtual void te::qt::widgets::HighlightDelegate::paint ( QPainter *  painter,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
virtual
virtual void te::qt::widgets::HighlightDelegate::setColor ( const QColor &  c)
virtual

Update the color group.

Parameters
cNew color of the group.
virtual void te::qt::widgets::HighlightDelegate::setDataSet ( te::da::DataSet dset)
virtual

Sets the current data set being used. This method DOES NOT take the ownership of the dset.

Parameters
dsetThe DataSet to be used.
virtual void te::qt::widgets::HighlightDelegate::setObjectIdSet ( const te::da::ObjectIdSet objs)
virtual

Sets the object id set. It WILL NOT TAKE the ownership of the objs.

void te::qt::widgets::HighlightDelegate::setPromoter ( Promoter promoter)

Sets the promoter being used.

Parameters
promoterPointer of the promoter.
Note
It DOES NOT take the ownership of promoter.

Member Data Documentation

QColor te::qt::widgets::HighlightDelegate::m_color
protected

Highlight color.

Definition at line 127 of file HighlightDelegate.h.

te::da::DataSet* te::qt::widgets::HighlightDelegate::m_dset
protected

Pointer to the DataSet being used.

Definition at line 131 of file HighlightDelegate.h.

const te::da::ObjectIdSet* te::qt::widgets::HighlightDelegate::m_objs
protected

Identifiers of the highlight object.

Definition at line 129 of file HighlightDelegate.h.

std::set<std::string> te::qt::widgets::HighlightDelegate::m_oids
protected

Definition at line 135 of file HighlightDelegate.h.

Promoter* te::qt::widgets::HighlightDelegate::m_promoter
protected

Pointer to the promoter being used.

Definition at line 133 of file HighlightDelegate.h.


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