def initParametersPan(self): ui = Ui_RnavDmeUpdateAreaDlg() self.parametersPanel = ui FlightPlanBaseSimpleDlg.initParametersPan(self) '''init panel''' self.parametersPanel.pnlDme1 = PositionPanel(ui.gbDme1) # self.parametersPanel.pnlDme1.groupBox.setTitle("DME Position") self.parametersPanel.pnlDme1.btnCalculater.hide() self.parametersPanel.pnlDme1.hideframe_Altitude() self.parametersPanel.pnlDme1.setObjectName("positionDme1") ui.vl_Dme1.insertWidget(1, self.parametersPanel.pnlDme1) self.parametersPanel.pnlDme2 = PositionPanel(ui.gbDme2) # self.parametersPanel.pnlDme1.groupBox.setTitle("DME Position") self.parametersPanel.pnlDme2.btnCalculater.hide() self.parametersPanel.pnlDme2.hideframe_Altitude() self.parametersPanel.pnlDme2.setObjectName("positionDme2") ui.vl_Dme2.insertWidget(1, self.parametersPanel.pnlDme2) self.parametersPanel.cmbConstructionType.addItems(["2D", "3D"]) '''signal and slost''' self.parametersPanel.btnMesureDoc1.clicked.connect(self.measureToolDoc1) self.parametersPanel.btnMesureDoc2.clicked.connect(self.measureToolDoc2)
def initParametersPan(self): ui = Ui_IasToTas() self.parametersPanel = ui FlightPlanBaseSimpleDlg.initParametersPan(self) self.parametersPanel.pnlWind = WindPanel( self.parametersPanel.gbNonStandard) self.parametersPanel.pnlWind.lblIA.setMinimumSize(180, 0) self.parametersPanel.pnlWind.speedBox.setEnabled(False) self.parametersPanel.vLayoutNonStandard.insertWidget( 0, self.parametersPanel.pnlWind) self.parametersPanel.pnlWind.setAltitude( Altitude(float(self.parametersPanel.txtAltitude.text()), AltitudeUnits.FT)) self.parametersPanel.txtAltitude.textChanged.connect( self.txtAltitudeChanged) self.parametersPanel.cmbType.addItems([ IasTasSegmentType.Departure, IasTasSegmentType.Enroute, IasTasSegmentType.Holding, IasTasSegmentType.InitialRR, IasTasSegmentType.InitialDR, IasTasSegmentType.IafIfFaf, IasTasSegmentType.MissedApproach ]) self.parametersPanel.cmbType.currentIndexChanged.connect( self.method_29) self.parametersPanel.txtIAS.textChanged.connect(self.method_29) self.parametersPanel.txtAltitude.textChanged.connect(self.method_29) self.parametersPanel.txtTime.textChanged.connect(self.method_29) self.parametersPanel.txtISA.textChanged.connect(self.method_29) self.parametersPanel.btnEST.clicked.connect(self.btnESTClicked) self.parametersPanel.btnREA.clicked.connect(self.btnREAClicked) self.parametersPanel.btnC.clicked.connect(self.btnCClicked) self.parametersPanel.btnD.clicked.connect(self.btnDClicked) self.parametersPanel.btnX.clicked.connect(self.btnXClicked) self.parametersPanel.btnNonStd.clicked.connect(self.btnNonStdClicked) self.parametersPanel.txtAltitudeM.textChanged.connect( self.txtAltitudeMChanged) self.parametersPanel.txtAltitude.textChanged.connect( self.txtAltitudeFtChanged) self.flag = 0 if self.flag == 0: self.flag = 2 if self.flag == 1: self.flag = 0 if self.flag == 2: try: self.parametersPanel.txtAltitudeM.setText( str( Unit.ConvertFeetToMeter( float(self.parametersPanel.txtAltitude.text())))) except: self.parametersPanel.txtAltitudeM.setText("0.0") self.method_29()
def initParametersPan(self): ui = Ui_DmeToleranceDlg() self.parametersPanel = ui FlightPlanBaseSimpleDlg.initParametersPan(self) '''init panel''' self.parametersPanel.pnlDME = PositionPanel(ui.gbConstruction) self.parametersPanel.pnlDME.groupBox.setTitle("DME Position") self.parametersPanel.pnlDME.btnCalculater.hide() self.parametersPanel.pnlDME.hideframe_Altitude() self.parametersPanel.pnlDME.setObjectName("positionDme") ui.vl_gbConstruction.insertWidget(1, self.parametersPanel.pnlDME) self.parametersPanel.cmbCalculationType.addItems([DmeToleranceCalculationType.Ground, DmeToleranceCalculationType.Aircraft]) self.parametersPanel.cmbConstructionType.addItems([DmeToleranceConstructionType.Circle, DmeToleranceConstructionType.Arc]) self.parametersPanel.btnMesureSlant.setVisible(False) self.parametersPanel.btnMesureTolerance.setVisible(False) # self.parametersPanel.txtRadial.setText("0") self.parametersPanel.cmbCalculationType.setCurrentIndex(1) '''signal and slost''' self.parametersPanel.cmbCalculationType.currentIndexChanged.connect(self.method_30) self.parametersPanel.txtDistance.textChanged.connect(self.method_30) self.parametersPanel.btnMesureDist.clicked.connect(self.measureToolDistance) self.parametersPanel.txtAcAltitude.textChanged.connect(self.method_30) self.parametersPanel.txtDmeAltitude.textChanged.connect(self.method_30) self.parametersPanel.cmbConstructionType.currentIndexChanged.connect(self.method_28) # self.parametersPanel.btnCaptureRadial.clicked.connect(self.captureRadial) self.parametersPanel.btnMesureAltitude.clicked.connect(self.measureToolAltitude) self.parametersPanel.txtAcAltitudeM.textChanged.connect(self.txtAcAltitudeMChanged) self.parametersPanel.txtAcAltitude.textChanged.connect(self.txtAcAltitudeFtChanged) self.flag = 0 if self.flag==0: self.flag=2; if self.flag==1: self.flag=0; if self.flag==2: try: self.parametersPanel.txtAcAltitudeM.setText(str(round(Unit.ConvertFeetToMeter(float(self.parametersPanel.txtAcAltitude.text())), 4))) except: self.parametersPanel.txtAcAltitudeM.setText("0.0") self.parametersPanel.txtDmeAltitude.textChanged.connect(self.txtDmeAltitudeMChanged) self.parametersPanel.txtDmeAltitudeFt.textChanged.connect(self.txtDmeAltitudeFtChanged) self.flag1 = 0 if self.flag1==0: self.flag1=1; if self.flag1==2: self.flag1=0; if self.flag1==1: try: self.parametersPanel.txtDmeAltitudeFt.setText(str(round(Unit.ConvertMeterToFeet(float(self.parametersPanel.txtDmeAltitude.text())), 4))) except: self.parametersPanel.txtDmeAltitudeFt.setText("0.0")
def initParametersPan(self): ui = Ui_Form_AAC() self.parametersPanel = ui FlightPlanBaseSimpleDlg.initParametersPan(self) self.parametersPanel.pnlNavAid = PositionPanel( self.ui.scrollAreaWidgetContents) self.parametersPanel.pnlNavAid.groupBox.setTitle( "Navigational AID Position") self.parametersPanel.pnlNavAid.hideframe_Altitude() self.parametersPanel.pnlNavAid.setObjectName("positionNavAid") self.parametersPanel.pnlNavAid.btnCalculater.hide() self.parametersPanel.verticalLayout_AAC.insertWidget( 2, self.parametersPanel.pnlNavAid) self.parametersPanel.pnlTHR = PositionPanel( self.ui.scrollAreaWidgetContents) self.parametersPanel.pnlTHR.groupBox.setTitle("Runway THR") self.parametersPanel.pnlTHR.btnCalculater.hide() self.parametersPanel.pnlTHR.hideframe_Altitude() self.parametersPanel.pnlTHR.setObjectName("positionTHR") self.parametersPanel.verticalLayout_AAC.insertWidget( 3, self.parametersPanel.pnlTHR) self.resize(500, 450) self.parametersPanel.cmbCategory.addItems( [Captions.ALL, Captions.CAT_A_B_ONLY]) self.connect(self.parametersPanel.pnlTHR, SIGNAL("positionChanged"), self.calcBearing) self.parametersPanel.pnlEnd = PositionPanel( self.ui.scrollAreaWidgetContents) self.parametersPanel.pnlEnd.groupBox.setTitle("Runway End") self.parametersPanel.pnlEnd.btnCalculater.hide() self.parametersPanel.pnlEnd.hideframe_Altitude() self.parametersPanel.pnlEnd.setObjectName("positionEnd") self.parametersPanel.verticalLayout_AAC.insertWidget( 4, self.parametersPanel.pnlEnd) self.connect(self.parametersPanel.pnlEnd, SIGNAL("positionChanged"), self.calcBearing) # self.resize(460,350) # self.parametersPanel.cmbCategory.addItems([Captions.ALL, Captions.CAT_A_B_ONLY]) '''Event Handlers Connect'''