An specialization of QItemDelegate to be used with te::map::AbstractTable objects. More...
#include <HighlightDelegate.h>
  
 Public Member Functions | |
| QColor | getColor () | 
| Returns the color.  More... | |
| virtual const te::da::ObjectIdSet * | getSelected () 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::DataSet * | m_dset | 
| Pointer to the DataSet being used.  More... | |
| const te::da::ObjectIdSet * | m_objs | 
| Identifiers of the highlight object.  More... | |
| std::set< std::string > | m_oids | 
| Promoter * | m_promoter | 
| Pointer to the promoter being used.  More... | |
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.
Definition at line 64 of file HighlightDelegate.h.
| te::qt::widgets::HighlightDelegate::HighlightDelegate | ( | QObject * | parent = 0 | ) | 
      
  | 
  virtual | 
Destructor.
Definition at line 94 of file HighlightDelegate.cpp.
| QColor te::qt::widgets::HighlightDelegate::getColor | ( | ) | 
      
  | 
  virtual | 
Returns the identifiers of the rows highlighted.
Definition at line 150 of file HighlightDelegate.cpp.
      
  | 
  virtual | 
Definition at line 99 of file HighlightDelegate.cpp.
References ToHighlight().
      
  | 
  virtual | 
Update the color group.
| c | New color of the group. | 
Definition at line 119 of file HighlightDelegate.cpp.
Referenced by te::qt::widgets::DataSetTableView::DataSetTableView().
      
  | 
  virtual | 
Sets the current data set being used. This method DOES NOT take the ownership of the dset.
| dset | The DataSet to be used. | 
Definition at line 129 of file HighlightDelegate.cpp.
      
  | 
  virtual | 
Sets the object id set. It WILL NOT TAKE the ownership of the objs.
Definition at line 134 of file HighlightDelegate.cpp.
References te::da::ObjectIdSet::clone(), and GetOidsAsString().
| void te::qt::widgets::HighlightDelegate::setPromoter | ( | Promoter * | promoter | ) | 
Sets the promoter being used.
| promoter | Pointer of the promoter. | 
Definition at line 155 of file HighlightDelegate.cpp.
Referenced by te::qt::widgets::DataSetTableView::DataSetTableView().
      
  | 
  protected | 
Highlight color.
Definition at line 127 of file HighlightDelegate.h.
      
  | 
  protected | 
Pointer to the DataSet being used.
Definition at line 131 of file HighlightDelegate.h.
      
  | 
  protected | 
Identifiers of the highlight object.
Definition at line 129 of file HighlightDelegate.h.
      
  | 
  protected | 
Definition at line 135 of file HighlightDelegate.h.
      
  | 
  protected | 
Pointer to the promoter being used.
Definition at line 133 of file HighlightDelegate.h.