'Rearrange the windows in the specified Qtile object according to this
QtileState.'

def apply(self, qtile):

    for (group, layout) in self.groups:
        try:
            qtile.groupMap[group].layout = layout
        except KeyError:
            qtile.addGroup(group, layout)
    for (screen, group) in self.screens.items():
        try:
            group = qtile.groupMap[group]
            qtile.screens[screen].setGroup(group)
        except (KeyError, IndexError):
            pass
    qtile.toScreen(self.current_screen)
