27 #include "../../common/Translator.h"
28 #include "../../datatype/Property.h"
29 #include "../Exception.h"
38 : AbstractTreeItem(parent)
40 if(properties.empty())
43 for(
size_t i = 0; i < properties.size(); ++i)
52 m_items.push_back(item);
69 if(role == Qt::DisplayRole && column == 0)
70 return QVariant(
TE_TR(
"Properties"));
88 if(!children().empty ())
96 return Qt::ItemIsUserCheckable;
142 return m_items.size() > 0 ?
true :
false;
162 return "GROUPING_ITEM";
QMenu * getMenu(QWidget *parent=0) const
te::map::AbstractLayerPtr getLayer() const
virtual Property * clone() const =0
It returns a clone of the object.
#define TE_TR(message)
It marks a string in order to get translated.
It models a property definition.
std::vector< te::qt::widgets::AbstractTreeItem * > getItems() const
A class that represents a group of Properties in a LayerTreeModel.
bool setData(int column, const QVariant &value, int role=Qt::EditRole)
PropertyGroupItem(std::vector< te::dt::Property * > properties, te::qt::widgets::AbstractTreeItem *parent)
A class that represents a Property in a LayerTreeModel.
const std::string getItemType() const
It returns the item type.
int getType() const
It returns the property data type.
A class that represents a Layer in a LayerTreeModel.
Qt::ItemFlags flags() const
bool canFetchMore() const
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
QVariant data(int column, int role) const