示例#1
0
 def __init__(self, xmlobj):
     self._attrs = []
     if xmlobj is not None:
         self.__name__ = xmlobj.tag
         for child in xmlobj:
             if child.tag == "property":
                 key, text = qt3ui.loadProperty(child)
             else:
                 text = aqtt(child.text)
                 key = child.tag
             if isinstance(text, basestring): text = text.strip()
             setattr(self, key, text)
             self._attrs.append(key)
示例#2
0
    def __init__(self, xmlobj=None):
        self._attrs = []
        if xmlobj is not None:
            self.__name__ = xmlobj.tag
            for child in xmlobj:
                if child.tag == "property":
                    # Se importa aquí para evitar error de importación cíclica.
                    from pineboolib.qt3ui import loadProperty

                    key, text = loadProperty(child)
                else:
                    text = aqtt(child.text)
                    key = child.tag
                if isinstance(text, str): text = text.strip()
                setattr(self, key, text)
                self._attrs.append(key)
示例#3
0
文件: utils.py 项目: sbellver/pineboo
    def __init__(self, xmlobj=None):
        self._attrs = []
        if xmlobj is not None:
            self.__name__ = xmlobj.tag
            for child in xmlobj:
                if child.tag == "property":
                    # Se importa aquí para evitar error de importación cíclica.
                    from pineboolib.qt3ui import loadProperty

                    key, text = loadProperty(child)
                else:
                    text = aqtt(child.text)
                    key = child.tag
                if isinstance(text, str): text = text.strip()
                setattr(self, key, text)
                self._attrs.append(key)