|
17 | 17 | *************************************************************************** |
18 | 18 | """ |
19 | 19 |
|
20 | | -# If pluginType is MODULE, the plugin loader will call moduleInformation. The |
21 | | -# variable MODULE is inserted into the local namespace by the plugin loader. |
22 | | -pluginType = MODULE |
| 20 | +""" |
| 21 | +This file is used by pyuic to redirect includes |
| 22 | +in custom widgets to the correct QGIS python packages. |
| 23 | +It is copied on installation in /pythonX/dist-packages/PyQt4/uic/widget-plugins/ |
| 24 | +""" |
| 25 | + |
| 26 | +#pluginType = CW_FILTER |
| 27 | +#def getFilter(): |
| 28 | +# import qgis.gui |
| 29 | +# |
| 30 | +# QGIS_widgets = {} |
| 31 | +# for pyClass in dir(qgis.gui): |
| 32 | +# QGIS_widgets[pyClass] = 'qgis.gui' |
| 33 | +# |
| 34 | +# def _QGISfilter(widgetname, baseclassname, module): |
| 35 | +# print widgetname, baseclassname, module |
| 36 | +# if widgetname in QGIS_widgets: |
| 37 | +# return (MATCH, (widgetname, baseclassname, QGIS_widgets[widgetname])) |
| 38 | +# else: |
| 39 | +# return (NO_MATCH, None) |
| 40 | +# |
| 41 | +# return _QGISfilter |
23 | 42 |
|
24 | 43 |
|
25 | | -# moduleInformation() must return a tuple (module, widget_list). If "module" |
26 | | -# is "A" and any widget from this module is used, the code generator will write |
27 | | -# "import A". If "module" is "A[.B].C", the code generator will write |
28 | | -# "from A[.B] import C". Each entry in "widget_list" must be unique. |
| 44 | + |
| 45 | +pluginType = MODULE |
29 | 46 | def moduleInformation(): |
30 | | - return "qgis.gui", \ |
31 | | - ("QgsCollapsibleGroupbox" ,\ |
32 | | - "QgsFieldComboBox" ,\ |
33 | | - "QgsFieldExpressionWidget",\ |
34 | | - "QgsMapLayerComboBox" ,\ |
35 | | - "QgsMapLayerProxyModel" ,\ |
36 | | - "QgsScalevisibilityWidget",\ |
37 | | - ) |
| 47 | + import qgis.gui |
| 48 | + return "qgis.gui", dir(qgis.gui) |
| 49 | + |
0 commit comments