示例#1
0
class CDR_Presenter(BinaryModelPresenter):

	cid = uc2const.CDR

	config = None
	doc_file = ''
	model = None
	version = 'CDRC'

	def __init__(self, appdata, cnf={}):
		self.config = CDR_Config()
		config_file = os.path.join(appdata.app_config_dir, 'cdr_config.xml')
		self.config.load(config_file)
		self.config.update(cnf)
		self.appdata = appdata
		self.loader = CDR_Loader()
		self.saver = CDR_Saver()
		self.new()

	def new(self):
		self.model = model.RiffRootList()
		self.model.childs = []

	def load(self, path):
		BinaryModelPresenter.load(self, path)

	def traslate_from_sk2(self, sk2_doc):
		pass

	def traslate_to_sk2(self, sk2_doc):
		msg = _('Translation is under process...')
		events.emit(events.FILTER_INFO, msg, 0.95)
		translator = CDR_to_SK2_Translator()
		translator.translate(self, sk2_doc)
示例#2
0
class CDR_Presenter(BinaryModelPresenter):

	cid = uc2const.CDR

	config = None
	doc_file = ''
	model = None
	version = 'CDRC'

	def __init__(self, appdata, cnf={}):
		self.config = CDR_Config()
		config_file = os.path.join(appdata.app_config_dir, 'cdr_config.xml')
		self.config.load(config_file)
		self.config.update(cnf)
		self.appdata = appdata
		self.loader = CDR_Loader()
		self.saver = CDR_Saver()
		self.new()

	def new(self):
		self.model = model.RiffRootList()
		self.model.childs = []

	def load(self, path):
		BinaryModelPresenter.load(self, path)

	def traslate_from_pdxf(self, pdxf_doc):
		pass

	def traslate_to_pdxf(self, pdxf_doc):
		msg = _('Translation is under process...')
		events.emit(events.FILTER_INFO, msg, 0.95)
		translator = CDR_to_PDXF_Translator()
		translator.translate(self, pdxf_doc)
示例#3
0
	def __init__(self, appdata, cnf={}):
		self.config = CDR_Config()
		config_file = os.path.join(appdata.app_config_dir, 'cdr_config.xml')
		self.config.load(config_file)
		self.config.update(cnf)
		self.appdata = appdata
		self.loader = CDR_Loader()
		self.saver = CDR_Saver()
		self.new()
示例#4
0
	def __init__(self, appdata, cnf={}):
		self.config = CDR_Config()
		config_file = os.path.join(appdata.app_config_dir, 'cdr_config.xml')
		self.config.load(config_file)
		self.config.update(cnf)
		self.appdata = appdata
		self.loader = CDR_Loader()
		self.saver = CDR_Saver()
		self.new()