コード例 #1
0
    def __init__(self, iface, bbox_tool):
        """Constructor.

        :param iface: An interface instance that will be passed to this class
            which provides the hook by which you can manipulate the QGIS
            application at run time.
        :type iface: QgsInterface
        """
        # Save reference to the QGIS interface
        self.iface = iface
        self.bbox_tool = bbox_tool

        # Create the dialog (after translation) and keep reference
        self.dlg = VectorsDialog(self.iface.mainWindow())
        self.iface.addDockWidget(Qt.RightDockWidgetArea, self.dlg)

        self.dialog_tool = VectorsDialogTool(self.iface, self.dlg.dialog_base,
                                             self.bbox_tool)