mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
192 lines
4.7 KiB
Plaintext
192 lines
4.7 KiB
Plaintext
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/3d/qgs3dmapcanvas.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Qgs3DMapCanvas : QWindow
|
|
{
|
|
%Docstring(signature="appended")
|
|
Qgs3DMapCanvas is a convenience wrapper to simplify the creation of a 3D window ready to be used with QGIS.
|
|
|
|
.. note::
|
|
|
|
This is a port of qtwindow3d which does not set the default surface when initialized.
|
|
|
|
.. note::
|
|
|
|
The default surface must be set before the construction of the QApplication when using shared OpenGL context.
|
|
|
|
.. note::
|
|
|
|
This is required in order to use QT3d and QtWebEngine at the same time.
|
|
|
|
.. versionadded:: 3.36
|
|
%End
|
|
|
|
%TypeHeaderCode
|
|
#include "qgs3dmapcanvas.h"
|
|
%End
|
|
public:
|
|
|
|
Qgs3DMapCanvas();
|
|
%Docstring
|
|
Constructor for Qgs3DMapCanvas.
|
|
%End
|
|
|
|
~Qgs3DMapCanvas();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void setMap( Qgs3DMapSettings *map );
|
|
%Docstring
|
|
Configure map scene being displayed. Takes ownership.
|
|
%End
|
|
|
|
Qgs3DMapSettings *map();
|
|
%Docstring
|
|
Returns access to the 3D scene configuration
|
|
%End
|
|
|
|
Qgs3DMapScene *scene();
|
|
%Docstring
|
|
Returns access to the 3D scene (root 3D entity)
|
|
%End
|
|
|
|
QgsCameraController *cameraController();
|
|
%Docstring
|
|
Returns access to the view's camera controller. Returns ``None`` if the scene has not been initialized yet with :py:func:`~Qgs3DMapCanvas.setMap`
|
|
%End
|
|
|
|
void resetView();
|
|
%Docstring
|
|
Resets camera position to the default: looking down at the origin of world coordinates
|
|
%End
|
|
|
|
void setViewFromTop( const QgsPointXY ¢er, float distance, float rotation = 0 );
|
|
%Docstring
|
|
Sets camera position to look down at the given point (in map coordinates) in given distance from plane with zero elevation
|
|
%End
|
|
|
|
void saveAsImage( const QString &fileName, const QString &fileFormat );
|
|
%Docstring
|
|
Saves the current scene as an image
|
|
%End
|
|
|
|
void setMapTool( Qgs3DMapTool *tool );
|
|
%Docstring
|
|
Sets the active map tool that will receive events from the 3D canvas. Does not transfer ownership.
|
|
If the tool is ``None``, events will be used for camera manipulation.
|
|
%End
|
|
|
|
Qgs3DMapTool *mapTool() const;
|
|
%Docstring
|
|
Returns the active map tool that will receive events from the 3D canvas.
|
|
If the tool is ``None``, events will be used for camera manipulation.
|
|
%End
|
|
|
|
|
|
void setTemporalController( QgsTemporalController *temporalController );
|
|
%Docstring
|
|
Sets the temporal controller
|
|
%End
|
|
|
|
QSize windowSize() const;
|
|
%Docstring
|
|
Returns the size of the 3D canvas window
|
|
|
|
.. versionadded:: 3.18
|
|
%End
|
|
|
|
void setViewFrom2DExtent( const QgsRectangle &extent );
|
|
%Docstring
|
|
Resets camera view to show the extent ``extent`` (top view)
|
|
|
|
.. versionadded:: 3.26
|
|
%End
|
|
|
|
QVector<QgsPointXY> viewFrustum2DExtent();
|
|
%Docstring
|
|
Calculates the 2D extent viewed by the 3D camera as the vertices of the viewed trapezoid
|
|
|
|
.. versionadded:: 3.26
|
|
%End
|
|
|
|
signals:
|
|
void savedAsImage( const QString &fileName );
|
|
%Docstring
|
|
Emitted when the 3D map canvas was successfully saved as image
|
|
%End
|
|
|
|
void mapSettingsChanged();
|
|
%Docstring
|
|
Emitted when the the map setting is changed
|
|
%End
|
|
|
|
void fpsCountChanged( float fpsCount );
|
|
%Docstring
|
|
Emitted when the FPS count changes (at most every frame)
|
|
%End
|
|
void fpsCounterEnabledChanged( bool enabled );
|
|
%Docstring
|
|
Emitted when the FPS counter is enabled or disabeld
|
|
%End
|
|
|
|
void viewed2DExtentFrom3DChanged( QVector<QgsPointXY> extent );
|
|
%Docstring
|
|
Emitted when the viewed 2D extent seen by the 3D camera has changed
|
|
|
|
.. versionadded:: 3.26
|
|
%End
|
|
|
|
void cameraNavigationSpeedChanged( double speed );
|
|
%Docstring
|
|
Emitted when the camera navigation ``speed`` is changed.
|
|
|
|
.. versionadded:: 3.18
|
|
%End
|
|
public slots:
|
|
void captureDepthBuffer();
|
|
|
|
protected:
|
|
|
|
virtual void showEvent( QShowEvent *e );
|
|
|
|
%Docstring
|
|
Manages the display events specified in e.
|
|
%End
|
|
|
|
virtual void resizeEvent( QResizeEvent * );
|
|
|
|
%Docstring
|
|
Resets the aspect ratio of the 3D window.
|
|
%End
|
|
|
|
|
|
|
|
virtual bool eventFilter( QObject *watched, QEvent *event );
|
|
|
|
|
|
};
|
|
|
|
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/3d/qgs3dmapcanvas.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
************************************************************************/
|