コード例 #1
0
    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()
コード例 #2
0
    def initParametersPan(self):
        ui = Ui_HoldingRace_P()
        self.parametersPanel = ui
        FlightPlanBaseDlg.initParametersPan(self)

        self.parametersPanel.txtTas.setEnabled(False)
        self.parametersPanel.pnlInsPos = PositionPanel(
            self.parametersPanel.gbVorDmePosition)
        #         self.parametersPanel.pnlInsPos.groupBox.setTitle("FAWP")
        self.parametersPanel.pnlInsPos.btnCalculater.hide()
        self.parametersPanel.pnlInsPos.hideframe_Altitude()
        self.parametersPanel.pnlInsPos.setObjectName("pnlInsPos")
        ui.vl_VorDmePosition.addWidget(self.parametersPanel.pnlInsPos)

        self.parametersPanel.pnlWind = WindPanel(
            self.parametersPanel.gbParameters)
        self.parametersPanel.pnlWind.lblIA.setMinimumSize(250, 0)
        self.parametersPanel.vl_gbParameters.insertWidget(
            6, self.parametersPanel.pnlWind)
        self.parametersPanel.pnlWind.setAltitude(
            Altitude(float(self.parametersPanel.txtAltitude.text()),
                     AltitudeUnits.FT))

        self.parametersPanel.cmbAircraftCategory.addItems(
            ["A", "B", "C", "D", "E", "H", "Custom"])
        #         self.parametersPanel.cmbOutboundLimit.addItems(["Time", "Distance From Waypoint"])
        #         self.parametersPanel.cmbConstruction.addItems(["2D", "3D"])
        self.parametersPanel.cmbOrientation.addItems(["Right", "Left"])

        self.parametersPanel.cmbAircraftCategory.setCurrentIndex(3)
        self.parametersPanel.frameAircraftCategory.hide()
        self.parametersPanel.frameMoc.hide()

        #         self.parametersPanel.cmbHoldingFunctionality.currentIndexChanged.connect(self.cmbHoldingFunctionalityCurrentIndexChanged)
        #         self.parametersPanel.cmbOutboundLimit.currentIndexChanged.connect(self.cmbOutboundLimitCurrentIndexChanged)
        #         self.parametersPanel.btnCaptureTrack.clicked.connect(self.captureBearing)
        #         self.parametersPanel.btnCaptureDistance.clicked.connect(self.measureDistance)
        #         self.parametersPanel.btnCaptureLength.clicked.connect(self.measureLength)
        self.parametersPanel.txtAltitude.textChanged.connect(
            self.altitudeChanged)
        #         self.parametersPanel.cmbAircraftCategory.currentIndexChanged.connect(self.changeCategory)
        #         self.parametersPanel.btnIasHelp.clicked.connect(self.iasHelpShow)
        self.parametersPanel.txtIas.textChanged.connect(self.iasChanged)
        self.parametersPanel.txtIsa.textChanged.connect(self.isaChanged)

        self.parametersPanel.txtTas.setText(
            str(
                Speed.smethod_0(
                    Speed(float(self.parametersPanel.txtIas.text())),
                    float(self.parametersPanel.txtIsa.text()),
                    Altitude(float(self.parametersPanel.txtAltitude.text()),
                             AltitudeUnits.FT)).Knots))
コード例 #3
0
    def initParametersPan(self):
        ui = Ui_TurnArea()
        self.parametersPanel = ui
        FlightPlanBaseDlg.initParametersPan(self)
        
        self.parametersPanel.txtTas.setEnabled(False)
        self.CaptureCoordTool = CaptureCoordinateToolUpdate(define._canvas)
        self.connect(self.CaptureCoordTool, SIGNAL("resultPointValueList"), self.resultPointValueListMethod)
        self.parametersPanel.pnlWind = WindPanel(self.parametersPanel.gbParameters)
        self.parametersPanel.pnlWind.lblIA.setMinimumSize(100, 0)
        self.parametersPanel.pnlWind.lblIA.setMaximumSize(100, 10000)
        self.parametersPanel.vl_gbParameters.insertWidget(6, self.parametersPanel.pnlWind)
        self.parametersPanel.pnlWind.setAltitude(Altitude(float(self.parametersPanel.txtAltitudeFt.text()), AltitudeUnits.FT))

        self.parametersPanel.cmbOrientation.addItems(["Right", "Left"])
                
#         self.parametersPanel.cmbHoldingFunctionality.currentIndexChanged.connect(self.cmbHoldingFunctionalityCurrentIndexChanged)
#         self.parametersPanel.cmbOutboundLimit.currentIndexChanged.connect(self.cmbOutboundLimitCurrentIndexChanged)
#         self.parametersPanel.btnCaptureTrack.clicked.connect(self.captureBearing)
#         self.parametersPanel.btnCaptureDistance.clicked.connect(self.measureDistance)
#         self.parametersPanel.btnCaptureLength.clicked.connect(self.measureLength)        
        self.parametersPanel.txtAltitudeFt.textChanged.connect(self.altitudeFtChanged)
        self.parametersPanel.txtAltitudeM.textChanged.connect(self.altitudeMChanged)
#         self.parametersPanel.cmbAircraftCategory.currentIndexChanged.connect(self.changeCategory)
#         self.parametersPanel.btnIasHelp.clicked.connect(self.iasHelpShow)
        self.parametersPanel.txtIas.textChanged.connect(self.iasChanged)
        self.parametersPanel.txtIsa.textChanged.connect(self.isaChanged)
        
        self.parametersPanel.txtTas.setText(str(round(Speed.smethod_0(Speed(float(self.parametersPanel.txtIas.text())), float(self.parametersPanel.txtIsa.text()), Altitude(float(self.parametersPanel.txtAltitudeFt.text()), AltitudeUnits.FT)).Knots, 4)))

        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(round(Unit.ConvertFeetToMeter(float(self.parametersPanel.txtAltitudeFt.text())), 4)))
            except:
                self.parametersPanel.txtAltitudeM.setText("0.0")
コード例 #4
0
    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
コード例 #5
0
    def initParametersPan(self):
        ui = Ui_HoldingRnpGeneral()
        self.parametersPanel = ui

        FlightPlanBaseDlg.initParametersPan(self)
        self.parametersPanel.txtTas.setEnabled(False)
        self.parametersPanel.pnlWaypoint = PositionPanel(
            self.parametersPanel.holding)
        self.parametersPanel.pnlWaypoint.groupBox.setTitle("Waypoint Position")

        self.parametersPanel.pnlWaypoint.hideframe_Altitude()
        self.parametersPanel.pnlWaypoint.setObjectName("positionWaypoint")
        self.parametersPanel.pnlWaypoint.btnCalculater.hide()
        self.parametersPanel.verticalLayout.insertWidget(
            0, self.parametersPanel.pnlWaypoint)

        self.parametersPanel.pnlWind = WindPanel(
            self.parametersPanel.grbParameters)
        self.parametersPanel.vLayout_grbParameters.insertWidget(
            5, self.parametersPanel.pnlWind)
        self.parametersPanel.pnlWind.setAltitude(
            Altitude(float(self.parametersPanel.txtAltitude.text()),
                     AltitudeUnits.FT))

        #         self.resize(460,600)
        self.parametersPanel.cmbConstruction.addItems(["2D", "3D"])
        self.parametersPanel.cmbAircraftCategory_2.addItems(
            ["A", "B", "C", "D", "E", "H", "Custom"])
        self.parametersPanel.cmbOrientation.addItems(
            [OrientationType.Left, OrientationType.Right])
        #         self.parametersPanel.cmbOrientation.setCurrentIndex(1)
        #
        #         '''Event Handlers Connect'''
        #
        self.parametersPanel.txtAltitude.textChanged.connect(self.method_31)
        #         self.parametersPanel.cmbTurnLimitation.currentIndexChanged.connect(self.method_28)
        #         self.parametersPanel.btnCaptureTrack.clicked.connect(self.captureBearing)
        self.parametersPanel.cmbAircraftCategory_2.currentIndexChanged.connect(
            self.changeCategory)
        self.parametersPanel.cmbAircraftCategory_2.setCurrentIndex(3)

        self.frame_8_1 = QFrame(self)
        sizePolicy = QSizePolicy(QSizePolicy.Minimum, QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        #         sizePolicy.setHeightForWidth(self.frame_8.sizePolicy().hasHeightForWidth())
        self.frame_8_1.setSizePolicy(sizePolicy)
        self.frame_8_1.setFrameShape(QFrame.StyledPanel)
        self.frame_8_1.setFrameShadow(QFrame.Raised)
        self.frame_8_1.setObjectName("frame_8")
        self.horizontalLayout_10_1 = QHBoxLayout(self.frame_8_1)
        self.horizontalLayout_10_1.setAlignment(Qt.AlignHCenter)
        self.horizontalLayout_10_1.setSpacing(0)
        self.horizontalLayout_10_1.setMargin(0)
        self.horizontalLayout_10_1.setObjectName("horizontalLayout_10")
        self.label_2_1 = QLabel(self.frame_8_1)
        self.label_2_1.setMinimumSize(QSize(140, 16777215))
        #         self.label_2_1.setFixedWidth(100)
        self.label_2_1.setText("MOCmultiplier")

        font = QFont()
        font.setFamily("Arial")
        font.setBold(False)
        font.setWeight(50)
        self.label_2_1.setFont(font)
        self.label_2_1.setObjectName("label_2_1")
        self.horizontalLayout_10_1.addWidget(self.label_2_1)

        self.parametersPanel.mocSpinBox = QSpinBox(self.frame_8_1)
        self.parametersPanel.mocSpinBox.setFont(font)
        self.parametersPanel.mocSpinBox.setObjectName("mocSpinBox")
        sizePolicy = QSizePolicy(QSizePolicy.MinimumExpanding,
                                 QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(
            self.parametersPanel.mocSpinBox.sizePolicy().hasHeightForWidth())
        self.parametersPanel.mocSpinBox.setSizePolicy(sizePolicy)
        self.parametersPanel.mocSpinBox.setMinimum(1)
        self.parametersPanel.mocSpinBox.setMinimumSize(QSize(140, 16777215))

        #         self.parametersPanel.mocSpinBox.setFixedWidth(100)
        self.horizontalLayout_10_1.addWidget(self.parametersPanel.mocSpinBox)
        #         self.verticalLayout_9.addWidget(self.frame_8_1)

        self.parametersPanel.vLayout_grbParameters.addWidget(self.frame_8_1)
        self.parametersPanel.btnIasHelp.clicked.connect(self.iasHelpShow)
        self.parametersPanel.frame_ConstructionType_2.hide()

        self.parametersPanel.txtIas.textChanged.connect(self.iasChanged)
        self.parametersPanel.txtIsa.textChanged.connect(self.isaChanged)
        #         self.parametersPanel.txtIsa.textChanged.connect(self.isaChanged)
        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(
                        round(
                            Unit.ConvertFeetToMeter(
                                float(
                                    self.parametersPanel.txtAltitude.text())),
                            4)))
            except:
                self.parametersPanel.txtAltitudeM.setText("0.0")
        self.parametersPanel.txtMoc.textChanged.connect(self.txtMocMChanged)
        self.parametersPanel.txtMocFt.textChanged.connect(self.txtMocFtChanged)

        self.flag1 = 0
        if self.flag1 == 0:
            self.flag1 = 1
        if self.flag1 == 2:
            self.flag1 = 0
        if self.flag1 == 1:
            try:
                self.parametersPanel.txtMocFt.setText(
                    str(
                        round(
                            Unit.ConvertMeterToFeet(
                                float(self.parametersPanel.txtMoc.text())),
                            4)))
            except:
                self.parametersPanel.txtMocFt.setText("0.0")

        self.parametersPanel.txtTas.setText(
            str(
                round(
                    Speed.smethod_0(
                        Speed(float(self.parametersPanel.txtIas.text())),
                        float(self.parametersPanel.txtIsa.text()),
                        Altitude(
                            float(self.parametersPanel.txtAltitude.text()),
                            AltitudeUnits.FT)).Knots, 4)))
コード例 #6
0
    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(_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
コード例 #8
0
    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