qgserde - v0.3.1
    Preparing search index...

    Interface QgsProject

    An editable project model, independent of the QGIS version used to read it.

    Edit the typed properties and choose a target version with serializeQgs. Store it with serializeJson and restore it with parseJson.

    interface QgsProject {
        annotations?: QgsCanvasAnnotation[];
        attributes?: QgsProjectAttributes;
        autoTransaction?: QgsActiveAttributes;
        bookmarks?: QgsBookmark[];
        canvasUnits?: string;
        crs?: QgsCrs;
        dataDefinedServerProperties?: QgsDataDefinedProperties;
        disabledCrs?: QgsCrs;
        displaySettings?: QgsProjectDisplaySettings;
        elevationProfiles?: QgsElevationProfile[];
        elevationProperties?: QgsProjectElevationProperties;
        elevationShading?: QgsElevationShadingAttributes;
        evaluateDefaultValues?: QgsActiveAttributes;
        extent?: QgsReferencedRectangle;
        gpsSettings?: QgsProjectGpsSettings;
        homePath?: string;
        labelEngineRules?: QgsLabelEngineRuleAttributes[];
        layerOrder?: string[];
        layers: QgsMapLayer[];
        layerTree?: QgsLayerTreeGroup;
        layouts?: QgsLayout[];
        legacyLegend?: QgsLegacyLegend;
        legacyView?: { extent?: QgsReferencedRectangle; rotation?: number };
        loadProjectExtent?: boolean;
        mainAnnotationLayer?: QgsMainAnnotationLayer;
        mapThemes?: QgsMapTheme[];
        mapViews3D?: QgsMapView3D[];
        maskingSourceSets?: QgsMaskingSourceSet[];
        metadata: QgsProjectMetadata;
        polymorphicRelations?: QgsRelation[];
        presetFullExtent?: QgsRectangle;
        presetFullExtentCrs?: QgsCrs;
        processingModels?: QgsProcessingModel[];
        projectFlags?: string;
        properties?: QgsProjectProperties;
        relations?: QgsRelation[];
        reports?: QgsReport[];
        rotation?: number;
        scales?: string[];
        sensors?: QgsSensor[];
        snapping?: QgsSnappingSettings;
        styleSettings?: QgsProjectStyleSettings;
        timeSettings?: QgsProjectTimeSettings;
        title: string;
        transactionMode?: string;
        transformContext?: QgsCoordinateOperation[];
        trust?: QgsActiveAttributes;
        useProjectScales?: boolean;
        verticalCrs?: QgsCrs;
    }
    Index
    annotations?: QgsCanvasAnnotation[]

    Map canvas annotations (text, SVG, HTML, and form annotations).

    Other root attributes, such as saveUser and saveDateTime.

    autoTransaction?: QgsActiveAttributes

    Automatic transaction groups of older projects (active).

    bookmarks?: QgsBookmark[]

    Spatial bookmarks.

    canvasUnits?: string

    Map canvas units of older projects, such as degrees or meters.

    crs?: QgsCrs

    Horizontal CRS. Removing an active CRS disables project projection.

    dataDefinedServerProperties?: QgsDataDefinedProperties

    Data-defined properties for QGIS Server.

    disabledCrs?: QgsCrs

    Stored horizontal CRS while project projection is disabled. An active crs takes precedence.

    displaySettings?: QgsProjectDisplaySettings

    Coordinate and bearing display settings.

    elevationProfiles?: QgsElevationProfile[]

    Elevation profiles (QGIS 4.2+).

    elevationProperties?: QgsProjectElevationProperties

    Terrain settings.

    Elevation shading (eye-dome lighting and hillshading) settings.

    evaluateDefaultValues?: QgsActiveAttributes

    Provider-side default values of older projects (active).

    Default view extent, with an optional CRS of its own.

    gpsSettings?: QgsProjectGpsSettings

    GPS digitizing settings.

    homePath?: string

    Project home path, passed to QGIS without rewriting file paths.

    labelEngineRules?: QgsLabelEngineRuleAttributes[]

    Labeling engine rules (QGIS 3.40+), such as a minimum distance between labels and features.

    layerOrder?: string[]

    Drawing order as layer IDs. Removed project layers are excluded on serialization.

    layers: QgsMapLayer[]

    Project layers. Additions and removals update tree and drawing-order references on serialization.

    layerTree?: QgsLayerTreeGroup

    Groups and layer references in display order.

    layouts?: QgsLayout[]

    Print layouts.

    legacyLegend?: QgsLegacyLegend

    QGIS 2 legend of older projects; QGIS uses it only without a layer tree.

    legacyView?: { extent?: QgsReferencedRectangle; rotation?: number }

    Independent legacy map canvas settings, when different from the default view.

    Type Declaration

    • Optionalextent?: QgsReferencedRectangle

      Legacy canvas extent and its CRS.

    • Optionalrotation?: number

      Legacy clockwise rotation in degrees.

    loadProjectExtent?: boolean

    Whether opening the project zooms to its default view extent.

    mainAnnotationLayer?: QgsMainAnnotationLayer

    The project's main annotation layer, drawn above all layers.

    mapThemes?: QgsMapTheme[]

    Map themes (visibility presets).

    mapViews3D?: QgsMapView3D[]

    3D map views (<mapViewDocks3D>).

    maskingSourceSets?: QgsMaskingSourceSet[]

    Selective masking source sets (QGIS 4.2+).

    Descriptive metadata, excluding the project title.

    polymorphicRelations?: QgsRelation[]

    Polymorphic relations, each with attributes and field pairs.

    presetFullExtent?: QgsRectangle

    Full extent that replaces the extent of all layers (<PresetFullExtent>).

    presetFullExtentCrs?: QgsCrs
    processingModels?: QgsProcessingModel[]

    Processing models stored in the project (<projectModels>).

    projectFlags?: string

    Project flags joined with |, such as EvaluateDefaultValuesOnProviderSide.

    Project property tree, such as Variables, Measurement, Measure, or WMSServiceTitle. SpatialRefSys/ProjectionsEnabled follows QgsProject.crs.

    relations?: QgsRelation[]

    Relations between layers.

    reports?: QgsReport[]

    Reports, stored with the layouts.

    rotation?: number

    Default clockwise view rotation in degrees. Must be finite.

    scales?: string[]

    Predefined scale denominators, as stored.

    sensors?: QgsSensor[]

    Sensors (<Sensors>), such as TCP or serial port feeds.

    Snapping settings.

    styleSettings?: QgsProjectStyleSettings

    Default symbol and style database settings.

    timeSettings?: QgsProjectTimeSettings

    Temporal navigation settings.

    title: string

    Project title. Edits synchronize the title locations used by QGIS.

    transactionMode?: string

    Transaction mode, such as Disabled, AutomaticGroups, or BufferedGroups.

    transformContext?: QgsCoordinateOperation[]

    Preferred coordinate operations between CRS pairs.

    Trusted layer metadata of older projects (active).

    useProjectScales?: boolean

    Whether the project's predefined scales replace the global ones.

    verticalCrs?: QgsCrs

    Vertical CRS, for use with QGIS versions that support it.