예제 #1
0
    def register():

        path = os.path.join(os.path.dirname(__file__), 'qgsfuncs.py')
        if not QgsExpression.isFunctionName("$format_label"):
            imp.load_source('qgsfuncs', path)
        icons = os.path.join(os.path.dirname(__file__), 'icons')

        if not icons in QgsApplication.svgPaths():
            QgsApplication.setDefaultSvgPaths(QgsApplication.svgPaths() + [icons])

        # from qgsfuncs import format_label
        pass
예제 #2
0
 def unload(self):
     """Unload the plugin"""
     control.unload()
     QgsExpression.unregisterFunction("$animation_datetime")
     QgsExpression.unregisterFunction("animation_datetime")
예제 #3
0
 def unload(self):
     """Unload the plugin"""
     control.unload()
     QgsExpression.unregisterFunction("$animation_datetime")
     QgsExpression.unregisterFunction("animation_datetime")
예제 #4
0
 def unregister():
     if QgsExpression.isFunctionName("$format_label"):
         QgsExpression.unregisterFunction("$format_label")
    def unregisterFuncs():
        Log.debug("Un Registering Generic functions")
        if QgsExpression.isFunctionName("$is_connected"):
            QgsExpression.unregisterFunction("$is_connected")

        if QgsExpression.isFunctionName("$is_visible"):
            QgsExpression.unregisterFunction("$is_visible")

        if QgsExpression.isFunctionName("$is_changed"):
            QgsExpression.unregisterFunction("$is_changed")

        if QgsExpression.isFunctionName("$since_change"):
            QgsExpression.unregisterFunction("$since_change")

        if QgsExpression.isFunctionName("$is_silent"):
            QgsExpression.unregisterFunction("$is_silent")