コード例 #1
0
 def updateCallsignFilter(self):
     sel = selection.selectedCallsign()
     if sel != None:
         self.last_selected_callsign = sel
         self.historyWith_radioButton.setText('History with ' + sel)
     if self.historyWith_radioButton.isChecked():
         self.filter_model.setCallsignFilter(self.last_selected_callsign)
     else:  # user wants to filter on live status (accept all callsigns)
         self.filter_model.setCallsignFilter(None)
コード例 #2
0
def transfer_selected_or_instruct(next_atc_callsign):
    '''
	CAUTION: Should not be called as teacher
	'''
    assert settings.session_manager.session_type != SessionType.TEACHER
    selected_callsign = selection.selectedCallsign()
    data_auth_transferred = False
    if settings.CPDLC_authority_transfers and selected_callsign != None and env.cpdlc.isConnected(
            selected_callsign):
        try:
            settings.session_manager.transferCpdlcAuthority(
                selected_callsign, next_atc_callsign)
            data_auth_transferred = True
        except CpdlcAuthorityTransferFailed:
            pass
    if data_auth_transferred:
        QMessageBox.information(settings.session_manager.gui, 'CPDLC transfer', \
          'Data authority transferred to %s' % next_atc_callsign)
    else:  # Hand over through regular instruction, possibly through data link
        instr = env.ATCs.handoverInstructionTo(next_atc_callsign)
        send_instruction(some(selected_callsign, ''), instr,
                         settings.CPDLC_suggest_handover_instructions)
コード例 #3
0
	def updateDestOnNewSelection(self):
		if settings.session_manager.session_type != SessionType.TEACHER:
			self.dest_edit.setText(some(selection.selectedCallsign(), ''))
コード例 #4
0
	def updateSuggestionFromSelection(self):
		cs = selection.selectedCallsign()
		if cs != None:
			self.callsign_suggestion = cs
コード例 #5
0
 def suggestChatDestFromNewSelection(self):
     cs = selection.selectedCallsign()
     if cs != None:
         self.dest_combo.setEditText(cs)
コード例 #6
0
 def instructAircraftByCallsign(self, callsign, instr):
     sugg = instr.suggestTextChatInstruction(
         selection.acft if callsign ==
         selection.selectedCallsign() else None)
     signals.chatInstructionSuggestion.emit(callsign, sugg, False)
コード例 #7
0
def instruct_selected_with_taxi(instr):
    send_instruction(some(selection.selectedCallsign(), ''), instr, False)
コード例 #8
0
def instruct_selected_with_vector(instr):
    send_instruction(some(selection.selectedCallsign(), ''), instr,
                     settings.CPDLC_suggest_vector_instructions)