Exemplo n.º 1
0
MetaInfoReader::ParserSate MetaInfoReader::readMetaInfoRootElement(const QString &name)
{
    if (name == QLatin1String(typeElementName)) {
        m_currentClassName = QString();
        m_currentIcon = QString();
        return ParsingType;
    } else {
        addErrorInvalidType(name);
        return Error;
    }
}
Exemplo n.º 2
0
MetaInfoReader::ParserSate MetaInfoReader::readDocument(const QString &name)
{
    if (name == rootElementName) {
        m_currentClassName.clear();
        m_currentIcon.clear();
        return ParsingMetaInfo;
    } else {
        addErrorInvalidType(name);
        return Error;
    }
}
Exemplo n.º 3
0
MetaInfoReader::ParserSate MetaInfoReader::readTypeElement(const QString &name)
{
    if (name == ItemLibraryEntryElementName) {
        m_currentEntry = ItemLibraryEntry();
        m_currentEntry.setType(m_currentClassName);
        m_currentEntry.setTypeIcon(QIcon(m_currentIcon));
        return ParsingItemLibrary;
    } else {
        addErrorInvalidType(name);
        return Error;
    }
}
Exemplo n.º 4
0
MetaInfoReader::ParserSate MetaInfoReader::readMetaInfoRootElement(const QString &name)
{
    if (name == typeElementName) {
        m_currentClassName.clear();
        m_currentIcon.clear();
        m_currentHints.clear();
        return ParsingType;
    } else if (name == importsElementName) {
        return ParsingImports;
    } else {
        addErrorInvalidType(name);
        return Error;
    }
}