Пример #1
0
    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__"))})
Пример #2
0
    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__"))})
Пример #3
0
    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)
Пример #4
0
    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)
Пример #5
0
 def __str__(cls):
     return moduleMember(type.__getattribute__(cls, "module"),
                         type.__getattribute__(cls, "__name__"))
Пример #6
0
 def __init__(self, *args):
     self._uic_name = "%s(%s)" % \
                  (moduleMember(self.module, self.__class__.__name__),
                   ", ".join(map(as_string, args)))
Пример #7
0
 def __str__(cls):
     return moduleMember(type.__getattribute__(cls, "module"),
                         type.__getattribute__(cls, "__name__"))
Пример #8
0
 def __init__(self, *args):
     self._uic_name = "%s(%s)" % \
                  (moduleMember(self.module, self.__class__.__name__),
                   ", ".join(map(as_string, args)))