예제 #1
0
static int readXmlNode(p3d_flatSuperGraph* graph, p3d_rob * robot, xmlNodePtr cur, xmlNodePtr* neigTab) {
  xmlNodePtr tmp = NULL;
  xmlChar * tmpChar = NULL;
  p3d_flatSuperGraphNode * node  = NULL;
  int idNode = 0;
  configPt config = NULL;
  p3d_node ** subNodes = MY_ALLOC(p3d_node*, robot->mg->nbGraphs);

  if ((tmpChar = xmlGetProp(cur, xmlCharStrdup("id"))) != NULL) {
    sscanf((char *) tmpChar, "%d", &(idNode));
    xmlFree(tmpChar);
  } else {
    xmlFree(tmpChar);
    MY_FREE(subNodes, p3d_node*, robot->mg->nbGraphs);
    return FALSE;
  }

  tmp = cur->xmlChildrenNode;
  for (;tmp != NULL; tmp = tmp->next) {
    if (!xmlStrcmp(tmp->name, xmlCharStrdup("config"))) {
      config = readXmlConfig(robot,  tmp);
      if (config == NULL) {
        printf("Error in node parse: Can not read the node config\n");
        MY_FREE(subNodes, p3d_node*, robot->mg->nbGraphs);
        return FALSE;
      }
    }else if (!xmlStrcmp(tmp->name, xmlCharStrdup("subNodes"))) {
예제 #2
0
OlvisExecGuiPlugin::OlvisExecGuiPlugin()
{
    mInterface = 0;
    mHilec = 0;
    connect(this, SIGNAL(pluginsWriteConfigReq(QXmlStreamWriter&)), SLOT(writeXmlConfig(QXmlStreamWriter&)), Qt::DirectConnection);
    connect(this, SIGNAL(pluginsReadConfigReq(QString)), SLOT(readXmlConfig(QString)), Qt::DirectConnection);
    mTimer.setInterval(5000);
    connect(&mTimer, SIGNAL(timeout()), SLOT(autoSave()));
}
예제 #3
0
void OlvisGuiPlugin::setGuiInterface(const QString &name, QObject * guiPlugin)
{
    if(name == "OlvisExecGuiInterface")
    {
        connect(guiPlugin, SIGNAL(pluginsWriteConfigReq(QXmlStreamWriter&)), SLOT(writeXmlConfig(QXmlStreamWriter&)), Qt::DirectConnection);
        connect(guiPlugin, SIGNAL(pluginsReadConfigReq(QString)), SLOT(readXmlConfig(QString)), Qt::DirectConnection);

        connect(this, SIGNAL(saveGraphString(QString&)), guiPlugin, SLOT(saveGraphString(QString&)), Qt::DirectConnection);
        connect(this, SIGNAL(loadGraphString(QString)), guiPlugin, SLOT(loadGraphString(QString)), Qt::DirectConnection);
    }