Skip to content
Permalink
Browse files

More layout object sip casting

  • Loading branch information
nyalldawson committed Oct 22, 2018
1 parent 926e03a commit 8d7c54e8d7e81029113879fcbfb604ed74bfcf0d
@@ -35,6 +35,12 @@ open layout designer dialogs.

%TypeHeaderCode
#include "qgslayoutdesignerinterface.h"
%End
%ConvertToSubClassCode
if ( qobject_cast<QgsLayoutDesignerInterface *>( sipCpp ) )
sipType = sipType_QgsLayoutDesignerInterface;
else
sipType = NULL;
%End
public:

@@ -21,6 +21,12 @@ QgsLayoutView manages the layout interaction tools and mouse/key events.

%TypeHeaderCode
#include "qgslayoutview.h"
%End
%ConvertToSubClassCode
if ( qobject_cast<QgsLayoutView *>( sipCpp ) )
sipType = sipType_QgsLayoutView;
else
sipType = NULL;
%End
public:

@@ -52,6 +52,16 @@ class QToolBar;
*/
class GUI_EXPORT QgsLayoutDesignerInterface: public QObject
{

#ifdef SIP_RUN
SIP_CONVERT_TO_SUBCLASS_CODE
if ( qobject_cast<QgsLayoutDesignerInterface *>( sipCpp ) )
sipType = sipType_QgsLayoutDesignerInterface;
else
sipType = NULL;
SIP_END
#endif

Q_OBJECT

public:
@@ -49,6 +49,15 @@ class QgsLayoutReportSectionLabel;
class GUI_EXPORT QgsLayoutView: public QGraphicsView
{

#ifdef SIP_RUN
SIP_CONVERT_TO_SUBCLASS_CODE
if ( qobject_cast<QgsLayoutView *>( sipCpp ) )
sipType = sipType_QgsLayoutView;
else
sipType = NULL;
SIP_END
#endif

Q_OBJECT

Q_PROPERTY( QgsLayout *currentLayout READ currentLayout WRITE setCurrentLayout NOTIFY layoutSet )

0 comments on commit 8d7c54e

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