36 if(e.hasAttribute(
"name"))
37 data->setObjectName(e.attribute(
"name"));
42 if(e.hasAttribute(
"color"))
44 QString color = e.attribute(
"color");
45 QStringList colorList = color.split(
" ");
46 if(colorList.size() >= 3)
47 data->
setColor(QColor(colorList.at(0).toInt(),
48 colorList.at(1).toInt(),
49 colorList.at(2).toInt()));
50 if(colorList.size() >= 4)
57 if(e.hasAttribute(
"size"))
59 double size = e.attribute(
"size").toDouble();
67 if(e.hasAttribute(
"shader"))
69 QString shader = e.attribute(
"shader");
74 dirShader =
":axlShader/shader/"+shader;
75 if(!QFile::exists(dirShader))
77 QSettings settings(
"inria",
"dtk");
79 settings.beginGroup(
"shader");
80 dirShader = settings.value(
"path", defaultPath).toString();
82 dirShader.append(
"/"+shader);
void setShaderOf(axlAbstractData *data, const QDomElement &e)
void setColorOf(axlAbstractData *data, const QDomElement &e)
void setShader(const QString &shader)
void setNameOf(axlAbstractData *data, const QDomElement &e)
void setSizeOf(axlAbstractData *data, const QDomElement &e)
virtual ~axlAbstractDataReader(void)
void setOpacity(const double &opacity)
void setSize(const double &size)
void setColor(double r, double g, double b)
Class axlAbstractData defines an API for all type of axel data.
axlAbstractDataReader(void)