Skip to content
Permalink
Browse files

[layouts] Add api to retrieve window from designer dialog interface

  • Loading branch information
nyalldawson committed Oct 23, 2018
1 parent 4212cca commit a093dd7293d93fc59ba01b5904a5e91ee347a923
@@ -61,6 +61,13 @@ Returns the current layout displayed in the designer.
Returns the master layout displayed in the designer.

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

virtual QWidget *window() = 0;
%Docstring
Returns a pointer to the designer window.

.. versionadded:: 3.4
%End

virtual QgsLayoutView *view() = 0;
@@ -102,6 +102,11 @@ QgsAppLayoutDesignerInterface::QgsAppLayoutDesignerInterface( QgsLayoutDesignerD
, mDesigner( dialog )
{}

QWidget *QgsAppLayoutDesignerInterface::window()
{
return mDesigner;
}

QgsLayout *QgsAppLayoutDesignerInterface::layout()
{
return mDesigner->currentLayout();
@@ -55,6 +55,7 @@ class QgsAppLayoutDesignerInterface : public QgsLayoutDesignerInterface

public:
QgsAppLayoutDesignerInterface( QgsLayoutDesignerDialog *dialog );
QWidget *window() override;
QgsLayout *layout() override;
QgsMasterLayoutInterface *masterLayout() override;
QgsLayoutView *view() override;
@@ -85,6 +85,13 @@ class GUI_EXPORT QgsLayoutDesignerInterface: public QObject
*/
virtual QgsMasterLayoutInterface *masterLayout() = 0;

/**
* Returns a pointer to the designer window.
*
* \since QGIS 3.4
*/
virtual QWidget *window() = 0;

/**
* Returns the layout view utilized by the designer.
* \see layout()

0 comments on commit a093dd7

Please sign in to comment.
You can’t perform that action at this time.