예제 #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_()