mirror of
https://github.com/qgis/QGIS.git
synced 2025-11-22 00:14:55 -05:00
217 lines
5.7 KiB
Plaintext
217 lines
5.7 KiB
Plaintext
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/core/project/qgsprojectstylesettings.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
class QgsProjectStyleSettings : QObject
|
|
{
|
|
%Docstring(signature="appended")
|
|
Contains settings and properties relating to how a :py:class:`QgsProject` should handle
|
|
styling.
|
|
|
|
.. versionadded:: 3.26
|
|
%End
|
|
|
|
%TypeHeaderCode
|
|
#include "qgsprojectstylesettings.h"
|
|
%End
|
|
public:
|
|
|
|
QgsProjectStyleSettings( QgsProject *project = 0 );
|
|
%Docstring
|
|
Constructor for QgsProjectStyleSettings for the specified ``project``.
|
|
|
|
Ownership is transferred to the ``project``.
|
|
%End
|
|
|
|
QgsSymbol *defaultSymbol( Qgis::SymbolType symbolType ) const /Factory/;
|
|
%Docstring
|
|
Returns the project default symbol for a given type.
|
|
|
|
:param symbolType: the symbol type
|
|
|
|
:return: a symbol pointer or NULL if there is no default set
|
|
|
|
.. note::
|
|
|
|
the symbol ownership is transferred to the caller
|
|
%End
|
|
|
|
void setDefaultSymbol( Qgis::SymbolType symbolType, QgsSymbol *symbol );
|
|
%Docstring
|
|
Sets the project default symbol for a given type.
|
|
|
|
:param symbolType: the symbol type
|
|
:param symbol: the symbol pointer, set to NULL to clear default
|
|
|
|
.. note::
|
|
|
|
the symbol ownership is not transferred
|
|
%End
|
|
|
|
QgsColorRamp *defaultColorRamp() const /Factory/;
|
|
%Docstring
|
|
Returns the project default color ramp.
|
|
|
|
:return: a color ramp pointer or NULL if there is no default set
|
|
|
|
.. note::
|
|
|
|
the color ramp ownership is transferred to the caller
|
|
%End
|
|
|
|
void setDefaultColorRamp( QgsColorRamp *colorRamp );
|
|
%Docstring
|
|
Sets the project default color ramp.
|
|
|
|
:param colorRamp: the color ramp, set to NULL to clear default
|
|
|
|
.. note::
|
|
|
|
the color ramp ownership is not transferred
|
|
%End
|
|
|
|
QgsTextFormat defaultTextFormat() const;
|
|
%Docstring
|
|
Returns the project default text format.
|
|
|
|
.. note::
|
|
|
|
if no default is defined, the returned format will be invalid
|
|
%End
|
|
|
|
void setDefaultTextFormat( const QgsTextFormat &textFormat );
|
|
%Docstring
|
|
Sets the project default text format.
|
|
|
|
:param textFormat: the text format, an invalid format is interpreted as no default
|
|
%End
|
|
|
|
bool randomizeDefaultSymbolColor() const;
|
|
%Docstring
|
|
Returns whether the default symbol fill color is randomized.
|
|
%End
|
|
|
|
void setRandomizeDefaultSymbolColor( bool randomized );
|
|
%Docstring
|
|
Sets whether the default symbol fill color is randomized.
|
|
%End
|
|
|
|
double defaultSymbolOpacity() const;
|
|
%Docstring
|
|
Returns the default symbol opacity.
|
|
%End
|
|
|
|
void setDefaultSymbolOpacity( double opacity );
|
|
%Docstring
|
|
Sets the default symbol opacity.
|
|
%End
|
|
|
|
void reset();
|
|
%Docstring
|
|
Resets the settings to a default state.
|
|
%End
|
|
|
|
bool readXml( const QDomElement &element, const QgsReadWriteContext &context );
|
|
%Docstring
|
|
Reads the settings's state from a DOM element.
|
|
|
|
.. seealso:: :py:func:`writeXml`
|
|
%End
|
|
|
|
QDomElement writeXml( QDomDocument &doc, const QgsReadWriteContext &context ) const;
|
|
%Docstring
|
|
Returns a DOM element representing the settings.
|
|
|
|
.. seealso:: :py:func:`readXml`
|
|
%End
|
|
|
|
QStringList styleDatabasePaths() const;
|
|
%Docstring
|
|
Returns a list of all style databases (file paths) associated with the project.
|
|
|
|
The file paths returned by this method will always be absolute paths. Depending on the
|
|
project settings, they may be converted to relative paths when the project is saved.
|
|
|
|
.. seealso:: :py:func:`styles`
|
|
|
|
.. seealso:: :py:func:`addStyleDatabasePath`
|
|
|
|
.. seealso:: :py:func:`setStyleDatabasePaths`
|
|
%End
|
|
|
|
QList< QgsStyle * > styles() const;
|
|
%Docstring
|
|
Returns a list of all the styles associated with the project.
|
|
|
|
.. seealso:: :py:func:`styleDatabasePaths`
|
|
%End
|
|
|
|
void addStyleDatabasePath( const QString &path );
|
|
%Docstring
|
|
Adds a style database ``path`` to the project.
|
|
|
|
The file path added by this method must always be absolute paths. Depending on the
|
|
project settings, they may be converted to relative paths when the project is saved.
|
|
|
|
.. seealso:: :py:func:`styleDatabasePaths`
|
|
|
|
.. seealso:: :py:func:`setStyleDatabasePaths`
|
|
|
|
.. seealso:: :py:func:`styleDatabasesChanged`
|
|
%End
|
|
|
|
void setStyleDatabasePaths( const QStringList &paths );
|
|
%Docstring
|
|
Sets the ``paths`` to all style databases associated with the project.
|
|
|
|
The file paths set by this method must always be absolute paths. Depending on the
|
|
project settings, they may be converted to relative paths when the project is saved.
|
|
|
|
.. seealso:: :py:func:`addStyleDatabasePath`
|
|
|
|
.. seealso:: :py:func:`styleDatabasePaths`
|
|
|
|
.. seealso:: :py:func:`styleDatabasesChanged`
|
|
%End
|
|
|
|
%If (CONCATENATED_TABLES_MODEL)
|
|
|
|
QgsCombinedStyleModel *combinedStyleModel();
|
|
%Docstring
|
|
Returns the combined style model which includes all style databases
|
|
associated with the project.
|
|
|
|
This model also includes :py:func:`QgsStyle.defaultStyle()`.
|
|
|
|
.. note::
|
|
|
|
This is only available on builds based on Qt 5.13 or later.
|
|
|
|
.. seealso:: :py:func:`styles`
|
|
%End
|
|
%End
|
|
|
|
signals:
|
|
|
|
void styleDatabasesChanged();
|
|
%Docstring
|
|
Emitted whenever the set of style databases associated with the project is changed.
|
|
%End
|
|
|
|
};
|
|
|
|
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/core/project/qgsprojectstylesettings.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
************************************************************************/
|