Пример #1
0
 def runGCPMainWindow(self, fromVirtual3D):
       # this QGIS tool emits as QgsPoint after each click on the map canvas
       self.clickTool = QgsMapToolEmitPoint(self.canvas)
       self.canvas.setMapTool(self.clickTool)
       # create main window
       self.gcpMainWindow = GetGCPMainWindow(self.iface, self.buffers, self.picture_name,self.pathToData,self.isFrameBufferSupported, self.crs)
       # show the Main Window
       self.gcpMainWindow.show()
       # load the picture in the central widget
       self.load_picture(self.picture_name)
       # get DEM reference layer
       self.gcpMainWindow.cLayer = self.cLayer
       # connect events between getGCPmainWindow and Qgis canvas
       self.gcpMainWindow.ui.tableView.selectionModel().currentRowChanged.connect(self.resetClickTool) 
       self.gcpMainWindow.resetToolSignal.connect(self.resetClickTool)
       self.gcpMainWindow.setCanvasExtentSignal.connect(self.setCanvasExtent)
       self.clickTool.canvasClicked.connect(self.newCanvasGCP)
       self.gcpMainWindow.GoToMonoplotterButton.triggered.connect(self.goToMonoplotter)
       self.gcpMainWindow.clearMapTool2.connect(self.clearMapTool)
       
       if fromVirtual3D:
           self.gcpMainWindow.pos = self.ParamPose[0]
           self.gcpMainWindow.lookat = self.ParamPose[1]
           self.gcpMainWindow.FOV = self.ParamPose[2]
           self.gcpMainWindow.roll = self.ParamPose[3]