Ejemplo 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)
        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)
Ejemplo n.º 3
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)
                
                # connect the signals
#                self.ctrl.distancesFromPoints.connect(self.calculateArcIntersection)
#                self.ctrl.closeArcIntersectionGui.connect(self.deactivate)
                self.ctrl.unsetTool.connect(self.unsetTool)
Ejemplo n.º 4
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)