/
choosers.py
40 lines (35 loc) · 1.46 KB
/
choosers.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
class aMSNFileChooserWindow(object):
"""
This Interface represent a window used to choose a file,
which could be an image for the dp, a file to send, a theme file, etc.
"""
def __init__(self, filters, directory, callback):
"""
@type filter: dict of tuple
@param filter: A dict whose keys are the names of the filters,
and the values are a tuple containing strings,
that will represent the patterns to filter.
@type directory: str
@param directory: The path to start from.
@type callback: function
@param callback: The function called when the file has been choosed.
Its prototype is callback(file_path)
This will eventually call the related show() method, so the window is
displayed when created.
"""
raise NotImplementedError
class aMSNDPChooserWindow(object):
"""
This Interface represent a window used to choose a display picture,
should show a list of default dps and the possibility to catch a picture from a webcam.
"""
def __init__(self, callback, backend_manager):
"""
@type callback: function
@param callback: The function called when the dp has been choosed.
Its prototype is callback(dp_path)
@type backend_manager: aMSNBackendManager
This will eventually call the related show() method, so the window is
displayed when created.
"""
raise NotImplementedError