Skip to content
Permalink
Browse files

add SIP bindings

  • Loading branch information
alexbruy committed Jan 10, 2017
1 parent 17905ca commit 6c3c5331dcd63604fa948eac1ef681daa2f2c491
Showing with 58 additions and 0 deletions.
  1. +1 −0 python/core/core.sip
  2. +7 −0 python/core/qgsapplication.sip
  3. +50 −0 python/core/qgshelp.sip
@@ -65,6 +65,7 @@
%Include qgsgeometryvalidator.sip
%Include qgsgml.sip
%Include qgsgmlschema.sip
%Include qgshelp.sip
%Include qgshistogram.sip
%Include qgsinterval.sip
%Include qgsjsonutils.sip
@@ -437,6 +437,13 @@ static void qtgui_UpdatePyArgv(PyObject *argvlist, int argc, char **argv)
*/
static QgsMessageLog* messageLog();

/**
* Returns the application's help viewer, used for displaying
* help topic for the given key
* @note added in QGIS 3.0
*/
static QgsHelp* helpViewer();

%If(ANDROID)
//dummy method to workaround sip generation issue issue
bool x11EventFilter ( XEvent * event );
@@ -0,0 +1,50 @@
/** \ingroup core
* \class QgsHelp
* @brief Helper class for showing help topic URI for the given key.
*
* Help can be stored online, on the local directory or on the intranet
* server. Location of the QGIS help can be configured in QGIS options.
* Multiple locations are supported, they will be used in order of
* preference, from top to bottom.
*
* URI construction takes in account following information:
* - QGIS version
* - language of the QGIS UI
*
* If no help found, default error page with information how to setup
* help system will be shown.
*
* This class can be created directly, or accessed via
* QgsApplication::helpViewer().
*
* @note added in QGIS 3.0
*/
class QgsHelp : QObject
{
%TypeHeaderCode
#include <qgshelp.h>
%End

public:

/** Constructor for QgsHelp.
* @param parent parent QObject
*/
QgsHelp( QObject* parent = nullptr );

virtual ~QgsHelp();

/** Opens help topic for the given help key using default system
* web browser. If help topic not found, builtin error page shown.
* @param key key which identified help topic
* @note added in QGIS 3.0
*/
void openHelp( const QString& key ) const;

/** Returns URI of the help topic for the given key. If help topic
* not found, URI of the builtin error page returned.
* @param key key which identified help topic
* @note added in QGIS 3.0
*/
QUrl helpUrl( const QString& key ) const;
};

0 comments on commit 6c3c533

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