-
Notifications
You must be signed in to change notification settings - Fork 1
/
controller_results.py
50 lines (37 loc) · 1.59 KB
/
controller_results.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
40
41
42
43
44
45
46
47
48
49
50
#!/usr/bin/python
import model as m
import view_results
import controller as c
class ControllerResults(c.Controller):
""" The ControllerResults class is a specific controller that inherits from the general Controller class and is used to manage the user interactions of the results window and the application (ViewResults). """
def __init__(self):
""" Constructor of ControllerResults. """
# call constructor of parent class
c.Controller.__init__(self)
def __init__(self, model = None, view = None):
""" Constructor of ControllerResults. """
# call constructor of parent class
c.Controller.__init__(self, model, view)
def add_text(self, text):
""" Add a defined text to the locked entry box of the corresponding view. """
if self._view != None:
self._view.add(text)
def clear(self):
""" Clear the entry box of the corresponding view. """
if self._view != None:
self._view.clear()
def update(self):
""" Interface to notify MVCObserver objects about a general data change. """
pass
def update_component(self, key):
""" Interface to notify Observer objects about a data change of a component. """
pass
def update_output(self):
""" Interface to notify Observer objects about a data change of simulation results. """
pass
def reset(self):
""" Interface to notify MVCObserver objects about a reset event. """
pass
def undo(self):
""" Interface to notify Observer objects about an undo. """
pass