int PointSets::pointCountMeasure(QString name) { PointSet* pointSet = findMeasure(name); if (pointSet == 0) return 0; else return pointSet->pointCount(); }
boost::optional<BCLMeasure> WorkflowJSON_Impl::getBCLMeasure(const MeasureStep& step) const { boost::optional<openstudio::path> path = findMeasure(step.measureDirName()); if (path){ return BCLMeasure::load(*path); } return boost::none; }
void PointSets::setName(QString oldName, QString newName) { ASSERT_ENGAUGE(oldName != AxesPointSetName); ASSERT_ENGAUGE(oldName != ScalePointSetName); PointSet* pointSet = findCurve(oldName); if (pointSet) { pointSet->setName(newName); return; } pointSet = findMeasure(oldName); if (pointSet) { pointSet->setName(newName); return; } }
QPixmap PointSets::measureThumbnail(QString name) { PointSet* pointSet = findMeasure(name); ASSERT_ENGAUGE(pointSet != 0); return pointSet->thumbnail(); }
void PointSets::setMeasureStyle(QString name, PointSetStyle pointSetStyle) { PointSet* pointSet = findMeasure(name); ASSERT_ENGAUGE(pointSet != 0); pointSet->setStyle(pointSetStyle); }
PointSetStyle PointSets::measureStyle(QString name) { PointSet* pointSet = findMeasure(name); ASSERT_ENGAUGE(pointSet != 0); return pointSet->style(); }
void PointSets::addPointMeasure(Q3Canvas* canvas, Point* p, QString name, QList<QRect>* updateRectList) { PointSet* pointSet = findMeasure(name); if (pointSet != 0) pointSet->addPoint(canvas, p, updateRectList); }
boost::optional<openstudio::path> WorkflowJSON_Impl::findMeasure(const std::string& measureDirName) const { return findMeasure(toPath(measureDirName)); }