Skip to content

Commit

Permalink
Dox++
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Mar 21, 2019
1 parent 6f92e7c commit 1dc447e
Show file tree
Hide file tree
Showing 19 changed files with 35 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ Returns ``True`` if the geometry contains m values.
Returns the closure of the combinatorial boundary of the geometry (ie the topological boundary of the geometry).
For instance, a polygon geometry will have a boundary consisting of the linestrings for each ring in the polygon.

:return: boundary for geometry. May be null for some geometry types.
:return: boundary for geometry. May be ``None`` for some geometry types.

.. versionadded:: 3.0
%End
Expand Down
2 changes: 1 addition & 1 deletion python/core/auto_generated/qgsvectorlayer.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -1423,7 +1423,7 @@ editing.

QgsAbstractVectorLayerLabeling *labeling();
%Docstring
Access to labeling configuration. May be null if labeling is not used.
Access to labeling configuration. May be ``None`` if labeling is not used.

.. note::

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Construct item. Does not take ownership of symbol (makes internal clone)

QgsSymbol *symbol() const;
%Docstring
Returns associated symbol. May be null.
Returns associated symbol. May be ``None``.
%End
QString label() const;
%Docstring
Expand Down
6 changes: 3 additions & 3 deletions python/gui/auto_generated/layertree/qgslayertreeview.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Sets provider for context menu. Takes ownership of the instance
%End
QgsLayerTreeViewMenuProvider *menuProvider() const;
%Docstring
Returns pointer to the context menu provider. May be null
Returns pointer to the context menu provider. May be ``None``
%End

QgsMapLayer *currentLayer() const;
Expand All @@ -88,11 +88,11 @@ If ``layer`` is ``None`` then all layers will be deselected.

QgsLayerTreeNode *currentNode() const;
%Docstring
Gets current node. May be null
Gets current node. May be ``None``
%End
QgsLayerTreeGroup *currentGroupNode() const;
%Docstring
Gets current group node. If a layer is current node, the function will return parent group. May be null.
Gets current group node. If a layer is current node, the function will return parent group. May be ``None``.
%End

QgsLayerTreeModelLegendNode *currentLegendNode() const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ Returns the widget mode

const QgsMapCanvas *mapCanvas() const;
%Docstring
Returns the map canvas (can be null)
Returns the map canvas (can be ``None``)
%End

void setupButtons( QDialogButtonBox *buttonBox );
Expand Down
2 changes: 1 addition & 1 deletion python/gui/auto_generated/qgsmapcanvastracer.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Create tracer associated with a particular map canvas, optionally message bar fo

QAction *actionEnableTracing() const;
%Docstring
Access to action that user may use to toggle tracing on/off. May be null if no action was associated
Access to action that user may use to toggle tracing on/off. May be ``None`` if no action was associated
%End

void setActionEnableTracing( QAction *action );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ when the symbol is given from outside rather than being set inside :py:class:`Qg

QgsDataDefinedSizeLegend *dataDefinedSizeLegend() const /Factory/;
%Docstring
Returns configuration as set up in the dialog (may be null). Ownership is passed to the caller.
Returns configuration as set up in the dialog (may be ``None``). Ownership is passed to the caller.
%End

signals:
Expand Down
2 changes: 1 addition & 1 deletion src/core/geometry/qgsabstractgeometry.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ class CORE_EXPORT QgsAbstractGeometry
/**
* Returns the closure of the combinatorial boundary of the geometry (ie the topological boundary of the geometry).
* For instance, a polygon geometry will have a boundary consisting of the linestrings for each ring in the polygon.
* \returns boundary for geometry. May be null for some geometry types.
* \returns boundary for geometry. May be NULLPTR for some geometry types.
* \since QGIS 3.0
*/
virtual QgsAbstractGeometry *boundary() const = 0 SIP_FACTORY;
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgscadutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class CORE_EXPORT QgsCadUtils
//! Structure defining all constraints for alignMapPoint() method
struct AlignMapPointContext
{
//! Snapping utils that will be used to snap point to map. Must not be null
//! Snapping utils that will be used to snap point to map. Must not be NULLPTR.
QgsSnappingUtils *snappingUtils = nullptr;
//! Map units/pixel ratio from map canvas. Needed for
double mapUnitsPerPixel;
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgscoordinatereferencesystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ class CORE_EXPORT QgsCoordinateReferenceSystem

QExplicitlySharedDataPointer<QgsCoordinateReferenceSystemPrivate> d;

//! Function for CRS validation. May be null.
//! Function for CRS validation. May be NULLPTR.
static CUSTOM_CRS_VALIDATION mCustomSrsValidation;


Expand Down
2 changes: 1 addition & 1 deletion src/core/qgslabelfeature.h
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ class CORE_EXPORT QgsLabelFeature
double mObstacleFactor;
//! text of the label
QString mLabelText;
//! extra information for curved labels (may be null)
//! extra information for curved labels (may be NULLPTR)
pal::LabelInfo *mInfo = nullptr;

private:
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsmaplayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -1513,7 +1513,7 @@ class CORE_EXPORT QgsMapLayer : public QObject
//! Controller of legend items of this layer
QgsMapLayerLegend *mLegend = nullptr;

//! Manager of multiple styles available for a layer (may be null)
//! Manager of multiple styles available for a layer (may be NULLPTR)
QgsMapLayerStyleManager *mStyleManager = nullptr;

//! Timer for triggering automatic refreshes of the layer
Expand Down
15 changes: 11 additions & 4 deletions src/core/qgsmaprendererjob.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,20 @@ class QgsFeatureFilterProvider;
struct LayerRenderJob
{
QgsRenderContext context;
QImage *img; // may be null if it is not necessary to draw to separate image (e.g. sequential rendering)
//! True when img has been initialized (filled with transparent pixels) and is safe to compose

/**
* Pointer to destination image.
*
* May be NULLPTR if it is not necessary to draw to separate image (e.g. sequential rendering).
*/
QImage *img;
//! TRUE when img has been initialized (filled with transparent pixels) and is safe to compose
bool imageInitialized = false;
QgsMapLayerRenderer *renderer; // must be deleted
QPainter::CompositionMode blendMode;
double opacity;
bool cached; // if true, img already contains cached image from previous rendering
//! If TRUE, img already contains cached image from previous rendering
bool cached;
QgsWeakMapLayerPointer layer;
int renderingTime; //!< Time it took to render the layer in ms (it is -1 if not rendered or still rendering)
QStringList errors; //!< Rendering errors
Expand All @@ -68,7 +75,7 @@ struct LabelRenderJob
QgsRenderContext context;

/**
* May be null if it is not necessary to draw to separate image (e.g. using composition modes which prevent "flattening" the layer).
* May be NULLPTR if it is not necessary to draw to separate image (e.g. using composition modes which prevent "flattening" the layer).
* Note that if complete is FALSE then img will be uninitialized and contain random data!.
*/
QImage *img = nullptr;
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgsvectorlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -1330,15 +1330,15 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte
int addTopologicalPoints( const QgsPointXY &p );

/**
* Access to const labeling configuration. May be null if labeling is not used.
* Access to const labeling configuration. May be NULLPTR if labeling is not used.
* \note Labels will only be rendered if labelsEnabled() returns TRUE.
* \see labelsEnabled()
* \since QGIS 3.0
*/
const QgsAbstractVectorLayerLabeling *labeling() const SIP_SKIP { return mLabeling; }

/**
* Access to labeling configuration. May be null if labeling is not used.
* Access to labeling configuration. May be NULLPTR if labeling is not used.
* \note Labels will only be rendered if labelsEnabled() returns TRUE.
* \see labelsEnabled()
* \since QGIS 3.0
Expand Down
4 changes: 2 additions & 2 deletions src/core/symbology/qgslegendsymbolitem.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class CORE_EXPORT QgsLegendSymbolItem
QgsLegendSymbolItem( const QgsLegendSymbolItem &other );
QgsLegendSymbolItem &operator=( const QgsLegendSymbolItem &other );

//! Returns associated symbol. May be null.
//! Returns associated symbol. May be NULLPTR.
QgsSymbol *symbol() const { return mSymbol; }
//! Returns text label
QString label() const { return mLabel; }
Expand Down Expand Up @@ -113,7 +113,7 @@ class CORE_EXPORT QgsLegendSymbolItem
QgsDataDefinedSizeLegend *dataDefinedSizeLegendSettings() const;

private:
//! Legend symbol -- may be null.
//! Legend symbol -- may be NULLPTR.
QgsSymbol *mSymbol = nullptr;
//! label of the item (may be empty or non-unique)
QString mLabel;
Expand Down
6 changes: 3 additions & 3 deletions src/gui/layertree/qgslayertreeview.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class GUI_EXPORT QgsLayerTreeView : public QTreeView

//! Sets provider for context menu. Takes ownership of the instance
void setMenuProvider( QgsLayerTreeViewMenuProvider *menuProvider SIP_TRANSFER );
//! Returns pointer to the context menu provider. May be null
//! Returns pointer to the context menu provider. May be NULLPTR
QgsLayerTreeViewMenuProvider *menuProvider() const { return mMenuProvider; }

/**
Expand All @@ -96,9 +96,9 @@ class GUI_EXPORT QgsLayerTreeView : public QTreeView
*/
void setCurrentLayer( QgsMapLayer *layer );

//! Gets current node. May be null
//! Gets current node. May be NULLPTR
QgsLayerTreeNode *currentNode() const;
//! Gets current group node. If a layer is current node, the function will return parent group. May be null.
//! Gets current group node. If a layer is current node, the function will return parent group. May be NULLPTR.
QgsLayerTreeGroup *currentGroupNode() const;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsabstractdatasourcewidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class GUI_EXPORT QgsAbstractDataSourceWidget : public QDialog
//! Returns the widget mode
QgsProviderRegistry::WidgetMode widgetMode() const;

//! Returns the map canvas (can be null)
//! Returns the map canvas (can be NULLPTR)
const QgsMapCanvas *mapCanvas() const;

//! Connect the ok and apply/add buttons to the slots
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsmapcanvastracer.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class GUI_EXPORT QgsMapCanvasTracer : public QgsTracer
explicit QgsMapCanvasTracer( QgsMapCanvas *canvas, QgsMessageBar *messageBar = nullptr );
~QgsMapCanvasTracer() override;

//! Access to action that user may use to toggle tracing on/off. May be null if no action was associated
//! Access to action that user may use to toggle tracing on/off. May be NULLPTR if no action was associated
QAction *actionEnableTracing() const { return mActionEnableTracing; }

/**
Expand Down
2 changes: 1 addition & 1 deletion src/gui/symbology/qgsdatadefinedsizelegendwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class GUI_EXPORT QgsDataDefinedSizeLegendWidget : public QgsPanelWidget, private
explicit QgsDataDefinedSizeLegendWidget( const QgsDataDefinedSizeLegend *ddsLegend, const QgsProperty &ddSize, QgsMarkerSymbol *overrideSymbol SIP_TRANSFER, QgsMapCanvas *canvas = nullptr, QWidget *parent SIP_TRANSFERTHIS = nullptr );
~QgsDataDefinedSizeLegendWidget() override;

//! Returns configuration as set up in the dialog (may be null). Ownership is passed to the caller.
//! Returns configuration as set up in the dialog (may be NULLPTR). Ownership is passed to the caller.
QgsDataDefinedSizeLegend *dataDefinedSizeLegend() const SIP_FACTORY;

signals:
Expand Down

0 comments on commit 1dc447e

Please sign in to comment.