45 mArgument.resize(descriptions.size());
46 mDescriptions = descriptions;
57 if (mArgument[index] == p)
62 disconnect(mArgument[index].
get(), SIGNAL(transformChanged()),
this, SIGNAL(
argumentsChanged()));
63 disconnect(mArgument[index].
get(), SIGNAL(propertiesChanged()),
this, SIGNAL(
argumentsChanged()));
70 connect(mArgument[index].
get(), SIGNAL(transformChanged()),
this, SIGNAL(
argumentsChanged()));
71 connect(mArgument[index].
get(), SIGNAL(propertiesChanged()),
this, SIGNAL(
argumentsChanged()));
79 return mArgument[index];
86 return mValidTypes.contains(p->getType());
91 return (
unsigned)mArgument.size();
96 return mDescriptions[index];
101 std::vector<Vector3D> p(this->
getCount());
102 for (
unsigned i = 0; i < p.size(); ++i)
106 return std::vector<Vector3D>();
114 for (
unsigned i = 0; i < mArgument.size(); ++i)
117 dataNode.toElement().setAttribute(QString(
"p%1").arg(i), mArgument[i]->getUid());
123 for (
unsigned i = 0; i < mArgument.size(); ++i)
125 QString uid = dataNode.toElement().attribute(QString(
"p%1").arg(i),
"");
126 if (!data.count(uid))
128 this->
set(i, data.find(uid)->second);
boost::shared_ptr< DataMetric > DataMetricPtr
virtual void parseXml(QDomNode &dataNode, const std::map< QString, DataPtr > &data)
bool validArgument(DataPtr p) const
virtual void addXml(QDomNode &dataNode)
boost::shared_ptr< class Data > DataPtr
QString getDescription(int index) const
void set(int index, DataPtr p)
void setValidArgumentTypes(QStringList types)
std::vector< Vector3D > getRefCoords() const
MetricReferenceArgumentList(QStringList descriptions)
unsigned getCount() const
Base class for all Data Metrics.
virtual Vector3D getRefCoord() const =0