mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
[layouts] Add api to retrieve window from designer dialog interface
This commit is contained in:
parent
4212cca56e
commit
a093dd7293
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user