bool EnhancedPathHandle::loadOdf(const KoXmlElement &element, KoShapeLoadingContext &context)
{
    if (element.localName() != "handle" || element.namespaceURI() != KoXmlNS::draw) {
        return false;
    }

    QString position = element.attributeNS(KoXmlNS::draw, "handle-position");
#ifndef NWORKAROUND_ODF_BUGS
    KoOdfWorkaround::fixEnhancedPathPolarHandlePosition(position, element, context);
#endif
    QStringList tokens = position.simplified().split(' ');
    if (tokens.count() != 2) {
        return false;
    }

    setPosition(m_parent->parameter(tokens[0]), m_parent->parameter(tokens[1]));

    // check if we have a polar handle
    if (element.hasAttributeNS(KoXmlNS::draw, "handle-polar")) {
        QString polar = element.attributeNS(KoXmlNS::draw, "handle-polar");
        QStringList tokens = polar.simplified().split(' ');
        if (tokens.count() == 2) {
            setPolarCenter(m_parent->parameter(tokens[0]), m_parent->parameter(tokens[1]));

            QString minRadius = element.attributeNS(KoXmlNS::draw, "handle-radius-range-minimum");
            QString maxRadius = element.attributeNS(KoXmlNS::draw, "handle-radius-range-maximum");
            if (!minRadius.isEmpty() && !maxRadius.isEmpty()) {
                setRadiusRange(m_parent->parameter(minRadius), m_parent->parameter(maxRadius));
            }
        }
    } else {
        QString minX = element.attributeNS(KoXmlNS::draw, "handle-range-x-minimum");
        QString maxX = element.attributeNS(KoXmlNS::draw, "handle-range-x-maximum");
        if (!minX.isEmpty() && ! maxX.isEmpty()) {
            setRangeX(m_parent->parameter(minX), m_parent->parameter(maxX));
        }

        QString minY = element.attributeNS(KoXmlNS::draw, "handle-range-y-minimum");
        QString maxY = element.attributeNS(KoXmlNS::draw, "handle-range-y-maximum");
        if (!minY.isEmpty() && ! maxY.isEmpty()) {
            setRangeY(m_parent->parameter(minY), m_parent->parameter(maxY));
        }
    }

    return hasPosition();
}
void
IsotropicBallModel::doExecute(type::ModelCmdType cmd)
{
  switch (cmd)
  {
    case type::MODEL_SET_TIME:
    case type::MODEL_SET_PHI:
    case type::MODEL_SET_THETA:
    case type::MODEL_SET_CATALOG_TYPE:
    {
      IsotropicSphereModel::doExecute(cmd);
      break;
    }
    case type::MODEL_SET_RADIUS:
    {
      setRadiusRange(_minValue, _maxValue);
      break;
    }
    default:
      break;
  }
}
IsotropicBallModel::IsotropicBallModel(type::ModelType type)
  : IsotropicSphereModel(type)
{
  setRadiusRange(0.0, 1.0);
}