def initSendFaxPage(self): self.info_icon = QIcon(load_pixmap("info", "16x16")) self.warn_icon = QIcon(load_pixmap("warning", "16x16")) self.error_icon = QIcon(load_pixmap("error", "16x16")) self.busy_icon = QIcon(load_pixmap("busy", "16x16")) self.update_queue = queue.Queue() # UI updates from send thread self.event_queue = queue.Queue() # UI events (cancel) to send thread self.send_fax_active = False
def __init__(self, service, num_copies=None, contrast=None, quality=None, reduction=None, fit_to_page=None, parent=None, form=None, name=None, fl=0): ScrollView.__init__(self, service, parent, name, fl) self.form = form self.num_copies = num_copies self.contrast = contrast self.quality = quality self.reduction = reduction self.fit_to_page = fit_to_page self.update_queue = queue.Queue() # UI updates from copy thread self.event_queue = queue.Queue() # UI events to copy thread
if dev.error_state > ERROR_STATE_MAX_OK and \ dev.error_state not in (ERROR_STATE_LOW_SUPPLIES, ERROR_STATE_LOW_PAPER): log.error("Device is busy or in an error state (code=%d). Please wait for the device to become idle or clear the error and try again." % dev.error_state) sys.exit(1) user_conf.set('last_used', 'device_uri', dev.device_uri) log.debug("File list:") for f in file_list: log.debug(str(f)) service.SendEvent(device_uri, printer_name, EVENT_START_FAX_JOB, prop.username, 0, '') update_queue = queue.Queue() event_queue = queue.Queue() log.info("\nSending fax...") if not dev.sendFaxes(phone_num_list, file_list, "", "", None, False, printer_name, update_queue, event_queue): log.error("Send fax is active. Please wait for operation to complete.") service.SendEvent(device_uri, printer_name, EVENT_FAX_JOB_FAIL, prop.username, 0, '') sys.exit(1) try: cont = True while cont: