Exemple #1
0
    def get_default_layout(self):
        """
        """
    
        group = DockLayout(self)

        todock = []
        
        for item in self.container.items:
            if not item.default_location:
                dgt = DockGroupItem(self, item)
                dgt.set_visible(item.default_visible)
                group.add_object(dgt)
            else:
                todock.append(item)

        last_count = 0

        while last_count != len(todock):
            last_count = len(todock)
            i = 0
            while i < len(todock):
                it = todock[i]                
                if self.add_default_item(group, it) != None:
                    todock.remove(it)
                    i -= 1
                i += 1
    
        
        for item in todock:
            dgt = DockGroupItem(self, item)
            dgt.set_visible(False)
            group.add_object(dgt)
        
        return group