def __getattribute__(cls, name): try: return type.__getattribute__(cls, name) except AttributeError: # Handle internal (ie. non-PySide) attributes as normal. if name == "module": raise # Avoid a circular import. from pysideuic.Compiler.qtproxies import LiteralProxyClass return type(name, (LiteralProxyClass, ), {"module": moduleMember(type.__getattribute__(cls, "module"), type.__getattribute__(cls, "__name__"))})
def __init__(self, objectname, is_attribute, args=(), noInstantiation=False): if objectname: if is_attribute: objectname = "self." + objectname self._uic_name = objectname else: self._uic_name = "Unnamed" if not noInstantiation: funcall = "%s(%s)" % \ (moduleMember(self.module, self.__class__.__name__), ", ".join(map(str, args))) if objectname: funcall = "%s = %s" % (objectname, funcall) write_code(funcall)
def __str__(cls): return moduleMember(type.__getattribute__(cls, "module"), type.__getattribute__(cls, "__name__"))
def __init__(self, *args): self._uic_name = "%s(%s)" % \ (moduleMember(self.module, self.__class__.__name__), ", ".join(map(as_string, args)))