bool ActionRegisterUserParser::startTag(const QString &tag, const QXmlAttributes &) { if (tag == "login") { setReadText(true); } else if (tag == "email") { setReadText(true); } return true; }
bool TupProjectParser::startTag(const QString &tag, const QXmlAttributes &atts) { Q_UNUSED(atts); if (root() == "server_project") { if (tag == "users") setReadText(true); if (tag == "data") setReadText(true); return true; } return false; }
bool TupRequestParser::startTag(const QString& qname, const QXmlAttributes& atts) { if (qname == "project_request") { k->sign = atts.value("sign"); } else if (qname == "item") { static_cast<TupItemResponse *>(k->response)->setItemIndex(atts.value("index").toInt()); } else if (qname == "objectType") { static_cast<TupItemResponse *>(k->response)->setItemType(TupLibraryObject::Type(atts.value("id").toInt())); } else if (qname == "position") { static_cast<TupItemResponse *>(k->response)->setPosX(atts.value("x").toDouble()); static_cast<TupItemResponse *>(k->response)->setPosY(atts.value("y").toDouble()); } else if (qname == "spaceMode") { static_cast<TupItemResponse *>(k->response)->setSpaceMode(TupProject::Mode(atts.value("current").toInt())); } else if (qname == "frame") { static_cast<TupFrameResponse *>(k->response)->setFrameIndex(atts.value("index").toInt()); } else if (qname == "data") { setReadText(true); } else if (qname == "layer") { static_cast<TupLayerResponse *>(k->response)->setLayerIndex(atts.value("index").toInt()); } else if (qname == "scene") { static_cast<TupSceneResponse *>(k->response)->setSceneIndex(atts.value("index").toInt()); } else if (qname == "symbol") { static_cast<TupLibraryResponse*>(k->response)->setSymbolType(TupLibraryObject::Type(atts.value("type").toInt())); static_cast<TupLibraryResponse*>(k->response)->setParent(atts.value("folder")); static_cast<TupLibraryResponse*>(k->response)->setSpaceMode(TupProject::Mode(atts.value("spaceMode").toInt())); } else if (qname == "action") { k->response = TupProjectResponseFactory::create(atts.value("part").toInt(), atts.value("id").toInt()); k->response->setArg(atts.value("arg")); } return true; }
bool ProjectActionParser::startTag(const QString &tag, const QXmlAttributes &atts) { if (root() == "addproject" || root() == "removeproject" || root() == "updateproject" || root() == "queryproject") { if (tag == "name" || tag == "author" || tag == "description") { setReadText(true); } else if (tag == "user") { k->type = atts.value("type").toInt(); setReadText(true); } } return true; }
bool RemoveBackupParser::startTag(const QString &tag, const QXmlAttributes &atts) { if (tag == "removebackup") { k->entries.clear(); } else if (tag == "entry") { k->currentDate = atts.value("date"); setReadText(true); } return true; }
bool TupNotificationParser::startTag(const QString &tag, const QXmlAttributes &atts) { if (root() == "communication_notification") { if (tag == "message") { package.level = atts.value("level").toInt(); package.code = atts.value("code").toInt(); setReadText(true); } } return true; }
bool DatabaseParser::startTag(const QString &tag, const QXmlAttributes &atts) { if (root() == "projects") { if (tag == "project") { tmpInfo.name = atts.value("name"); tmpInfo.author = atts.value("author"); tmpInfo.description = atts.value("description"); if (m_findProject) { if (tmpInfo.name == m_condition) m_projectExists = true; } } else if (tag == "user") { m_typeUser = SProject::UserType(atts.value("type").toInt()); setReadText(true); } else if (tag == "file") { QString filename = kAppProp->cacheDir() + "/" + atts.value("name"); tmpInfo.file = filename; if (filename > m_lastFileName) m_lastFileName = filename; if (m_loadProject) { if (tmpInfo.name == m_condition) { gc(); m_project = new SProject(filename); m_project->setProjectName(tmpInfo.name); m_project->setAuthor(tmpInfo.author); m_project->setDescription(tmpInfo.description); } } } } return true; }