示例#1
0
  bool addString(const string &st,const string &str) {
    if (idSet!=-1) {
      if (st==LABEL)
        graphBuilder->setNodeValue(idSet,"viewLabel",str);
      else
        graphBuilder->setNodeValue(idSet, st, str);
    }
    else
      nodeAttributeError();

    return true;
  }
示例#2
0
  bool addBool(const string &st,const bool boolean) {
    if (idSet!=-1)
      graphBuilder->setNodeValue(idSet,st,boolean);
    else
      nodeAttributeError();

    return true;
  }
示例#3
0
  bool addDouble(const string &st,const double real) {
    if (idSet!=-1)
      graphBuilder->setNodeValue(idSet, st, real);
    else
      nodeAttributeError();

    return true;
  }
示例#4
0
  bool addInt(const string &st,const int id) {
    if (st==ID) {
      bool result=graphBuilder->addNode(id);

      if (result) idSet=id;
      else return false;
    }
    else {
      if (idSet!=-1)
        graphBuilder->setNodeValue(idSet, st, id);
      else
        nodeAttributeError();
    }

    return true;
  }
示例#5
0
 void setColor(const Color &color) {
   graphBuilder->setNodeValue(idSet,"viewColor",color);
 }
示例#6
0
 void setCoord(const Coord &coord) {
   graphBuilder->setNodeValue(idSet,"viewLayout",coord);
 }
示例#7
0
 void setSize(const Size &size) {
   graphBuilder->setNodeValue(idSet,"viewSize",size);
 }