Skip to content
Permalink
Browse files
[api] Add QgsLayoutDesignerInterface.layoutExported signal
Emitted whenever the layout is exported from the designer
  • Loading branch information
nyalldawson committed Jun 9, 2021
1 parent e627144 commit 6bd24e5d17f0d72d50ce548cfab0d723c0f8dbef
@@ -457,6 +457,16 @@ Toggles whether or not the rulers should be ``visible`` in the designer.
.. versionadded:: 3.4
%End

signals:

void layoutExported();
%Docstring
Emitted whenever a layout is exported from the layout designer.

The results of the export can be retrieved by calling :py:func:`~QgsLayoutDesignerInterface.lastExportResults`.

.. versionadded:: 3.20
%End

};

@@ -113,7 +113,9 @@ bool QgsLayoutDesignerDialog::sInitializedRegistry = false;
QgsAppLayoutDesignerInterface::QgsAppLayoutDesignerInterface( QgsLayoutDesignerDialog *dialog )
: QgsLayoutDesignerInterface( dialog )
, mDesigner( dialog )
{}
{
connect( mDesigner, &QgsLayoutDesignerDialog::layoutExported, this, &QgsLayoutDesignerInterface::layoutExported );
}

QWidget *QgsAppLayoutDesignerInterface::window()
{
@@ -4904,6 +4906,8 @@ void QgsLayoutDesignerDialog::storeExportResults( QgsLayoutExporter::ExportResul
qDeleteAll( mLastExportLabelingResults );
mLastExportLabelingResults.clear();
}

emit layoutExported();
}

void QgsLayoutDesignerDialog::selectItems( const QList<QgsLayoutItem *> &items )
@@ -338,6 +338,12 @@ class QgsLayoutDesignerDialog: public QMainWindow, public Ui::QgsLayoutDesignerB
*/
void aboutToClose();

/**
* Emitted whenever a layout is exported from the layout designer.
*
*/
void layoutExported();

protected:

void closeEvent( QCloseEvent * ) override;
@@ -398,6 +398,16 @@ class GUI_EXPORT QgsLayoutDesignerInterface: public QObject
*/
virtual void showRulers( bool visible ) = 0;

signals:

/**
* Emitted whenever a layout is exported from the layout designer.
*
* The results of the export can be retrieved by calling lastExportResults().
*
* \since QGIS 3.20
*/
void layoutExported();

};

0 comments on commit 6bd24e5

Please sign in to comment.