Beispiel #1
0
FileTypes CellMLSupportPlugin::fileTypes() const
{
    // Return the CellML file type that the CellMLSupport plugin supports

    return FileTypes() << FileType(qobject_cast<FileInterface *>(this),
                                   CellmlMimeType, CellmlFileExtension);
}
CellMLSupportPlugin::CellMLSupportPlugin()
{
    // The file types that we support

    mFileTypes = FileTypes() << new FileType(qobject_cast<FileTypeInterface *>(this),
                                             CellmlMimeType, CellmlFileExtension);
}
Beispiel #3
0
void CorePlugin::pluginsInitialized(const Plugins &pLoadedPlugins)
{
    // Retrieve the different file types supported by our various plugins and
    // make our central widget aware of them

    FileTypes supportedFileTypes = FileTypes();

    foreach (Plugin *plugin, pLoadedPlugins) {
        FileTypeInterface *fileTypeInterface = qobject_cast<FileTypeInterface *>(plugin->instance());

        if (fileTypeInterface)
            // The plugin implements our file type interface, so add the
            // supported file types, but only if they are not already in our
            // list

            foreach (FileType *fileType, fileTypeInterface->fileTypes())
                if (!supportedFileTypes.contains(fileType))
                    supportedFileTypes << fileType;
    }
Beispiel #4
0
FileTypes FileInterface::fileTypes() const
{
    // By default, there are no file types

    return FileTypes();
}
Beispiel #5
0
FileTypeInterface::FileTypeInterface() :
    mFileTypes(FileTypes())
{
}