Exemple #1
0
def strip_auto_print_check():
    if settings.session_manager.isRunning():
        for fpl in env.FPLs.findAll():
            reason_to_print = auto_print_strip_reason(fpl)
            if reason_to_print != None:
                strip = Strip()
                strip.linkFPL(fpl)
                strip.writeDetail(
                    rack_detail,
                    some(settings.auto_print_collecting_rack,
                         default_rack_name))
                strip.writeDetail(auto_printed_detail, True)
                fpl.strip_auto_printed = True
                env.strips.addStrip(strip)
                signals.stripAutoPrinted.emit(strip, reason_to_print)
                signals.selectionChanged.emit()
Exemple #2
0
def new_strip_dialog(parent_widget, rack, linkToSelection=False):
    '''
	Returns the created strip if operation not aborted
	'''
    new_strip = Strip()
    new_strip.writeDetail(rack_detail, rack)
    if linkToSelection:
        new_strip.linkAircraft(selection.acft)
        if settings.strip_autofill_on_ACFT_link:
            new_strip.fillFromXPDR()
        new_strip.linkFPL(selection.fpl)
    dialog = StripDetailSheetDialog(parent_widget, new_strip)
    dialog.exec()
    if dialog.result() > 0:  # not rejected
        new_strip.writeDetail(rack_detail, dialog.selectedRack())
        env.strips.addStrip(new_strip)
        selection.selectStrip(new_strip)
        return new_strip
    else:
        return None