A class for rendering icons for layer and folder itens. More...
#include <LayerViewDelegate.h>
Public Member Functions | |
QStyledItemDelegate * | findDecorator (QStyledItemDelegate *decorated) |
Returns the Decorator that decorates this item. More... | |
QStyledItemDelegate * | getDecorated () |
Returns the pointer of decorated object. More... | |
QStyledItemDelegate * | removeDecorator (QStyledItemDelegate *decorated) |
Removes The decorator of the decorated. More... | |
Instantiation Methods | |
Methods related to creation and destruction of the object. | |
LayerViewDelegate (QStyledItemDelegate *decorated, QObject *parent=0) | |
Constructor. More... | |
~LayerViewDelegate () | |
Destructor. More... | |
Protected Attributes | |
QStyledItemDelegate * | m_decorated |
The object decorated. More... | |
bool | m_delDecorated |
If true, also delete decorated pointer. More... | |
Reimplementation of QStyledItemDelegate. | |
Methods reimplemented of the QStyledItemDelegate class. | |
QIcon | m_layer |
Icon for a layer not invalid. More... | |
QIcon | m_folder |
Icon for a folder. More... | |
QIcon | m_style |
Icon for a style. More... | |
QIcon | m_colorMap |
Icon for a ColorMap. More... | |
QIcon | m_chart |
Icon for a chart. More... | |
QIcon | m_queryLayer |
Icon for a query layer. More... | |
QIcon | m_tabularLayer |
Icon for a tabular layer. More... | |
QIcon | m_invalidLayer |
Icon for an invalid layers. More... | |
QIcon | m_warningLayer |
Icon for a layer with warnings. More... | |
void | paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const |
QIcon | getIcon (const QModelIndex &index) const |
Returns the icon for a given index. More... | |
A class for rendering icons for layer and folder itens.
This is the default delegate for LayerItemView. It's used for present icons for the known kind of items. For unknown items, or if you want to change the known ones, you can create your own delegate and install it on the LayerItemView. Note that we use a decorator instead the QStyledItemDelegate. This is useful for making the inheritance dynamic.
Definition at line 57 of file LayerViewDelegate.h.
te::qt::widgets::LayerViewDelegate::LayerViewDelegate | ( | QStyledItemDelegate * | decorated, |
QObject * | parent = 0 |
||
) |
Constructor.
decorated | The delegate to be decorated. |
parent | Used by Qt5. |
te::qt::widgets::LayerViewDelegate::~LayerViewDelegate | ( | ) |
Destructor.
|
inherited |
Returns the Decorator that decorates this item.
decorated | The decorated item that we are looking for. |
Definition at line 86 of file Decorator.h.
|
inherited |
Returns the pointer of decorated object.
Definition at line 78 of file Decorator.h.
|
protected |
Returns the icon for a given index.
index | Index of the object being rendered. |
void te::qt::widgets::LayerViewDelegate::paint | ( | QPainter * | painter, |
const QStyleOptionViewItem & | option, | ||
const QModelIndex & | index | ||
) | const |
|
inherited |
Removes The decorator of the decorated.
decorated | The item that we are searching for the decorator. |
Definition at line 94 of file Decorator.h.
|
protected |
Icon for a chart.
Definition at line 108 of file LayerViewDelegate.h.
|
protected |
Icon for a ColorMap.
Definition at line 107 of file LayerViewDelegate.h.
|
protectedinherited |
The object decorated.
Definition at line 98 of file Decorator.h.
|
protectedinherited |
If true, also delete decorated pointer.
Definition at line 99 of file Decorator.h.
|
protected |
Icon for a folder.
Definition at line 105 of file LayerViewDelegate.h.
|
protected |
Icon for an invalid layers.
Definition at line 111 of file LayerViewDelegate.h.
|
protected |
Icon for a layer not invalid.
Definition at line 104 of file LayerViewDelegate.h.
|
protected |
Icon for a query layer.
Definition at line 109 of file LayerViewDelegate.h.
|
protected |
Icon for a style.
Definition at line 106 of file LayerViewDelegate.h.
|
protected |
Icon for a tabular layer.
Definition at line 110 of file LayerViewDelegate.h.
|
protected |
Icon for a layer with warnings.
Definition at line 112 of file LayerViewDelegate.h.