Skip to content

Commit ddca8b6

Browse files
committedNov 20, 2017
SipConvertToSubClass code for QgsSearchWidgetToolButton
1 parent bdc47a4 commit ddca8b6

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed
 

‎python/gui/editorwidgets/qgssearchwidgettoolbutton.sip

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88

99

1010

11+
%ModuleHeaderCode
12+
#include "qgssearchwidgettoolbutton.h"
13+
%End
14+
1115
class QgsSearchWidgetToolButton : QToolButton
1216
{
1317
%Docstring
@@ -19,6 +23,12 @@ class QgsSearchWidgetToolButton : QToolButton
1923

2024
%TypeHeaderCode
2125
#include "qgssearchwidgettoolbutton.h"
26+
%End
27+
%ConvertToSubClassCode
28+
if ( qobject_cast<QgsSearchWidgetToolButton *>( sipCpp ) )
29+
sipType = sipType_QgsSearchWidgetToolButton;
30+
else
31+
sipType = nullptr;
2232
%End
2333
public:
2434

‎src/gui/editorwidgets/qgssearchwidgettoolbutton.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@
2121
#include <QToolButton>
2222
#include "qgis_gui.h"
2323

24+
#ifdef SIP_RUN
25+
% ModuleHeaderCode
26+
#include "qgssearchwidgettoolbutton.h"
27+
% End
28+
#endif
29+
2430
/**
2531
* \ingroup gui
2632
* \class QgsSearchWidgetToolButton
@@ -31,6 +37,16 @@
3137
*/
3238
class GUI_EXPORT QgsSearchWidgetToolButton : public QToolButton
3339
{
40+
41+
#ifdef SIP_RUN
42+
SIP_CONVERT_TO_SUBCLASS_CODE
43+
if ( qobject_cast<QgsSearchWidgetToolButton *>( sipCpp ) )
44+
sipType = sipType_QgsSearchWidgetToolButton;
45+
else
46+
sipType = nullptr;
47+
SIP_END
48+
#endif
49+
3450
Q_OBJECT
3551

3652
public:

0 commit comments

Comments
 (0)
Please sign in to comment.