当前位置: 首页>>代码示例>>C++>>正文


C++ QDomAttr::nodeValue方法代码示例

本文整理汇总了C++中QDomAttr::nodeValue方法的典型用法代码示例。如果您正苦于以下问题:C++ QDomAttr::nodeValue方法的具体用法?C++ QDomAttr::nodeValue怎么用?C++ QDomAttr::nodeValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在QDomAttr的用法示例。


在下文中一共展示了QDomAttr::nodeValue方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: LoadContent

void DialogEditNodeTable::LoadContent()
{
    //Load the element value
    m_pValueLine->setText(m_node.toElement().text());

    //Get all the attributes
    QDomNamedNodeMap attributes = m_node.attributes();

    m_pTable->setRowCount(attributes.size());

    QTableWidgetItem* item = 0;

    //Add each attribute in to the table
    for(int indexRow=0; indexRow < attributes.size(); ++indexRow)
    {
        int columnIndex = 0;

        QDomAttr attributeNode = attributes.item(indexRow).toAttr();

        item = new QTableWidgetItem(attributeNode.nodeName());// << attribute name
        item->setToolTip(attributeNode.nodeName());
        m_pTable->setItem(indexRow, columnIndex, item);
        columnIndex++;

        item = new QTableWidgetItem(attributeNode.nodeValue());// << value
        item->setToolTip(attributeNode.nodeValue());
        m_pTable->setItem(indexRow, columnIndex, item);
        columnIndex++;
    }

}
开发者ID:Mauxx91,项目名称:XML-Editor,代码行数:31,代码来源:DialogEditNodeTable.cpp

示例2: argumentType

QString ServiceDefinition::argumentType(const QString &serviceName,
                                        const QString &argument) const {
  QDomNode node = d->mInputArguments[serviceName][argument];

  if (node.hasAttributes()) {
    QDomAttr attr = d->getAttributeFromNode(node, "type");
    return attr.nodeValue();
  }

  return "";
}
开发者ID:shaheeqa,项目名称:plexydesk,代码行数:11,代码来源:servicedefinition.cpp

示例3: requestType

uint ServiceDefinition::requestType(const QString &name) const {
  QDomNode node = d->definitionsOfServiceName(name)["input"];
  QDomAttr attr = d->getAttributeFromNode(node, "type");

  QString value = attr.nodeValue();

  if (value.toLower() == "get") {
    return 0;
  }

  if (value.toLower() == "post") {
    return 1;
  }

  return -1;
}
开发者ID:shaheeqa,项目名称:plexydesk,代码行数:16,代码来源:servicedefinition.cpp

示例4: UpdateSignal


//.........这里部分代码省略.........
        if (SelectNextDomain())
            http.Propfind(QS(SelectedDomain().href) + "web/");
        else if (SelectFirstEndpoint()) {
            Logger::ins.Info() << "Parsing index files...\r\n";
            emit UpdateSignal("Parsing index files...");
            op = lsoGetIndexXml;
            Logger::ins.Info() << "Parsing " << QS(SelectedEndpoint().urlRegistryFolder) << "index.xml...\r\n";
            http.Get(QS(SelectedEndpoint().urlRegistryFolder) + "index.xml");
        }

        break;

    case lsoGetIndexXml:

        if (reply->error() == QNetworkReply::NoError) {

            QString replyString(reply->readAll());
            sl::log << "lsoGetIndexXml: " << SQ(replyString) << sl::end;

            QDomDocument doc;
            doc.setContent(replyString);

            for (QDomElement r = doc.firstChildElement(); !r.isNull(); r = r.nextSiblingElement()) {

                if (r.nodeName() == "service") {

                    for (QDomElement e = r.firstChildElement(); !e.isNull(); e = e.nextSiblingElement()) {

                        if (e.nodeName() == "files") {

                            for (QDomElement f = e.firstChildElement(); !f.isNull(); f = f.nextSiblingElement()) {

                                QDomAttr r = f.attributeNode("root"), t = f.attributeNode("type");
                                if (!r.isNull() && r.nodeValue() == "true" && !t.isNull() && t.value() == "WSDL")
                                    SelectedEndpoint().urlWSDL = SQ(f.text());
                            }
                        }
                        else if (e.nodeName() == "name")
                            SelectedEndpoint().intGivenName = SQ(e.text());
                        else if (e.nodeName() == "version")
                            SelectedEndpoint().intGivenVersion = SQ(e.text());
                        else if (e.nodeName() == "policyVersion")
                            SelectedEndpoint().policyVersion = SQ(e.text());
                        else if (e.nodeName() == "enabled")
                            SelectedEndpoint().enabled = SQ(e.text());
                        else if (e.nodeName() == "soap")
                            SelectedEndpoint().soap = SQ(e.text());
                        else if (e.nodeName() == "resolutionPath")
                            SelectedEndpoint().resolutionPath = SQ(e.text());
                        else if (e.nodeName() == "id")
                            SelectedEndpoint().intGivenId = SQ(e.text());
                        else if (e.nodeName() == "protectedEndpoint")
                            SelectedEndpoint().protectedEndpoint = SQ(e.text());
                    }

                    break;
                }
            }

            if (SelectedEndpoint().urlWSDL == "") {
                Logger::ins.Warning() << "WSDL file url not found for endpoint '" << QS(SelectedEndpoint().intGivenName) << "'\r\n";
                emit UpdateSignal("WSDL file url not found for endpoint '" + QS(SelectedEndpoint().intGivenName) + "'");
                SelectedEndpoint().serviceName = SelectedEndpoint().intGivenName;
            }

            if (SelectedEndpoint().protectedEndpoint == "") {
开发者ID:bcace,项目名称:soabrowser,代码行数:67,代码来源:layer7loader.cpp


注:本文中的QDomAttr::nodeValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。