Exemplo n.º 1
0
    def showDialog(self):
        if self.p1 == None or self.p2 == None:
            QMessageBox.information(
                None, QCoreApplication.translate("ctools", "Cancel"),
                QCoreApplication.translate("ctools",
                                           "Not enough vertex selected."))
        else:
            az = Azimuth.calculate(self.p1, self.p2)

            flags = Qt.WindowTitleHint | Qt.WindowSystemMenuHint | Qt.WindowMaximizeButtonHint  # QgisGui.ModalDialogFlags
            self.ctrl = ShowAzimuthGui(self.iface.mainWindow(), flags)
            self.ctrl.initGui()
            self.ctrl.show()
            self.ctrl.writeAzimuth(az)

            self.ctrl.unsetTool.connect(self.unsetTool)
Exemplo n.º 2
0
    def showDialog(self):
        if self.p1 == None or self.p2 == None:
            QMessageBox.information(None, "Cancel",
                                    "Not enough vertex selected.")
        else:
            az = Azimuth.calculate(self.p1, self.p2)

            flags = Qt.WindowTitleHint | Qt.WindowSystemMenuHint | Qt.WindowMaximizeButtonHint  # QgisGui.ModalDialogFlags
            self.ctrl = ShowAzimuthGui(self.iface.mainWindow(), flags)
            self.ctrl.initGui()
            self.ctrl.show()
            self.ctrl.writeAzimuth(az)

            # connect the signals
            #                QObject.connect(self.ctrl, SIGNAL("distancesFromPoints(double, double)"), self.calculateArcIntersection)
            #                QObject.connect(self.ctrl, SIGNAL("closeArcIntersectionGui()"), self.deactivate)
            QObject.connect(self.ctrl, SIGNAL("unsetTool()"), self.unsetTool)