class Properties(object):

    default = {
        'location': {'xpos': 400,
                     'ypos': 400,
                     'width': 400,
                     'height': 300,
                     },
        'slide_timing': {'slide': 10,
                         'item': 5
                        },
    }

    def __init__(self):
        self._properties = self.default.copy()

    def get_location(self):
        location = self._properties['location']
        return (location['xpos'], location['ypos'], location['width'],
                location['height'])

    def get_supported_properties(self):
        return self.default.keys()

    def get_timing(self):
        timing = self._properties['slide_timing']
        return timing['slide'], timing['item']

    def reset(self):
        self._properties = self.default.copy()

    def set_location(self, xpos, ypos, width, height):
        location = self._properties['location']
        location['xpos'] = int(xpos)
        location['ypos'] = int(ypos)
        location['width'] = int(width)
        location['height'] = int(height)

    def set_timing(self, slide, item):
        timing = self._properties['slide_timing']
        timing['slide'] = int(slide)
        timing['item'] = int(item)

    set_methods = {
        'location': set_location,
        'slide_timing': set_timing,
    }

