Created
December 7, 2016 13:56
-
-
Save ghtmtt/f67073819e3af070daa144eac2f1a907 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
*************************************************************************** | |
customwidgets.py | |
--------------------- | |
Date : May 2014 | |
Copyright : (C) 2014 by Denis Rouzaud | |
Email : denis.rouzaud@gmail.com | |
*************************************************************************** | |
* * | |
* This program is free software; you can redistribute it and/or modify * | |
* it under the terms of the GNU General Public License as published by * | |
* the Free Software Foundation; either version 2 of the License, or * | |
* (at your option) any later version. * | |
* * | |
*************************************************************************** | |
""" | |
""" | |
This file is used by pyuic to redirect includes | |
in custom widgets to the correct QGIS python packages. | |
It is copied on installation in /pythonX/dist-packages/PyQt4/uic/widget-plugins/ | |
""" | |
# solution with CW_FILTER not fully working due to include of other files | |
# (e.g. for flags defined in other source files) | |
# pluginType = CW_FILTER | |
# def getFilter(): | |
# import qgis.gui | |
# | |
# QGIS_widgets = {} | |
# for pyClass in dir(qgis.gui): | |
# QGIS_widgets[pyClass] = 'qgis.gui' | |
# | |
# def _QGISfilter(widgetname, baseclassname, module): | |
# print widgetname, baseclassname, module | |
# if widgetname in QGIS_widgets: | |
# return (MATCH, (widgetname, baseclassname, QGIS_widgets[widgetname])) | |
# else: | |
# return (NO_MATCH, None) | |
# | |
# return _QGISfilter | |
pluginType = MODULE | |
def moduleInformation(): | |
try: | |
import qgis.gui | |
return "qgis.gui", dir(qgis.gui) | |
except ImportError: | |
return "", [] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment