27 #include "../../../../common/Translator.h"
28 #include "../../../../se/Description.h"
29 #include "../../../../se/Rule.h"
30 #include "../../se/SymbologyPreview.h"
31 #include "../../Exception.h"
58 if(role == Qt::DecorationRole && column == 0)
63 if(role == Qt::DisplayRole)
67 if(m_rule->getDescription())
68 return QVariant(QString::fromStdString(m_rule->getDescription()->getTitle()));
71 return QVariant(QString::fromStdString(*(m_rule->getName())));
73 return QVariant(QString(tr(
"Style")));
77 if(role == Qt::CheckStateRole && m_isCheckable && column == 0)
78 return QVariant(m_isChecked ? Qt::Checked : Qt::Unchecked);
105 return (m_isCheckable ? (Qt::ItemIsEnabled | Qt::ItemIsUserCheckable) : Qt::ItemIsEnabled);
119 if(role == Qt::CheckStateRole && m_isCheckable)
122 Qt::CheckState checkState =
static_cast<Qt::CheckState
>(value.toInt(&ok));
127 m_isChecked = (checkState == Qt::Checked ?
true :
false);
148 return "LEGEND_ITEM";
158 m_isCheckable = checkable;
163 return m_isCheckable;
A Rule is used to attach property/scale conditions to and group the individual symbols used for rende...
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr