コード例 #1
0
class PrinterAPI(object):
    def __init__(self, ):

        self._configuration_manager = CircutSourcedConfigurationManager()
        self._configuration_api = ConfigurationAPI(self._configuration_manager)
        self._test_print_api = None

    '''Loads a connected printer'''

    def load_printer(self):
        self._configuration_api.load_printer()

    def current_printer(self):
        return self._configuration_api.current_printer()

    def get_print_api(self, start_height=0.0):
        return PrintAPI(self._configuration_api.get_current_config(),
                        start_height=start_height)

    def get_print_queue_api(self):
        return PrintQueueAPI(self._configuration_api.get_current_config())

    def get_calibration_api(self, ):
        return CalibrationAPI(self._configuration_manager)

    def get_configuration_api(self):
        return self._configuration_api

    def get_current_config(self):
        return self._configuration_api.get_current_config()

    def get_test_print_api(self, ):
        if not self._test_print_api:
            self._test_print_api = TestPrintAPI()
        return self._test_print_api
コード例 #2
0
class PrinterAPI(object):
    def __init__(self, ):

        self._configuration_manager = CircutSourcedConfigurationManager()
        self._configuration_api = ConfigurationAPI(self._configuration_manager)
        self._test_print_api = None


    '''Loads a connected printer'''
    def load_printer(self):
        self._configuration_api.load_printer()

    def current_printer(self):
        return self._configuration_api.current_printer()

    def get_print_api(self, start_height=0.0):
        return PrintAPI(self._configuration_api.get_current_config(), start_height=start_height)

    def get_print_queue_api(self):
        return PrintQueueAPI(self._configuration_api.get_current_config())

    def get_calibration_api(self, ):
        return CalibrationAPI(self._configuration_manager)

    def get_configuration_api(self):
        return self._configuration_api

    def get_current_config(self):
        return self._configuration_api.get_current_config()

    def get_test_print_api(self, ):
        if not self._test_print_api:
            self._test_print_api = TestPrintAPI()
        return self._test_print_api
コード例 #3
0
    def __init__(self, ):

        self._configuration_manager = CircutSourcedConfigurationManager()
        self._configuration_api = ConfigurationAPI(self._configuration_manager)
        self._test_print_api = None
コード例 #4
0
    def __init__(self, ):

        self._configuration_manager = CircutSourcedConfigurationManager()
        self._configuration_api = ConfigurationAPI(self._configuration_manager)
        self._test_print_api = None