Skip to content

Commit

Permalink
Merge branch 'master' into skybox-feature
Browse files Browse the repository at this point in the history
  • Loading branch information
NEDJIMAbelgacem committed Aug 2, 2020
2 parents 942ec92 + e06cefe commit 7746575
Show file tree
Hide file tree
Showing 142 changed files with 3,952 additions and 378 deletions.
1 change: 1 addition & 0 deletions python/3d/3d_auto.sip
Expand Up @@ -7,6 +7,7 @@
%Include auto_generated/qgsabstractvectorlayer3drenderer.sip
%Include auto_generated/qgscamerapose.sip
%Include auto_generated/qgslayoutitem3dmap.sip
%Include auto_generated/qgsmaterialregistry.sip
%Include auto_generated/qgsphongmaterialsettings.sip
%Include auto_generated/qgspointlightsettings.sip
%Include auto_generated/qgsdirectionallightsettings.sip
Expand Down
6 changes: 6 additions & 0 deletions python/3d/auto_generated/qgs3d.sip.in
Expand Up @@ -9,6 +9,7 @@




class Qgs3D
{
%Docstring
Expand All @@ -35,6 +36,11 @@ Returns a pointer to the singleton instance.
static void initialize();
%Docstring
Initializes the 3D framework.
%End

static QgsMaterialRegistry *materialRegistry();
%Docstring
Returns the material registry, used for managing 3D materials.
%End

private:
Expand Down
5 changes: 5 additions & 0 deletions python/3d/auto_generated/qgsabstractmaterialsettings.sip.in
Expand Up @@ -78,6 +78,11 @@ Abstract base class for material settings.

virtual ~QgsAbstractMaterialSettings();

virtual QString type() const = 0;
%Docstring
Returns the unique type name for the material.
%End

virtual QgsAbstractMaterialSettings *clone() const = 0 /Factory/;
%Docstring
Clones the material settings.
Expand Down
118 changes: 118 additions & 0 deletions python/3d/auto_generated/qgsmaterialregistry.sip.in
@@ -0,0 +1,118 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/3d/qgsmaterialregistry.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/




class QgsMaterialSettingsWidget /External/;

class QgsMaterialSettingsAbstractMetadata
{
%Docstring
Stores metadata about one 3D material settings class.

.. note::

It's necessary to implement :py:func:`~createMaterialSettings` function.
In C++ you can use QgsMaterialSettingsMetadata convenience class.

.. versionadded:: 3.16
%End

%TypeHeaderCode
#include "qgsmaterialregistry.h"
%End
public:

QgsMaterialSettingsAbstractMetadata( const QString &type, const QString &visibleName );
%Docstring
Constructor for QgsMaterialSettingsAbstractMetadata, with the specified ``type`` and ``visibleName``.
%End

virtual ~QgsMaterialSettingsAbstractMetadata();

QString type() const;
%Docstring
Returns the unique material type string.
%End

QString visibleName() const;
%Docstring
Returns the material's visible (translated) name.
%End

virtual QgsAbstractMaterialSettings *create() = 0 /Factory/;
%Docstring
Creates a new instance of this material settings type.

Caller takes ownership of the returned object.
%End


};





class QgsMaterialRegistry
{
%Docstring
Registry of available 3d material settings classes.

QgsMaterialRegistry is not usually directly created, but rather accessed through
Qgs3D.materialRegistry().

.. versionadded:: 3.16
%End

%TypeHeaderCode
#include "qgsmaterialregistry.h"
%End
public:

QgsMaterialRegistry();
~QgsMaterialRegistry();


QgsMaterialSettingsAbstractMetadata *materialSettingsMetadata( const QString &type ) const;
%Docstring
Returns metadata for specified material settings ``type``. Returns ``None`` if not found
%End

QStringList materialSettingsTypes() const;
%Docstring
Returns a list of all available material settings types.
%End

bool addMaterialSettingsType( QgsMaterialSettingsAbstractMetadata *metadata /Transfer/ );
%Docstring
Registers a new material settings type. Takes ownership of the ``metadata`` instance.
%End

QgsAbstractMaterialSettings *createMaterialSettings( const QString &type ) const /Factory/;
%Docstring
Creates a new instance of the material settings of the specified ``type``.

The caller takes ownership of the returned object.

Returns ``None`` if the specified type is not found in the registry.
%End

private:
QgsMaterialRegistry( const QgsMaterialRegistry &rh );
};


/************************************************************************
* This file has been generated automatically from *
* *
* src/3d/qgsmaterialregistry.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
8 changes: 8 additions & 0 deletions python/3d/auto_generated/qgsphongmaterialsettings.sip.in
Expand Up @@ -32,6 +32,14 @@ with three color components: ambient, diffuse and specular.
QgsPhongMaterialSettings();
%Docstring
Constructor for QgsPhongMaterialSettings.
%End

virtual QString type() const;


static QgsAbstractMaterialSettings *create() /Factory/;
%Docstring
Returns a new instance of QgsPhongMaterialSettings.
%End

virtual QgsPhongMaterialSettings *clone() const /Factory/;
Expand Down
37 changes: 37 additions & 0 deletions python/core/auto_generated/layout/qgslayoutitem.sip.in
Expand Up @@ -246,6 +246,7 @@ Base class for graphical items within a :py:class:`QgsLayout`.
enum Flag
{
FlagOverridesPaint,
FlagProvidesClipPath,
};
typedef QFlags<QgsLayoutItem::Flag> Flags;

Expand Down Expand Up @@ -1026,6 +1027,18 @@ Returns ``True`` if the visitor should continue visiting other objects, or ``Fal
should be canceled.

.. versionadded:: 3.10
%End

virtual QgsGeometry clipPath() const;
%Docstring
Returns the clipping path generated by this item, in layout coordinates.

.. note::

Not all items can function as clipping paths. The FlagProvidesClipPath flag
indicates if a particular item can function as a clipping path provider.

.. versionadded:: 3.16
%End

public slots:
Expand Down Expand Up @@ -1107,6 +1120,15 @@ Emitted when the item's size or position changes.
Emitted whenever the number of background tasks an item is executing changes.

.. versionadded:: 3.10
%End

void clipPathChanged();
%Docstring
Emitted when the item's clipping path has changed.

.. seealso:: :py:func:`clipPath`

.. versionadded:: 3.16
%End

protected:
Expand All @@ -1125,16 +1147,31 @@ Draws the item's contents using the specified item render ``context``.

Note that the context's painter has been scaled so that painter units are pixels.
Use the QgsRenderContext methods to convert from millimeters or other units to the painter's units.
%End

virtual QPainterPath framePath() const;
%Docstring
Returns the path to use when drawing the item's frame or background.

.. seealso:: :py:func:`drawFrame`

.. seealso:: :py:func:`drawBackground`

.. versionadded:: 3.16
%End

virtual void drawFrame( QgsRenderContext &context );
%Docstring
Draws the frame around the item.

.. seealso:: :py:func:`framePath`
%End

virtual void drawBackground( QgsRenderContext &context );
%Docstring
Draws the background for the item.

.. seealso:: :py:func:`framePath`
%End

virtual void setFixedSize( const QgsLayoutSize &size );
Expand Down

0 comments on commit 7746575

Please sign in to comment.