27 #include "../../../../common/STLUtils.h" 28 #include "../../../../core/translator/Translator.h" 29 #include "../../../../dataaccess/dataset/DataSetType.h" 30 #include "../../../../datatype/Property.h" 31 #include "../../Exception.h" 57 if(role == Qt::DecorationRole)
58 return QVariant(QIcon::fromTheme(
"properties"));
60 if(role == Qt::DisplayRole)
61 return QVariant(QString(
"properties"));
68 QMenu* m =
new QMenu(parent);
70 QAction* aOpenProperties = m->addAction(tr(
"&Open properties"));
72 connect(aOpenProperties, SIGNAL(triggered()),
this, SLOT(openProperties()));
79 if(!children().empty())
87 return Qt::NoItemFlags;
92 if(parent() ==
nullptr)
98 if(parentItem ==
nullptr)
103 if(dt.get() ==
nullptr)
106 const std::size_t nproperties = dt->size();
108 for(std::size_t i = 0; i < nproperties; ++i)
121 if(parent() ==
nullptr)
126 if(parentItem ==
nullptr)
131 if(dt.get() ==
nullptr)
134 return dt->size() != 0;
boost::shared_ptr< DataSetType > DataSetTypePtr
It models a property definition.
A class that represents a dataset in a TreeModel.
static te::dt::TimeDuration dt(20, 30, 50, 11)
A class used to group a set of properties from a dataset in a TreeModel.