Skip to content

Commit

Permalink
fix documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Jan 18, 2024
1 parent 9c13cb6 commit 2e41a60
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 20 deletions.
11 changes: 11 additions & 0 deletions python/PyQt6/core/auto_generated/qgssnappingutils.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,18 @@ Returns the list of extra snapping layers
%End

QgsDigitizingGuideLayer *guideLayer() const;
%Docstring
Returns the map guide layer

.. versionadded:: 3.36
%End

void setGuideLayer( QgsDigitizingGuideLayer *guideLayer );
%Docstring
Sets the map guide layer

.. versionadded:: 3.36
%End

public slots:

Expand Down
11 changes: 11 additions & 0 deletions python/core/auto_generated/qgssnappingutils.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,18 @@ Returns the list of extra snapping layers
%End

QgsDigitizingGuideLayer *guideLayer() const;
%Docstring
Returns the map guide layer

.. versionadded:: 3.36
%End

void setGuideLayer( QgsDigitizingGuideLayer *guideLayer );
%Docstring
Sets the map guide layer

.. versionadded:: 3.36
%End

public slots:

Expand Down
4 changes: 2 additions & 2 deletions src/core/qgsdigitizingguidelayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class QgsLineSymbol;

/**
* \ingroup core
* @brief The QgsDigitizingGuideLayer class holds map guides information saved in the project file.
* \brief The QgsDigitizingGuideLayer class holds map guides information saved in the project file.
*
* \since QGIS 3.36
*/
Expand All @@ -56,7 +56,7 @@ class CORE_EXPORT QgsDigitizingGuideLayer : public QgsAnnotationLayer
//! Adds a line guide
void addLineGuide( QgsCurve *curve SIP_TRANSFER, const QString &title, QList<QgsAnnotationItem *> details = QList<QgsAnnotationItem *>(), const QDateTime &creation = QDateTime::currentDateTime() );

//! Return the guides
//! Returns the guides
std::pair<QList<QgsPointXY>, QList<const QgsCurve *> > guides() const;

//! Returns the model
Expand Down
9 changes: 9 additions & 0 deletions src/core/qgssnappingutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,16 @@ class CORE_EXPORT QgsSnappingUtils : public QObject
return mExtraSnapLayers;
}

/**
* Returns the map guide layer
* \since QGIS 3.36
*/
QgsDigitizingGuideLayer *guideLayer() const;

/**
* Sets the map guide layer
* \since QGIS 3.36
*/
void setGuideLayer( QgsDigitizingGuideLayer *guideLayer );

public slots:
Expand Down
24 changes: 12 additions & 12 deletions src/gui/advanceddigitizing/qgsdigitizingguidewidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,29 +28,29 @@ class QgsMapCanvas;

/**
* \ingroup core
* @brief The QgsDigitizingGuideLayer class holds map guides information saved in the project file.
* \brief The QgsDigitizingGuideLayer class holds map guides information saved in the project file.
*
* \since QGIS 3.36
*/
class GUI_EXPORT QgsDigitizingGuideWidget : public QWidget, private Ui::QgsDigitizingGuideWidget
{
Q_OBJECT
public:
explicit QgsDigitizingGuideWidget(QgsMapCanvas *canvas, QWidget *parent = nullptr);
Q_OBJECT
public:
explicit QgsDigitizingGuideWidget( QgsMapCanvas *canvas, QWidget *parent = nullptr );

signals:
signals:

private:
void enableGuideMapTool();
private:
void enableGuideMapTool();

void guideSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
void guideSelectionChanged( const QItemSelection &selected, const QItemSelection &deselected );

void removeButtonClicked();
void removeButtonClicked();

QgsMapCanvas* mCanvas = nullptr;
QgsDigitizingGuideLayer* mGuideLayer = nullptr;
QgsMapCanvas *mCanvas = nullptr;
QgsDigitizingGuideLayer *mGuideLayer = nullptr;

QMap<QToolButton *, QgsDigitizingGuideMapTool *> mGuidesMapTools;
QMap<QToolButton *, QgsDigitizingGuideMapTool *> mGuidesMapTools;

};

Expand Down
14 changes: 8 additions & 6 deletions src/gui/qgsdigitizingguidemaptool.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class GUI_EXPORT QgsDigitizingGuideToolUserInputWidget : public QWidget, private

/**
* \ingroup gui
* @brief The QgsDigitizingGuideMapTool is a base class for map tools drawing map guides
* \brief The QgsDigitizingGuideMapTool is a base class for map tools drawing map guides
* \since QGIS 3.34
*/
class GUI_EXPORT QgsDigitizingGuideMapTool : public QgsMapTool
Expand Down Expand Up @@ -91,7 +91,7 @@ class GUI_EXPORT QgsDigitizingGuideMapTool : public QgsMapTool

/**
* \ingroup gui
* @brief The QgsDigitizingGuideMapToolDistanceToPoints is a map tool to place a point guide at a given distance to 2 points
* \brief The QgsDigitizingGuideMapToolDistanceToPoints is a map tool to place a point guide at a given distance to 2 points
* \since QGIS 3.34
*/
class GUI_EXPORT QgsDigitizingGuideMapToolDistanceToPoints : public QgsDigitizingGuideMapTool
Expand Down Expand Up @@ -119,7 +119,7 @@ class GUI_EXPORT QgsDigitizingGuideMapToolDistanceToPoints : public QgsDigitizin

/**
* \ingroup gui
* @brief The QgsDigitizingGuideMapToolLineAbstract is an absctract class for line extension/parallel/perpendicular implementations
* \brief The QgsDigitizingGuideMapToolLineAbstract is an absctract class for line extension/parallel/perpendicular implementations
* \since QGIS 3.34
*/
class GUI_EXPORT QgsDigitizingGuideMapToolLineAbstract : public QgsDigitizingGuideMapTool
Expand All @@ -135,6 +135,7 @@ class GUI_EXPORT QgsDigitizingGuideMapToolLineAbstract : public QgsDigitizingGui
void deactivate() override;

protected:
//! Updates the rubber band using the constructed line
void updateRubberBand( QgsLineString *line );

bool mHasOffset = false;
Expand All @@ -160,7 +161,7 @@ class GUI_EXPORT QgsDigitizingGuideMapToolLineAbstract : public QgsDigitizingGui

/**
* \ingroup gui
* @brief The QgsDigitizingGuideMapToolLineExtension is a map tool to place a line guide as an extension of a segment
* \brief The QgsDigitizingGuideMapToolLineExtension is a map tool to place a line guide as an extension of a segment
* \since QGIS 3.34
*/
class GUI_EXPORT QgsDigitizingGuideMapToolLineExtension : public QgsDigitizingGuideMapToolLineAbstract
Expand All @@ -176,7 +177,7 @@ class GUI_EXPORT QgsDigitizingGuideMapToolLineExtension : public QgsDigitizingGu

/**
* \ingroup gui
* @brief The QgsDigitizingGuideMapToolLineParallel is a map tool to place a line guide as a parallel to a segment
* \brief The QgsDigitizingGuideMapToolLineParallel is a map tool to place a line guide as a parallel to a segment
* \since QGIS 3.34
*/
class GUI_EXPORT QgsDigitizingGuideMapToolLineParallel : public QgsDigitizingGuideMapToolLineAbstract
Expand All @@ -189,9 +190,10 @@ class GUI_EXPORT QgsDigitizingGuideMapToolLineParallel : public QgsDigitizingGui
private:
QgsLineString *createLine( const QgsPointXY &point, double offset = 0 ) override;
};

/**
* \ingroup gui
* @brief The QgsDigitizingGuideMapToolLinePerpendicular is a map tool to place a line guide as a perpendicular to a segment
* \brief The QgsDigitizingGuideMapToolLinePerpendicular is a map tool to place a line guide as a perpendicular to a segment
* \since QGIS 3.34
*/
class GUI_EXPORT QgsDigitizingGuideMapToolLinePerpendicular : public QgsDigitizingGuideMapToolLineAbstract
Expand Down

0 comments on commit 2e41a60

Please sign in to comment.