def setupUi(self, Form): Form.setObjectName(("Form")) Form.resize(473, 580) font = QtGui.QFont() font.setFamily(("Arial")) font.setBold(False) font.setWeight(50) Form.setFont(font) self.aprAnnotation = QgsTextAnnotationItem(define._canvas) self.aprAnnotation.setDocument(QtGui.QTextDocument("ARP")) self.aprAnnotation.setFrameSize(QtCore.QSizeF(30, 20)) self.aprAnnotation.hide() self.thrAnnotation = QgsTextAnnotationItem(define._canvas) self.thrAnnotation.setDocument(QtGui.QTextDocument("THR")) self.thrAnnotation.setFrameSize(QtCore.QSizeF(30, 20)) self.thrAnnotation.hide() self.vlForm = QtGui.QVBoxLayout(Form) self.vlForm.setObjectName(("vlForm")) self.vlForm.setSpacing(0) self.vlForm.setMargin(0) self.pnlPositions = QtGui.QFrame(Form) self.pnlPositions.setObjectName(("pnlPositions")) self.hl_pnlPositions = QtGui.QVBoxLayout(self.pnlPositions) self.hl_pnlPositions.setObjectName(("hl_pnlPositions")) self.hl_pnlPositions.setMargin(0) self.cmbAerodrome = ComboBoxPanel(self.pnlPositions, True) self.cmbAerodrome.Caption = "Aerodrome" self.cmbAerodrome.LabelWidth = 120 self.hl_pnlPositions.addWidget(self.cmbAerodrome) self.cmbRwyDir = ComboBoxPanel(self.pnlPositions, True) self.cmbRwyDir.Caption = "Runway Direction" self.cmbRwyDir.LabelWidth = 120 self.cmbRwyDir.Width = 120 self.hl_pnlPositions.addWidget(self.cmbRwyDir) self.gbAerodrome = QtGui.QGroupBox(Form) self.gbAerodrome.setObjectName("gbAerodrome") self.gbAerodrome.setTitle("Aerodrome") self.vl_gbAerodrome = QtGui.QVBoxLayout(self.gbAerodrome) self.vl_gbAerodrome.setObjectName("vl_gbAerodrome") self.pnlArp = PositionPanel(self.gbAerodrome, self.aprAnnotation) self.pnlArp.groupBox.setTitle("Reference Point (ARP)") self.pnlArp.btnCalculater.hide() self.vl_gbAerodrome.addWidget(self.pnlArp) self.pnlMinTemp = NumberBoxPanel(self.gbAerodrome) self.pnlMinTemp.CaptionUnits = define._degreeStr self.pnlMinTemp.Caption = "Minimum Temperature" self.pnlMinTemp.Value = -15 self.vl_gbAerodrome.addWidget(self.pnlMinTemp) self.hl_pnlPositions.addWidget(self.gbAerodrome) self.gbRunway = QtGui.QGroupBox(Form) self.gbRunway.setObjectName("gbRunway") self.gbRunway.setTitle("Runway") self.vl_gbRunway = QtGui.QVBoxLayout(self.gbRunway) self.vl_gbRunway.setObjectName("vl_gbRunway") self.pnlThr = PositionPanel(self.gbRunway, self.thrAnnotation) self.pnlThr.groupBox.setTitle("Threshold Position") self.pnlThr.btnCalculater.hide() self.vl_gbRunway.addWidget(self.pnlThr) self.pnlThrEnd = PositionPanel(self.gbRunway, self.thrAnnotation) self.pnlThrEnd.groupBox.setTitle("Runway End Position") self.pnlThrEnd.btnCalculater.hide() self.vl_gbRunway.addWidget(self.pnlThrEnd) self.pnlThrEnd.Visible = False self.pnlRwyDir = TrackRadialBoxPanel(self.gbRunway) self.pnlRwyDir.Caption = "Direction" self.pnlRwyDir.LabelWidth = 70 self.vl_gbRunway.addWidget(self.pnlRwyDir) self.hl_pnlPositions.addWidget(self.gbRunway) self.vlForm.addWidget(self.pnlPositions) self.gbParameters = QtGui.QGroupBox(Form) font = QtGui.QFont() font.setFamily(("Arial")) font.setBold(False) font.setWeight(50) self.gbParameters.setFont(font) self.gbParameters.setObjectName(("gbParameters")) self.gbParameters.setTitle("Parameters") self.vl_gbParameters = QtGui.QVBoxLayout(self.gbParameters) self.vl_gbParameters.setObjectName(("vl_gbParameters")) self.pnlOCAH = OCAHPanel(self.gbParameters) self.pnlOCAH.Caption = "Intermediate Segment" self.pnlOCAH.Value = Altitude(2000, AltitudeUnits.FT) self.pnlOCAH.LabelWidth = 200 self.vl_gbParameters.addWidget(self.pnlOCAH) self.pnlMocI = AltitudeBoxPanel(self.gbParameters) self.pnlMocI.CaptionUnits = "m" self.pnlMocI.Caption = "Intermediate Segment MOC" self.pnlMocI.Value = Altitude(150) self.vl_gbParameters.addWidget(self.pnlMocI) self.pnlRDH = AltitudeBoxPanel(self.gbParameters) self.pnlRDH.CaptionUnits = "m" self.pnlRDH.Caption = "RDH at THR" self.pnlRDH.Value = Altitude(15) self.vl_gbParameters.addWidget(self.pnlRDH) self.pnlVPA = ComboBoxPanel(self.gbParameters) self.pnlVPA.Caption = "Vertical Path Angle [VPA]" # self.pnlVPA.comboBox.setToolTip() self.vl_gbParameters.addWidget(self.pnlVPA) self.lblAbove35 = QtGui.QLabel(self.gbParameters) self.lblAbove35.setText( QtCore.QString("A procedure with a promulgated VPA exceeding 3.5") + unicode("°", "utf-8") + QtCore.QString( " is a non-standard procedure.\nIt shall be subject to an aeronautical study and will require special approval \n by the national competent authority (PANS-OPS Part III, Section 3, Chapter 4, Par. 4.2.1.3)" )) self.vl_gbParameters.addWidget(self.lblAbove35) self.pnlThrFafDist = DistanceBoxPanel(self.gbParameters, DistanceUnits.NM) self.pnlThrFafDist.Caption = "THR to FAWP Distance" self.pnlThrFafDist.Value = Distance(5, DistanceUnits.NM) self.vl_gbParameters.addWidget(self.pnlThrFafDist) self.pnlAcCat = ComboBoxPanel(self.gbParameters) self.pnlAcCat.Caption = "Aircraft Category" self.vl_gbParameters.addWidget(self.pnlAcCat) self.pnlIas = SpeedBoxPanel(self.gbParameters, SpeedUnits.KTS) self.pnlIas.Caption = "Max. IAS" self.pnlIas.Value = Speed(185) self.vl_gbParameters.addWidget(self.pnlIas) self.pnlIasAtThr = SpeedBoxPanel(self.gbParameters, SpeedUnits.KTS) self.pnlIasAtThr.Caption = "Max. IAS at THR" self.pnlIasAtThr.Value = Speed(165) self.vl_gbParameters.addWidget(self.pnlIasAtThr) self.pnlHL = AltitudeBoxPanel(self.gbParameters) self.pnlHL.CaptionUnits = "m" self.pnlHL.Caption = "Height Loss" self.pnlHL.Value = Altitude(49) self.vl_gbParameters.addWidget(self.pnlHL) self.pnlTC = AltitudeBoxPanel(self.gbParameters) self.pnlTC.CaptionUnits = "m" self.pnlTC.Caption = "Temperature Correction" self.pnlTC.Value = Altitude(0) self.vl_gbParameters.addWidget(self.pnlTC) self.tableLayoutPanel1 = QtGui.QFrame(self.gbParameters) self.tableLayoutPanel1.setObjectName("tableLayoutPanel1") self.vl_tableLayoutPanel1 = QtGui.QVBoxLayout(self.tableLayoutPanel1) self.vl_tableLayoutPanel1.setObjectName("vl_tableLayoutPanel1") self.vl_tableLayoutPanel1.setSpacing(0) self.vl_tableLayoutPanel1.setMargin(0) self.upFrame = QtGui.QFrame(self.tableLayoutPanel1) self.upFrame.setObjectName("upFrame") sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.upFrame.sizePolicy().hasHeightForWidth()) self.upFrame.setSizePolicy(sizePolicy) self.hl_upFrame = QtGui.QHBoxLayout(self.upFrame) self.hl_upFrame.setObjectName("hl_upFrame") self.hl_upFrame.setMargin(0) self.cmbTermination = ComboBoxPanel(self.upFrame) self.cmbTermination.Caption = "APV Segment Termination" self.cmbTermination.comboBox.setMinimumWidth(80) self.hl_upFrame.addWidget(self.cmbTermination) self.pnlTerminationDist = DistanceBoxPanel(self.upFrame, DistanceUnits.NM) self.pnlTerminationDist.Caption = "Dist." self.pnlTerminationDist.Value = Distance(5, DistanceUnits.NM) self.pnlTerminationDist.LabelWidth = 50 self.hl_upFrame.addWidget(self.pnlTerminationDist) self.vl_tableLayoutPanel1.addWidget(self.upFrame) self.downFrame = QtGui.QFrame(self.tableLayoutPanel1) self.downFrame.setObjectName("downFrame") sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.downFrame.sizePolicy().hasHeightForWidth()) self.downFrame.setSizePolicy(sizePolicy) self.hl_downFrame = QtGui.QHBoxLayout(self.downFrame) self.hl_downFrame.setObjectName("hl_downFrame") self.hl_downFrame.setMargin(0) self.cmbMAPt = ComboBoxPanel(self.downFrame) self.cmbMAPt.Caption = "Missed Approach Point" self.cmbMAPt.comboBox.setMinimumWidth(80) self.hl_downFrame.addWidget(self.cmbMAPt) self.pnlMAPtDist = DistanceBoxPanel(self.downFrame, DistanceUnits.NM) self.pnlMAPtDist.Caption = "Dist." # self.pnlMAPtDist.Value = Distance(5, DistanceUnits.NM) self.pnlMAPtDist.LabelWidth = 50 self.hl_downFrame.addWidget(self.pnlMAPtDist) self.vl_tableLayoutPanel1.addWidget(self.downFrame) self.vl_gbParameters.addWidget(self.tableLayoutPanel1) self.pnlMACG = NumberBoxPanel(self.gbParameters) self.pnlMACG.CaptionUnits = "%" self.pnlMACG.Caption = "Missed Approach Climb Gradient" self.pnlMACG.Value = 2.5 self.vl_gbParameters.addWidget(self.pnlMACG) self.pnlMocMA = AltitudeBoxPanel(self.gbParameters) self.pnlMocMA.CaptionUnits = "m" self.pnlMocMA.Caption = "Missed Approach MOC" self.pnlMocMA.Value = Altitude(30) self.vl_gbParameters.addWidget(self.pnlMocMA) self.pnlEvalMethodMA = ComboBoxPanel(self.gbParameters) self.pnlEvalMethodMA.Caption = "Missed Approach Evaluation" self.vl_gbParameters.addWidget(self.pnlEvalMethodMA) self.pnlConstructionType = ComboBoxPanel(self.gbParameters) self.pnlConstructionType.Caption = "Construction Type" self.vl_gbParameters.addWidget(self.pnlConstructionType) self.vlForm.addWidget(self.gbParameters) QtCore.QMetaObject.connectSlotsByName(Form)
def setupUi(self, Form): Form.setObjectName(_fromUtf8("Form")) Form.resize(435, 580) self.verticalLayout = QVBoxLayout(Form) self.verticalLayout.setObjectName(_fromUtf8("verticalLayout")) self.gbParameters = GroupBox(Form) self.gbParameters.Caption = "General" self.verticalLayout.addWidget(self.gbParameters) self.cmbAerodrome = ComboBoxPanel(self.gbParameters, True) self.cmbAerodrome.Caption = "Aerodrome" self.cmbAerodrome.LabelWidth = 150 self.cmbAerodrome.Width = 150 self.gbParameters.Add = self.cmbAerodrome self.cmbRwyDir = ComboBoxPanel(self.gbParameters, True) self.cmbRwyDir.Caption = "Runway Direction" self.cmbRwyDir.LabelWidth = 150 self.cmbRwyDir.Width = 150 self.gbParameters.Add = self.cmbRwyDir self.annotationFAWP = QgsTextAnnotationItem(define._canvas) self.annotationFAWP.setDocument(QTextDocument("FAF")) self.annotationFAWP.hide() self.pnlFafPosition = PositionPanel(self.gbParameters, self.annotationFAWP) self.pnlFafPosition.Caption = "FAF Position" self.pnlFafPosition.btnCalculater.hide() self.pnlFafPosition.hideframe_Altitude() self.gbParameters.Add = self.pnlFafPosition self.pnlThrPosition = PositionPanel(self.gbParameters) self.pnlThrPosition.Caption = "Threshold Position" self.pnlThrPosition.btnCalculater.hide() self.gbParameters.Add = self.pnlThrPosition # self.annotationMapt = QgsTextAnnotationItem(define._canvas) # self.annotationMapt.setDocument(QTextDocument("MAPt")) # self.annotationMapt.hide() self.pnlMaPtPosition = PositionPanel(self.gbParameters) self.pnlMaPtPosition.Caption = "MAPt Position" self.pnlMaPtPosition.btnCalculater.hide() self.pnlMaPtPosition.hideframe_Altitude() self.gbParameters.Add = self.pnlMaPtPosition self.pnlRwyEndPosition = PositionPanel(self.gbParameters) self.pnlRwyEndPosition.Caption = "Rwy End Position" self.pnlRwyEndPosition.btnCalculater.hide() self.pnlRwyEndPosition.hideframe_Altitude() self.gbParameters.Add = self.pnlRwyEndPosition self.pnlRwyEndPosition.Visible = False self.pnlInboundTrack = TrackRadialBoxPanel(self.gbParameters) self.pnlInboundTrack.Caption = "In-bound Track" self.pnlInboundTrack.LabelWidth = 150 self.pnlInboundTrack.Enabled = False self.gbParameters.Add = self.pnlInboundTrack self.pnlEstimatedAltitude = AltitudeBoxPanel(self.gbParameters) self.pnlEstimatedAltitude.Caption = "Estimated Altitude" self.pnlEstimatedAltitude.LabelWidth = 150 self.pnlEstimatedAltitude.Value = Altitude(1000) self.gbParameters.Add = self.pnlEstimatedAltitude self.pnlAerodromeAltitude = AltitudeBoxPanel(self.gbParameters) self.pnlAerodromeAltitude.Caption = "Aerodrome Altitude" self.pnlAerodromeAltitude.LabelWidth = 150 self.pnlAerodromeAltitude.Value = Altitude(1000) self.gbParameters.Add = self.pnlAerodromeAltitude self.pnlIsa = NumberBoxPanel(self.gbParameters, "0.0") self.pnlIsa.CaptionUnits = define._degreeStr + "C" self.pnlIsa.Caption = "ISA" self.pnlIsa.LabelWidth = 150 self.pnlIsa.Value = 15 self.gbParameters.Add = self.pnlIsa self.cmbAircraftCategory = ComboBoxPanel(self.gbParameters) self.cmbAircraftCategory.Caption = "Aircraft Category" self.cmbAircraftCategory.LabelWidth = 150 self.gbParameters.Add = self.cmbAircraftCategory # self.pnlHeightLoss = AltitudeBoxPanel(self.gbParameters) # self.pnlHeightLoss.Caption = "Height Loss" # self.pnlHeightLoss.LabelWidth = 150 # self.gbParameters.Add = self.pnlHeightLoss self.pnlIas = SpeedBoxPanel(self.gbParameters) self.pnlIas.Caption = "IAS" self.pnlIas.LabelWidth = 150 self.pnlIas.Value = Speed(100) self.pnlIas.Enabled = False self.gbParameters.Add = self.pnlIas self.pnlTas = SpeedBoxPanel(self.gbParameters) self.pnlTas.Caption = "TAS" self.pnlTas.Enabled = False self.pnlTas.LabelWidth = 150 self.gbParameters.Add = self.pnlTas self.pnlWind = WindPanel(self.gbParameters) self.pnlWind.LabelWidth = 145 self.gbParameters.Add = self.pnlWind self.pnlSocAltitude = AltitudeBoxPanel(self.gbParameters) self.pnlSocAltitude.Caption = "SOC Altitude" self.pnlSocAltitude.LabelWidth = 150 self.gbParameters.Add = self.pnlSocAltitude self.pnlDistFixTolerance = DistanceBoxPanel(self.gbParameters, DistanceUnits.M, DistanceUnits.NM) self.pnlDistFixTolerance.Caption = "FIX Tolerance" self.pnlDistFixTolerance.LabelWidth = 150 self.pnlDistFixTolerance.Button = "coordinate_capture.png" self.pnlDistFixTolerance.Value = Distance(900) # self.pnlDistFixTolerance.Enabled = False self.gbParameters.Add = self.pnlDistFixTolerance self.pnlDistD = DistanceBoxPanel(self.gbParameters, DistanceUnits.M, DistanceUnits.NM) self.pnlDistD.Caption = "d(10kts/3s)" self.pnlDistD.LabelWidth = 150 self.pnlDistD.Button = None self.pnlDistD.Value = Distance(900) self.pnlDistD.Enabled = False self.gbParameters.Add = self.pnlDistD self.pnlDistX = DistanceBoxPanel(self.gbParameters, DistanceUnits.M, DistanceUnits.NM) self.pnlDistX.Caption = "X(10kts/15s)" self.pnlDistX.LabelWidth = 150 self.pnlDistX.Button = None self.pnlDistX.Value = Distance(900) self.pnlDistX.Enabled = False self.gbParameters.Add = self.pnlDistX self.pnlDistOfFafMapt = DistanceBoxPanel(self.gbParameters, DistanceUnits.M, DistanceUnits.NM) self.pnlDistOfFafMapt.Caption = "FAP-MAPt Distance" self.pnlDistOfFafMapt.LabelWidth = 150 self.pnlDistOfFafMapt.Button = None self.pnlDistOfFafMapt.Enabled = False self.gbParameters.Add = self.pnlDistOfFafMapt self.pnlDistOfMaptThr = DistanceBoxPanel(self.gbParameters, DistanceUnits.M, DistanceUnits.NM) self.pnlDistOfMaptThr.Caption = "MAPt-THR Distance" self.pnlDistOfMaptThr.LabelWidth = 150 self.pnlDistOfMaptThr.Button = None self.pnlDistOfMaptThr.Enabled = False self.gbParameters.Add = self.pnlDistOfMaptThr self.pnlDistOfMaptSoc = DistanceBoxPanel(self.gbParameters, DistanceUnits.M, DistanceUnits.NM) self.pnlDistOfMaptSoc.Caption = "MAPt-SOC Distance" self.pnlDistOfMaptSoc.LabelWidth = 150 self.pnlDistOfMaptSoc.Button = None self.pnlDistOfMaptSoc.Enabled = False self.gbParameters.Add = self.pnlDistOfMaptSoc self.pnlDistOfSocThr = DistanceBoxPanel(self.gbParameters, DistanceUnits.M, DistanceUnits.NM) self.pnlDistOfSocThr.Caption = "THR-SOC Distance" self.pnlDistOfSocThr.LabelWidth = 150 self.pnlDistOfSocThr.Button = None self.pnlDistOfSocThr.Enabled = False self.gbParameters.Add = self.pnlDistOfSocThr
def setupUi(self, Form): Form.setObjectName("Form") Form.resize(467, 464) self.verticalLayout = QtGui.QVBoxLayout(Form) self.verticalLayout.setObjectName("verticalLayout") self.gbNavAid = GroupBox(Form) self.gbNavAid.Caption = "Navigational Aid" self.verticalLayout.addWidget(self.gbNavAid) self.cmbNavAidType = ComboBoxPanel(self.gbNavAid) self.cmbNavAidType.Caption = "Type" self.cmbNavAidType.LabelWidth = 120 self.gbNavAid.Add = self.cmbNavAidType self.cmbBasedOn = ComboBoxPanel(self.gbNavAid, True) self.cmbBasedOn.Caption = "Based On" self.cmbBasedOn.LabelWidth = 120 self.cmbBasedOn.Width = 120 self.gbNavAid.Add = self.cmbBasedOn self.pnlNavAid = PositionPanel(self.gbNavAid) self.pnlNavAid.btnCalculater.hide() self.pnlNavAid.setObjectName("pnlNavAid") self.gbNavAid.Add = self.pnlNavAid self.gbParameters = GroupBox(Form) self.gbParameters.Caption = "Parameters" self.verticalLayout.addWidget(self.gbParameters) self.cmbUsedFor = ComboBoxPanel(self.gbParameters) self.cmbUsedFor.Caption = "Type" self.cmbUsedFor.LabelWidth = 120 self.gbParameters.Add = self.cmbUsedFor self.txtIas = SpeedBoxPanel(self.gbParameters, SpeedUnits.KTS) self.txtIas.Caption = "IAS" self.txtIas.Value = Speed(250) self.txtIas.LabelWidth = 120 self.gbParameters.Add = self.txtIas self.txtTas = SpeedBoxPanel(self.gbParameters, SpeedUnits.KTS) self.txtTas.Caption = "TAS" self.txtTas.LabelWidth = 120 self.txtTas.Enabled = False self.gbParameters.Add = self.txtTas self.txtAltitude = AltitudeBoxPanel(self.gbParameters) self.txtAltitude.CaptionUnits = "ft" self.txtAltitude.Caption = "Altitude" self.txtAltitude.Value = Altitude(10000, AltitudeUnits.FT) self.txtAltitude.LabelWidth = 120 self.gbParameters.Add = self.txtAltitude self.txtIsa = NumberBoxPanel(self.gbParameters, "0.0") self.txtIsa.CaptionUnits = define._degreeStr self.txtIsa.Caption = "ISA" self.txtIsa.Value = 15 self.txtIsa.LabelWidth = 120 self.gbParameters.Add = self.txtIsa self.pnlWind = WindPanel(self.gbParameters) self.pnlWind.lblIA.setMinimumSize(113, 0) self.gbParameters.Add = self.pnlWind self.txtTime = NumberBoxPanel(self.gbParameters, "0.0") self.txtTime.CaptionUnits = "min" self.txtTime.Caption = "Time" self.txtTime.Value = 1 self.txtTime.LabelWidth = 120 self.gbParameters.Add = self.txtTime self.txtMoc = AltitudeBoxPanel(self.gbParameters) self.txtMoc.CaptionUnits = "m" self.txtMoc.Caption = "Moc" self.txtMoc.Value = Altitude(300) self.txtMoc.LabelWidth = 120 self.gbParameters.Add = self.txtMoc self.chbCatH = CheckBox(self.gbParameters) self.chbCatH.Caption = "Cat. H ( linear MOC reduction up to 2NM )" self.gbParameters.Add = self.chbCatH self.gbEntryAreas = GroupBox(self.gbParameters, "HL") self.gbEntryAreas.Caption = "Entry Areas" self.gbParameters.Add = self.gbEntryAreas self.chbIntercept = CheckBox(self.gbEntryAreas) self.chbIntercept.Caption = "Intercept" self.gbEntryAreas.Add = self.chbIntercept self.chbSector1 = CheckBox(self.gbEntryAreas) self.chbSector1.Caption = "Sector 1" self.gbEntryAreas.Add = self.chbSector1 self.chbSector2 = CheckBox(self.gbEntryAreas) self.chbSector2.Caption = "Sector 2" self.gbEntryAreas.Add = self.chbSector2 self.chbSectors12 = CheckBox(self.gbEntryAreas) self.chbSectors12.Caption = "Sectors 1 & 2" self.gbEntryAreas.Add = self.chbSectors12 self.chbSector3 = CheckBox(self.gbEntryAreas) self.chbSector3.Caption = "Sectors 3" self.gbEntryAreas.Add = self.chbSector3 self.cmbConstruction = ComboBoxPanel(self.gbParameters) self.cmbConstruction.Caption = "Construction Type" self.cmbConstruction.LabelWidth = 120 self.cmbConstruction.Width = 50 self.gbParameters.Add = self.cmbConstruction self.mocSpinBox = NumberBoxPanel(self.gbParameters, None) self.mocSpinBox.Caption = "MOCmultiplier" self.mocSpinBox.LabelWidth = 120 self.mocSpinBox.Value = 1 self.mocSpinBox.Width = 50 self.gbParameters.Add = self.mocSpinBox self.gbOrientation = GroupBox(Form) self.gbOrientation.Caption = "Orientation" self.verticalLayout.addWidget(self.gbOrientation) self.txtTrack = TrackRadialBoxPanel(self.gbOrientation) self.txtTrack.Caption = "In-bound Track" self.txtTrack.LabelWidth = 120 self.gbOrientation.Add = self.txtTrack self.cmbOrientation = ComboBoxPanel(self.gbOrientation) self.cmbOrientation.Caption = "Turns" self.cmbOrientation.LabelWidth = 120 self.gbOrientation.Add = self.cmbOrientation QtCore.QMetaObject.connectSlotsByName(Form)
def setupUi(self, Form): Form.setObjectName("Form") Form.resize(473, 580) font = QtGui.QFont() font.setFamily("Arial") font.setBold(False) font.setWeight(50) Form.setFont(font) self.vlForm = QtGui.QVBoxLayout(Form) self.vlForm.setObjectName(("vlForm")) self.gbPosition = GroupBox(Form) self.gbPosition.Caption = "Positions" self.gbPosition.layoutBoxPanel.setSpacing(9) self.vlForm.addWidget(self.gbPosition) self.gbNavAid = GroupBox(self.gbPosition) self.gbNavAid.Caption = "Navigational Aid" self.gbPosition.Add = self.gbNavAid self.cmbNavAidType = ComboBoxPanel(self.gbNavAid) self.cmbNavAidType.Caption = "Type" self.cmbNavAidType.Items = ["NDB", "NDB/DME", "VOR", "VOR/DME"] self.cmbNavAidType.LabelWidth = 140 self.gbNavAid.Add = self.cmbNavAidType self.cmbBasedOn = ComboBoxPanel(self.gbNavAid, True) self.cmbBasedOn.Caption = "Based On" self.cmbBasedOn.LabelWidth = 140 self.cmbBasedOn.Width = 121 self.gbNavAid.Add = self.cmbBasedOn self.pnlNavAidPos = PositionPanel(self.gbNavAid) self.pnlNavAidPos.btnCalculater.hide() self.pnlNavAidPos.hideframe_Altitude() self.gbNavAid.Add = self.pnlNavAidPos self.pnlDmePos = PositionPanel(self.gbPosition) self.pnlDmePos.Caption = "DME Position" self.pnlDmePos.btnCalculater.hide() self.pnlDmePos.hideframe_Altitude() self.gbPosition.Add = self.pnlDmePos self.cmbEntry = ComboBoxPanel(self.gbPosition) self.cmbEntry.Caption = "Entry" self.cmbEntry.Items = ["Omnidirectional", "On Track"] self.cmbEntry.LabelWidth = 140 self.gbPosition.Add = self.cmbEntry self.txtBearing = TrackRadialBoxPanel(self.gbPosition) self.txtBearing.Caption = "Outbound Track" self.txtBearing.LabelWidth = 140 self.gbPosition.Add = self.txtBearing self.gbParameters = GroupBox(Form) self.gbParameters.Caption = "Parameters" self.gbParameters.layoutBoxPanel.setSpacing(9) self.vlForm.addWidget(self.gbParameters) self.cmbDirection = ComboBoxPanel(self.gbParameters) self.cmbDirection.Caption = "Turn Direction" self.cmbDirection.Items = ["Right", "Left"] self.cmbDirection.LabelWidth = 140 self.cmbDirection.Width = 70 self.gbParameters.Add = self.cmbDirection self.cmbAircraftCatgory = ComboBoxPanel(self.gbParameters) self.cmbAircraftCatgory.Caption = "Aircraft Category" self.cmbAircraftCatgory.Items = ["A", "B", "C", "D", "E"] self.cmbAircraftCatgory.LabelWidth = 140 self.cmbAircraftCatgory.Width = 50 self.gbParameters.Add = self.cmbAircraftCatgory self.cmbCondition = ComboBoxPanel(self.gbParameters) self.cmbCondition.Caption = "Condition" self.cmbCondition.Items = ["Normal Condition", "Turbulence Condition"] self.cmbCondition.LabelWidth = 140 self.gbParameters.Add = self.cmbCondition self.txtNAVAlt = AltitudeBoxPanel(self.gbParameters) self.txtNAVAlt.CaptionUnits = "ft" self.txtNAVAlt.Caption = "NAV Altitude" self.txtNAVAlt.LabelWidth = 140 self.gbParameters.Add = self.txtNAVAlt self.txtInitialAlt = AltitudeBoxPanel(self.gbParameters) self.txtInitialAlt.CaptionUnits = "ft" self.txtInitialAlt.Caption = "Initial Altitude" self.txtInitialAlt.LabelWidth = 140 self.gbParameters.Add = self.txtInitialAlt self.txtTurnAlt = AltitudeBoxPanel(self.gbParameters) self.txtTurnAlt.CaptionUnits = "ft" self.txtTurnAlt.Caption = "Turn Altitude" self.txtTurnAlt.LabelWidth = 140 self.gbParameters.Add = self.txtTurnAlt self.txtFinalAlt = AltitudeBoxPanel(self.gbParameters) self.txtFinalAlt.CaptionUnits = "ft" self.txtFinalAlt.Caption = "Final Altitude" self.txtFinalAlt.LabelWidth = 140 self.gbParameters.Add = self.txtFinalAlt self.txtLimitDistance = DistanceBoxPanel(self.gbParameters, DistanceUnits.NM) self.txtLimitDistance.Caption = "Limiting Distance" self.txtLimitDistance.Button = None self.txtLimitDistance.LabelWidth = 140 self.gbParameters.Add = self.txtLimitDistance self.txtOutboundTime = NumberBoxPanel(self.gbParameters ) self.txtOutboundTime.Caption = "Outbound Time" self.txtOutboundTime.LabelWidth = 140 self.gbParameters.Add = self.txtOutboundTime self.txtOutboundLeg = DistanceBoxPanel(self.gbParameters, DistanceUnits.NM) self.txtOutboundLeg.Caption = "Outbound Leg" self.txtOutboundLeg.Button = None self.txtOutboundLeg.LabelWidth = 140 self.gbParameters.Add = self.txtOutboundLeg self.txtISA = NumberBoxPanel(self.gbParameters, "0.0") self.txtISA.CaptionUnits = define._degreeStr self.txtISA.Caption = "ISA" self.txtISA.LabelWidth = 140 self.gbParameters.Add = self.txtISA self.txtIAS = SpeedBoxPanel(self.gbParameters, SpeedUnits.KTS) self.txtIAS.Caption = "IAS" self.txtIAS.LabelWidth = 140 self.gbParameters.Add = self.txtIAS self.txtTAS = SpeedBoxPanel(self.gbParameters, SpeedUnits.KTS) self.txtTAS.Caption = "TAS" self.txtTAS.LabelWidth = 140 self.gbParameters.Add = self.txtTAS
def setupUi(self, Form): Form.setObjectName(_fromUtf8("Form")) Form.resize(435, 580) self.verticalLayout = QVBoxLayout(Form) self.verticalLayout.setObjectName(_fromUtf8("verticalLayout")) self.gbGeneral = GroupBox(Form) self.gbGeneral.Caption = "General" self.verticalLayout.addWidget(self.gbGeneral) # self.cmbAerodrome = ComboBoxPanel(self.gbGeneral, True) # self.cmbAerodrome.Caption = "Aerodrome" # self.cmbAerodrome.LabelWidth = 120 # self.gbGeneral.Add = self.cmbAerodrome # # self.cmbRwyDir = ComboBoxPanel(self.gbGeneral, True) # self.cmbRwyDir.Caption = "Runway Direction" # self.cmbRwyDir.LabelWidth = 120 # self.cmbRwyDir.Width = 120 # self.gbGeneral.Add = self.cmbRwyDir self.cmbRnavSpecification = ComboBoxPanel(self.gbGeneral) self.cmbRnavSpecification.Caption = "Rnav Specification" self.cmbRnavSpecification.LabelWidth = 150 self.gbGeneral.Add = self.cmbRnavSpecification self.frameChbThree = Frame(self.gbGeneral, "HL") self.gbGeneral.Add = self.frameChbThree self.chbUseTwoWpt = CheckBox(self.frameChbThree) self.chbUseTwoWpt.Caption = "Use 2 Waypoints" self.frameChbThree.Add = self.chbUseTwoWpt self.chbInsertSymbol = CheckBox(self.frameChbThree) self.chbInsertSymbol.Caption = "Insert Symbol(s)" self.frameChbThree.Add = self.chbInsertSymbol self.chbCatH = CheckBox(self.frameChbThree) self.chbCatH.Caption = "Cat.H" self.frameChbThree.Add = self.chbCatH self.cmbPhaseOfFlight = ComboBoxPanel(self.gbGeneral) self.cmbPhaseOfFlight.Caption = "Phase Of Flight" self.cmbPhaseOfFlight.LabelWidth = 150 self.gbGeneral.Add = self.cmbPhaseOfFlight self.pnlArp = PositionPanel(self.gbGeneral) self.pnlArp.Caption = "Aerodrome Reference Point(ARP)" self.pnlArp.btnCalculater.hide() self.pnlArp.hideframe_Altitude() self.gbGeneral.Add = self.pnlArp self.gbWaypoint1 = GroupBox(self.gbGeneral) self.gbWaypoint1.Caption = "Waypoint1" self.gbGeneral.Add = self.gbWaypoint1 self.cmbType1 = ComboBoxPanel(self.gbWaypoint1) self.cmbType1.Caption = "Type" self.cmbType1.LabelWidth = 150 self.gbWaypoint1.Add = self.cmbType1 self.pnlTolerances = RnavTolerancesPanel(self.gbWaypoint1) self.pnlTolerances.set_Att(Distance(0.8, DistanceUnits.NM)) self.pnlTolerances.set_Xtt(Distance(1, DistanceUnits.NM)) self.pnlTolerances.set_Asw(Distance(2, DistanceUnits.NM)) self.gbWaypoint1.Add = self.pnlTolerances self.pnlWaypoint1 = PositionPanel(self.gbWaypoint1) self.pnlWaypoint1.btnCalculater.hide() self.pnlWaypoint1.hideframe_Altitude() self.gbWaypoint1.Add = self.pnlWaypoint1 self.gbWaypoint2 = GroupBox(self.gbGeneral) self.gbWaypoint2.Caption = "Waypoint2" self.gbGeneral.Add = self.gbWaypoint2 self.cmbType2 = ComboBoxPanel(self.gbWaypoint2) self.cmbType2.Caption = "Type" self.cmbType2.LabelWidth = 150 self.gbWaypoint2.Add = self.cmbType2 self.pnlTolerances2 = RnavTolerancesPanel(self.gbWaypoint2) self.pnlTolerances2.set_Att(Distance(0.8, DistanceUnits.NM)) self.pnlTolerances2.set_Xtt(Distance(1, DistanceUnits.NM)) self.pnlTolerances2.set_Asw(Distance(2, DistanceUnits.NM)) self.gbWaypoint2.Add = self.pnlTolerances2 self.pnlWaypoint2 = PositionPanel(self.gbWaypoint2) self.pnlWaypoint2.btnCalculater.hide() self.pnlWaypoint2.hideframe_Altitude() self.gbWaypoint2.Add = self.pnlWaypoint2 self.frmRadioBtns = Frame(self.gbGeneral, "HL") self.gbGeneral.Add = self.frmRadioBtns self.rdnTF = QRadioButton(self.frmRadioBtns) self.rdnTF.setObjectName("rdnTF") self.rdnTF.setText("TF") self.rdnTF.setChecked(True) self.frmRadioBtns.Add = self.rdnTF self.rdnDF = QRadioButton(self.frmRadioBtns) self.rdnDF.setObjectName("rdnDF") self.rdnDF.setText("DF") self.frmRadioBtns.Add = self.rdnDF self.rdnCF = QRadioButton(self.frmRadioBtns) self.rdnCF.setObjectName("rdnCF") self.rdnCF.setText("CF") self.frmRadioBtns.Add = self.rdnCF self.chbCircularArcs = CheckBox(self.gbGeneral) self.chbCircularArcs.Caption = "Use Circular Arcs Method for Turns <= 30" self.gbGeneral.Add = self.chbCircularArcs self.gbParameters = GroupBox(Form) self.gbParameters.Caption = "Parameters" self.verticalLayout.addWidget(self.gbParameters) self.cmbSelectionMode = ComboBoxPanel(self.gbParameters) self.cmbSelectionMode.Caption = "Selection Mode" self.cmbSelectionMode.LabelWidth = 150 self.gbParameters.Add = self.cmbSelectionMode self.pnlInbound = TrackRadialBoxPanel(self.gbParameters) self.pnlInbound.Caption = "In-bound Track" self.pnlInbound.LabelWidth = 150 self.gbParameters.Add = self.pnlInbound self.pnlOutbound = TrackRadialBoxPanel(self.gbParameters) self.pnlOutbound.Caption = "Out-bound Track" self.pnlOutbound.LabelWidth = 150 self.gbParameters.Add = self.pnlOutbound # icon = QIcon() # icon.addPixmap(QPixmap(_fromUtf8("Resource/coordinate_capture.png")), QIcon.Normal, QIcon.Off) self.pnlIas = SpeedBoxPanel(self.gbParameters) self.pnlIas.Caption = "IAS" self.pnlIas.LabelWidth = 150 self.pnlIas.Value = Speed(250) self.gbParameters.Add = self.pnlIas self.pnlTas = SpeedBoxPanel(self.gbParameters) self.pnlTas.Caption = "TAS" self.pnlTas.Enabled = False self.pnlTas.LabelWidth = 150 self.gbParameters.Add = self.pnlTas self.pnlAltitude = AltitudeBoxPanel(self.gbParameters) self.pnlAltitude.Caption = "Altitude" self.pnlAltitude.LabelWidth = 150 self.pnlAltitude.Value = Altitude(1000) self.gbParameters.Add = self.pnlAltitude self.pnlIsa = NumberBoxPanel(self.gbParameters, "0.0") self.pnlIsa.CaptionUnits = define._degreeStr + "C" self.pnlIsa.Caption = "ISA" self.pnlIsa.LabelWidth = 150 self.pnlIsa.Value = 15 self.gbParameters.Add = self.pnlIsa self.pnlBankAngle = NumberBoxPanel(self.gbParameters, "0.0") self.pnlBankAngle.CaptionUnits = define._degreeStr self.pnlBankAngle.Caption = "Bank Angle" self.pnlBankAngle.LabelWidth = 150 self.pnlBankAngle.Value = 25 self.gbParameters.Add = self.pnlBankAngle self.pnlBankEstTime = NumberBoxPanel(self.gbParameters, "0.0") self.pnlBankEstTime.Caption = "Bank Establishment Time" self.pnlBankEstTime.Value = 1 self.pnlBankEstTime.LabelWidth = 150 self.pnlBankEstTime.Value = 5 self.gbParameters.Add = self.pnlBankEstTime self.pnlPilotTime = NumberBoxPanel(self.gbParameters, "0.0") self.pnlPilotTime.Caption = "Pilot Reaction Time" self.pnlPilotTime.Value = 6 self.pnlPilotTime.LabelWidth = 150 self.gbParameters.Add = self.pnlPilotTime self.pnlWind = WindPanel(self.gbParameters) self.pnlWind.LabelWidth = 145 self.gbParameters.Add = self.pnlWind self.pnlPrimaryMoc = AltitudeBoxPanel(self.gbParameters) self.pnlPrimaryMoc.Caption = "Primary Moc" self.pnlPrimaryMoc.LabelWidth = 150 self.gbParameters.Add = self.pnlPrimaryMoc self.cmbConstructionType = ComboBoxPanel(self.gbParameters) self.cmbConstructionType.Caption = "Construction Type" self.cmbConstructionType.LabelWidth = 150 self.gbParameters.Add = self.cmbConstructionType self.frameMOCmultipiler = Frame(self.gbParameters, "HL") self.gbParameters.Add = self.frameMOCmultipiler self.labelMOCmultipiler = QLabel(self.frameMOCmultipiler) self.labelMOCmultipiler.setMinimumSize(QSize(145, 0)) self.labelMOCmultipiler.setMaximumSize(QSize(145, 16777215)) font = QFont() font.setBold(False) font.setWeight(50) self.labelMOCmultipiler.setFont(font) self.labelMOCmultipiler.setObjectName(_fromUtf8("labelMOCmultipiler")) self.labelMOCmultipiler.setText("MOCmultipiler") self.frameMOCmultipiler.Add = self.labelMOCmultipiler self.mocSpinBox = QSpinBox(self.frameMOCmultipiler) sizePolicy = QSizePolicy(QSizePolicy.Expanding, QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.mocSpinBox.sizePolicy().hasHeightForWidth()) self.mocSpinBox.setSizePolicy(sizePolicy) self.mocSpinBox.setMinimumSize(QSize(70, 0)) self.mocSpinBox.setMaximumSize(QSize(70, 16777215)) self.mocSpinBox.setMinimum(1) self.mocSpinBox.setObjectName(_fromUtf8("mocSpinBox")) self.frameMOCmultipiler.Add = self.mocSpinBox spacerItem = QSpacerItem(10,10,QSizePolicy.Expanding, QSizePolicy.Minimum) self.frameMOCmultipiler.layoutBoxPanel.addItem(spacerItem) self.chbDrawTolerance = CheckBox(self.gbParameters) self.chbDrawTolerance.Caption = "Draw Waypoint Tolerance" self.gbParameters.Add = self.chbDrawTolerance
def __init__(self, parent = None): QDialog.__init__(self, parent) self.resize(290, 136); self.setWindowTitle("Procedure Legs (AIXM 4.5)") sizePolicy = QSizePolicy(QSizePolicy.Fixed, QSizePolicy.Fixed); sizePolicy.setHorizontalStretch(0); sizePolicy.setVerticalStretch(0); sizePolicy.setHeightForWidth(self.sizePolicy().hasHeightForWidth()); self.setSizePolicy(sizePolicy); verticalLayoutDlg = QVBoxLayout(self) verticalLayoutDlg.setObjectName(("verticalLayoutDlg")); self.gbAll = GroupBox(self, "HL") self.gbAll.Caption = "Legs" verticalLayoutDlg.addWidget(self.gbAll) self.trvLegs = QTreeView(self.gbAll) self.trvLegsStdModel = StandardItemModel() self.trvLegs.setModel(self.trvLegsStdModel) self.gbAll.Add = self.trvLegs self.flowLayoutPanel1 = Frame(self.gbAll) self.gbAll.Add = self.flowLayoutPanel1 self.btnAdd = QPushButton(self.flowLayoutPanel1) icon = QIcon() icon.addPixmap(QPixmap("Resource/add.png"), QIcon.Normal, QIcon.Off) self.btnAdd.setIcon(icon) self.flowLayoutPanel1.Add = self.btnAdd self.btnRemove = QPushButton(self.flowLayoutPanel1) icon = QIcon() icon.addPixmap(QPixmap("Resource/remove.png"), QIcon.Normal, QIcon.Off) self.btnRemove.setIcon(icon) self.flowLayoutPanel1.Add = self.btnRemove self.btnMoveUp = QPushButton(self.flowLayoutPanel1) icon = QIcon() icon.addPixmap(QPixmap("Resource/up.png"), QIcon.Normal, QIcon.Off) self.btnMoveUp.setIcon(icon) self.flowLayoutPanel1.Add = self.btnMoveUp self.btnMoveDown = QPushButton(self.flowLayoutPanel1) icon = QIcon() icon.addPixmap(QPixmap("Resource/down.png"), QIcon.Normal, QIcon.Off) self.btnMoveDown.setIcon(icon) self.flowLayoutPanel1.Add = self.btnMoveDown self.scrollBox = Frame(self.gbAll) self.gbAll.Add = self.scrollBox self.gbFix = GroupBox(self.scrollBox) self.gbFix.Caption = "Fix" self.scrollBox.Add = self.gbFix self.cmbFixPos = ComboBoxPanel(self.gbFix) self.cmbFixPos.Caption = "Position" self.cmbFixPos.Button = "coordinate_capture.png" self.gbFix.Add = self.cmbFixPos self.pnlCodeRoleFix = ComboBoxPanel(self.gbFix) self.pnlCodeRoleFix.Caption = "Type" self.gbFix.Add = self.pnlCodeRoleFix self.gbAttributes = GroupBox(self.scrollBox) self.gbAttributes.Caption = "Attributes" self.scrollBox.Add = self.gbAttributes self.cmbRecommendedEnt = ComboBoxPanel(self.gbAttributes) self.cmbRecommendedEnt.Caption = "Recommended Navigational Aid" self.gbAttributes.Add = self.cmbRecommendedEnt self.pnlCodePhase = ComboBoxPanel(self.gbAttributes) self.pnlCodePhase.Caption = "Fligh Phase" self.gbAttributes.Add = self.pnlCodePhase self.pnlCodeType = ComboBoxPanel(self.gbAttributes) self.pnlCodeType.Caption = "Leg Type" self.gbAttributes.Add = self.pnlCodeType self.pnlLegVOR = Frame(self.gbAttributes, "HL") self.gbAttributes.Add = self.pnlLegVOR self.cmbCodeTypeCourse = ComboBoxPanel(self.pnlLegVOR) self.cmbCodeTypeCourse.Caption = "Course Angle (" + define._degreeStr + ")" self.pnlLegVOR.Add = self.cmbCodeTypeCourse self.txtValCourse = TrackRadialBoxPanel(self.pnlLegVOR) self.txtValCourse.LabelWidth = 0 self.pnlLegVOR.Add = self.txtValCourse self.pnlCodeDirTurn = ComboBoxPanel(self.gbAttributes) self.pnlCodeDirTurn.Caption = "Turn Direction" self.gbAttributes.Add = self.pnlCodeDirTurn self.pnlTurnValid = ComboBoxPanel(self.gbAttributes) self.pnlTurnValid.Caption = "Fly-By" self.gbAttributes.Add = self.pnlTurnValid self.cmbCenter = ComboBoxPanel(self.gbAttributes) self.cmbCenter.Caption = "Center" self.cmbCenter.Button = "coordinate_capture.png" self.gbAttributes.Add = self.cmbCenter self.pnlValBankAngle = NumberBoxPanel(self.gbAttributes) self.pnlValBankAngle.Caption = "Bank Angle (" + define._degreeStr + ")" self.gbAttributes.Add = self.pnlValBankAngle self.pnlCodeDescrDistVer = ComboBoxPanel(self.gbAttributes) self.pnlCodeDescrDistVer.Caption = "Altitude Interpretation" self.gbAttributes.Add = self.pnlCodeDescrDistVer self.pnlVerDistLower = Frame(self.gbAttributes, "HL") self.gbAttributes.Add = self.pnlVerDistLower self.cmbDistVerLower = ComboBoxPanel(self.pnlVerDistLower) self.cmbDistVerLower.CaptionUnits = "ft" self.cmbDistVerLower.Caption = "Lower Altitude Limit" self.pnlVerDistLower.Add = self.cmbDistVerLower self.txtDistVerLower = AltitudeBoxPanel(self.pnlVerDistLower) self.txtDistVerLower.CaptionUnits = "ft" self.txtDistVerLower.LabelWidth = 0 self.pnlVerDistLower.Add = self.txtDistVerLower self.pnlDistVerUpper = Frame(self.gbAttributes, "HL") self.gbAttributes.Add = self.pnlDistVerUpper self.cmbDistVerUpper = ComboBoxPanel(self.pnlDistVerUpper) self.cmbDistVerUpper.CaptionUnits = "ft" self.cmbDistVerUpper.Caption = "Upper Altitude Limit" self.pnlDistVerUpper.Add = self.cmbDistVerUpper self.txtDistVerUpper = AltitudeBoxPanel(self.pnlDistVerUpper) self.txtDistVerUpper.CaptionUnits = "ft" self.txtDistVerUpper.LabelWidth = 0 self.pnlDistVerUpper.Add = self.txtDistVerUpper self.pnlValVerAngle = NumberBoxPanel(self.gbAttributes) self.pnlValVerAngle.Caption = "Climb / Descent Angle [+/-] (" + define._degreeStr + ")" self.gbAttributes.Add = self.pnlValVerAngle self.tableLayoutPanel2 = Frame(self.gbAttributes, "HL") self.gbAttributes.Add = self.tableLayoutPanel2 self.cmbCodeSpeedRef = ComboBoxPanel(self.tableLayoutPanel2) self.cmbCodeSpeedRef.CaptionUnits = "kts" self.cmbCodeSpeedRef.Caption = "Speed Restriction" self.tableLayoutPanel2.Add = self.cmbCodeSpeedRef self.txtValSpeed = SpeedBoxPanel(self.tableLayoutPanel2) self.txtValSpeed.LabelWidth = 0 self.tableLayoutPanel2.Add = self.txtValSpeed self.pnlValDist = DistanceBoxPanel(self.gbAttributes, DistanceUnits.NM) self.pnlValDist.Caption = "Segment Length" self.pnlValDist.Button = None self.gbAttributes.Add = self.pnlValDist self.pnlValDur = NumberBoxPanel(self.gbAttributes) self.pnlValDur.CaptionUnits = "min" self.pnlValDur.Caption = "Duration" self.gbAttributes.Add = self.pnlValDur self.pnlCodeRepAtc = ComboBoxPanel(self.gbAttributes) self.pnlCodeRepAtc.Caption = "ATC Reporting" self.gbAttributes.Add = self.pnlCodeRepAtc self.pnlValTheta = TrackRadialBoxPanel(self.gbAttributes) self.pnlValTheta.Caption = "Magnetic Bearing / Radial from Recommended Nav. Aid" self.pnlValTheta.LabelWidth = 350 self.gbAttributes.Add = self.pnlValTheta self.pnlValRho = DistanceBoxPanel(self.gbAttributes, DistanceUnits.NM) self.pnlValRho.Caption = "Distance from Recommended Nav. Aid" self.pnlValRho.LabelWidth = 350 self.gbAttributes.Add = self.pnlValRho self.txtRemarks = TextBoxPanel(self.gbAttributes, True) self.txtRemarks.Caption = "Remarks" self.gbAttributes.Add = self.txtRemarks self.btnBoxOkCancel = QDialogButtonBox(self) self.btnBoxOkCancel.setObjectName(("btnBoxOkCancel")); self.btnBoxOkCancel.setStandardButtons(QDialogButtonBox.Cancel|QDialogButtonBox.Ok); self.connect(self.btnBoxOkCancel, SIGNAL("accepted()"), self.acceptDlg) self.connect(self.btnBoxOkCancel, SIGNAL("rejected()"), self.reject) verticalLayoutDlg.addWidget(self.btnBoxOkCancel) self.trvLegs.pressed.connect(self.trvLegs_pressed) self.data = None self.legs = None self.aerodrome = None; self.magnVar = 0.0 for value in CodeIapFixAixm.Items: self.pnlCodeRoleFix.Add(value); for codeTypeProcPathAixm in CodeTypeProcPathAixm.Items: self.pnlCodeType.Add(codeTypeProcPathAixm); for codePhaseProcAixm in CodePhaseProcAixm.Items: self.pnlCodePhase.Add(codePhaseProcAixm); for codeTypeCourseAixm in CodeTypeCourseAixm.Items: self.cmbCodeTypeCourse.Add(codeTypeCourseAixm); for codeDirTurnAixm in CodeDirTurnAixm.Items: self.pnlCodeDirTurn.Add(codeDirTurnAixm); for codeDescrDistVerAixm in CodeDescrDistVerAixm.Items: self.pnlCodeDescrDistVer.Add(codeDescrDistVerAixm); for codeDistVerAixm in CodeDistVerAixm.Items: self.cmbDistVerLower.Add(codeDistVerAixm); for value1 in CodeDistVerAixm.Items: self.cmbDistVerUpper.Add(value1); for codeSpeedRefAixm in CodeSpeedRefAixm.Items: self.cmbCodeSpeedRef.Add(codeSpeedRefAixm); for codeTypeFlyByAixm in CodeTypeFlyByAixm.Items: self.pnlTurnValid.Add(codeTypeFlyByAixm); for codeRepAtcAixm in CodeRepAtcAixm.Items: self.pnlCodeRepAtc.Add(codeRepAtcAixm); self.method_6() self.connect(self.pnlValRho, SIGNAL("Event_0"), self.pnlValRho_Event_0) self.connect(self.pnlValTheta, SIGNAL("Event_0"), self.pnlValTheta_Event_0) self.connect(self.pnlCodeRepAtc, SIGNAL("Event_0"), self.pnlCodeRepAtc_Event_0) self.connect(self.pnlValDur, SIGNAL("Event_0"), self.pnlValDur_Event_0) self.connect(self.pnlValDist, SIGNAL("Event_0"), self.pnlValDist_Event_0) self.connect(self.cmbCodeSpeedRef, SIGNAL("Event_0"), self.cmbCodeSpeedRef_Event_0) self.connect(self.txtValSpeed, SIGNAL("Event_0"), self.txtValSpeed_Event_0) self.connect(self.txtDistVerUpper, SIGNAL("Event_0"), self.txtDistVerUpper_Event_0) self.connect(self.cmbDistVerUpper, SIGNAL("Event_0"), self.cmbDistVerUpper_Event_0) self.connect(self.txtDistVerLower, SIGNAL("Event_0"), self.txtDistVerLower_Event_0) self.connect(self.cmbDistVerLower, SIGNAL("Event_0"), self.cmbDistVerLower_Event_0) self.connect(self.pnlValBankAngle, SIGNAL("Event_0"), self.pnlValBankAngle_Event_0) self.connect(self.cmbCenter, SIGNAL("Event_0"), self.cmbCenter_Event_0) self.connect(self.pnlTurnValid, SIGNAL("Event_0"), self.pnlTurnValid_Event_0) self.connect(self.pnlCodeDirTurn, SIGNAL("Event_0"), self.pnlCodeDirTurn_Event_0) self.connect(self.cmbCodeTypeCourse, SIGNAL("Event_0"), self.cmbCodeTypeCourse_Event_0) self.connect(self.txtValCourse, SIGNAL("Event_0"), self.txtValCourse_Event_0) self.connect(self.pnlCodeType, SIGNAL("Event_0"), self.pnlCodeType_Event_0) self.connect(self.pnlCodePhase, SIGNAL("Event_0"), self.pnlCodePhase_Event_0) self.connect(self.pnlCodeRoleFix, SIGNAL("Event_0"), self.pnlCodeRoleFix_Event_0) self.connect(self.txtRemarks, SIGNAL("Event_0"), self.txtRemarks_Event_0) self.connect(self.cmbRecommendedEnt, SIGNAL("Event_0"), self.cmbRecommendedEnt_Event_0) self.connect(self.cmbFixPos, SIGNAL("Event_0"), self.cmbFixPos_Event_0) self.connect(self.cmbCenter, SIGNAL("Event_3"), self.method_14) self.connect(self.cmbFixPos, SIGNAL("Event_3"), self.method_13) self.btnAdd.clicked.connect(self.btnAdd_Click) self.btnMoveDown.clicked.connect(self.btnMoveDown_Click) self.btnMoveUp.clicked.connect(self.btnMoveUp_Click) self.btnRemove.clicked.connect(self.btnRemove_Click) self.trvLegs.setHeaderHidden(True) if self.trvLegsStdModel.rowCount() > 0: self.trvLegs.setCurrentIndex(self.trvLegsStdModel.index(0,0)) self.method_8()
def setupUi(self, Form): Form.setObjectName("Form") Form.resize(473, 580) font = QtGui.QFont() font.setFamily("Arial") font.setBold(False) font.setWeight(50) Form.setFont(font) self.vlForm = QtGui.QVBoxLayout(Form) self.vlForm.setObjectName(("vlForm")) self.gbMASegmentType = GroupBox(Form) self.gbMASegmentType.Caption = "Missed Approach Segment Type" self.vlForm.addWidget(self.gbMASegmentType) self.txtMASegmentType = TextBoxPanel(self.gbMASegmentType) self.txtMASegmentType.Caption = "Type" self.txtMASegmentType.textBox.setEnabled(False) self.txtMASegmentType.Button = "sort2.png" self.txtMASegmentType.Value = "Straight" self.txtMASegmentType.textBox.setMaximumWidth(10000000) self.txtMASegmentType.hLayoutBoxPanel.removeItem( self.txtMASegmentType.spacerItem) QtCore.QObject.connect(self.txtMASegmentType, QtCore.SIGNAL("Event_1"), self.txtMASegmentType_Event_1) self.gbMASegmentType.Add = self.txtMASegmentType self.gbPosition = GroupBox(Form) self.gbPosition.Caption = "Positions" self.gbPosition.layoutBoxPanel.setSpacing(9) self.vlForm.addWidget(self.gbPosition) self.pnlFafPos = PositionPanel(self.gbPosition) self.pnlFafPos.Caption = "FAF Position" self.pnlFafPos.hideframe_Altitude() self.pnlFafPos.btnCalculater.hide() self.gbPosition.Add = self.pnlFafPos self.pnlMaptPos = PositionPanel(self.gbPosition) self.pnlMaptPos.Caption = "MAPt Position" self.pnlMaptPos.hideframe_Altitude() self.pnlMaptPos.btnCalculater.hide() self.gbPosition.Add = self.pnlMaptPos self.pnlMaTpPos = PositionPanel(self.gbPosition) self.pnlMaTpPos.Caption = "MA TP Position" self.pnlMaTpPos.hideframe_Altitude() self.pnlMaTpPos.btnCalculater.hide() self.gbPosition.Add = self.pnlMaTpPos self.pnlMaTpPos.Visible = False self.gbMaEndPos = GroupBox(self.gbPosition) self.gbMaEndPos.Caption = "MA End Position" self.gbPosition.Add = self.gbMaEndPos self.cmbMaEndType = ComboBoxPanel(self.gbMaEndPos) self.cmbMaEndType.Caption = "Type" self.cmbMaEndType.Items = ["NDB", "VOR"] self.gbMaEndPos.Add = self.cmbMaEndType self.cmbMaEndType.Visible = False self.pnlMaEndPos = PositionPanel(self.gbMaEndPos) self.pnlMaEndPos.hideframe_Altitude() self.pnlMaEndPos.btnCalculater.hide() self.gbMaEndPos.Add = self.pnlMaEndPos self.gbNavAid = GroupBox(self.gbPosition) self.gbNavAid.Caption = "Navigational Aid Position" self.gbPosition.Add = self.gbNavAid self.cmbNavAidType = ComboBoxPanel(self.gbNavAid) self.cmbNavAidType.Caption = "Type" self.cmbNavAidType.Items = ["NDB", "VOR"] self.gbNavAid.Add = self.cmbNavAidType self.pnlNavAidPos = PositionPanel(self.gbNavAid) self.pnlNavAidPos.btnCalculater.hide() self.pnlNavAidPos.hideframe_Altitude() self.gbNavAid.Add = self.pnlNavAidPos self.gbAddNavAid = GroupBox(self.gbPosition) self.gbAddNavAid.Caption = "Additional Navigational Aid Position" self.gbPosition.Add = self.gbAddNavAid self.cmbAddNavAidType = ComboBoxPanel(self.gbAddNavAid) self.cmbAddNavAidType.Caption = "Type" self.cmbAddNavAidType.Items = ["NDB", "VOR"] self.gbAddNavAid.Add = self.cmbAddNavAidType self.pnlAddNavAidPos = PositionPanel(self.gbAddNavAid) self.pnlAddNavAidPos.btnCalculater.hide() self.pnlAddNavAidPos.hideframe_Altitude() self.gbAddNavAid.Add = self.pnlAddNavAidPos self.gbParameters = GroupBox(Form) self.gbParameters.Caption = "Parameters" self.gbParameters.layoutBoxPanel.setSpacing(9) self.vlForm.addWidget(self.gbParameters) self.cmbTypeMapt = ComboBoxPanel(self.gbParameters) self.cmbTypeMapt.Caption = "MAPt Type" self.cmbTypeMapt.Items = ["Navigation facility", "FIX", "Timing"] self.gbParameters.Add = self.cmbTypeMapt self.cmbTypeTP = ComboBoxPanel(self.gbParameters) self.cmbTypeTP.Caption = "TP Type" self.cmbTypeTP.Items = [ "Turn at FIX or Facility", "Turn at Altitude", "Turn at MAPt" ] self.gbParameters.Add = self.cmbTypeTP self.cmbTypeTP.Visible = False self.cmbAircraftCatgory = ComboBoxPanel(self.gbParameters) self.cmbAircraftCatgory.Caption = "Aircraft Category" self.cmbAircraftCatgory.Items = ["A", "B", "C", "D", "E", "H"] self.gbParameters.Add = self.cmbAircraftCatgory self.cmbDirection = ComboBoxPanel(self.gbParameters) self.cmbDirection.Caption = "Direction" self.cmbDirection.Items = ["Left", "Right"] self.gbParameters.Add = self.cmbDirection self.cmbDirection.Visible = False self.pnlAerodromeAlt = AltitudeBoxPanel(self.gbParameters) self.pnlAerodromeAlt.CaptionUnits = "ft" self.pnlAerodromeAlt.Caption = "Aerodrome Altitude" self.gbParameters.Add = self.pnlAerodromeAlt self.pnlPrimaryMoc = AltitudeBoxPanel(self.gbParameters) self.pnlPrimaryMoc.CaptionUnits = "m" self.pnlPrimaryMoc.Caption = "Primary Moc" self.pnlPrimaryMoc.Value = Altitude(75) self.gbParameters.Add = self.pnlPrimaryMoc self.pnlOCA = AltitudeBoxPanel(self.gbParameters) self.pnlOCA.CaptionUnits = "ft" self.pnlOCA.Caption = "OCA" self.gbParameters.Add = self.pnlOCA self.pnlTpAlt = AltitudeBoxPanel(self.gbParameters) self.pnlTpAlt.CaptionUnits = "ft" self.pnlTpAlt.Caption = "TP Altitude" self.gbParameters.Add = self.pnlTpAlt self.pnlTpAlt.Visible = False self.pnlEndTurnAlt = AltitudeBoxPanel(self.gbParameters) self.pnlEndTurnAlt.CaptionUnits = "ft" self.pnlEndTurnAlt.Caption = "End Turn Altitude" self.gbParameters.Add = self.pnlEndTurnAlt self.pnlEndTurnAlt.Visible = False self.pnlEndAlt = AltitudeBoxPanel(self.gbParameters) self.pnlEndAlt.CaptionUnits = "ft" self.pnlEndAlt.Caption = "End Altitude" self.gbParameters.Add = self.pnlEndAlt self.pnlEndAlt.Visible = False self.pnlTurnGradient = AngleGradientBoxPanel(self.gbParameters) self.pnlTurnGradient.CaptionUnits = AngleGradientSlopeUnits.Percent self.pnlTurnGradient.Caption = "Turn Gradient" # self.pnlTurnGradient.Value = AngleGradientSlope(2.5, AngleGradientSlopeUnits.Percent) self.gbParameters.Add = self.pnlTurnGradient self.pnlTurnGradient.Visible = False self.pnlBearing = TrackRadialBoxPanel(self.gbParameters) self.pnlBearing.Caption = "Bearing" self.gbParameters.Add = self.pnlBearing self.pnlBearing.Visible = False self.pnlDistance = DistanceBoxPanel(self.gbParameters, DistanceUnits.NM) self.pnlDistance.Caption = "Distance FAF-MAPt" self.pnlDistance.Button = None self.gbParameters.Add = self.pnlDistance self.pnlClimbGradient = AngleGradientBoxPanel(self.gbParameters) self.pnlClimbGradient.CaptionUnits = AngleGradientSlopeUnits.Percent self.pnlClimbGradient.Caption = "Climb Gradient" self.pnlClimbGradient.Value = AngleGradientSlope( 2.5, AngleGradientSlopeUnits.Percent) self.gbParameters.Add = self.pnlClimbGradient self.cmbTrackGuidance = ComboBoxPanel(self.gbParameters) self.cmbTrackGuidance.Caption = "Track Guidance" self.cmbTrackGuidance.Items = ["Yes", "No"] QtCore.QObject.connect(self.cmbTrackGuidance, QtCore.SIGNAL("Event_0"), self.cmbTrackGuidanceEvent_0) self.gbParameters.Add = self.cmbTrackGuidance self.cmbAddTrackGuidance = ComboBoxPanel(self.gbParameters) self.cmbAddTrackGuidance.Caption = "Additional Track Guidance" self.cmbAddTrackGuidance.Items = ["Yes", "No"] QtCore.QObject.connect(self.cmbAddTrackGuidance, QtCore.SIGNAL("Event_0"), self.cmbAddTrackGuidanceEvent_0) self.gbParameters.Add = self.cmbAddTrackGuidance self.cmbTurnMAPt = ComboBoxPanel(self.gbParameters) self.cmbTurnMAPt.Caption = "Turn Before MAPt" self.cmbTurnMAPt.Items = ["Yes", "No"] # QtCore.QObject.connect(self.cmbTrackGuidance, QtCore.SIGNAL("Event_0"), self.cmbTrackGuidanceEvent_0) self.gbParameters.Add = self.cmbTurnMAPt self.cmbTurnMAPt.Visible = False self.gbTpTolerance = GroupBox(self.gbParameters) self.gbTpTolerance.Caption = "TP Tolerance" self.gbParameters.Add = self.gbTpTolerance self.gbTpTolerance.Visible = False self.txtKEarlist = NumberBoxPanel(self.gbTpTolerance) self.txtKEarlist.CaptionUnits = "nm" self.txtKEarlist.Caption = "K Earliest" self.gbTpTolerance.Add = self.txtKEarlist self.txtLatestFix = NumberBoxPanel(self.gbTpTolerance) self.txtLatestFix.CaptionUnits = "nm" self.txtLatestFix.Caption = "Latest Fix" self.gbTpTolerance.Add = self.txtLatestFix self.txtC = NumberBoxPanel(self.gbTpTolerance) self.txtC.CaptionUnits = "nm" self.txtC.Caption = "C" self.gbTpTolerance.Add = self.txtC self.txtLatestTurn = NumberBoxPanel(self.gbTpTolerance) self.txtLatestTurn.CaptionUnits = "nm" self.txtLatestTurn.Caption = "Latest" self.gbTpTolerance.Add = self.txtLatestTurn self.gbNominalTrack = GroupBox(self.gbParameters) self.gbNominalTrack.Caption = "Nominal Track" self.gbParameters.Add = self.gbNominalTrack self.gbNominalTrack.Visible = False self.pnlTrueStartTrack = TrackRadialBoxPanel(self.gbNominalTrack) self.pnlTrueStartTrack.Caption = "True Start Track" self.gbNominalTrack.Add = self.pnlTrueStartTrack self.pnlTrueEndTrack = TrackRadialBoxPanel(self.gbNominalTrack) self.pnlTrueEndTrack.Caption = "True End Track" self.gbNominalTrack.Add = self.pnlTrueEndTrack self.txtArcLength = NumberBoxPanel(self.gbNominalTrack) self.txtArcLength.CaptionUnits = "nm" self.txtArcLength.Caption = "Arc Length" self.gbNominalTrack.Add = self.txtArcLength self.gbVelocity = GroupBox(self.gbParameters) self.gbVelocity.Caption = "ISA VAR Celsius,IAS,TAS and Wind Velocity" self.gbParameters.Add = self.gbVelocity self.txtISAVAR = NumberBoxPanel(self.gbVelocity, "0.0") self.txtISAVAR.CaptionUnits = define._degreeStr + QtCore.QString("C") self.txtISAVAR.Caption = "ISA" # self.txtISAVAR.Items = ["ISA-30", "ISA-20", "ISA-10", "ISA", "ISA+10", "ISA+15", "ISA+20", "ISA+30"] self.gbVelocity.Add = self.txtISAVAR self.pnlIAS = SpeedBoxPanel(self.gbVelocity, SpeedUnits.KTS) self.pnlIAS.Caption = "IAS" self.gbVelocity.Add = self.pnlIAS # self.pnlWind = WindPanel(self.gbVelocity) # self.gbVelocity.Add = self.pnlWind # self.pnlWind.Visible = False self.pnlTAS = SpeedBoxPanel(self.gbVelocity, SpeedUnits.KTS) self.pnlTAS.Caption = "TAS" self.gbVelocity.Add = self.pnlTAS self.gbTurn = GroupBox(self.gbParameters) self.gbTurn.Caption = "Turn" self.gbParameters.Add = self.gbTurn self.gbTurn.Visible = False self.txtBankAngle = NumberBoxPanel(self.gbTurn) self.txtBankAngle.CaptionUnits = define._degreeStr self.txtBankAngle.Caption = "Bank Angle" self.gbTurn.Add = self.txtBankAngle self.txtRateOfTurn = NumberBoxPanel(self.gbTurn) self.txtRateOfTurn.CaptionUnits = define._degreeStr + QtCore.QString( "/sec") self.txtRateOfTurn.Caption = "Rate Of Turn" self.gbTurn.Add = self.txtRateOfTurn self.txtWindEffect = NumberBoxPanel(self.gbTurn) self.txtWindEffect.Caption = "Wind Effect" self.gbTurn.Add = self.txtWindEffect self.gbMAPtTolerance = GroupBox(self.gbParameters) self.gbMAPtTolerance.Caption = "MAPt Tolerance" self.gbParameters.Add = self.gbMAPtTolerance self.txtEarlist = NumberBoxPanel(self.gbMAPtTolerance) self.txtEarlist.CaptionUnits = "nm" self.txtEarlist.Caption = "Earliest" self.gbMAPtTolerance.Add = self.txtEarlist self.txtLatest = NumberBoxPanel(self.gbMAPtTolerance) self.txtLatest.CaptionUnits = "nm" self.txtLatest.Caption = "Latest" self.gbMAPtTolerance.Add = self.txtLatest self.txtD = NumberBoxPanel(self.gbMAPtTolerance) self.txtD.CaptionUnits = "nm" self.txtD.Caption = "D" self.gbMAPtTolerance.Add = self.txtD self.gbMAPtToSocDist = GroupBox(self.gbParameters) self.gbMAPtToSocDist.Caption = "MAPt to SOC Distance" self.gbParameters.Add = self.gbMAPtToSocDist self.txtX = NumberBoxPanel(self.gbMAPtToSocDist) self.txtX.CaptionUnits = "nm" self.txtX.Caption = "X" self.gbMAPtToSocDist.Add = self.txtX self.txtDistMAPtSOC = DistanceBoxPanel(self.gbMAPtToSocDist, DistanceUnits.NM) self.txtDistMAPtSOC.Caption = "MAPt - SOC Distance" self.txtDistMAPtSOC.Button = None self.gbMAPtToSocDist.Add = self.txtDistMAPtSOC self.txtEarlistTemp = NumberBoxPanel(self.gbParameters) self.gbParameters.Add = self.txtEarlistTemp self.txtEarlistTemp.Visible = False self.txtLatestTemp = NumberBoxPanel(self.gbParameters) self.gbParameters.Add = self.txtLatestTemp self.txtLatestTemp.Visible = False self.missedApproachMenu = QtGui.QMenu() self.strightCmd = QgisHelper.createAction(self.missedApproachMenu, "Straight", self.menuStrightClick) self.missedApproachMenu.addAction(self.strightCmd) self.turningCmd = QgisHelper.createAction(self.missedApproachMenu, "Turning", self.menuTurningClick) self.missedApproachMenu.addAction(self.turningCmd)
def setupUi(self, Form): Form.setObjectName(_fromUtf8("Form")) Form.resize(473, 580) font = QtGui.QFont() font.setFamily(_fromUtf8("Arial")) font.setBold(False) font.setWeight(50) Form.setFont(font) self.vlForm = QtGui.QVBoxLayout(Form) self.vlForm.setObjectName(_fromUtf8("vlForm")) self.gbGeneral = QtGui.QGroupBox(Form) self.gbGeneral.setObjectName(_fromUtf8("gbGeneral")) self.gbGeneral.setTitle("General") self.vl_gbGeneral = QtGui.QVBoxLayout(self.gbGeneral) self.vl_gbGeneral.setObjectName(_fromUtf8("vl_gbGeneral")) self.pnlProcType = ComboBoxPanel(self.gbGeneral) self.pnlProcType.Caption = "Procedure Type" self.vl_gbGeneral.addWidget(self.pnlProcType) self.pnlBasedOn = ComboBoxPanel(self.gbGeneral) self.pnlBasedOn.Caption = "Path Terminators Based On" self.vl_gbGeneral.addWidget(self.pnlBasedOn) self.vlForm.addWidget(self.gbGeneral) self.gbParameters = QtGui.QGroupBox(Form) font = QtGui.QFont() font.setFamily(_fromUtf8("Arial")) font.setBold(False) font.setWeight(50) self.gbParameters.setFont(font) self.gbParameters.setObjectName(_fromUtf8("gbParameters")) self.gbParameters.setTitle("Path Terminators") self.vl_gbParameters = QtGui.QVBoxLayout(self.gbParameters) self.vl_gbParameters.setObjectName(_fromUtf8("vl_gbParameters")) self.pnlPT = ComboBoxPanel(self.gbParameters) self.pnlPT.Caption = "Type" self.vl_gbParameters.addWidget(self.pnlPT) self.pnlProperties = QtGui.QFrame(self.gbParameters) self.pnlProperties.setObjectName("pnlProperties") self.hl_pnlProperties = QtGui.QHBoxLayout(self.pnlProperties) self.hl_pnlProperties.setObjectName("hl_pnlProperties") # self.hl_pnlProperties.setMargin(0) # self.hl_pnlProperties.setSpacing(0) self.pnlLeft = QtGui.QFrame(self.pnlProperties) self.pnlLeft.setFrameShape(QtGui.QFrame.NoFrame) self.pnlLeft.setFrameShadow(QtGui.QFrame.Raised) self.pnlLeft.setObjectName("pnlLeft") self.vl_pnlLeft = QtGui.QVBoxLayout(self.pnlLeft) self.vl_pnlLeft.setObjectName("vl_pnlLeft") self.vl_pnlLeft.setMargin(0) self.vl_pnlLeft.setSpacing(0) self.gbWpt = QtGui.QGroupBox(self.pnlLeft) self.gbWpt.setObjectName("gbWpt") self.gbWpt.setTitle("Waypoint") self.vl_gbWpt = QtGui.QVBoxLayout(self.gbWpt) self.vl_gbWpt.setObjectName("vl_gbWpt") self.pnlWpt = PositionPanel(self.gbWpt, None, None, "Degree") self.pnlWpt.btnCalculater.hide() self.pnlWpt.showframe_ID() self.pnlWpt.hideframe_Altitude() self.pnlWpt.degreeFormat = "ddmmss.ssssH" self.vl_gbWpt.addWidget(self.pnlWpt) self.pnlFlyOver = ComboBoxPanel(self.gbWpt) self.pnlFlyOver.Caption = "Fly-over" self.pnlFlyOver.LabelWidth = 150 self.vl_gbWpt.addWidget(self.pnlFlyOver) self.vl_pnlLeft.addWidget(self.gbWpt) self.pnlAltitude = AltitudeBoxPanel(self.pnlLeft) self.pnlAltitude.Caption = "Altitude Restriction" self.pnlAltitude.CaptionUnits = "ft" self.pnlAltitude.LabelWidth = 150 self.vl_pnlLeft.addWidget(self.pnlAltitude) self.pnlSpeed = SpeedBoxPanel(self.pnlLeft, SpeedUnits.KTS) self.pnlSpeed.Caption = "Speed Limit" self.pnlSpeed.LabelWidth = 150 self.vl_pnlLeft.addWidget(self.pnlSpeed) self.hl_pnlProperties.addWidget(self.pnlLeft) self.pnlRight = QtGui.QFrame(self.pnlProperties) self.pnlRight.setObjectName("pnlRight") self.pnlRight.setFrameShape(QtGui.QFrame.NoFrame) self.pnlRight.setFrameShadow(QtGui.QFrame.Raised) self.vl_pnlRight = QtGui.QVBoxLayout(self.pnlRight) self.vl_pnlRight.setObjectName("vl_pnlRight") self.vl_pnlRight.setMargin(0) self.vl_pnlRight.setSpacing(0) self.pnlCourse = TrackRadialBoxPanel(self.pnlRight) self.pnlCourse.Caption = "Course" self.pnlCourse.LabelWidth = 150 self.vl_pnlRight.addWidget(self.pnlCourse) self.pnlTurnDir = ComboBoxPanel(self.pnlRight) self.pnlTurnDir.Caption = "Turn Direction" self.pnlTurnDir.LabelWidth = 150 self.vl_pnlRight.addWidget(self.pnlTurnDir) self.pnlDist = DistanceBoxPanel(self.pnlRight, DistanceUnits.NM) self.pnlDist.Caption = "Distance" self.pnlDist.LabelWidth = 150 self.vl_pnlRight.addWidget(self.pnlDist) self.pnlTime = NumberBoxPanel(self.pnlRight) self.pnlTime.CaptionUnits = "min" self.pnlTime.Caption = "Time" self.pnlTime.LabelWidth = 150 self.vl_pnlRight.addWidget(self.pnlTime) self.pnlArcCen = PositionPanel(self.pnlRight, None, None, "Degree") self.pnlArcCen.groupBox.setTitle("Arc Center") self.pnlArcCen.btnCalculater.hide() self.pnlArcCen.hideframe_Altitude() self.pnlWpt.degreeFormat = "ddmmss.ssssH" self.vl_pnlRight.addWidget(self.pnlArcCen) self.hl_pnlProperties.addWidget(self.pnlRight) self.vl_gbParameters.addWidget(self.pnlProperties) self.frameResult = Frame(self.gbParameters, "HL") self.vl_gbParameters.addWidget(self.frameResult) self.grid = QtGui.QTableView(self.frameResult) self.grid.setObjectName("grid") self.frameResult.Add = self.grid self.lblError = QtGui.QLabel(self.gbParameters) self.lblError.setObjectName("lblError") self.lblError.setAlignment(QtCore.Qt.AlignCenter) font = QtGui.QFont() font.setBold(True) font.setPointSize(10) self.lblError.setFont(font) palette = QtGui.QPalette() brush = QtGui.QBrush(QtGui.QColor(207, 56, 86, 255)) # brush.setStyle(Qt::SolidPattern); palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.WindowText, brush) # palette.setBrush(QPalette.Inactive, QPalette.WindowText, brush2); # palette.setBrush(QPalette.Disabled, QPalette.WindowText, brush1); self.lblError.setPalette(palette) self.vl_gbParameters.addWidget(self.lblError) self.gridStdModel = QtGui.QStandardItemModel() self.gridStdModel.setHorizontalHeaderLabels([ "#", "ID", "Latitude", "Longitude", "P/T", "Fly-over", unicode("Course (° T)", "utf-8"), "Turn Direction", "Altitude (ft)", "Dist. (nm) / Time (min)", "Speed Limit (kts)", "Center Latitude", "Center Longitude" ]) # self.gridSelectionModel = QtGui.QSortFilterProxyModel() # # self.gridSelectionModel.setSourceModel(self.gridStdModel) self.grid.setModel(self.gridStdModel) self.grid.setSelectionBehavior(1) # self.grid.setSelectionMode(1) self.pnlTreeViewActions = QtGui.QFrame(self.frameResult) self.pnlTreeViewActions.setObjectName("pnlTreeViewActions") self.vl_pnlTreeViewActions = QtGui.QVBoxLayout(self.pnlTreeViewActions) self.vl_pnlTreeViewActions.setObjectName("vl_pnlTreeViewActions") self.btnAdd = QtGui.QPushButton(self.pnlTreeViewActions) self.btnAdd.setObjectName("btnAdd") self.btnAdd.setText("") icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap("Resource/add.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.btnAdd.setIcon(icon) self.vl_pnlTreeViewActions.addWidget(self.btnAdd) self.btnRemove = QtGui.QPushButton(self.pnlTreeViewActions) self.btnRemove.setObjectName("btnRemove") self.btnRemove.setText("") icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap("Resource/remove.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.btnRemove.setIcon(icon) self.vl_pnlTreeViewActions.addWidget(self.btnRemove) self.btnUp = QtGui.QPushButton(self.pnlTreeViewActions) self.btnUp.setObjectName("btnUp") self.btnUp.setText("") icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap("Resource/up.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.btnUp.setIcon(icon) self.vl_pnlTreeViewActions.addWidget(self.btnUp) self.btnDown = QtGui.QPushButton(self.pnlTreeViewActions) self.btnDown.setObjectName("btnDown") self.btnDown.setText("") icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap("Resource/down.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.btnDown.setIcon(icon) self.vl_pnlTreeViewActions.addWidget(self.btnDown) self.frameResult.Add = self.pnlTreeViewActions self.vlForm.addWidget(self.gbParameters)
def setupUi(self, Form): Form.setObjectName(_fromUtf8("Form")) Form.resize(435, 580) self.verticalLayout = QVBoxLayout(Form) self.verticalLayout.setObjectName(_fromUtf8("verticalLayout")) self.gbParameters = GroupBox(Form) self.gbParameters.Caption = "General" self.verticalLayout.addWidget(self.gbParameters) self.cmbAerodrome = ComboBoxPanel(self.gbParameters, True) self.cmbAerodrome.Caption = "Aerodrome" self.cmbAerodrome.LabelWidth = 150 self.cmbAerodrome.Width = 150 self.gbParameters.Add = self.cmbAerodrome self.cmbRwyDir = ComboBoxPanel(self.gbParameters, True) self.cmbRwyDir.Caption = "Runway Direction" self.cmbRwyDir.LabelWidth = 150 self.cmbRwyDir.Width = 150 self.gbParameters.Add = self.cmbRwyDir self.annotationFAWP = QgsTextAnnotationItem(define._canvas) self.annotationFAWP.setDocument(QTextDocument("FAP")) self.annotationFAWP.hide() self.pnlFapPosition = PositionPanel(self.gbParameters, self.annotationFAWP) self.pnlFapPosition.Caption = "FAP Position" # self.pnlFafPosition.btnCalculater.hide() self.pnlFapPosition.hideframe_Altitude() self.gbParameters.Add = self.pnlFapPosition self.pnlThrPosition = PositionPanel(self.gbParameters) self.pnlThrPosition.Caption = "Threshold Position" self.pnlThrPosition.btnCalculater.hide() self.gbParameters.Add = self.pnlThrPosition self.pnlRwyEndPosition = PositionPanel(self.gbParameters) self.pnlRwyEndPosition.Caption = "RwyEnd Position" self.pnlRwyEndPosition.btnCalculater.hide() self.gbParameters.Add = self.pnlRwyEndPosition self.pnlRwyEndPosition.Visible = False self.pnlInboundTrack = TrackRadialBoxPanel(self.gbParameters) self.pnlInboundTrack.Caption = "In-bound Track" self.pnlInboundTrack.LabelWidth = 150 self.gbParameters.Add = self.pnlInboundTrack self.pnlEstimatedAltitude = AltitudeBoxPanel(self.gbParameters) self.pnlEstimatedAltitude.Caption = "Estimated Altitude" self.pnlEstimatedAltitude.LabelWidth = 150 self.pnlEstimatedAltitude.Value = Altitude(1000) self.gbParameters.Add = self.pnlEstimatedAltitude self.pnlAerodromeAltitude = AltitudeBoxPanel(self.gbParameters) self.pnlAerodromeAltitude.Caption = "Aerodrome Altitude" self.pnlAerodromeAltitude.LabelWidth = 150 self.pnlAerodromeAltitude.Value = Altitude(1000) self.gbParameters.Add = self.pnlAerodromeAltitude self.pnlIsa = NumberBoxPanel(self.gbParameters, "0.0") self.pnlIsa.CaptionUnits = define._degreeStr + "C" self.pnlIsa.Caption = "ISA" self.pnlIsa.LabelWidth = 150 self.pnlIsa.Value = 15 self.gbParameters.Add = self.pnlIsa self.pnlRDH = AltitudeBoxPanel(self.gbParameters) self.pnlRDH.Caption = "RDH at THR" self.pnlRDH.LabelWidth = 150 self.pnlRDH.Value = Altitude(15) self.gbParameters.Add = self.pnlRDH self.cmbVPA = ComboBoxPanel(self.gbParameters) self.cmbVPA.Caption = "Vertical Path Angle[VPA]" self.cmbVPA.LabelWidth = 150 self.gbParameters.Add = self.cmbVPA self.cmbAircraftCategory = ComboBoxPanel(self.gbParameters) self.cmbAircraftCategory.Caption = "Aircraft Category" self.cmbAircraftCategory.LabelWidth = 150 self.gbParameters.Add = self.cmbAircraftCategory self.pnlHeightLoss = AltitudeBoxPanel(self.gbParameters) self.pnlHeightLoss.Caption = "Height Loss" self.pnlHeightLoss.LabelWidth = 150 self.gbParameters.Add = self.pnlHeightLoss self.pnlIas = SpeedBoxPanel(self.gbParameters) self.pnlIas.Caption = "IAS" self.pnlIas.LabelWidth = 150 self.pnlIas.Value = Speed(185) self.gbParameters.Add = self.pnlIas self.pnlTas = SpeedBoxPanel(self.gbParameters) self.pnlTas.Caption = "TAS" self.pnlTas.Enabled = False self.pnlTas.LabelWidth = 150 self.gbParameters.Add = self.pnlTas self.pnlWind = WindPanel(self.gbParameters) self.pnlWind.LabelWidth = 145 self.gbParameters.Add = self.pnlWind self.pnlSocAltitude = AltitudeBoxPanel(self.gbParameters) self.pnlSocAltitude.Caption = "SOC Altitude" self.pnlSocAltitude.LabelWidth = 150 self.gbParameters.Add = self.pnlSocAltitude self.pnlDistXz = DistanceBoxPanel(self.gbParameters, DistanceUnits.M, DistanceUnits.NM) self.pnlDistXz.Caption = "Xz Distance" self.pnlDistXz.LabelWidth = 150 self.pnlDistXz.Button = None self.pnlDistXz.Value = Distance(-900) self.pnlDistXz.Enabled = False self.gbParameters.Add = self.pnlDistXz self.pnlDistOfFafDA = DistanceBoxPanel(self.gbParameters, DistanceUnits.M, DistanceUnits.NM) self.pnlDistOfFafDA.Caption = "FAP-DA Distance" self.pnlDistOfFafDA.LabelWidth = 150 self.pnlDistOfFafDA.Button = None self.pnlDistOfFafDA.Enabled = False self.gbParameters.Add = self.pnlDistOfFafDA self.pnlDistOfDaThr = DistanceBoxPanel(self.gbParameters, DistanceUnits.M, DistanceUnits.NM) self.pnlDistOfDaThr.Caption = "DA-THR Distance" self.pnlDistOfDaThr.LabelWidth = 150 self.pnlDistOfDaThr.Button = None self.pnlDistOfDaThr.Enabled = False self.gbParameters.Add = self.pnlDistOfDaThr self.pnlDistOfSocThr = DistanceBoxPanel(self.gbParameters, DistanceUnits.M, DistanceUnits.NM) self.pnlDistOfSocThr.Caption = "SOC-THR Distance" self.pnlDistOfSocThr.LabelWidth = 150 self.pnlDistOfSocThr.Button = None self.pnlDistOfSocThr.Enabled = False self.gbParameters.Add = self.pnlDistOfSocThr