예제 #1
0
 def __init__(self, appdata, cnf={}):
     self.config = CDRZ_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.doc_id = id(self)
     self.loader = CDRZ_Loader()
     self.saver = CDRZ_Saver()
     self.create_cache_structure()
     self.new()
예제 #2
0
파일: presenter.py 프로젝트: Scrik/sk1-wx
	def __init__(self, appdata, cnf={}):
		self.config = CDRZ_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.doc_id = id(self)
		self.loader = CDRZ_Loader()
		self.saver = CDRZ_Saver()
		self.create_cache_structure()
		self.new()
예제 #3
0
파일: presenter.py 프로젝트: Scrik/sk1-wx
class CDRZ_Presenter(BinaryModelPresenter):

	cid = uc2const.CDRZ

	config = None
	doc_file = ''
	model = None
	version = 'CDRF'

	def __init__(self, appdata, cnf={}):
		self.config = CDRZ_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.doc_id = id(self)
		self.loader = CDRZ_Loader()
		self.saver = CDRZ_Saver()
		self.create_cache_structure()
		self.new()

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

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

	def create_cache_structure(self):
		doc_cache_dir = os.path.join(self.appdata.app_config_dir, 'docs_cache')
		self.doc_dir = os.path.join(doc_cache_dir, 'doc_' + self.doc_id)
		os.makedirs(self.doc_dir)

	def traslate_from_pdxf(self, pdxf_doc):
		pass

	def traslate_to_pdxf(self, pdxf_doc):
		pass
예제 #4
0
class CDRZ_Presenter(BinaryModelPresenter):

    cid = uc2const.CDRZ

    config = None
    doc_file = ''
    model = None
    version = 'CDRF'

    def __init__(self, appdata, cnf={}):
        self.config = CDRZ_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.doc_id = id(self)
        self.loader = CDRZ_Loader()
        self.saver = CDRZ_Saver()
        self.create_cache_structure()
        self.new()

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

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

    def create_cache_structure(self):
        doc_cache_dir = os.path.join(self.appdata.app_config_dir, 'docs_cache')
        self.doc_dir = os.path.join(doc_cache_dir, 'doc_' + self.doc_id)
        os.makedirs(self.doc_dir)

    def traslate_from_pdxf(self, pdxf_doc):
        pass

    def traslate_to_pdxf(self, pdxf_doc):
        pass