def __new__(mcs, name, bases, attrs):
        """
        Manages the creation of database model classes, reading
        through the creation attributes and generating table
        schemas based on the inputed information.  This class
        never needs to be expressly defined, as any class that
        inherits from the Table class will be passed through this
        as a constructor.
        
        :param      mcs         <TableBase>
        :param      name        <str>
        :param      bases       <tuple> (<object> base,)
        :param      attrs       <dict> properties
        
        :return     <type>
        """
        # determine if this is a definition, or a specific schema
        new_class = super(XPaletteType, mcs).__new__(mcs, name, bases, attrs)
        
        # add new custom roles
        curr = 50 + len(new_class.CustomRoles)
        custom = attrs.pop('__custom_roles__', [])
        for role in custom:
            if not role in new_class.CustomRoles:
                setattr(new_class, role, QtGui.QPalette.ColorRole(curr))
                curr += 1
        
        # update the global set of custom roles
        new_class.CustomRoles.update(custom)
        return new_class
def __new__ ( mcs , name , bases , attrs ) : new_class = super ( XPaletteType , mcs ) . __new__ ( mcs , name , bases , attrs ) curr = 50 + len ( new_class . CustomRoles ) custom = attrs . pop ( '__custom_roles__' , [ ] ) for role in custom : if not role in new_class . CustomRoles : setattr ( new_class , role , QtGui . QPalette . ColorRole ( curr ) ) curr += 1 new_class . CustomRoles . update ( custom ) return new_class
Manages the creation of database model classes, reading
        through the creation attributes and generating table
        schemas based on the inputed information.  This class
        never needs to be expressly defined, as any class that
        inherits from the Table class will be passed through this
        as a constructor.
        
        :param      mcs         <TableBase>
        :param      name        <str>
        :param      bases       <tuple> (<object> base,)
        :param      attrs       <dict> properties
        
        :return     <type>