def setupUi(self, form_VSS): form_VSS.setObjectName(_fromUtf8("form_VSS")) form_VSS.resize(375, 372) font = QtGui.QFont() font.setFamily(_fromUtf8("Arial")) form_VSS.setFont(font) self.verticalLayout = QtGui.QVBoxLayout(form_VSS) self.verticalLayout.setObjectName(_fromUtf8("verticalLayout")) self.grbRunway = QtGui.QGroupBox(form_VSS) font = QtGui.QFont() font.setFamily(_fromUtf8("Arial")) font.setBold(False) font.setWeight(50) self.grbRunway.setFont(font) self.grbRunway.setObjectName(_fromUtf8("grbRunway")) self.vLayout_grbRunway = QtGui.QVBoxLayout(self.grbRunway) self.vLayout_grbRunway.setObjectName(_fromUtf8("vLayout_grbRunway")) self.cmbAerodrome = ComboBoxPanel(self.grbRunway, True) self.cmbAerodrome.Caption = "Aerodrome" self.cmbAerodrome.LabelWidth = 120 self.vLayout_grbRunway.addWidget(self.cmbAerodrome) self.cmbRwyDir = ComboBoxPanel(self.grbRunway, True) self.cmbRwyDir.Caption = "Runway Direction" self.cmbRwyDir.LabelWidth = 120 self.cmbRwyDir.Width = 120 self.vLayout_grbRunway.addWidget(self.cmbRwyDir) self.pnlTHR = PositionPanel(self.grbRunway) self.pnlTHR.groupBox.setTitle("Runway Thr") self.pnlTHR.btnCalculater.hide() self.pnlTHR.setObjectName("positionTHR") self.vLayout_grbRunway.addWidget(self.pnlTHR) self.pnlRwyEnd = PositionPanel(self.grbRunway) self.pnlRwyEnd.groupBox.setTitle("Runway End") self.pnlRwyEnd.hideframe_Altitude() self.pnlRwyEnd.btnCalculater.hide() self.pnlRwyEnd.setObjectName("positionRwyEnd") self.vLayout_grbRunway.addWidget(self.pnlRwyEnd) self.txtRwyDir = TrackRadialBoxPanel(self.grbRunway) self.txtRwyDir.Caption = "Runway In-bound Direction" self.txtRwyDir.LabelWidth = 160 self.vLayout_grbRunway.addWidget(self.txtRwyDir) icon = QtGui.QIcon() icon.addPixmap( QtGui.QPixmap(_fromUtf8("Resource/coordinate_capture.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.cmbRwyCode = ComboBoxPanel(self.grbRunway) self.cmbRwyCode.Caption = "Code" self.cmbRwyCode.LabelWidth = 160 self.vLayout_grbRunway.addWidget(self.cmbRwyCode) self.txtStripWidth = DistanceBoxPanel(self.grbRunway, DistanceUnits.M) self.txtStripWidth.Caption = "Strip Width" self.txtStripWidth.Value = Distance(300) self.txtStripWidth.LabelWidth = 160 self.vLayout_grbRunway.addWidget(self.txtStripWidth) self.verticalLayout.addWidget(self.grbRunway) self.grbParameters = QtGui.QGroupBox(form_VSS) self.grbParameters.setObjectName(_fromUtf8("grbParameters")) self.vLayout_grbParameters = QtGui.QVBoxLayout(self.grbParameters) self.vLayout_grbParameters.setObjectName( _fromUtf8("vLayout_grbParameters")) self.cmbApproachType = ComboBoxPanel(self.grbParameters) self.cmbApproachType.Caption = "Approach Type" self.cmbApproachType.LabelWidth = 160 self.vLayout_grbParameters.addWidget(self.cmbApproachType) self.txtTrack = TrackRadialBoxPanel(self.grbParameters) self.txtTrack.Caption = "In-bound Track" self.txtTrack.LabelWidth = 160 self.vLayout_grbParameters.addWidget(self.txtTrack) self.txtThrFaf = DistanceBoxPanel(self.grbParameters, DistanceUnits.NM) self.txtThrFaf.Caption = "THR to FAF Distance" self.txtThrFaf.Value = Distance(5, DistanceUnits.NM) self.txtThrFaf.LabelWidth = 160 self.vLayout_grbParameters.addWidget(self.txtThrFaf) self.txtDescAngle = AngleGradientBoxPanel(self.grbParameters) self.txtDescAngle.CaptionUnits = AngleGradientSlopeUnits.Degrees self.txtDescAngle.Caption = "Descent Angle" self.txtDescAngle.LabelWidth = 160 self.txtDescAngle.Value = AngleGradientSlope( 3, AngleGradientSlopeUnits.Degrees) self.vLayout_grbParameters.addWidget(self.txtDescAngle) self.pnlOCAH = MCAHPanel(self.grbParameters) self.pnlOCAH.lblMCAH.setText("Minimum Altitude (ft):") self.pnlOCAH.lblMCAH.setMaximumWidth(160) self.pnlOCAH.lblMCAH.setMinimumWidth(160) self.pnlOCAH.setValue(Altitude(800, AltitudeUnits.FT)) self.pnlOCAH.cmbMCAH.clear() self.pnlOCAH.cmbMCAH.addItems([OCAHType.OCA, OCAHType.OCH]) self.vLayout_grbParameters.addWidget(self.pnlOCAH) self.cmbConstructionType = ComboBoxPanel(self.grbParameters) self.cmbConstructionType.Caption = "Construction Type" self.cmbConstructionType.LabelWidth = 160 self.vLayout_grbParameters.addWidget(self.cmbConstructionType) self.chbAdCodeF = CheckBox(self.grbParameters) self.chbAdCodeF.Caption = "Aerodrome Code Letter" self.vLayout_grbParameters.addWidget(self.chbAdCodeF) self.verticalLayout.addWidget(self.grbParameters) spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) self.verticalLayout.addItem(spacerItem) self.retranslateUi(form_VSS) QtCore.QMetaObject.connectSlotsByName(form_VSS)
def __init__(self, parent): QDialog.__init__(self, parent) self.resize(100, 70) self.setWindowTitle("Navigational Aid") 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) self.gbAll.Caption = "Properties" verticalLayoutDlg.addWidget(self.gbAll) self.pnlType = ComboBoxPanel(self.gbAll) self.pnlType.Caption = "Type" self.pnlType.LabelWidth = 140 self.gbAll.Add = self.pnlType self.pnlName = TextBoxPanel(self.gbAll) self.pnlName.Caption = "Name" self.pnlName.LabelWidth = 140 self.pnlType.Items = NavigationalAidType.Items self.gbAll.Add = self.pnlName self.pnlSlope = AngleGradientBoxPanel(self.gbAll) self.pnlSlope.CaptionUnits = AngleGradientSlopeUnits.Degrees self.pnlSlope.Caption = "Slope" self.pnlSlope.LabelWidth = 140 self.gbAll.Add = self.pnlSlope self.pnlStartingHeight = AltitudeBoxPanel(self.gbAll) self.pnlStartingHeight.Caption = "Starting Height" self.pnlStartingHeight.CaptionUnits = "m" self.pnlStartingHeight.LabelWidth = 140 self.gbAll.Add = self.pnlStartingHeight self.pnlFinishingDistance = DistanceBoxPanel(self.gbAll, DistanceUnits.M) self.pnlFinishingDistance.Caption = "Finishing Distance" self.pnlFinishingDistance.LabelWidth = 140 self.gbAll.Add = self.pnlFinishingDistance self.pnlAlfa = AngleGradientBoxPanel(self.gbAll) self.pnlAlfa.CaptionUnits = AngleGradientSlopeUnits.Degrees self.pnlAlfa.Caption = "Alpha [" + unicode("α", "utf-8") + " - Cone]" self.pnlAlfa.LabelWidth = 140 self.gbAll.Add = self.pnlAlfa self.pnlRadiusCone = DistanceBoxPanel(self.gbAll, DistanceUnits.M) self.pnlRadiusCone.Caption = "Radius [R - Cone]" self.pnlRadiusCone.LabelWidth = 140 self.gbAll.Add = self.pnlRadiusCone self.pnlRadiusCylinder = DistanceBoxPanel(self.gbAll, DistanceUnits.M) self.pnlRadiusCylinder.Caption = "Radius [r - Cylinder]" self.pnlRadiusCylinder.LabelWidth = 140 self.gbAll.Add = self.pnlRadiusCylinder self.pnla = DistanceBoxPanel(self.gbAll, DistanceUnits.M) self.pnla.Caption = "a" self.pnla.LabelWidth = 140 self.gbAll.Add = self.pnla self.pnlb = DistanceBoxPanel(self.gbAll, DistanceUnits.M) self.pnlb.Caption = "b" self.pnlb.LabelWidth = 140 self.gbAll.Add = self.pnlb self.pnlh = AltitudeBoxPanel(self.gbAll) self.pnlh.Caption = "h" self.pnlh.CaptionUnits = "m" self.pnlh.LabelWidth = 140 self.gbAll.Add = self.pnlh self.pnlr = DistanceBoxPanel(self.gbAll, DistanceUnits.M) self.pnlr.Caption = "r" self.pnlr.LabelWidth = 140 self.gbAll.Add = self.pnlr self.pnlD = DistanceBoxPanel(self.gbAll, DistanceUnits.M) self.pnlD.Caption = "D" self.pnlD.LabelWidth = 140 self.gbAll.Add = self.pnlD self.pnlHbig = AltitudeBoxPanel(self.gbAll) self.pnlHbig.Caption = "H" self.pnlHbig.CaptionUnits = "m" self.pnlHbig.LabelWidth = 140 self.gbAll.Add = self.pnlHbig self.pnlL = DistanceBoxPanel(self.gbAll, DistanceUnits.M) self.pnlL.Caption = "L" self.pnlL.LabelWidth = 140 self.gbAll.Add = self.pnlL self.pnlphi = AngleGradientBoxPanel(self.gbAll) self.pnlphi.CaptionUnits = AngleGradientSlopeUnits.Degrees self.pnlphi.Caption = unicode("ɸ", "utf-8") self.pnlphi.LabelWidth = 140 self.gbAll.Add = self.pnlphi 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.connect(self.pnlType, SIGNAL("Event_0"), self.method_5) self.shownOnce = False self.method_5()
def setupUi(self, Dialog): Dialog.setObjectName(_fromUtf8("Dialog")) Dialog.resize(548, 584) self.verticalLayout_8 = QtGui.QVBoxLayout(Dialog) self.verticalLayout_8.setObjectName(_fromUtf8("verticalLayout_8")) self.tabControls = QtGui.QTabWidget(Dialog) font = QtGui.QFont() font.setFamily(_fromUtf8("Arial")) font.setWeight(50) font.setBold(False) self.tabControls.setFont(font) self.tabControls.setAutoFillBackground(False) self.tabControls.setStyleSheet(_fromUtf8("")) self.tabControls.setObjectName(_fromUtf8("tabControls")) self.tab_General = QtGui.QWidget(Dialog) self.tab_General.setObjectName(_fromUtf8("tab_General")) self.horizontalLayout_29 = QtGui.QHBoxLayout(self.tab_General) self.horizontalLayout_29.setMargin(3) self.horizontalLayout_29.setObjectName(_fromUtf8("horizontalLayout_29")) self.frame_2 = QtGui.QFrame(self.tab_General) self.frame_2.setFrameShape(QtGui.QFrame.StyledPanel) self.frame_2.setFrameShadow(QtGui.QFrame.Raised) self.frame_2.setObjectName(_fromUtf8("frame_2")) self.verticalLayout_2 = QtGui.QVBoxLayout(self.frame_2) self.verticalLayout_2.setSpacing(0) self.verticalLayout_2.setMargin(0) self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2")) self.groupBox_20 = QtGui.QGroupBox(self.frame_2) self.groupBox_20.setObjectName(_fromUtf8("groupBox_20")) self.verticalLayout_5 = QtGui.QVBoxLayout(self.groupBox_20) self.verticalLayout_5.setObjectName(_fromUtf8("verticalLayout_5")) self.cmbSegmentType = ComboBoxPanel(self.groupBox_20) self.cmbSegmentType.Caption = "Visual Segment Type" self.cmbSegmentType.LabelWidth = 250 self.verticalLayout_5.addWidget(self.cmbSegmentType) self.cmbDepartureType = ComboBoxPanel(self.groupBox_20) self.cmbDepartureType.Caption = "Departure Type" self.cmbDepartureType.LabelWidth = 250 self.verticalLayout_5.addWidget(self.cmbDepartureType) self.txtVSDG = AngleGradientBoxPanel(self.groupBox_20) self.txtVSDG.CaptionUnits = AngleGradientSlopeUnits.Percent self.txtVSDG.Caption = "Visual Segment Design Gradient [VSDG]" self.txtVSDG.LabelWidth = 250 self.txtVSDG.Value = AngleGradientSlope(5, AngleGradientSlopeUnits.Percent) self.verticalLayout_5.addWidget(self.txtVSDG) self.txtTakeOffSurfaceTrack = TrackRadialBoxPanel(self.groupBox_20) self.txtTakeOffSurfaceTrack.Caption = "Out-bound Take-off Surface Track" self.txtTakeOffSurfaceTrack.LabelWidth = 250 self.verticalLayout_5.addWidget(self.txtTakeOffSurfaceTrack) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(_fromUtf8("Resource/coordinate_capture.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.txtMOC = AltitudeBoxPanel(self.groupBox_20) self.txtMOC.CaptionUnits = "m" self.txtMOC.Caption = "MOC" self.txtMOC.Value = Altitude(30) self.txtMOC.LabelWidth = 250 self.verticalLayout_5.addWidget(self.txtMOC) self.frame_Limitation = QtGui.QFrame(self.groupBox_20) self.frame_Limitation.setFrameShape(QtGui.QFrame.StyledPanel) self.frame_Limitation.setFrameShadow(QtGui.QFrame.Raised) self.frame_Limitation.setObjectName(_fromUtf8("frame_Limitation")) self.horizontalLayout_2 = QtGui.QHBoxLayout(self.frame_Limitation) self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2")) self.chbLeftTurnProhibited = QtGui.QCheckBox(self.frame_Limitation) self.chbLeftTurnProhibited.setMinimumSize(QtCore.QSize(230, 0)) font = QtGui.QFont() font.setWeight(50) font.setBold(False) self.chbLeftTurnProhibited.setFont(font) self.chbLeftTurnProhibited.setObjectName(_fromUtf8("chbLeftTurnProhibited")) self.horizontalLayout_2.addWidget(self.chbLeftTurnProhibited) self.chbRightTurnProhibited = QtGui.QCheckBox(self.frame_Limitation) font = QtGui.QFont() font.setWeight(50) font.setBold(False) self.chbRightTurnProhibited.setFont(font) self.chbRightTurnProhibited.setLayoutDirection(QtCore.Qt.LeftToRight) self.chbRightTurnProhibited.setObjectName(_fromUtf8("chbRightTurnProhibited")) self.horizontalLayout_2.addWidget(self.chbRightTurnProhibited) self.verticalLayout_5.addWidget(self.frame_Limitation) self.grbIDF = QtGui.QGroupBox(self.groupBox_20) self.grbIDF.setObjectName(_fromUtf8("grbIDF")) self.verticalLayout_IDF = QtGui.QVBoxLayout(self.grbIDF) self.verticalLayout_IDF.setObjectName(_fromUtf8("verticalLayout_IDF")) self.txtTrackFrom = TrackRadialBoxPanel(self.grbIDF) self.txtTrackFrom.Caption = "Track From" self.verticalLayout_IDF.addWidget(self.txtTrackFrom) self.verticalLayout_5.addWidget(self.grbIDF) self.grbHRP = QtGui.QGroupBox(self.groupBox_20) self.grbHRP.setObjectName(_fromUtf8("grbHRP")) self.verticalLayout_HRP = QtGui.QVBoxLayout(self.grbHRP) self.verticalLayout_HRP.setObjectName(_fromUtf8("verticalLayout_HRP")) self.txtHSAL = DistanceBoxPanel(self.grbHRP, DistanceUnits.M) self.txtHSAL.Caption = "Safety Area Length" self.txtHSAL.Value = Distance(30) self.txtHSAL.LabelWidth = 240 self.verticalLayout_HRP.addWidget(self.txtHSAL) self.txtHSAW = DistanceBoxPanel(self.grbHRP, DistanceUnits.M) self.txtHSAW.Caption = "Safety Area Width" self.txtHSAW.Value = Distance(30) self.txtHSAW.LabelWidth = 240 self.verticalLayout_HRP.addWidget(self.txtHSAW) self.verticalLayout_5.addWidget(self.grbHRP) self.cmbConstructionType = ComboBoxPanel(self.groupBox_20) self.cmbConstructionType.Caption = "Construction Type" self.cmbConstructionType.LabelWidth = 250 self.verticalLayout_5.addWidget(self.cmbConstructionType) self.verticalLayout_2.addWidget(self.groupBox_20) spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) self.verticalLayout_2.addItem(spacerItem) self.horizontalLayout_29.addWidget(self.frame_2) self.frame_38 = QtGui.QFrame(self.tab_General) self.frame_38.setMaximumSize(QtCore.QSize(100, 16777215)) self.frame_38.setFrameShape(QtGui.QFrame.StyledPanel) self.frame_38.setFrameShadow(QtGui.QFrame.Raised) self.frame_38.setObjectName(_fromUtf8("frame_38")) self.verticalLayout_7 = QtGui.QVBoxLayout(self.frame_38) self.verticalLayout_7.setObjectName(_fromUtf8("verticalLayout_7")) self.btnOpenData = QtGui.QPushButton(self.frame_38) font = QtGui.QFont() font.setWeight(50) font.setBold(False) self.btnOpenData.setFont(font) self.btnOpenData.setObjectName(_fromUtf8("btnOpenData")) self.verticalLayout_7.addWidget(self.btnOpenData) self.btnSaveData = QtGui.QPushButton(self.frame_38) font = QtGui.QFont() font.setWeight(50) font.setBold(False) self.btnSaveData.setFont(font) self.btnSaveData.setObjectName(_fromUtf8("btnSaveData")) self.verticalLayout_7.addWidget(self.btnSaveData) self.btnConstruct = QtGui.QPushButton(self.frame_38) font = QtGui.QFont() font.setWeight(50) font.setBold(False) self.btnConstruct.setFont(font) self.btnConstruct.setObjectName(_fromUtf8("btnConstruct")) self.verticalLayout_7.addWidget(self.btnConstruct) self.btnEvaluate = QtGui.QPushButton(self.frame_38) font = QtGui.QFont() font.setWeight(50) font.setBold(False) self.btnEvaluate.setFont(font) self.btnEvaluate.setObjectName(_fromUtf8("btnEvaluate")) self.verticalLayout_7.addWidget(self.btnEvaluate) self.btnUpdateQA = QtGui.QPushButton(self.frame_38) self.btnUpdateQA.setEnabled(False) font = QtGui.QFont() font.setWeight(50) font.setBold(False) self.btnUpdateQA.setFont(font) self.btnUpdateQA.setObjectName(_fromUtf8("btnUpdateQA")) self.verticalLayout_7.addWidget(self.btnUpdateQA) self.btnClose = QtGui.QPushButton(self.frame_38) font = QtGui.QFont() font.setWeight(50) font.setBold(False) self.btnClose.setFont(font) self.btnClose.setObjectName(_fromUtf8("btnClose")) self.verticalLayout_7.addWidget(self.btnClose) spacerItem1 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) self.verticalLayout_7.addItem(spacerItem1) self.horizontalLayout_29.addWidget(self.frame_38) self.tabControls.addTab(self.tab_General, _fromUtf8("")) self.tab_Results = QtGui.QWidget(Dialog) self.tab_Results.setObjectName(_fromUtf8("tab_Results")) self.horizontalLayout_3 = QtGui.QHBoxLayout(self.tab_Results) self.horizontalLayout_3.setSpacing(3) self.horizontalLayout_3.setMargin(3) self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3")) self.frame_3 = QtGui.QFrame(self.tab_Results) self.frame_3.setFrameShape(QtGui.QFrame.StyledPanel) self.frame_3.setFrameShadow(QtGui.QFrame.Raised) self.frame_3.setObjectName(_fromUtf8("frame_3")) self.verticalLayout_6 = QtGui.QVBoxLayout(self.frame_3) self.verticalLayout_6.setSpacing(6) self.verticalLayout_6.setMargin(0) self.verticalLayout_6.setObjectName(_fromUtf8("verticalLayout_6")) self.frame_117 = QtGui.QFrame(self.frame_3) self.frame_117.setFrameShape(QtGui.QFrame.NoFrame) self.frame_117.setFrameShadow(QtGui.QFrame.Raised) self.frame_117.setObjectName(_fromUtf8("frame_117")) self.horizontalLayout_105 = QtGui.QHBoxLayout(self.frame_117) self.horizontalLayout_105.setSpacing(0) self.horizontalLayout_105.setMargin(0) self.horizontalLayout_105.setObjectName(_fromUtf8("horizontalLayout_105")) self.label_126 = QtGui.QLabel(self.frame_117) self.label_126.setMinimumSize(QtCore.QSize(290, 0)) font = QtGui.QFont() font.setWeight(50) font.setBold(False) self.label_126.setFont(font) self.label_126.setObjectName(_fromUtf8("label_126")) self.horizontalLayout_105.addWidget(self.label_126) self.cmbSurface = QtGui.QComboBox(self.frame_117) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.cmbSurface.sizePolicy().hasHeightForWidth()) self.cmbSurface.setSizePolicy(sizePolicy) font = QtGui.QFont() font.setFamily(_fromUtf8("Arial")) font.setWeight(50) font.setBold(False) self.cmbSurface.setFont(font) self.cmbSurface.setObjectName(_fromUtf8("cmbSurface")) self.horizontalLayout_105.addWidget(self.cmbSurface) self.verticalLayout_6.addWidget(self.frame_117) self.tblObstacles = QtGui.QTableView(self.frame_3) font = QtGui.QFont() font.setFamily(_fromUtf8("Arial")) self.tblObstacles.setFont(font) self.tblObstacles.setObjectName(_fromUtf8("tblObstacles")) self.verticalLayout_6.addWidget(self.tblObstacles) self.horizontalLayout_3.addWidget(self.frame_3) self.frame = QtGui.QFrame(self.tab_Results) # self.frame.setMinimumSize(QtCore.QSize(105, 16777215)) self.frame.setFrameShape(QtGui.QFrame.StyledPanel) self.frame.setFrameShadow(QtGui.QFrame.Raised) self.frame.setObjectName(_fromUtf8("frame")) self.verticalLayout_4 = QtGui.QVBoxLayout(self.frame) self.verticalLayout_4.setObjectName(_fromUtf8("verticalLayout_4")) self.btnLocate = QtGui.QPushButton(self.frame) self.btnLocate.setEnabled(False) font = QtGui.QFont() font.setWeight(50) font.setBold(False) self.btnLocate.setFont(font) self.btnLocate.setObjectName(_fromUtf8("btnLocate")) self.verticalLayout_4.addWidget(self.btnLocate) self.btnUpdateQA_2 = QtGui.QPushButton(self.frame) self.btnUpdateQA_2.setEnabled(False) font = QtGui.QFont() font.setWeight(50) font.setBold(False) self.btnUpdateQA_2.setFont(font) self.btnUpdateQA_2.setObjectName(_fromUtf8("btnUpdateQA_2")) self.verticalLayout_4.addWidget(self.btnUpdateQA_2) self.btnExportResult = QtGui.QPushButton(self.frame) font = QtGui.QFont() font.setWeight(50) font.setBold(False) self.btnExportResult.setFont(font) self.btnExportResult.setObjectName(_fromUtf8("btnExportResult")) self.verticalLayout_4.addWidget(self.btnExportResult) self.btnClose_2 = QtGui.QPushButton(self.frame) font = QtGui.QFont() font.setWeight(50) font.setBold(False) self.btnClose_2.setFont(font) self.btnClose_2.setObjectName(_fromUtf8("btnClose_2")) self.verticalLayout_4.addWidget(self.btnClose_2) spacerItem2 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) self.verticalLayout_4.addItem(spacerItem2) self.horizontalLayout_3.addWidget(self.frame) self.tabControls.addTab(self.tab_Results, _fromUtf8("")) self.verticalLayout_8.addWidget(self.tabControls) self.retranslateUi(Dialog) self.tabControls.setCurrentIndex(0) QtCore.QMetaObject.connectSlotsByName(Dialog) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(_fromUtf8("Resource/btnImage/openData.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.btnOpenData.setIcon(icon) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(_fromUtf8("Resource/btnImage/saveData.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.btnSaveData.setIcon(icon) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(_fromUtf8("Resource/btnImage/construct.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.btnConstruct.setIcon(icon) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(_fromUtf8("Resource/btnImage/evaluate.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.btnEvaluate.setIcon(icon) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(_fromUtf8("Resource/btnImage/close.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.btnClose.setIcon(icon) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(_fromUtf8("Resource/btnImage/locate.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.btnLocate.setIcon(icon) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(_fromUtf8("Resource/btnImage/pdtCheck.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) # self.btnPDTCheck.setIcon(icon) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(_fromUtf8("Resource/btnImage/close.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.btnClose_2.setIcon(icon) icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(_fromUtf8("Resource/btnImage/exportResult.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.btnExportResult.setIcon(icon) self.btnClose.setToolTip(_fromUtf8("Close")) self.btnClose_2.setToolTip(_fromUtf8("Close")) self.btnConstruct.setToolTip(_fromUtf8("Construct")) self.btnEvaluate.setToolTip(_fromUtf8("Evaluate")) self.btnLocate.setToolTip(_fromUtf8("Locate")) self.btnExportResult.setToolTip(_fromUtf8("Export Result")) self.btnOpenData.setToolTip(_fromUtf8("Open Data")) self.btnSaveData.setToolTip(_fromUtf8("Save Data")) # self.btnMarkSoc.setToolTip(_fromUtf8("Mark SOC")) self.btnClose.setIconSize(QtCore.QSize(32,32)) self.btnClose_2.setIconSize(QtCore.QSize(32,32)) self.btnConstruct.setIconSize(QtCore.QSize(32,32)) self.btnEvaluate.setIconSize(QtCore.QSize(32,32)) self.btnLocate.setIconSize(QtCore.QSize(32,32)) self.btnExportResult.setIconSize(QtCore.QSize(32,32)) self.btnOpenData.setIconSize(QtCore.QSize(32,32)) self.btnSaveData.setIconSize(QtCore.QSize(32,32))
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.gbApproachSegmentType = GroupBox(Form) self.gbApproachSegmentType.Caption = "Approach Segment Type" self.vlForm.addWidget(self.gbApproachSegmentType) self.txtApproachSegmentType = TextBoxPanel(self.gbApproachSegmentType) self.txtApproachSegmentType.Caption = "Type" self.txtApproachSegmentType.textBox.setEnabled(False) self.txtApproachSegmentType.Button = "sort2.png" self.txtApproachSegmentType.Value = "Final Segment" self.txtApproachSegmentType.textBox.setMaximumWidth(10000000) self.txtApproachSegmentType.hLayoutBoxPanel.removeItem( self.txtApproachSegmentType.spacerItem) QtCore.QObject.connect(self.txtApproachSegmentType, QtCore.SIGNAL("Event_1"), self.txtApproachSegmentType_Event_1) self.gbApproachSegmentType.Add = self.txtApproachSegmentType 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", "VOR"] 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.pnlNavAidPos = PositionPanel(self.gbNavAid) self.pnlNavAidPos.btnCalculater.hide() self.pnlNavAidPos.hideframe_Altitude() self.gbNavAid.Add = self.pnlNavAidPos self.pnlFafPos = PositionPanel(self.gbPosition) self.pnlFafPos.Caption = "FAF Position" self.pnlFafPos.btnCalculater.hide() self.gbPosition.Add = self.pnlFafPos self.pnlMaptPos = PositionPanel(self.gbPosition) self.pnlMaptPos.Caption = "MAPt Position" self.pnlMaptPos.btnCalculater.hide() self.gbPosition.Add = self.pnlMaptPos self.pnlDerPos = PositionPanel(self.gbPosition) self.pnlDerPos.Caption = "Approach THR Position" self.pnlDerPos.btnCalculater.hide() self.gbPosition.Add = self.pnlDerPos self.gbParameters = GroupBox(Form) self.gbParameters.Caption = "Parameters" self.gbParameters.layoutBoxPanel.setSpacing(9) self.vlForm.addWidget(self.gbParameters) self.cmbTurnDirection = ComboBoxPanel(self.gbParameters) self.cmbTurnDirection.Caption = "Turn Direction" self.cmbTurnDirection.Items = ["Left", "Right"] self.gbParameters.Add = self.cmbTurnDirection 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.gbJoin = GroupBox(self.gbParameters, "HL") self.gbJoin.Caption = "Join the intermediate segment" self.gbParameters.Add = self.gbJoin self.radioJoinYes = QtGui.QRadioButton(self.gbJoin) self.radioJoinYes.setText("Yes") self.radioJoinYes.setChecked(True) self.gbJoin.Add = self.radioJoinYes self.radioJoinNo = QtGui.QRadioButton(self.gbJoin) self.radioJoinNo.setText("No") self.gbJoin.Add = self.radioJoinNo self.pnlDistance = DistanceBoxPanel(self.gbParameters, DistanceUnits.NM) self.pnlDistance.Caption = "Distance FAF - MAPt" self.pnlDistance.Button = None self.gbParameters.Add = self.pnlDistance self.pnlGradient = AngleGradientBoxPanel(self.gbParameters) self.pnlGradient.CaptionUnits = AngleGradientSlopeUnits.Percent self.pnlGradient.Caption = "Descent Gradient" self.gbParameters.Add = self.pnlGradient self.approachMenu = QtGui.QMenu() self.finalCmd = QgisHelper.createAction(self.approachMenu, "Final Segment", self.menuFinalClick) self.approachMenu.addAction(self.finalCmd) self.intermediateMnu = QtGui.QMenu("Intermediate Approach Segment") self.approachMenu.addMenu(self.intermediateMnu) self.interStraightCmd = QgisHelper.createAction( self.intermediateMnu, "Intermediate Segment Straight", self.menuInterStrightClick) self.intermediateMnu.addAction(self.interStraightCmd) self.interWithIFCmd = QgisHelper.createAction( self.intermediateMnu, "Intermediate Segment With IF", self.menuInterWithIFClick) self.intermediateMnu.addAction(self.interWithIFCmd) self.interWithNoIFCmd = QgisHelper.createAction( self.intermediateMnu, "Intermediate Segment With No IF", self.menuInterWithNoIFClick) self.intermediateMnu.addAction(self.interWithNoIFCmd) self.initialMnu = QtGui.QMenu("Initial Approach Segment") self.approachMenu.addMenu(self.initialMnu) self.initialStraigtCmd = QgisHelper.createAction( self.initialMnu, "Initial Segment Straight", self.menuInitialStrightClick) self.initialMnu.addAction(self.initialStraigtCmd) self.initialDMEArcCmd = QgisHelper.createAction( self.initialMnu, "Initial Segment DME ARCS", self.menuInitialDMEArcClick) self.initialMnu.addAction(self.initialDMEArcCmd)
def setupUi(self, Form): Form.setObjectName(_fromUtf8("Form")) Form.resize(515, 570) self.verticalLayout = QtGui.QVBoxLayout(Form) self.verticalLayout.setObjectName(_fromUtf8("verticalLayout")) self.groupBox_20 = QtGui.QGroupBox(Form) font = QtGui.QFont() font.setFamily(_fromUtf8("Arial")) font.setBold(False) font.setWeight(50) self.groupBox_20.setFont(font) self.groupBox_20.setObjectName(_fromUtf8("groupBox_20")) self.verticalLayout_5 = QtGui.QVBoxLayout(self.groupBox_20) self.verticalLayout_5.setObjectName(_fromUtf8("verticalLayout_5")) self.cmbSegmentType = ComboBoxPanel(self.groupBox_20) self.cmbSegmentType.Caption = "Visual Segment Type" self.cmbSegmentType.LabelWidth = 250 self.verticalLayout_5.addWidget(self.cmbSegmentType) self.cmbApproachType = ComboBoxPanel(self.groupBox_20) self.cmbApproachType.Caption = "Approach Type" self.cmbApproachType.LabelWidth = 250 self.verticalLayout_5.addWidget(self.cmbApproachType) self.txtVSDG = AngleGradientBoxPanel(self.groupBox_20) self.txtVSDG.CaptionUnits = AngleGradientSlopeUnits.Degrees self.txtVSDG.Caption = "Visual Segment Design Gradient [VSDG]" self.txtVSDG.LabelWidth = 250 self.txtVSDG.Value = AngleGradientSlope( 8.3, AngleGradientSlopeUnits.Degrees) self.verticalLayout_5.addWidget(self.txtVSDG) self.txtApproachSurfaceTrack = TrackRadialBoxPanel(self.groupBox_20) self.txtApproachSurfaceTrack.Caption = "In-bound Approach Surface Track" self.verticalLayout_5.addWidget(self.txtApproachSurfaceTrack) icon = QtGui.QIcon() icon.addPixmap( QtGui.QPixmap(_fromUtf8("Resource/coordinate_capture.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.txtMOC = AltitudeBoxPanel(self.groupBox_20) self.txtMOC.CaptionUnits = "m" self.txtMOC.Caption = "MOC" self.txtMOC.Value = Altitude(75) self.txtMOC.LabelWidth = 250 self.verticalLayout_5.addWidget(self.txtMOC) self.frame_Limitation = QtGui.QFrame(self.groupBox_20) self.frame_Limitation.setFrameShape(QtGui.QFrame.StyledPanel) self.frame_Limitation.setFrameShadow(QtGui.QFrame.Raised) self.frame_Limitation.setObjectName(_fromUtf8("frame_Limitation")) self.horizontalLayout_2 = QtGui.QHBoxLayout(self.frame_Limitation) self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2")) self.chbLeftFlyOverProhibited = CheckBox(self.frame_Limitation) self.chbLeftFlyOverProhibited.Caption = "Left fly-over prohibited" self.horizontalLayout_2.addWidget(self.chbLeftFlyOverProhibited) self.chbRightFlyOverProhibited = CheckBox(self.frame_Limitation) self.chbRightFlyOverProhibited.Caption = "Right fly-over prohibited" self.horizontalLayout_2.addWidget(self.chbRightFlyOverProhibited) self.verticalLayout_5.addWidget(self.frame_Limitation) self.grbIDF = QtGui.QGroupBox(self.groupBox_20) self.grbIDF.setObjectName(_fromUtf8("grbIDF")) self.verticalLayout_IDF = QtGui.QVBoxLayout(self.grbIDF) self.verticalLayout_IDF.setObjectName(_fromUtf8("verticalLayout_IDF")) self.txtTrackTo = TrackRadialBoxPanel(self.grbIDF) self.txtTrackTo.Caption = "Track To" self.txtTrackTo.LabelWidth = 100 self.verticalLayout_IDF.addWidget(self.txtTrackTo) self.frame_Tolerance = QtGui.QFrame(self.grbIDF) self.frame_Tolerance.setFrameShape(QtGui.QFrame.StyledPanel) self.frame_Tolerance.setFrameShadow(QtGui.QFrame.Raised) self.frame_Tolerance.setObjectName(_fromUtf8("frame_Tolerance")) self.horizontalLayout = QtGui.QHBoxLayout(self.frame_Tolerance) self.horizontalLayout.setSpacing(0) self.horizontalLayout.setMargin(0) self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) self.frame_2 = QtGui.QFrame(self.frame_Tolerance) self.frame_2.setFrameShape(QtGui.QFrame.StyledPanel) self.frame_2.setFrameShadow(QtGui.QFrame.Raised) self.frame_2.setObjectName(_fromUtf8("frame_2")) self.verticalLayout_3 = QtGui.QVBoxLayout(self.frame_2) self.verticalLayout_3.setSpacing(3) self.verticalLayout_3.setMargin(0) self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3")) self.frame_TrackFrom_2 = QtGui.QFrame(self.frame_2) self.frame_TrackFrom_2.setFrameShape(QtGui.QFrame.NoFrame) self.frame_TrackFrom_2.setFrameShadow(QtGui.QFrame.Raised) self.frame_TrackFrom_2.setObjectName(_fromUtf8("frame_TrackFrom_2")) self.horizontalLayout_70 = QtGui.QHBoxLayout(self.frame_TrackFrom_2) self.horizontalLayout_70.setSpacing(0) self.horizontalLayout_70.setMargin(0) self.horizontalLayout_70.setObjectName( _fromUtf8("horizontalLayout_70")) self.label_78 = QtGui.QLabel(self.frame_TrackFrom_2) self.label_78.setMinimumSize(QtCore.QSize(240, 0)) font = QtGui.QFont() font.setBold(False) font.setWeight(50) self.label_78.setFont(font) self.label_78.setObjectName(_fromUtf8("label_78")) self.horizontalLayout_70.addWidget(self.label_78) self.frame_APV_12 = QtGui.QFrame(self.frame_TrackFrom_2) self.frame_APV_12.setFrameShape(QtGui.QFrame.StyledPanel) self.frame_APV_12.setFrameShadow(QtGui.QFrame.Raised) self.frame_APV_12.setObjectName(_fromUtf8("frame_APV_12")) self.horizontalLayout_16 = QtGui.QHBoxLayout(self.frame_APV_12) self.horizontalLayout_16.setSpacing(0) self.horizontalLayout_16.setMargin(0) self.horizontalLayout_16.setObjectName( _fromUtf8("horizontalLayout_16")) self.txtAtt = QtGui.QLineEdit(self.frame_APV_12) self.txtAtt.setEnabled(True) font = QtGui.QFont() font.setBold(False) font.setWeight(50) self.txtAtt.setFont(font) self.txtAtt.setObjectName(_fromUtf8("txtAtt")) self.txtAtt.setMinimumWidth(50) self.txtAtt.setMaximumWidth(50) self.horizontalLayout_16.addWidget(self.txtAtt) self.horizontalLayout_70.addWidget(self.frame_APV_12) self.verticalLayout_3.addWidget(self.frame_TrackFrom_2) self.frame_TrackFrom_3 = QtGui.QFrame(self.frame_2) self.frame_TrackFrom_3.setFrameShape(QtGui.QFrame.NoFrame) self.frame_TrackFrom_3.setFrameShadow(QtGui.QFrame.Raised) self.frame_TrackFrom_3.setObjectName(_fromUtf8("frame_TrackFrom_3")) self.horizontalLayout_71 = QtGui.QHBoxLayout(self.frame_TrackFrom_3) self.horizontalLayout_71.setSpacing(0) self.horizontalLayout_71.setMargin(0) self.horizontalLayout_71.setObjectName( _fromUtf8("horizontalLayout_71")) self.label_79 = QtGui.QLabel(self.frame_TrackFrom_3) self.label_79.setMinimumSize(QtCore.QSize(240, 0)) font = QtGui.QFont() font.setBold(False) font.setWeight(50) self.label_79.setFont(font) self.label_79.setObjectName(_fromUtf8("label_79")) self.horizontalLayout_71.addWidget(self.label_79) self.frame_APV_13 = QtGui.QFrame(self.frame_TrackFrom_3) self.frame_APV_13.setFrameShape(QtGui.QFrame.StyledPanel) self.frame_APV_13.setFrameShadow(QtGui.QFrame.Raised) self.frame_APV_13.setObjectName(_fromUtf8("frame_APV_13")) self.horizontalLayout_17 = QtGui.QHBoxLayout(self.frame_APV_13) self.horizontalLayout_17.setSpacing(0) self.horizontalLayout_17.setMargin(0) self.horizontalLayout_17.setObjectName( _fromUtf8("horizontalLayout_17")) self.txtAsw = QtGui.QLineEdit(self.frame_APV_13) self.txtAsw.setEnabled(True) font = QtGui.QFont() font.setBold(False) font.setWeight(50) self.txtAsw.setFont(font) self.txtAsw.setObjectName(_fromUtf8("txtAsw")) self.txtAsw.setMinimumWidth(50) self.txtAsw.setMaximumWidth(50) self.horizontalLayout_17.addWidget(self.txtAsw) self.horizontalLayout_71.addWidget(self.frame_APV_13) self.verticalLayout_3.addWidget(self.frame_TrackFrom_3) self.horizontalLayout.addWidget(self.frame_2) self.btnDropDown = QtGui.QToolButton(self.frame_Tolerance) self.btnDropDown.setMaximumSize(QtCore.QSize(16777215, 50)) self.btnDropDown.setText(_fromUtf8("")) self.btnDropDown.setObjectName(_fromUtf8("btnDropDown")) self.horizontalLayout.addWidget(self.btnDropDown) spacerItem = QtGui.QSpacerItem(0, 10, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum) self.horizontalLayout.addItem(spacerItem) self.verticalLayout_IDF.addWidget(self.frame_Tolerance) self.verticalLayout_5.addWidget(self.grbIDF) self.grbHRP = QtGui.QGroupBox(self.groupBox_20) self.grbHRP.setObjectName(_fromUtf8("grbHRP")) self.verticalLayout_HRP = QtGui.QVBoxLayout(self.grbHRP) self.verticalLayout_HRP.setObjectName(_fromUtf8("verticalLayout_HRP")) self.txtHCH = NumberBoxPanel(self.grbHRP) self.txtHCH.CaptionUnits = "m" self.txtHCH.Caption = "Crossing Height [HCH]" self.txtHCH.LabelWidth = 140 self.txtHCH.Value = 15 self.verticalLayout_HRP.addWidget(self.txtHCH) self.txtHSAL = DistanceBoxPanel(self.grbHRP, DistanceUnits.M) self.txtHSAL.Caption = "Safety Area Length" self.txtHSAL.Value = Distance(30) self.txtHSAL.LabelWidth = 140 self.verticalLayout_HRP.addWidget(self.txtHSAL) self.txtHSAW = DistanceBoxPanel(self.grbHRP, DistanceUnits.M) self.txtHSAW.Caption = "Safety Area Width" self.txtHSAW.Value = Distance(30) self.txtHSAW.LabelWidth = 140 self.verticalLayout_HRP.addWidget(self.txtHSAW) self.verticalLayout_5.addWidget(self.grbHRP) self.cmbConstructionType = ComboBoxPanel(self.groupBox_20) self.cmbConstructionType.Caption = "Construction Type" self.cmbConstructionType.LabelWidth = 150 self.verticalLayout_5.addWidget(self.cmbConstructionType) self.verticalLayout.addWidget(self.groupBox_20) spacerItem = QtGui.QSpacerItem(0, 0, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum) self.verticalLayout.addItem(spacerItem) self.retranslateUi(Form) QtCore.QMetaObject.connectSlotsByName(Form)
def __init__(self, parent=None): QDialog.__init__(self, parent) self.resize(400, 500) self.setWindowTitle("Aerodrome Surfaces Criteria") 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")) scrollArea = QScrollArea(self) scrollArea.setObjectName("scrollArea") scrollArea.setWidgetResizable(True) scrollAreaWidgetContents = QWidget(scrollArea) scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents") # scrollAreaWidgetContents.setGeometry(QRect(0, 0, 380, 280)) vLayoutScrollArea = QVBoxLayout(scrollAreaWidgetContents) vLayoutScrollArea.setObjectName("vLayoutScrollArea") scrollArea.setWidget(scrollAreaWidgetContents) verticalLayoutDlg.addWidget(scrollArea) self.groupBox = GroupBox(self) self.groupBox.Caption = "" vLayoutScrollArea.addWidget(self.groupBox) self.panel = Frame(self.groupBox) self.groupBox.Add = self.panel self.pnlName = TextBoxPanel(self.panel) self.pnlName.LabelWidth = 0 self.panel.Add = self.pnlName self.gbApproach = GroupBox(self.panel) self.gbApproach.Caption = "Approach" self.panel.Add = self.gbApproach self.pnlAPP_InnerEdge = DistanceBoxPanel(self.gbApproach, DistanceUnits.M) self.pnlAPP_InnerEdge.Caption = "Inner Edge" self.pnlAPP_InnerEdge.Button = None self.gbApproach.Add = self.pnlAPP_InnerEdge self.pnlAPP_DistFromTHR = DistanceBoxPanel(self.gbApproach, DistanceUnits.M) self.pnlAPP_DistFromTHR.Caption = "Distance From Threshold" self.pnlAPP_DistFromTHR.Button = None self.gbApproach.Add = self.pnlAPP_DistFromTHR self.pnlAPP_Divergence = AngleGradientBoxPanel(self.gbApproach) self.pnlAPP_Divergence.CaptionUnits = AngleGradientSlopeUnits.Percent self.pnlAPP_Divergence.Caption = "Divergence (each side)" self.gbApproach.Add = self.pnlAPP_Divergence self.gbApproach1 = GroupBox(self.gbApproach) self.gbApproach1.Caption = "First Section" self.gbApproach.Add = self.gbApproach1 self.pnlAPP_Length1 = DistanceBoxPanel(self.gbApproach1, DistanceUnits.M) self.pnlAPP_Length1.Caption = "Length" self.pnlAPP_Length1.Button = None self.gbApproach1.Add = self.pnlAPP_Length1 self.pnlAPP_Slope1 = AngleGradientBoxPanel(self.gbApproach1) self.pnlAPP_Slope1.CaptionUnits = AngleGradientSlopeUnits.Percent self.pnlAPP_Slope1.Caption = "Slope" self.gbApproach1.Add = self.pnlAPP_Slope1 self.gbApproach2 = GroupBox(self.gbApproach) self.gbApproach2.Caption = "Second Section" self.gbApproach.Add = self.gbApproach2 self.pnlAPP_Length2 = DistanceBoxPanel(self.gbApproach2, DistanceUnits.M) self.pnlAPP_Length2.Caption = "Length" self.pnlAPP_Length2.Button = None self.gbApproach2.Add = self.pnlAPP_Length2 self.pnlAPP_Slope2 = AngleGradientBoxPanel(self.gbApproach2) self.pnlAPP_Slope2.CaptionUnits = AngleGradientSlopeUnits.Percent self.pnlAPP_Slope2.Caption = "Slope" self.gbApproach2.Add = self.pnlAPP_Slope2 self.gbApproach3 = GroupBox(self.gbApproach) self.gbApproach3.Caption = "Horizontal Section" self.gbApproach.Add = self.gbApproach3 self.pnlAPP_Length3 = DistanceBoxPanel(self.gbApproach3, DistanceUnits.M) self.pnlAPP_Length3.Caption = "Length" self.pnlAPP_Length3.Button = None self.gbApproach3.Add = self.pnlAPP_Length3 self.pnlAPP_TotalLength = DistanceBoxPanel(self.gbApproach3, DistanceUnits.M) self.pnlAPP_TotalLength.Caption = "Total Length" self.pnlAPP_TotalLength.Button = None self.gbApproach3.Add = self.pnlAPP_TotalLength self.gbBalkedLanding = GroupBox(self.panel) self.gbBalkedLanding.Caption = "Balked Landing" self.panel.Add = self.gbBalkedLanding self.pnlBL_InnerEdge = DistanceBoxPanel(self.gbBalkedLanding, DistanceUnits.M) self.pnlBL_InnerEdge.Caption = "Length of Inner Edge" self.pnlBL_InnerEdge.Button = None self.gbBalkedLanding.Add = self.pnlBL_InnerEdge self.pnlBL_DistFromTHR = Frame(self.gbBalkedLanding, "HL") self.gbBalkedLanding.Add = self.pnlBL_DistFromTHR self.cmbBL_DistFromTHR = ComboBoxPanel(self.pnlBL_DistFromTHR) self.cmbBL_DistFromTHR.CaptionUnits = "m" self.cmbBL_DistFromTHR.Caption = "Distance From Threshold" self.pnlBL_DistFromTHR.Add = self.cmbBL_DistFromTHR self.txtBL_DistFromTHR = DistanceBoxPanel(self.pnlBL_DistFromTHR, DistanceUnits.M) self.txtBL_DistFromTHR.LabelWidth = 0 self.txtBL_DistFromTHR.Button = None self.pnlBL_DistFromTHR.Add = self.txtBL_DistFromTHR self.pnlBL_Divergence = AngleGradientBoxPanel(self.gbBalkedLanding) self.pnlBL_Divergence.CaptionUnits = AngleGradientSlopeUnits.Percent self.pnlBL_Divergence.Caption = "Divergence (each side)" self.gbBalkedLanding.Add = self.pnlBL_Divergence self.pnlBL_Slope = AngleGradientBoxPanel(self.gbBalkedLanding) self.pnlBL_Slope.CaptionUnits = AngleGradientSlopeUnits.Percent self.pnlBL_Slope.Caption = "Slope" self.gbBalkedLanding.Add = self.pnlBL_Slope self.gbConical = GroupBox(self.panel) self.gbConical.Caption = "Conical" self.panel.Add = self.gbConical self.pnlCON_Slope = AngleGradientBoxPanel(self.gbConical) self.pnlCON_Slope.CaptionUnits = AngleGradientSlopeUnits.Percent self.pnlCON_Slope.Caption = "Slope" self.gbConical.Add = self.pnlCON_Slope self.pnlCON_Height = AltitudeBoxPanel(self.gbConical) self.pnlCON_Height.CaptionUnits = "m" self.pnlCON_Height.Caption = "Height" self.gbConical.Add = self.pnlCON_Height self.gbInnerApproach = GroupBox(self.panel) self.gbInnerApproach.Caption = "Inner Approach" self.panel.Add = self.gbInnerApproach self.pnlIA_Width = DistanceBoxPanel(self.gbInnerApproach, DistanceUnits.M) self.pnlIA_Width.Caption = "Width" self.pnlIA_Width.Button = None self.gbInnerApproach.Add = self.pnlIA_Width self.pnlIA_DistFromTHR = DistanceBoxPanel(self.gbInnerApproach, DistanceUnits.M) self.pnlIA_DistFromTHR.Caption = "Distance From Threshold" self.pnlIA_DistFromTHR.Button = None self.gbInnerApproach.Add = self.pnlIA_DistFromTHR self.pnlIA_Length = DistanceBoxPanel(self.gbInnerApproach, DistanceUnits.M) self.pnlIA_Length.Caption = "Length" self.pnlIA_Length.Button = None self.gbInnerApproach.Add = self.pnlIA_Length self.pnlIA_Slope = AngleGradientBoxPanel(self.gbInnerApproach) self.pnlIA_Slope.CaptionUnits = AngleGradientSlopeUnits.Percent self.pnlIA_Slope.Caption = "Slope" self.gbInnerApproach.Add = self.pnlIA_Slope self.gbInnerHorizontal = GroupBox(self.panel) self.gbInnerHorizontal.Caption = "Inner Horizontal" self.panel.Add = self.gbInnerHorizontal self.pnlIH_Location = ComboBoxPanel(self.gbInnerHorizontal) self.pnlIH_Location.Caption = "Location" self.gbInnerHorizontal.Add = self.pnlIH_Location self.pnlIH_Height = AltitudeBoxPanel(self.gbInnerHorizontal) self.pnlIH_Height.CaptionUnits = "m" self.pnlIH_Height.Caption = "Height" self.gbInnerHorizontal.Add = self.pnlIH_Height self.pnlIH_Radius = DistanceBoxPanel(self.gbInnerHorizontal, DistanceUnits.M) self.pnlIH_Radius.Caption = "Radius" self.pnlIH_Radius.Button = None self.gbInnerHorizontal.Add = self.pnlIH_Radius self.gbInnerTransitional = GroupBox(self.panel) self.gbInnerTransitional.Caption = "Inner Transitional" self.panel.Add = self.gbInnerTransitional self.pnlIT_Slope = AngleGradientBoxPanel(self.gbInnerTransitional) self.pnlIT_Slope.CaptionUnits = AngleGradientSlopeUnits.Percent self.pnlIT_Slope.Caption = "Slope" self.gbInnerTransitional.Add = self.pnlIT_Slope self.gbNavAid = GroupBox(self.panel) self.gbNavAid.Caption = "1:10 Navigational Aid" self.panel.Add = self.gbNavAid self.pnlNA_Slope = AngleGradientBoxPanel(self.gbNavAid) self.pnlNA_Slope.CaptionUnits = AngleGradientSlopeUnits.Percent self.pnlNA_Slope.Caption = "Slope" self.gbNavAid.Add = self.pnlNA_Slope self.gbOuterHorizontal = GroupBox(self.panel) self.gbOuterHorizontal.Caption = "Outer Horizontal" self.panel.Add = self.gbOuterHorizontal self.pnlOH_Height = AltitudeBoxPanel(self.gbOuterHorizontal) self.pnlOH_Height.CaptionUnits = "m" self.pnlOH_Height.Caption = "Height" self.gbOuterHorizontal.Add = self.pnlOH_Height self.pnlOH_Radius = DistanceBoxPanel(self.gbOuterHorizontal, DistanceUnits.M) self.pnlOH_Radius.Caption = "Radius" self.pnlOH_Radius.Button = None self.gbOuterHorizontal.Add = self.pnlOH_Radius self.gbStrip = GroupBox(self.panel) self.gbStrip.Caption = "Strip" self.panel.Add = self.gbStrip self.pnlS_Width = DistanceBoxPanel(self.gbStrip, DistanceUnits.M) self.pnlS_Width.Caption = "Width" self.pnlS_Width.Button = None self.gbStrip.Add = self.pnlS_Width self.pnlS_Length = DistanceBoxPanel(self.gbStrip, DistanceUnits.M) self.pnlS_Length.Caption = "Length" self.pnlS_Length.Button = None self.gbStrip.Add = self.pnlS_Length self.gbTakeOff = GroupBox(self.panel) self.gbTakeOff.Caption = "Take-off " self.panel.Add = self.gbTakeOff self.pnlTO_InnerEdge = DistanceBoxPanel(self.gbTakeOff, DistanceUnits.M) self.pnlTO_InnerEdge.Caption = "Length of Inner Edge" self.pnlTO_InnerEdge.Button = None self.gbTakeOff.Add = self.pnlTO_InnerEdge self.pnlTO_DistFromEND = Frame(self.gbTakeOff, "HL") self.gbTakeOff.Add = self.pnlTO_DistFromEND self.cmbTO_DistFromEND = ComboBoxPanel(self.pnlTO_DistFromEND) self.cmbTO_DistFromEND.CaptionUnits = "m" self.cmbTO_DistFromEND.Caption = "Distance From Runway End" self.pnlTO_DistFromEND.Add = self.cmbTO_DistFromEND self.txtTO_DistFromEND = DistanceBoxPanel(self.pnlTO_DistFromEND, DistanceUnits.M) self.txtTO_DistFromEND.LabelWidth = 0 self.txtTO_DistFromEND.Button = None self.pnlTO_DistFromEND.Add = self.txtTO_DistFromEND self.pnlTO_Divergence = AngleGradientBoxPanel(self.gbTakeOff) self.pnlTO_Divergence.CaptionUnits = AngleGradientSlopeUnits.Percent self.pnlTO_Divergence.Caption = "Divergence (each side)" self.gbTakeOff.Add = self.pnlTO_Divergence self.pnlTO_FinalWidth = DistanceBoxPanel(self.gbTakeOff, DistanceUnits.M) self.pnlTO_FinalWidth.Caption = "Final Width" self.pnlTO_FinalWidth.Button = None self.gbTakeOff.Add = self.pnlTO_FinalWidth self.pnlTO_Length = DistanceBoxPanel(self.gbTakeOff, DistanceUnits.M) self.pnlTO_Length.Caption = "Length" self.pnlTO_Length.Button = None self.gbTakeOff.Add = self.pnlTO_Length self.pnlTO_Slope = AngleGradientBoxPanel(self.gbTakeOff) self.pnlTO_Slope.CaptionUnits = AngleGradientSlopeUnits.Percent self.pnlTO_Slope.Caption = "Slope" self.gbTakeOff.Add = self.pnlTO_Slope self.gbTransitional = GroupBox(self.panel) self.gbTransitional.Caption = "Transitional" self.panel.Add = self.gbTransitional self.pnlT_Slope = AngleGradientBoxPanel(self.gbTransitional) self.pnlT_Slope.CaptionUnits = AngleGradientSlopeUnits.Percent self.pnlT_Slope.Caption = "Slope" self.gbTransitional.Add = self.pnlT_Slope self.btnBoxOkCancel = QDialogButtonBox(self) self.btnBoxOkCancel.setObjectName(("btnBoxOkCancel")) self.btnBoxOkCancel.setStandardButtons(QDialogButtonBox.Cancel | QDialogButtonBox.Ok) self.btnSave = self.btnBoxOkCancel.button(QDialogButtonBox.Ok) self.btnSave.setText("Save") self.connect(self.btnBoxOkCancel, SIGNAL("accepted()"), self.acceptDlg) self.connect(self.btnBoxOkCancel, SIGNAL("rejected()"), self.reject) vLayoutScrollArea.addWidget(self.btnBoxOkCancel) self.cmbBL_DistFromTHR.Items = AerodromeSurfacesBalkedLandingFrom.Items self.pnlIH_Location.Items = AerodromeSurfacesInnerHorizontalLocation.Items self.cmbTO_DistFromEND.Items = AerodromeSurfacesTakeOffFrom.Items self.connect(self.pnlT_Slope, SIGNAL("Event_0"), self.method_6) self.connect(self.pnlTO_Slope, SIGNAL("Event_0"), self.method_6) self.connect(self.pnlTO_Length, SIGNAL("Event_0"), self.method_6) self.connect(self.pnlTO_FinalWidth, SIGNAL("Event_0"), self.method_6) self.connect(self.pnlTO_Divergence, SIGNAL("Event_0"), self.method_6) self.connect(self.txtTO_DistFromEND, SIGNAL("Event_0"), self.method_6) self.connect(self.cmbTO_DistFromEND, SIGNAL("Event_0"), self.method_6) self.connect(self.pnlTO_InnerEdge, SIGNAL("Event_0"), self.method_6) self.connect(self.pnlS_Length, SIGNAL("Event_0"), self.method_6) self.connect(self.pnlS_Width, SIGNAL("Event_0"), self.method_6) self.connect(self.pnlOH_Radius, SIGNAL("Event_0"), self.method_6) self.connect(self.pnlOH_Height, SIGNAL("Event_0"), self.method_6) self.connect(self.pnlNA_Slope, SIGNAL("Event_0"), self.method_6) self.connect(self.pnlIT_Slope, SIGNAL("Event_0"), self.method_6) self.connect(self.pnlIH_Radius, SIGNAL("Event_0"), self.method_6) self.connect(self.pnlIH_Height, SIGNAL("Event_0"), self.method_6) self.connect(self.pnlIH_Location, SIGNAL("Event_0"), self.method_6) self.connect(self.pnlIA_Slope, SIGNAL("Event_0"), self.method_6) self.connect(self.pnlIA_Length, SIGNAL("Event_0"), self.method_6) self.connect(self.pnlIA_DistFromTHR, SIGNAL("Event_0"), self.method_6) self.connect(self.pnlIA_Width, SIGNAL("Event_0"), self.method_6) self.connect(self.pnlCON_Height, SIGNAL("Event_0"), self.method_6) self.connect(self.pnlCON_Slope, SIGNAL("Event_0"), self.method_6) self.connect(self.pnlBL_Slope, SIGNAL("Event_0"), self.method_6) self.connect(self.pnlBL_Divergence, SIGNAL("Event_0"), self.method_6) self.connect(self.txtBL_DistFromTHR, SIGNAL("Event_0"), self.method_6) self.connect(self.cmbBL_DistFromTHR, SIGNAL("Event_0"), self.cmbBL_DistFromTHR_currentIndexChanged) self.connect(self.pnlBL_InnerEdge, SIGNAL("Event_0"), self.method_6) self.connect(self.pnlAPP_TotalLength, SIGNAL("Event_0"), self.method_6) self.connect(self.pnlAPP_Length3, SIGNAL("Event_0"), self.method_6) self.connect(self.pnlAPP_Slope2, SIGNAL("Event_0"), self.method_6) self.connect(self.pnlAPP_Length2, SIGNAL("Event_0"), self.method_6) self.connect(self.pnlAPP_Slope1, SIGNAL("Event_0"), self.method_6) self.connect(self.pnlAPP_Length1, SIGNAL("Event_0"), self.method_6) self.connect(self.pnlAPP_Divergence, SIGNAL("Event_0"), self.method_6) self.connect(self.pnlAPP_DistFromTHR, SIGNAL("Event_0"), self.method_6) self.connect(self.pnlAPP_InnerEdge, SIGNAL("Event_0"), self.method_6) self.connect(self.pnlName, SIGNAL("Event_0"), self.method_6) self.modified = False self.criteria = None
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 __init__(self, parent): QtGui.QDialog.__init__(self, parent) self.setObjectName(_fromUtf8("Dialog")) self.resize(200, 200) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.sizePolicy().hasHeightForWidth()) self.setSizePolicy(sizePolicy) self.horizontalLayout_2 = QtGui.QVBoxLayout(self) self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2")) self.frame_13 = QtGui.QFrame(self) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.frame_13.sizePolicy().hasHeightForWidth()) self.frame_13.setSizePolicy(sizePolicy) self.frame_13.setFrameShape(QtGui.QFrame.StyledPanel) self.frame_13.setFrameShadow(QtGui.QFrame.Raised) self.frame_13.setObjectName(_fromUtf8("frame_13")) self.horizontalLayout_6 = QtGui.QHBoxLayout(self.frame_13) self.horizontalLayout_6.setObjectName(_fromUtf8("horizontalLayout_6")) spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout_6.addItem(spacerItem) self.frame_3 = QtGui.QFrame(self.frame_13) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.frame_3.sizePolicy().hasHeightForWidth()) self.frame_3.setSizePolicy(sizePolicy) self.frame_3.setFrameShape(QtGui.QFrame.StyledPanel) self.frame_3.setFrameShadow(QtGui.QFrame.Raised) self.frame_3.setObjectName(_fromUtf8("frame_3")) self.verticalLayout_9 = QtGui.QVBoxLayout(self.frame_3) self.verticalLayout_9.setObjectName(_fromUtf8("verticalLayout_9")) spacerItem111 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) self.verticalLayout_9.addItem(spacerItem111) self.gbGradientDist = GroupBox(self.frame_3) self.gbGradientDist.Caption = "" self.verticalLayout_9.addWidget(self.gbGradientDist) self.pnlDescentGradient = AngleGradientBoxPanel(self.gbGradientDist) self.pnlDescentGradient.CaptionUnits = AngleGradientSlopeUnits.Percent self.pnlDescentGradient.Caption = "Descent gradient" self.pnlDescentGradient.Value = AngleGradientSlope( 5.0, AngleGradientSlopeUnits.Percent) self.pnlDescentGradient.showPercentBox() self.gbGradientDist.Add = self.pnlDescentGradient self.pnlDX = DistanceBoxPanel(self.gbGradientDist, DistanceUnits.M) self.pnlDX.Caption = "dX(THR-DME)" self.gbGradientDist.Add = self.pnlDX self.pnlThrAlt = AltitudeBoxPanel(self.gbGradientDist) self.pnlThrAlt.Caption = "THR Altitude" self.pnlThrAlt.Value = Altitude(734.0, AltitudeUnits.FT) self.gbGradientDist.Add = self.pnlThrAlt self.pnlRDHAlt = AltitudeBoxPanel(self.gbGradientDist) self.pnlRDHAlt.Caption = "RDH Altitude" self.pnlRDHAlt.Value = Altitude(50.0, AltitudeUnits.FT) self.gbGradientDist.Add = self.pnlRDHAlt self.pnlDistance = DistanceBoxPanel(self.gbGradientDist, DistanceUnits.NM) self.pnlDistance.Caption = "Distance between FAF-MAPt" self.pnlDistance.Value = Distance(6, DistanceUnits.NM) self.gbGradientDist.Add = self.pnlDistance self.gbCatOfACFT = QtGui.QGroupBox(self.frame_3) self.gbCatOfACFT.setObjectName("gbCatOfACFT") self.verticalLayoutgbCatOfACFT = QtGui.QVBoxLayout(self.gbCatOfACFT) self.verticalLayoutgbCatOfACFT.setObjectName( "verticalLayoutgbCatOfACFT") self.cmbCatOfACFT = QtGui.QComboBox(self.gbCatOfACFT) self.cmbCatOfACFT.setObjectName("cmbCatOfACFT") self.verticalLayoutgbCatOfACFT.addWidget(self.cmbCatOfACFT) self.verticalLayout_9.addWidget(self.gbCatOfACFT) self.gbCatOfACFT.setTitle("Cat Of ACFT") self.cmbCatOfACFT.addItems([ "A", "A, B", "A, B, C", "A, B, C, D", "A, B, C, D, DL", "A, B, C, D, DL, E", "A, B, C, D, E" ]) self.gbTemplate = QtGui.QGroupBox(self.frame_3) self.gbTemplate.setObjectName("gbTemplate") self.verticalLayoutgbTemplate = QtGui.QVBoxLayout(self.gbTemplate) self.verticalLayoutgbTemplate.setObjectName( "self.verticalLayoutgbTemplate") self.cmbTemplate = QtGui.QComboBox(self.gbTemplate) self.cmbTemplate.setObjectName("cmbTemplate") self.verticalLayoutgbTemplate.addWidget(self.cmbTemplate) self.verticalLayout_9.addWidget(self.gbTemplate) self.gbTemplate.setTitle("Template") # self.cmbTemplate = ComboBoxPanel(self.gbTemplate) # self.cmbTemplate.LabelWidth = 0 self.cmbTemplate.addItems([ "ILS or LOC", "LOC", "VOR", "NDB", "TACAN", "RNP BAROVNAV, SBAS, LNAV", "RNP BAROVNAV, LNAV", "RNP SBAS, LNAV", "RNP LNAV", "RNP AR", "RNAV STAR", "RNAV SID", "CONV STAR", "CONV SID" ]) # self.verticalLayoutgbTemplate.addWidget(self.cmbTemplate) self.gbStraightInApproach = QtGui.QGroupBox(self.frame_3) self.gbStraightInApproach.setObjectName("gbStraightInApproach") self.verticalLayoutgbStraightInApproach = QtGui.QVBoxLayout( self.gbStraightInApproach) self.verticalLayoutgbStraightInApproach.setObjectName( "verticalLayoutgbStraightInApproach") self.chbCat1 = CheckBox(self.gbStraightInApproach) self.chbCat1.Caption = "Cat I" self.verticalLayoutgbStraightInApproach.addWidget(self.chbCat1) self.chbCat2 = CheckBox(self.gbStraightInApproach) self.chbCat2.Caption = "Cat II" self.verticalLayoutgbStraightInApproach.addWidget(self.chbCat2) self.chbLOC = CheckBox(self.gbStraightInApproach) self.chbLOC.Caption = "LOC" self.verticalLayoutgbStraightInApproach.addWidget(self.chbLOC) self.verticalLayout_9.addWidget(self.gbStraightInApproach) self.gbStraightInApproach.setTitle("Straight-In Approach") self.frmState = QtGui.QFrame(self.frame_3) self.frmState.setFrameShape(QtGui.QFrame.StyledPanel) self.frmState.setFrameShadow(QtGui.QFrame.Raised) self.frmState.setObjectName(_fromUtf8("frmState")) self.horizontalLayout_3 = QtGui.QHBoxLayout(self.frmState) self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3")) self.lblState = QtGui.QLabel(self.frmState) self.lblState.setMinimumSize(QtCore.QSize(90, 0)) self.lblState.setMaximumSize(QtCore.QSize(90, 16777215)) self.lblState.setObjectName(_fromUtf8("lblState")) self.horizontalLayout_3.addWidget(self.lblState) self.ddlState = QtGui.QComboBox(self.frmState) self.ddlState.setObjectName(_fromUtf8("ddlState")) self.horizontalLayout_3.addWidget(self.ddlState) self.verticalLayout_9.addWidget(self.frmState) self.frmAerodrome = QtGui.QFrame(self.frame_3) self.frmAerodrome.setFrameShape(QtGui.QFrame.StyledPanel) self.frmAerodrome.setFrameShadow(QtGui.QFrame.Raised) self.frmAerodrome.setObjectName(_fromUtf8("frmAerodrome")) self.horizontalLayout_4 = QtGui.QHBoxLayout(self.frmAerodrome) self.horizontalLayout_4.setObjectName(_fromUtf8("horizontalLayout_4")) self.lblAerodrome = QtGui.QLabel(self.frmAerodrome) self.lblAerodrome.setMinimumSize(QtCore.QSize(90, 0)) self.lblAerodrome.setMaximumSize(QtCore.QSize(90, 16777215)) self.lblAerodrome.setObjectName(_fromUtf8("lblAerodrome")) self.horizontalLayout_4.addWidget(self.lblAerodrome) self.ddlAerodrome = QtGui.QComboBox(self.frmAerodrome) self.ddlAerodrome.setObjectName(_fromUtf8("ddlAerodrome")) self.horizontalLayout_4.addWidget(self.ddlAerodrome) self.verticalLayout_9.addWidget(self.frmAerodrome) self.frmRunway = QtGui.QFrame(self.frame_3) self.frmRunway.setFrameShape(QtGui.QFrame.StyledPanel) self.frmRunway.setFrameShadow(QtGui.QFrame.Raised) self.frmRunway.setObjectName(_fromUtf8("frmRunway")) self.horizontalLayout_5 = QtGui.QHBoxLayout(self.frmRunway) self.horizontalLayout_5.setObjectName(_fromUtf8("horizontalLayout_5")) self.lblRunway = QtGui.QLabel(self.frmRunway) self.lblRunway.setMinimumSize(QtCore.QSize(90, 0)) self.lblRunway.setMaximumSize(QtCore.QSize(90, 16777215)) self.lblRunway.setObjectName(_fromUtf8("lblRunway")) self.horizontalLayout_5.addWidget(self.lblRunway) self.ddlRunway1 = QtGui.QComboBox(self.frmRunway) self.ddlRunway1.setObjectName(_fromUtf8("ddlRunway1")) self.horizontalLayout_5.addWidget(self.ddlRunway1) self.ddlRunway2 = QtGui.QComboBox(self.frmRunway) self.ddlRunway2.setObjectName(_fromUtf8("ddlRunway2")) self.horizontalLayout_5.addWidget(self.ddlRunway2) self.verticalLayout_9.addWidget(self.frmRunway) self.frmSlope = QtGui.QFrame(self.frame_3) self.frmSlope.setFrameShape(QtGui.QFrame.StyledPanel) self.frmSlope.setFrameShadow(QtGui.QFrame.Raised) self.frmSlope.setObjectName(_fromUtf8("frmSlope")) self.horizontalLayout_7 = QtGui.QHBoxLayout(self.frmSlope) self.horizontalLayout_7.setObjectName(_fromUtf8("horizontalLayout_7")) self.lblSlope = QtGui.QLabel(self.frmSlope) self.lblSlope.setMinimumSize(QtCore.QSize(90, 0)) self.lblSlope.setMaximumSize(QtCore.QSize(90, 16777215)) self.lblSlope.setObjectName(_fromUtf8("lblSlope")) self.horizontalLayout_7.addWidget(self.lblSlope) self.ddlSlope = QtGui.QComboBox(self.frmSlope) self.ddlSlope.setObjectName(_fromUtf8("ddlSlope")) self.horizontalLayout_7.addWidget(self.ddlSlope) self.verticalLayout_9.addWidget(self.frmSlope) self.frmPrintScale = QtGui.QFrame(self.frame_3) self.frmPrintScale.setFrameShape(QtGui.QFrame.StyledPanel) self.frmPrintScale.setFrameShadow(QtGui.QFrame.Raised) self.frmPrintScale.setObjectName(_fromUtf8("frmPrintScale")) self.horizontalLayout_8 = QtGui.QHBoxLayout(self.frmPrintScale) self.horizontalLayout_8.setObjectName(_fromUtf8("horizontalLayout_8")) self.lblPrintScale = QtGui.QLabel(self.frmPrintScale) self.lblPrintScale.setMinimumSize(QtCore.QSize(90, 0)) self.lblPrintScale.setMaximumSize(QtCore.QSize(90, 16777215)) self.lblPrintScale.setObjectName(_fromUtf8("lblPrintScale")) self.horizontalLayout_8.addWidget(self.lblPrintScale) self.txtPrintScale = QtGui.QLineEdit(self.frmPrintScale) self.txtPrintScale.setObjectName(_fromUtf8("txtPrintScale")) self.horizontalLayout_8.addWidget(self.txtPrintScale) self.verticalLayout_9.addWidget(self.frmPrintScale) self.frmFontSize = QtGui.QFrame(self.frame_3) self.frmFontSize.setFrameShape(QtGui.QFrame.StyledPanel) self.frmFontSize.setFrameShadow(QtGui.QFrame.Raised) self.frmFontSize.setObjectName(_fromUtf8("frmFontSize")) self.horizontalLayout_9 = QtGui.QHBoxLayout(self.frmFontSize) self.horizontalLayout_9.setObjectName(_fromUtf8("horizontalLayout_9")) self.lblFontSize = QtGui.QLabel(self.frmFontSize) self.lblFontSize.setMinimumSize(QtCore.QSize(90, 0)) self.lblFontSize.setMaximumSize(QtCore.QSize(90, 16777215)) self.lblFontSize.setObjectName(_fromUtf8("lblFontSize")) self.horizontalLayout_9.addWidget(self.lblFontSize) self.txtFontSize = QtGui.QLineEdit(self.frmFontSize) self.txtFontSize.setObjectName(_fromUtf8("txtFontSize")) self.horizontalLayout_9.addWidget(self.txtFontSize) self.verticalLayout_9.addWidget(self.frmFontSize) self.gbSizes = QtGui.QGroupBox(self.frame_3) self.gbSizes.setObjectName(_fromUtf8("gbSizes")) self.verticalLayout_10 = QtGui.QVBoxLayout(self.gbSizes) self.verticalLayout_10.setObjectName(_fromUtf8("verticalLayout_10")) self.ddlPageSizes = QtGui.QComboBox(self.gbSizes) self.ddlPageSizes.setObjectName(_fromUtf8("ddlPageSizes")) self.verticalLayout_10.addWidget(self.ddlPageSizes) self.frame_11 = QtGui.QFrame(self.gbSizes) self.frame_11.setFrameShape(QtGui.QFrame.StyledPanel) self.frame_11.setFrameShadow(QtGui.QFrame.Raised) self.frame_11.setObjectName(_fromUtf8("frame_11")) self.horizontalLayout_10 = QtGui.QHBoxLayout(self.frame_11) self.horizontalLayout_10.setObjectName( _fromUtf8("horizontalLayout_10")) self.labelUnit = QtGui.QLabel(self.frame_11) self.labelUnit.setObjectName("labelUint") self.labelUnit.setText("Unit") self.horizontalLayout_10.addWidget(self.labelUnit) self.cmbUnit = QtGui.QComboBox(self.frame_11) self.cmbUnit.setObjectName("cmbUnit") self.cmbUnit.addItems(["mm", "inch"]) self.horizontalLayout_10.addWidget(self.cmbUnit) self.verticalLayout_10.addWidget(self.frame_11) self.frmWidth = QtGui.QFrame(self.gbSizes) self.frmWidth.setFrameShape(QtGui.QFrame.StyledPanel) self.frmWidth.setFrameShadow(QtGui.QFrame.Raised) self.frmWidth.setObjectName(_fromUtf8("frmWidth")) self.horizontalLayout_12 = QtGui.QHBoxLayout(self.frmWidth) self.horizontalLayout_12.setObjectName( _fromUtf8("horizontalLayout_12")) self.lblWidth = QtGui.QLabel(self.frmWidth) self.lblWidth.setMinimumSize(QtCore.QSize(81, 0)) self.lblWidth.setMaximumSize(QtCore.QSize(81, 16777215)) self.lblWidth.setObjectName(_fromUtf8("lblWidth")) self.horizontalLayout_12.addWidget(self.lblWidth) self.txtWidth = QtGui.QLineEdit(self.frmWidth) self.txtWidth.setObjectName(_fromUtf8("txtWidth")) self.horizontalLayout_12.addWidget(self.txtWidth) self.verticalLayout_10.addWidget(self.frmWidth) self.frmHeight = QtGui.QFrame(self.gbSizes) self.frmHeight.setFrameShape(QtGui.QFrame.StyledPanel) self.frmHeight.setFrameShadow(QtGui.QFrame.Raised) self.frmHeight.setObjectName(_fromUtf8("frmHeight")) self.horizontalLayout_13 = QtGui.QHBoxLayout(self.frmHeight) self.horizontalLayout_13.setObjectName( _fromUtf8("horizontalLayout_13")) self.lblHeight = QtGui.QLabel(self.frmHeight) self.lblHeight.setMinimumSize(QtCore.QSize(81, 0)) self.lblHeight.setMaximumSize(QtCore.QSize(81, 16777215)) self.lblHeight.setObjectName(_fromUtf8("lblHeight")) self.horizontalLayout_13.addWidget(self.lblHeight) self.txtHeight = QtGui.QLineEdit(self.frmHeight) self.txtHeight.setObjectName(_fromUtf8("txtHeight")) self.horizontalLayout_13.addWidget(self.txtHeight) self.verticalLayout_10.addWidget(self.frmHeight) self.verticalLayout_9.addWidget(self.gbSizes) self.gbPageOrientation = QtGui.QGroupBox(self.frame_3) self.gbPageOrientation.setObjectName(_fromUtf8("gbPageOrientation")) self.horizontalLayout_14 = QtGui.QHBoxLayout(self.gbPageOrientation) self.horizontalLayout_14.setObjectName( _fromUtf8("horizontalLayout_14")) # self.labelPageOrientation = QtGui.QLabel(self.gbPageOrientation) # self.labelPageOrientation.setObjectName("labelPageOrientation") # self.labelPageOrientation.setText("Page Orientation") # self.horizontalLayout_14.addWidget(self.labelPageOrientation) self.cmbPageOrientation = QtGui.QComboBox(self.gbPageOrientation) self.cmbPageOrientation.setObjectName("cmbPageOrientation") self.cmbPageOrientation.addItems(["Portrait", "Landscape"]) self.horizontalLayout_14.addWidget(self.cmbPageOrientation) # self.rbtLandscape = QtGui.QRadioButton(self.gbPageOrientation) # self.rbtLandscape.setObjectName(_fromUtf8("radioButton")) # self.horizontalLayout_14.addWidget(self.rbtLandscape) # self.rbtPortrait = QtGui.QRadioButton(self.gbPageOrientation) # self.rbtPortrait.setChecked(True) # self.rbtPortrait.setObjectName(_fromUtf8("rblLandscape")) # self.horizontalLayout_14.addWidget(self.rbtPortrait) self.verticalLayout_9.addWidget(self.gbPageOrientation) self.horizontalLayout_6.addWidget(self.frame_3) spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout_6.addItem(spacerItem1) self.horizontalLayout_2.addWidget(self.frame_13) self.frame = QtGui.QFrame(self) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.frame.sizePolicy().hasHeightForWidth()) self.frame.setSizePolicy(sizePolicy) self.frame.setFrameShape(QtGui.QFrame.StyledPanel) self.frame.setFrameShadow(QtGui.QFrame.Raised) self.frame.setObjectName(_fromUtf8("frame")) self.horizontalLayout = QtGui.QHBoxLayout(self.frame) self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) spacerItem15 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout.addItem(spacerItem15) self.btnPrevious = QtGui.QPushButton(self.frame) self.btnPrevious.setObjectName(_fromUtf8("btnPrevious")) self.horizontalLayout.addWidget(self.btnPrevious) self.btnNext = QtGui.QPushButton(self.frame) self.btnNext.setObjectName(_fromUtf8("btnNext")) self.horizontalLayout.addWidget(self.btnNext) self.btnExit = QtGui.QPushButton(self.frame) self.btnExit.setObjectName(_fromUtf8("btnExit")) self.horizontalLayout.addWidget(self.btnExit) spacerItem16 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout.addItem(spacerItem16) self.horizontalLayout_2.addWidget(self.frame) self.frmState.setVisible(False) self.frmAerodrome.setVisible(False) self.frmRunway.setVisible(False) self.frmSlope.setVisible(False) self.ddlPageSizes.setVisible(False) self.txtPrintScale.setText("10") self.txtFontSize.setText("10") self.txtWidth.setText("210") self.txtHeight.setText("290") # self.rbtnmm.setChecked(True) self.retranslateUi() # self.stackedWidget.setCurrentIndex(0) QtCore.QMetaObject.connectSlotsByName(self) self.btnPrevious.setEnabled(False) self.btnNext.clicked.connect(self.btnNext_clicked) self.btnExit.setVisible(False) self.gbStraightInApproach.setVisible( self.cmbCatOfACFT.currentIndex() == 0) self.cmbUnit.currentIndexChanged.connect(self.paperResize) self.txtHeight.textChanged.connect(self.pageOrientationChange) self.txtWidth.textChanged.connect(self.pageOrientationChange) self.cmbTemplate.currentIndexChanged.connect( self.cmbCatOfACFT_currentIndexChanged) self.cmbTemplate.activated.connect(self.cmbCatOfACFT_activated) self.cmbCatOfACFT.currentIndexChanged.connect( self.cmbCatOfACFT_currentIndexChanged) self.connect(self.chbCat1, QtCore.SIGNAL("Event_0"), self.chbCat1_clicked) self.connect(self.chbCat2, QtCore.SIGNAL("Event_0"), self.chbCat2_clicked) self.connect(self.chbLOC, QtCore.SIGNAL("Event_0"), self.chbLOC_clicked) # self.cmbPageOrientation.currentIndexChanged.connect(self.widthHeighChange) self.dlg = None self.straightCount = 3 self.catOfAcftCount = 1
class DlgChartingStart(QtGui.QDialog): def __init__(self, parent): QtGui.QDialog.__init__(self, parent) self.setObjectName(_fromUtf8("Dialog")) self.resize(200, 200) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.sizePolicy().hasHeightForWidth()) self.setSizePolicy(sizePolicy) self.horizontalLayout_2 = QtGui.QVBoxLayout(self) self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2")) self.frame_13 = QtGui.QFrame(self) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.frame_13.sizePolicy().hasHeightForWidth()) self.frame_13.setSizePolicy(sizePolicy) self.frame_13.setFrameShape(QtGui.QFrame.StyledPanel) self.frame_13.setFrameShadow(QtGui.QFrame.Raised) self.frame_13.setObjectName(_fromUtf8("frame_13")) self.horizontalLayout_6 = QtGui.QHBoxLayout(self.frame_13) self.horizontalLayout_6.setObjectName(_fromUtf8("horizontalLayout_6")) spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout_6.addItem(spacerItem) self.frame_3 = QtGui.QFrame(self.frame_13) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.frame_3.sizePolicy().hasHeightForWidth()) self.frame_3.setSizePolicy(sizePolicy) self.frame_3.setFrameShape(QtGui.QFrame.StyledPanel) self.frame_3.setFrameShadow(QtGui.QFrame.Raised) self.frame_3.setObjectName(_fromUtf8("frame_3")) self.verticalLayout_9 = QtGui.QVBoxLayout(self.frame_3) self.verticalLayout_9.setObjectName(_fromUtf8("verticalLayout_9")) spacerItem111 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) self.verticalLayout_9.addItem(spacerItem111) self.gbGradientDist = GroupBox(self.frame_3) self.gbGradientDist.Caption = "" self.verticalLayout_9.addWidget(self.gbGradientDist) self.pnlDescentGradient = AngleGradientBoxPanel(self.gbGradientDist) self.pnlDescentGradient.CaptionUnits = AngleGradientSlopeUnits.Percent self.pnlDescentGradient.Caption = "Descent gradient" self.pnlDescentGradient.Value = AngleGradientSlope( 5.0, AngleGradientSlopeUnits.Percent) self.pnlDescentGradient.showPercentBox() self.gbGradientDist.Add = self.pnlDescentGradient self.pnlDX = DistanceBoxPanel(self.gbGradientDist, DistanceUnits.M) self.pnlDX.Caption = "dX(THR-DME)" self.gbGradientDist.Add = self.pnlDX self.pnlThrAlt = AltitudeBoxPanel(self.gbGradientDist) self.pnlThrAlt.Caption = "THR Altitude" self.pnlThrAlt.Value = Altitude(734.0, AltitudeUnits.FT) self.gbGradientDist.Add = self.pnlThrAlt self.pnlRDHAlt = AltitudeBoxPanel(self.gbGradientDist) self.pnlRDHAlt.Caption = "RDH Altitude" self.pnlRDHAlt.Value = Altitude(50.0, AltitudeUnits.FT) self.gbGradientDist.Add = self.pnlRDHAlt self.pnlDistance = DistanceBoxPanel(self.gbGradientDist, DistanceUnits.NM) self.pnlDistance.Caption = "Distance between FAF-MAPt" self.pnlDistance.Value = Distance(6, DistanceUnits.NM) self.gbGradientDist.Add = self.pnlDistance self.gbCatOfACFT = QtGui.QGroupBox(self.frame_3) self.gbCatOfACFT.setObjectName("gbCatOfACFT") self.verticalLayoutgbCatOfACFT = QtGui.QVBoxLayout(self.gbCatOfACFT) self.verticalLayoutgbCatOfACFT.setObjectName( "verticalLayoutgbCatOfACFT") self.cmbCatOfACFT = QtGui.QComboBox(self.gbCatOfACFT) self.cmbCatOfACFT.setObjectName("cmbCatOfACFT") self.verticalLayoutgbCatOfACFT.addWidget(self.cmbCatOfACFT) self.verticalLayout_9.addWidget(self.gbCatOfACFT) self.gbCatOfACFT.setTitle("Cat Of ACFT") self.cmbCatOfACFT.addItems([ "A", "A, B", "A, B, C", "A, B, C, D", "A, B, C, D, DL", "A, B, C, D, DL, E", "A, B, C, D, E" ]) self.gbTemplate = QtGui.QGroupBox(self.frame_3) self.gbTemplate.setObjectName("gbTemplate") self.verticalLayoutgbTemplate = QtGui.QVBoxLayout(self.gbTemplate) self.verticalLayoutgbTemplate.setObjectName( "self.verticalLayoutgbTemplate") self.cmbTemplate = QtGui.QComboBox(self.gbTemplate) self.cmbTemplate.setObjectName("cmbTemplate") self.verticalLayoutgbTemplate.addWidget(self.cmbTemplate) self.verticalLayout_9.addWidget(self.gbTemplate) self.gbTemplate.setTitle("Template") # self.cmbTemplate = ComboBoxPanel(self.gbTemplate) # self.cmbTemplate.LabelWidth = 0 self.cmbTemplate.addItems([ "ILS or LOC", "LOC", "VOR", "NDB", "TACAN", "RNP BAROVNAV, SBAS, LNAV", "RNP BAROVNAV, LNAV", "RNP SBAS, LNAV", "RNP LNAV", "RNP AR", "RNAV STAR", "RNAV SID", "CONV STAR", "CONV SID" ]) # self.verticalLayoutgbTemplate.addWidget(self.cmbTemplate) self.gbStraightInApproach = QtGui.QGroupBox(self.frame_3) self.gbStraightInApproach.setObjectName("gbStraightInApproach") self.verticalLayoutgbStraightInApproach = QtGui.QVBoxLayout( self.gbStraightInApproach) self.verticalLayoutgbStraightInApproach.setObjectName( "verticalLayoutgbStraightInApproach") self.chbCat1 = CheckBox(self.gbStraightInApproach) self.chbCat1.Caption = "Cat I" self.verticalLayoutgbStraightInApproach.addWidget(self.chbCat1) self.chbCat2 = CheckBox(self.gbStraightInApproach) self.chbCat2.Caption = "Cat II" self.verticalLayoutgbStraightInApproach.addWidget(self.chbCat2) self.chbLOC = CheckBox(self.gbStraightInApproach) self.chbLOC.Caption = "LOC" self.verticalLayoutgbStraightInApproach.addWidget(self.chbLOC) self.verticalLayout_9.addWidget(self.gbStraightInApproach) self.gbStraightInApproach.setTitle("Straight-In Approach") self.frmState = QtGui.QFrame(self.frame_3) self.frmState.setFrameShape(QtGui.QFrame.StyledPanel) self.frmState.setFrameShadow(QtGui.QFrame.Raised) self.frmState.setObjectName(_fromUtf8("frmState")) self.horizontalLayout_3 = QtGui.QHBoxLayout(self.frmState) self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3")) self.lblState = QtGui.QLabel(self.frmState) self.lblState.setMinimumSize(QtCore.QSize(90, 0)) self.lblState.setMaximumSize(QtCore.QSize(90, 16777215)) self.lblState.setObjectName(_fromUtf8("lblState")) self.horizontalLayout_3.addWidget(self.lblState) self.ddlState = QtGui.QComboBox(self.frmState) self.ddlState.setObjectName(_fromUtf8("ddlState")) self.horizontalLayout_3.addWidget(self.ddlState) self.verticalLayout_9.addWidget(self.frmState) self.frmAerodrome = QtGui.QFrame(self.frame_3) self.frmAerodrome.setFrameShape(QtGui.QFrame.StyledPanel) self.frmAerodrome.setFrameShadow(QtGui.QFrame.Raised) self.frmAerodrome.setObjectName(_fromUtf8("frmAerodrome")) self.horizontalLayout_4 = QtGui.QHBoxLayout(self.frmAerodrome) self.horizontalLayout_4.setObjectName(_fromUtf8("horizontalLayout_4")) self.lblAerodrome = QtGui.QLabel(self.frmAerodrome) self.lblAerodrome.setMinimumSize(QtCore.QSize(90, 0)) self.lblAerodrome.setMaximumSize(QtCore.QSize(90, 16777215)) self.lblAerodrome.setObjectName(_fromUtf8("lblAerodrome")) self.horizontalLayout_4.addWidget(self.lblAerodrome) self.ddlAerodrome = QtGui.QComboBox(self.frmAerodrome) self.ddlAerodrome.setObjectName(_fromUtf8("ddlAerodrome")) self.horizontalLayout_4.addWidget(self.ddlAerodrome) self.verticalLayout_9.addWidget(self.frmAerodrome) self.frmRunway = QtGui.QFrame(self.frame_3) self.frmRunway.setFrameShape(QtGui.QFrame.StyledPanel) self.frmRunway.setFrameShadow(QtGui.QFrame.Raised) self.frmRunway.setObjectName(_fromUtf8("frmRunway")) self.horizontalLayout_5 = QtGui.QHBoxLayout(self.frmRunway) self.horizontalLayout_5.setObjectName(_fromUtf8("horizontalLayout_5")) self.lblRunway = QtGui.QLabel(self.frmRunway) self.lblRunway.setMinimumSize(QtCore.QSize(90, 0)) self.lblRunway.setMaximumSize(QtCore.QSize(90, 16777215)) self.lblRunway.setObjectName(_fromUtf8("lblRunway")) self.horizontalLayout_5.addWidget(self.lblRunway) self.ddlRunway1 = QtGui.QComboBox(self.frmRunway) self.ddlRunway1.setObjectName(_fromUtf8("ddlRunway1")) self.horizontalLayout_5.addWidget(self.ddlRunway1) self.ddlRunway2 = QtGui.QComboBox(self.frmRunway) self.ddlRunway2.setObjectName(_fromUtf8("ddlRunway2")) self.horizontalLayout_5.addWidget(self.ddlRunway2) self.verticalLayout_9.addWidget(self.frmRunway) self.frmSlope = QtGui.QFrame(self.frame_3) self.frmSlope.setFrameShape(QtGui.QFrame.StyledPanel) self.frmSlope.setFrameShadow(QtGui.QFrame.Raised) self.frmSlope.setObjectName(_fromUtf8("frmSlope")) self.horizontalLayout_7 = QtGui.QHBoxLayout(self.frmSlope) self.horizontalLayout_7.setObjectName(_fromUtf8("horizontalLayout_7")) self.lblSlope = QtGui.QLabel(self.frmSlope) self.lblSlope.setMinimumSize(QtCore.QSize(90, 0)) self.lblSlope.setMaximumSize(QtCore.QSize(90, 16777215)) self.lblSlope.setObjectName(_fromUtf8("lblSlope")) self.horizontalLayout_7.addWidget(self.lblSlope) self.ddlSlope = QtGui.QComboBox(self.frmSlope) self.ddlSlope.setObjectName(_fromUtf8("ddlSlope")) self.horizontalLayout_7.addWidget(self.ddlSlope) self.verticalLayout_9.addWidget(self.frmSlope) self.frmPrintScale = QtGui.QFrame(self.frame_3) self.frmPrintScale.setFrameShape(QtGui.QFrame.StyledPanel) self.frmPrintScale.setFrameShadow(QtGui.QFrame.Raised) self.frmPrintScale.setObjectName(_fromUtf8("frmPrintScale")) self.horizontalLayout_8 = QtGui.QHBoxLayout(self.frmPrintScale) self.horizontalLayout_8.setObjectName(_fromUtf8("horizontalLayout_8")) self.lblPrintScale = QtGui.QLabel(self.frmPrintScale) self.lblPrintScale.setMinimumSize(QtCore.QSize(90, 0)) self.lblPrintScale.setMaximumSize(QtCore.QSize(90, 16777215)) self.lblPrintScale.setObjectName(_fromUtf8("lblPrintScale")) self.horizontalLayout_8.addWidget(self.lblPrintScale) self.txtPrintScale = QtGui.QLineEdit(self.frmPrintScale) self.txtPrintScale.setObjectName(_fromUtf8("txtPrintScale")) self.horizontalLayout_8.addWidget(self.txtPrintScale) self.verticalLayout_9.addWidget(self.frmPrintScale) self.frmFontSize = QtGui.QFrame(self.frame_3) self.frmFontSize.setFrameShape(QtGui.QFrame.StyledPanel) self.frmFontSize.setFrameShadow(QtGui.QFrame.Raised) self.frmFontSize.setObjectName(_fromUtf8("frmFontSize")) self.horizontalLayout_9 = QtGui.QHBoxLayout(self.frmFontSize) self.horizontalLayout_9.setObjectName(_fromUtf8("horizontalLayout_9")) self.lblFontSize = QtGui.QLabel(self.frmFontSize) self.lblFontSize.setMinimumSize(QtCore.QSize(90, 0)) self.lblFontSize.setMaximumSize(QtCore.QSize(90, 16777215)) self.lblFontSize.setObjectName(_fromUtf8("lblFontSize")) self.horizontalLayout_9.addWidget(self.lblFontSize) self.txtFontSize = QtGui.QLineEdit(self.frmFontSize) self.txtFontSize.setObjectName(_fromUtf8("txtFontSize")) self.horizontalLayout_9.addWidget(self.txtFontSize) self.verticalLayout_9.addWidget(self.frmFontSize) self.gbSizes = QtGui.QGroupBox(self.frame_3) self.gbSizes.setObjectName(_fromUtf8("gbSizes")) self.verticalLayout_10 = QtGui.QVBoxLayout(self.gbSizes) self.verticalLayout_10.setObjectName(_fromUtf8("verticalLayout_10")) self.ddlPageSizes = QtGui.QComboBox(self.gbSizes) self.ddlPageSizes.setObjectName(_fromUtf8("ddlPageSizes")) self.verticalLayout_10.addWidget(self.ddlPageSizes) self.frame_11 = QtGui.QFrame(self.gbSizes) self.frame_11.setFrameShape(QtGui.QFrame.StyledPanel) self.frame_11.setFrameShadow(QtGui.QFrame.Raised) self.frame_11.setObjectName(_fromUtf8("frame_11")) self.horizontalLayout_10 = QtGui.QHBoxLayout(self.frame_11) self.horizontalLayout_10.setObjectName( _fromUtf8("horizontalLayout_10")) self.labelUnit = QtGui.QLabel(self.frame_11) self.labelUnit.setObjectName("labelUint") self.labelUnit.setText("Unit") self.horizontalLayout_10.addWidget(self.labelUnit) self.cmbUnit = QtGui.QComboBox(self.frame_11) self.cmbUnit.setObjectName("cmbUnit") self.cmbUnit.addItems(["mm", "inch"]) self.horizontalLayout_10.addWidget(self.cmbUnit) self.verticalLayout_10.addWidget(self.frame_11) self.frmWidth = QtGui.QFrame(self.gbSizes) self.frmWidth.setFrameShape(QtGui.QFrame.StyledPanel) self.frmWidth.setFrameShadow(QtGui.QFrame.Raised) self.frmWidth.setObjectName(_fromUtf8("frmWidth")) self.horizontalLayout_12 = QtGui.QHBoxLayout(self.frmWidth) self.horizontalLayout_12.setObjectName( _fromUtf8("horizontalLayout_12")) self.lblWidth = QtGui.QLabel(self.frmWidth) self.lblWidth.setMinimumSize(QtCore.QSize(81, 0)) self.lblWidth.setMaximumSize(QtCore.QSize(81, 16777215)) self.lblWidth.setObjectName(_fromUtf8("lblWidth")) self.horizontalLayout_12.addWidget(self.lblWidth) self.txtWidth = QtGui.QLineEdit(self.frmWidth) self.txtWidth.setObjectName(_fromUtf8("txtWidth")) self.horizontalLayout_12.addWidget(self.txtWidth) self.verticalLayout_10.addWidget(self.frmWidth) self.frmHeight = QtGui.QFrame(self.gbSizes) self.frmHeight.setFrameShape(QtGui.QFrame.StyledPanel) self.frmHeight.setFrameShadow(QtGui.QFrame.Raised) self.frmHeight.setObjectName(_fromUtf8("frmHeight")) self.horizontalLayout_13 = QtGui.QHBoxLayout(self.frmHeight) self.horizontalLayout_13.setObjectName( _fromUtf8("horizontalLayout_13")) self.lblHeight = QtGui.QLabel(self.frmHeight) self.lblHeight.setMinimumSize(QtCore.QSize(81, 0)) self.lblHeight.setMaximumSize(QtCore.QSize(81, 16777215)) self.lblHeight.setObjectName(_fromUtf8("lblHeight")) self.horizontalLayout_13.addWidget(self.lblHeight) self.txtHeight = QtGui.QLineEdit(self.frmHeight) self.txtHeight.setObjectName(_fromUtf8("txtHeight")) self.horizontalLayout_13.addWidget(self.txtHeight) self.verticalLayout_10.addWidget(self.frmHeight) self.verticalLayout_9.addWidget(self.gbSizes) self.gbPageOrientation = QtGui.QGroupBox(self.frame_3) self.gbPageOrientation.setObjectName(_fromUtf8("gbPageOrientation")) self.horizontalLayout_14 = QtGui.QHBoxLayout(self.gbPageOrientation) self.horizontalLayout_14.setObjectName( _fromUtf8("horizontalLayout_14")) # self.labelPageOrientation = QtGui.QLabel(self.gbPageOrientation) # self.labelPageOrientation.setObjectName("labelPageOrientation") # self.labelPageOrientation.setText("Page Orientation") # self.horizontalLayout_14.addWidget(self.labelPageOrientation) self.cmbPageOrientation = QtGui.QComboBox(self.gbPageOrientation) self.cmbPageOrientation.setObjectName("cmbPageOrientation") self.cmbPageOrientation.addItems(["Portrait", "Landscape"]) self.horizontalLayout_14.addWidget(self.cmbPageOrientation) # self.rbtLandscape = QtGui.QRadioButton(self.gbPageOrientation) # self.rbtLandscape.setObjectName(_fromUtf8("radioButton")) # self.horizontalLayout_14.addWidget(self.rbtLandscape) # self.rbtPortrait = QtGui.QRadioButton(self.gbPageOrientation) # self.rbtPortrait.setChecked(True) # self.rbtPortrait.setObjectName(_fromUtf8("rblLandscape")) # self.horizontalLayout_14.addWidget(self.rbtPortrait) self.verticalLayout_9.addWidget(self.gbPageOrientation) self.horizontalLayout_6.addWidget(self.frame_3) spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout_6.addItem(spacerItem1) self.horizontalLayout_2.addWidget(self.frame_13) self.frame = QtGui.QFrame(self) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.frame.sizePolicy().hasHeightForWidth()) self.frame.setSizePolicy(sizePolicy) self.frame.setFrameShape(QtGui.QFrame.StyledPanel) self.frame.setFrameShadow(QtGui.QFrame.Raised) self.frame.setObjectName(_fromUtf8("frame")) self.horizontalLayout = QtGui.QHBoxLayout(self.frame) self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) spacerItem15 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout.addItem(spacerItem15) self.btnPrevious = QtGui.QPushButton(self.frame) self.btnPrevious.setObjectName(_fromUtf8("btnPrevious")) self.horizontalLayout.addWidget(self.btnPrevious) self.btnNext = QtGui.QPushButton(self.frame) self.btnNext.setObjectName(_fromUtf8("btnNext")) self.horizontalLayout.addWidget(self.btnNext) self.btnExit = QtGui.QPushButton(self.frame) self.btnExit.setObjectName(_fromUtf8("btnExit")) self.horizontalLayout.addWidget(self.btnExit) spacerItem16 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) self.horizontalLayout.addItem(spacerItem16) self.horizontalLayout_2.addWidget(self.frame) self.frmState.setVisible(False) self.frmAerodrome.setVisible(False) self.frmRunway.setVisible(False) self.frmSlope.setVisible(False) self.ddlPageSizes.setVisible(False) self.txtPrintScale.setText("10") self.txtFontSize.setText("10") self.txtWidth.setText("210") self.txtHeight.setText("290") # self.rbtnmm.setChecked(True) self.retranslateUi() # self.stackedWidget.setCurrentIndex(0) QtCore.QMetaObject.connectSlotsByName(self) self.btnPrevious.setEnabled(False) self.btnNext.clicked.connect(self.btnNext_clicked) self.btnExit.setVisible(False) self.gbStraightInApproach.setVisible( self.cmbCatOfACFT.currentIndex() == 0) self.cmbUnit.currentIndexChanged.connect(self.paperResize) self.txtHeight.textChanged.connect(self.pageOrientationChange) self.txtWidth.textChanged.connect(self.pageOrientationChange) self.cmbTemplate.currentIndexChanged.connect( self.cmbCatOfACFT_currentIndexChanged) self.cmbTemplate.activated.connect(self.cmbCatOfACFT_activated) self.cmbCatOfACFT.currentIndexChanged.connect( self.cmbCatOfACFT_currentIndexChanged) self.connect(self.chbCat1, QtCore.SIGNAL("Event_0"), self.chbCat1_clicked) self.connect(self.chbCat2, QtCore.SIGNAL("Event_0"), self.chbCat2_clicked) self.connect(self.chbLOC, QtCore.SIGNAL("Event_0"), self.chbLOC_clicked) # self.cmbPageOrientation.currentIndexChanged.connect(self.widthHeighChange) self.dlg = None self.straightCount = 3 self.catOfAcftCount = 1 def cmbCatOfACFT_currentIndexChanged(self): if self.cmbCatOfACFT.currentIndex() == 6: self.catOfAcftCount = 5 else: self.catOfAcftCount = self.cmbCatOfACFT.currentIndex() + 1 def chbCat1_clicked(self): if self.chbCat1.Checked: self.straightCount += 1 else: self.straightCount -= 1 def chbCat2_clicked(self): if self.chbCat2.Checked: self.straightCount += 1 else: self.straightCount -= 1 def chbLOC_clicked(self): if self.chbLOC.Checked: self.straightCount += 1 else: self.straightCount -= 1 def cmbCatOfACFT_activated(self, index): self.gbStraightInApproach.setVisible(index == 0) def widthHeighChange(self): w = float(self.txtWidth.text()) h = float(self.txtHeight.text()) self.txtWidth.setText(str(round(h, 2))) self.txtHeight.setText(str(round(w, 2))) def pageOrientationChange(self): w = float(self.txtWidth.text()) h = float(self.txtHeight.text()) if w < h: self.cmbPageOrientation.setCurrentIndex(0) else: self.cmbPageOrientation.setCurrentIndex(1) def paperResize(self): w = float(self.txtWidth.text()) h = float(self.txtHeight.text()) if self.cmbUnit.currentIndex() != 0: w /= 25.4 h /= 25.4 else: w *= 25.4 h *= 25.4 self.txtWidth.setText(str(round(w, 2))) self.txtHeight.setText(str(round(h, 2))) def btnNext_clicked(self): # self.btnPrevious.setEnabled(True) w = float(self.txtWidth.text()) h = float(self.txtHeight.text()) if self.cmbUnit.currentIndex() != 0: w *= 25.4 h *= 25.4 data = { "PrintScale": int(self.txtPrintScale.text()), "FontSize": int(self.txtFontSize.text()), "Sizes": "mm" if self.cmbUnit.currentIndex() == 0 else "inch", "Width": int(w), "Height": int(h), "PageOrientation": "L" if self.cmbPageOrientation.currentIndex() == 1 else "P", "StraightCount": self.straightCount, "Template": [self.cmbTemplate.currentIndex(), self.cmbTemplate.currentText()], "CatOfAcftCount": [self.catOfAcftCount, self.cmbCatOfACFT.currentIndex()], "Distance": self.pnlDistance.Value.NauticalMiles, "DescentGradient": self.pnlDescentGradient.Value.Degrees, "ThrAltitude": self.pnlThrAlt.Value.Feet, "RDHAltitude": self.pnlRDHAlt.Value.Feet, "dX": self.pnlDX.Value.Metres } if self.dlg == None: self.dlg = DlgCharting(self, data) if data["Template"][1].contains("RNP"): self.dlg.ui.txtText7.setText("RNP RWY 19") elif data["Template"][1].contains("RNAV"): self.dlg.ui.txtText7.setText("RNAV RWY 19") elif data["Template"][1].contains("CONV"): self.dlg.ui.txtText7.setText("CONV RWY 19") else: self.dlg.ui.txtText7.setText(data["Template"][1] + " RWY 19") if data["Template"][1].contains("RNP AR"): self.dlg.ui.txtText7.setText("RNP AR RWY 19") self.dlg.show() self.hide() self.dlg.refreshData(data) def retranslateUi(self): self.setWindowTitle(_translate("Dialog", "Charting Tool 1", None)) self.lblState.setText(_translate("Dialog", "State: ", None)) self.lblAerodrome.setText(_translate("Dialog", "Aerodrome: ", None)) self.lblRunway.setText(_translate("Dialog", "Runway: ", None)) self.lblSlope.setText(_translate("Dialog", "Slope: ", None)) self.lblPrintScale.setText(_translate("Dialog", "Print Scale: ", None)) self.lblFontSize.setText( _translate("Dialog", "Font Size(Point): ", None)) self.gbSizes.setTitle(_translate("Dialog", "Sizes", None)) # self.rbtnInch.setText(_translate("Dialog", "Inch", None)) # self.rbtnmm.setText(_translate("Dialog", "MM", None)) self.lblWidth.setText(_translate("Dialog", "Width:", None)) self.lblHeight.setText(_translate("Dialog", "Height: ", None)) self.gbPageOrientation.setTitle( _translate("Dialog", "Page Orientation", None)) # self.rbtLandscape.setText(_translate("Dialog", "Landscape", None)) # self.rbtPortrait.setText(_translate("Dialog", "Portrait", None)) self.btnPrevious.setText(_translate("Dialog", "Previous", None)) self.btnNext.setText(_translate("Dialog", "Next", None)) self.btnExit.setText(_translate("Dialog", "Finish", None))