Exemplo n.º 1
0
void LoaderXml::bitmap(const QDomElement& node)
{
    auto content_type = mimeType(node.attribute("type"), "image/png");
    QByteArray image_data = QByteArray::fromBase64(node.text().toLatin1());
    QBuffer buffer(&image_data);
    QImageReader reader(&buffer, content_type.preferredSuffix().toUtf8());
    reader.read(&builder.currentImage()->image());
}
Exemplo n.º 2
0
Core::GeneratedFiles
    TextFileWizard::generateFilesFromPath(const QString &path, const QString &name,
                                          QString * /*errorMessage*/) const
{
    const QString suffix = preferredSuffix(m_mimeType);
    const QString fileName = Core::BaseFileWizard::buildFileName(path, name, suffix);
    Core::GeneratedFile file(fileName);
    file.setAttributes(Core::GeneratedFile::OpenEditorAttribute);
    return Core::GeneratedFiles() << file;
}
Exemplo n.º 3
0
QString FormClassWizard::formSuffix() const
{
    return preferredSuffix(QLatin1String(Constants::FORM_MIMETYPE));
}
Exemplo n.º 4
0
QString FormClassWizard::sourceSuffix() const
{
    return preferredSuffix(QLatin1String(CppEditor::Constants::CPP_SOURCE_MIMETYPE));
}
Exemplo n.º 5
0
QString FormClassWizard::headerSuffix() const
{
    return preferredSuffix(QLatin1String(CppEditor::Constants::CPP_HEADER_MIMETYPE));
}