Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
More layout object sip casting
  • Loading branch information
nyalldawson committed Oct 22, 2018
1 parent 926e03a commit 8d7c54e
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
Expand Up @@ -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:

Expand Down
6 changes: 6 additions & 0 deletions python/gui/auto_generated/layout/qgslayoutview.sip.in
Expand Up @@ -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:

Expand Down
10 changes: 10 additions & 0 deletions src/gui/layout/qgslayoutdesignerinterface.h
Expand Up @@ -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:
Expand Down
9 changes: 9 additions & 0 deletions src/gui/layout/qgslayoutview.h
Expand Up @@ -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 )
Expand Down

0 comments on commit 8d7c54e

Please sign in to comment.