forked from etiennesky/gridoverlay
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgridpluginlayertype.py
36 lines (30 loc) · 1.56 KB
/
gridpluginlayertype.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
"""
/***************************************************************************
GridPluginLayerType - registers itself to Quantum as a Plugin Layer
A QGIS plugin
Overlays a user-definable grid on the map.
-------------------
begin : 2012-05-11
copyright : (C) 2012 by John Donovan
email : [email protected]
***************************************************************************/
/***************************************************************************
* *
* 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. *
* *
***************************************************************************/
"""
from qgis import core
from gridpluginlayer import GridPluginLayer
class GridPluginLayerType(core.QgsPluginLayerType):
def __init__(self, iface):
core.QgsPluginLayerType.__init__(self, GridPluginLayer.LAYER_TYPE)
self.iface = iface
def createLayer(self):
return GridPluginLayer(self.iface)
def showLayerProperties(self, layer):
layer.showDialog()
return True