Skip to content

Commit

Permalink
add missing doxymentation to gui/layout
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Oct 24, 2018
1 parent 3663de9 commit fa92f41
Show file tree
Hide file tree
Showing 14 changed files with 38 additions and 12 deletions.
Expand Up @@ -91,7 +91,7 @@ Selects the specified ``items``.
%Docstring
Toggles whether the atlas preview mode should be ``enabled`` in the designer.

.. seealso:: :py:func:`atlasPreviewModeEnabled`
.. seealso:: :py:func:`atlasPreviewEnabled`

.. versionadded:: 3.4
%End
Expand Down
Expand Up @@ -178,8 +178,6 @@ Creates a new empty item GUI registry.

QgsLayoutItemGuiRegistry is not usually directly created, but rather accessed through
:py:func:`QgsGui.layoutItemGuiRegistry()`

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

~QgsLayoutItemGuiRegistry();
Expand Down
16 changes: 16 additions & 0 deletions python/gui/auto_generated/layout/qgslayoutitemwidget.sip.in
Expand Up @@ -150,15 +150,31 @@ This widget can be embedded into other layout item widgets.
#include "qgslayoutitemwidget.h"
%End
public:

QgsLayoutItemPropertiesWidget( QWidget *parent, QgsLayoutItem *item );
%Docstring
Constructs a QgsLayoutItemPropertiesWidget with a ``parent`` and for the given layout ``item``.
%End

QgsLayoutItem::ReferencePoint positionMode() const;
%Docstring
Returns the position mode
%End

void showBackgroundGroup( bool showGroup );
%Docstring
Determines if the background of the group box shall be shown
%End

void showFrameGroup( bool showGroup );
%Docstring
Determines if the frame of the group box shall be shown
%End

void setItem( QgsLayoutItem *item );
%Docstring
Sets the layout item
%End

protected slots:
void initializeDataDefinedButtons();
Expand Down
Expand Up @@ -55,8 +55,6 @@ The ``ignoreItems`` argument can be used to specify a list of items to avoid sna
QPointF layoutPoint() const;
%Docstring
Returns the event point location in layout coordinates.

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

QPointF snappedPoint() const;
Expand All @@ -65,8 +63,6 @@ Returns the snapped event point location in layout coordinates. The snapped poin
all possible snapping methods, such as snapping to grid or guide lines.

.. seealso:: :py:func:`isSnapped`

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

bool isSnapped() const;
Expand Down
Expand Up @@ -22,6 +22,9 @@ Layout view tool for adding items to a layout.
public:

QgsLayoutViewToolAddItem( QgsLayoutView *view /TransferThis/ );
%Docstring
Constructs a QgsLayoutViewToolAddItem for the given layout ``view``.
%End

int itemMetadataId() const;
%Docstring
Expand Down
Expand Up @@ -22,6 +22,9 @@ Layout view tool for adding node based items to a layout.
public:

QgsLayoutViewToolAddNodeItem( QgsLayoutView *view /TransferThis/ );
%Docstring
Constructs a QgsLayoutViewToolAddNodeItem for the given layout ``view``.
%End

int itemMetadataId() const;
%Docstring
Expand Down
Expand Up @@ -44,6 +44,9 @@ Constructor for QgsLayoutViewToolSelect.


void setLayout( QgsLayout *layout );
%Docstring
Sets the a ``layout``.
%End

};

Expand Down
2 changes: 1 addition & 1 deletion src/gui/layout/qgslayoutdesignerinterface.h
Expand Up @@ -111,7 +111,7 @@ class GUI_EXPORT QgsLayoutDesignerInterface: public QObject
/**
* Toggles whether the atlas preview mode should be \a enabled in the designer.
*
* \see atlasPreviewModeEnabled()
* \see atlasPreviewEnabled()
* \since QGIS 3.4
*/
virtual void setAtlasPreviewEnabled( bool enabled ) = 0;
Expand Down
2 changes: 0 additions & 2 deletions src/gui/layout/qgslayoutitemguiregistry.h
Expand Up @@ -339,8 +339,6 @@ class GUI_EXPORT QgsLayoutItemGuiRegistry : public QObject
*
* QgsLayoutItemGuiRegistry is not usually directly created, but rather accessed through
* QgsGui::layoutItemGuiRegistry().
*
* \see populate()
*/
QgsLayoutItemGuiRegistry( QObject *parent = nullptr );

Expand Down
8 changes: 8 additions & 0 deletions src/gui/layout/qgslayoutitemwidget.h
Expand Up @@ -193,14 +193,22 @@ class GUI_EXPORT QgsLayoutItemPropertiesWidget: public QWidget, private Ui::QgsL
{
Q_OBJECT
public:

/**
* Constructs a QgsLayoutItemPropertiesWidget with a \a parent and for the given layout \a item.
*/
QgsLayoutItemPropertiesWidget( QWidget *parent, QgsLayoutItem *item );

//! Returns the position mode
QgsLayoutItem::ReferencePoint positionMode() const;

//! Determines if the background of the group box shall be shown
void showBackgroundGroup( bool showGroup );

//! Determines if the frame of the group box shall be shown
void showFrameGroup( bool showGroup );

//! Sets the layout item
void setItem( QgsLayoutItem *item );

protected slots:
Expand Down
2 changes: 0 additions & 2 deletions src/gui/layout/qgslayoutviewmouseevent.h
Expand Up @@ -67,15 +67,13 @@ class GUI_EXPORT QgsLayoutViewMouseEvent : public QMouseEvent

/**
* Returns the event point location in layout coordinates.
* \see pos()
*/
QPointF layoutPoint() const;

/**
* Returns the snapped event point location in layout coordinates. The snapped point will consider
* all possible snapping methods, such as snapping to grid or guide lines.
* \see isSnapped()
* \see pos()
*/
QPointF snappedPoint() const { return mSnappedPoint; }

Expand Down
1 change: 1 addition & 0 deletions src/gui/layout/qgslayoutviewtooladditem.h
Expand Up @@ -34,6 +34,7 @@ class GUI_EXPORT QgsLayoutViewToolAddItem : public QgsLayoutViewTool

public:

//! Constructs a QgsLayoutViewToolAddItem for the given layout \a view.
QgsLayoutViewToolAddItem( QgsLayoutView *view SIP_TRANSFERTHIS );

/**
Expand Down
1 change: 1 addition & 0 deletions src/gui/layout/qgslayoutviewtooladdnodeitem.h
Expand Up @@ -34,6 +34,7 @@ class GUI_EXPORT QgsLayoutViewToolAddNodeItem : public QgsLayoutViewTool

public:

//! Constructs a QgsLayoutViewToolAddNodeItem for the given layout \a view.
QgsLayoutViewToolAddNodeItem( QgsLayoutView *view SIP_TRANSFERTHIS );

/**
Expand Down
1 change: 1 addition & 0 deletions src/gui/layout/qgslayoutviewtoolselect.h
Expand Up @@ -58,6 +58,7 @@ class GUI_EXPORT QgsLayoutViewToolSelect : public QgsLayoutViewTool
SIP_SKIP QgsLayoutMouseHandles *mouseHandles();
///@endcond

//! Sets the a \a layout.
void setLayout( QgsLayout *layout );

private:
Expand Down

0 comments on commit fa92f41

Please sign in to comment.