Skip to content

Commit

Permalink
SipConvertToSubClass code for QgsSearchWidgetToolButton
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Nov 20, 2017
1 parent bdc47a4 commit ddca8b6
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
10 changes: 10 additions & 0 deletions python/gui/editorwidgets/qgssearchwidgettoolbutton.sip
Expand Up @@ -8,6 +8,10 @@



%ModuleHeaderCode
#include "qgssearchwidgettoolbutton.h"
%End

class QgsSearchWidgetToolButton : QToolButton
{
%Docstring
Expand All @@ -19,6 +23,12 @@ class QgsSearchWidgetToolButton : QToolButton

%TypeHeaderCode
#include "qgssearchwidgettoolbutton.h"
%End
%ConvertToSubClassCode
if ( qobject_cast<QgsSearchWidgetToolButton *>( sipCpp ) )
sipType = sipType_QgsSearchWidgetToolButton;
else
sipType = nullptr;
%End
public:

Expand Down
16 changes: 16 additions & 0 deletions src/gui/editorwidgets/qgssearchwidgettoolbutton.h
Expand Up @@ -21,6 +21,12 @@
#include <QToolButton>
#include "qgis_gui.h"

#ifdef SIP_RUN
% ModuleHeaderCode
#include "qgssearchwidgettoolbutton.h"
% End
#endif

/**
* \ingroup gui
* \class QgsSearchWidgetToolButton
Expand All @@ -31,6 +37,16 @@
*/
class GUI_EXPORT QgsSearchWidgetToolButton : public QToolButton
{

#ifdef SIP_RUN
SIP_CONVERT_TO_SUBCLASS_CODE
if ( qobject_cast<QgsSearchWidgetToolButton *>( sipCpp ) )
sipType = sipType_QgsSearchWidgetToolButton;
else
sipType = nullptr;
SIP_END
#endif

Q_OBJECT

public:
Expand Down

0 comments on commit ddca8b6

Please sign in to comment.