コード例 #1
0
ファイル: xmlLoader.cpp プロジェクト: nfrey/qreal
void XmlLoader::readPicture(QDomElement const &picture)
{
    QDomNodeList pictureAttributes = picture.childNodes();

    for (unsigned i = 0; i < pictureAttributes.length(); ++i) {
        QDomElement type = pictureAttributes.at(i).toElement();
        if (type.tagName() == "line")
            readLine(type);
        else if (type.tagName() == "ellipse")
            readEllipse(type);
        else if (type.tagName() == "arc")
            readArch(type);
        else if (type.tagName() == "rectangle")
            readRectangle(type);
        else if (type.tagName() == "stylus")
            readStylus(type);
        else if (type.tagName() == "path")
            readPath(type);
        else if (type.tagName() == "curve")
            readCurve(type);
        else if (type.tagName() == "text")
            readText(type);
        else
            qDebug() << "Incorrect picture tag";
    }
}
コード例 #2
0
void ArchiveViewer::rebuild(int){
    readArch();
    clear();
    buildTree(nullptr, 0);
    setEditTriggers(QTreeWidget::NoEditTriggers);
    setAlternatingRowColors(false);
    setSortingEnabled(false);
    setSelectionBehavior(QTreeWidget::SelectRows);
    setHeaderHidden(true);
    setColumnWidth(0, 280);
}