27 #include "../../../../common/Translator.h"
28 #include "../../../../maptools/RasterLayer.h"
29 #include "../../../../se/Style.h"
30 #include "../../Exception.h"
58 if(role == Qt::DisplayRole)
59 return QVariant(QString::fromStdString(m_layer->getTitle()));
61 if(role == Qt::CheckStateRole)
62 return QVariant(m_layer->getVisibility() ==
te::map::VISIBLE ? Qt::Checked : Qt::Unchecked);
81 return children().isEmpty();
86 return Qt::ItemIsUserCheckable | Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled;;
91 if(!children().isEmpty())
110 if(role == Qt::CheckStateRole)
113 Qt::CheckState checkState =
static_cast<Qt::CheckState
>(value.toInt(&ok));
118 if(checkState == Qt::Checked)
120 else if(checkState == Qt::Unchecked)
136 return "RASTER_LAYER_ITEM";
A layer with reference to a raster.
The class that represents a raster layer item in a LayerTreeModel.
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr