示例#1
0
    def __init__(self, iface):
        # Save reference to the QGIS interface
        self.iface = iface
        self.action = None

        # create and show the dialog
        self.dlg = InfoCubeDialog()
        self.dlg.message_bar = self.iface.messageBar()

        # create the bbox tool
        self.bbox = InfoCubeBBoxTool(self.iface.mapCanvas(), self.dlg)
示例#2
0
    def __init__(self, iface):
        # Save reference to the QGIS interface
        self.iface = iface
        self.action = None
        
        # create and show the dialog
        self.dlg = InfoCubeDialog()
        self.dlg.message_bar = self.iface.messageBar()

        # create the bbox tool
        self.bbox = InfoCubeBBoxTool(self.iface.mapCanvas(), self.dlg)
示例#3
0
class InfoCubeConnect:
    def __init__(self, iface):
        # Save reference to the QGIS interface
        self.iface = iface
        self.action = None
        
        # create and show the dialog
        self.dlg = InfoCubeDialog()
        self.dlg.message_bar = self.iface.messageBar()

        # create the bbox tool
        self.bbox = InfoCubeBBoxTool(self.iface.mapCanvas(), self.dlg)

    def unload(self):
        self.bbox.reset()
        self.dlg.reject()

        # remove the bbox
        self.iface.mapCanvas().unsetMapTool(self.bbox)

    # run method that performs all the real work
    def run(self):
        # add the bbox
        self.iface.mapCanvas().setMapTool(self.bbox)
        # show the dialog
        self.dlg.show()
        self.dlg.exec_()
示例#4
0
class InfoCubeConnect:
    def __init__(self, iface):
        # Save reference to the QGIS interface
        self.iface = iface
        self.action = None

        # create and show the dialog
        self.dlg = InfoCubeDialog()
        self.dlg.message_bar = self.iface.messageBar()

        # create the bbox tool
        self.bbox = InfoCubeBBoxTool(self.iface.mapCanvas(), self.dlg)

    def unload(self):
        self.bbox.reset()
        self.dlg.reject()

        # remove the bbox
        self.iface.mapCanvas().unsetMapTool(self.bbox)

    # run method that performs all the real work
    def run(self):
        # add the bbox
        self.iface.mapCanvas().setMapTool(self.bbox)
        # show the dialog
        self.dlg.show()
        self.dlg.exec_()