harray<PropertyDescription> Resizer::getPropertyDescriptions() { if (Resizer::_propertyDescriptions.size() == 0) { Resizer::_propertyDescriptions += PropertyDescription("start_size", PropertyDescription::GVEC2); Resizer::_propertyDescriptions += PropertyDescription("end_size", PropertyDescription::GVEC2); } return (Affector::getPropertyDescriptions() + Resizer::_propertyDescriptions); }
harray<PropertyDescription> Space::getPropertyDescriptions() const { if (Space::_propertyDescriptions.size() == 0) { Space::_propertyDescriptions += PropertyDescription("position", PropertyDescription::GVEC3); Space::_propertyDescriptions += PropertyDescription("radius", PropertyDescription::FLOAT); } return (Affector::getPropertyDescriptions() + Space::_propertyDescriptions); }
harray<PropertyDescription> ColorChanger::getPropertyDescriptions() const { if (ColorChanger::_propertyDescriptions.size() == 0) { ColorChanger::_propertyDescriptions += PropertyDescription("start_color", PropertyDescription::HEXCOLOR); ColorChanger::_propertyDescriptions += PropertyDescription("end_color", PropertyDescription::HEXCOLOR); } return (Affector::getPropertyDescriptions() + ColorChanger::_propertyDescriptions); }
harray<PropertyDescription> ImageButton::getPropertyDescriptions() const { if (ImageButton::_propertyDescriptions.size() == 0) { ImageButton::_propertyDescriptions += PropertyDescription("pushed_image", PropertyDescription::STRING); ImageButton::_propertyDescriptions += PropertyDescription("hover_image", PropertyDescription::STRING); ImageButton::_propertyDescriptions += PropertyDescription("disabled_image", PropertyDescription::STRING); } return (ImageBox::getPropertyDescriptions() + ImageButton::_propertyDescriptions); }
harray<PropertyDescription> ScrollBar::getPropertyDescriptions() { if (ScrollBar::_propertyDescriptions.size() == 0) { ScrollBar::_propertyDescriptions += PropertyDescription("skin", PropertyDescription::STRING); ScrollBar::_propertyDescriptions += PropertyDescription("grid_size", PropertyDescription::FLOAT); ScrollBar::_propertyDescriptions += PropertyDescription("use_fading", PropertyDescription::BOOL); ScrollBar::_propertyDescriptions += PropertyDescription("height_hide", PropertyDescription::BOOL); ScrollBar::_propertyDescriptions += PropertyDescription("use_stretched_slider", PropertyDescription::BOOL); } return (Object::getPropertyDescriptions() + ScrollBar::_propertyDescriptions); }
harray<PropertyDescription> LinearForce::getPropertyDescriptions() { if (LinearForce::_propertyDescriptions.size() == 0) { LinearForce::_propertyDescriptions += PropertyDescription("direction", PropertyDescription::GVEC3); } return (Affector::getPropertyDescriptions() + LinearForce::_propertyDescriptions); }
harray<PropertyDescription> ProgressCircle::getPropertyDescriptions() { if (ProgressCircle::_propertyDescriptions.size() == 0) { ProgressCircle::_propertyDescriptions += PropertyDescription("direction", PropertyDescription::ENUM); } return (ImageBox::getPropertyDescriptions() + ProgressBase::getPropertyDescriptions() + ProgressCircle::_propertyDescriptions); }
harray<PropertyDescription> SelectionContainer::getPropertyDescriptions() const { if (SelectionContainer::_propertyDescriptions.size() == 0) { SelectionContainer::_propertyDescriptions += PropertyDescription("selected_index", PropertyDescription::INT); SelectionContainer::_propertyDescriptions += PropertyDescription("item_height", PropertyDescription::FLOAT); SelectionContainer::_propertyDescriptions += PropertyDescription("hover_color", PropertyDescription::HEXCOLOR); SelectionContainer::_propertyDescriptions += PropertyDescription("pushed_color", PropertyDescription::HEXCOLOR); SelectionContainer::_propertyDescriptions += PropertyDescription("selected_color", PropertyDescription::HEXCOLOR); SelectionContainer::_propertyDescriptions += PropertyDescription("selected_hover_color", PropertyDescription::HEXCOLOR); SelectionContainer::_propertyDescriptions += PropertyDescription("selected_pushed_color", PropertyDescription::HEXCOLOR); SelectionContainer::_propertyDescriptions += PropertyDescription("allow_drag", PropertyDescription::BOOL); SelectionContainer::_propertyDescriptions += PropertyDescription("item_count", PropertyDescription::INT); } return (Container::getPropertyDescriptions() + SelectionContainer::_propertyDescriptions); }
bool XMLPropertyHandler::startElement(const QString & namespaceURI, const QString & name, const QString & qName, const QXmlAttributes & attributes) { LIMA_UNUSED(namespaceURI); LIMA_UNUSED(qName); PROPERTYCODELOGINIT; const QString& stringName = name; if (stringName == "property") { m_currentProp=PROP; m_properties.push_back(PropertyDescription()); m_properties.back().name = attributes.value("name").toUtf8().data(); LDEBUG << "read property " << m_properties.back().name; } else if (stringName == "subproperty") { m_currentProp=SUBPROP; m_subproperties.push_back(SubPropertyDescription()); m_subproperties.back().name = attributes.value("name").toUtf8().data(); m_subproperties.back().parentName = attributes.value("parent").toUtf8().data(); LDEBUG << "read subproperty " << m_subproperties.back().name << " of parent property " << m_subproperties.back().parentName; } else if (stringName == "value") { string value=attributes.value("name").toUtf8().data(); LDEBUG << "read value " << value; if (m_currentProp == PROP) { m_properties.back().values.push_back(value); } else if (m_currentProp == SUBPROP) { m_subproperties.back().values.back().second.push_back(value); } else { LERROR << "Don't know what to do with value " << value << " !"; } } else if (stringName == "subvalues") { string value=attributes.value("value").toUtf8().data(); LDEBUG << "read subvalues " << value; if (m_currentProp == SUBPROP) { m_subproperties.back().values.push_back(make_pair(value,vector<string>())); } else { LERROR << "Don't know what to do with subvalues " << value << " !"; } } return true; }