27 #include "../../common/Translator.h"
28 #include "../../datatype/Property.h"
29 #include "../../qt/widgets/layer/explorer/LegendItem.h"
30 #include "../../se/Rule.h"
31 #include "../Exception.h"
35 #include <QtGui/QWidget>
38 : AbstractTreeItem(parent)
43 for(
size_t i = 0; i < rules.size(); ++i)
66 if(role == Qt::DisplayRole && column == 0)
67 return QVariant(
TR_VP(
"Legends"));
79 if(!children().empty ())
87 return Qt::ItemIsUserCheckable;
96 return m_items.size() > 0 ?
true :
false;
116 return "LEGEND_ITEM";
std::vector< te::qt::widgets::AbstractTreeItem * > getItems() const
std::vector< te::qt::widgets::AbstractTreeItem * > m_items
bool setData(int column, const QVariant &value, int role=Qt::EditRole)
bool canFetchMore() const
te::map::AbstractLayerPtr getLayer() const
A Rule is used to attach property/scale conditions to and group the individual symbols used for rende...
A class that represents a group of legends in a LayerTreeModel.
LegendGroupItem(std::vector< te::se::Rule * > rules, AbstractTreeItem *parent)
const std::string getItemType() const
It returns the item type.
void setCheckable(bool checkable)
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
QVariant data(int column, int role) const
QMenu * getMenu(QWidget *parent=0) const
#define TR_VP(message)
It marks a string in order to get translated. This is a special mark used in the Terrralib Vector Pro...
Qt::ItemFlags flags() const