eric6/MicroPython/EspDevices.py

branch
micropython
changeset 7100
c4d9c28ebcd8
parent 7095
8e10acb1cd85
child 7108
4f6133a01c6a
equal deleted inserted replaced
7099:89f11ae6bec3 7100:c4d9c28ebcd8
28 @type MicroPythonReplWidget 28 @type MicroPythonReplWidget
29 @param parent reference to the parent object 29 @param parent reference to the parent object
30 @type QObject 30 @type QObject
31 """ 31 """
32 super(EspDevice, self).__init__(microPythonWidget, parent) 32 super(EspDevice, self).__init__(microPythonWidget, parent)
33
34 self.__replActive = False
35 self.__fileManagerActive = False
36 self.__plotterActive = False
37 33
38 def setButtons(self): 34 def setButtons(self):
39 """ 35 """
40 Public method to enable the supported action buttons. 36 Public method to enable the supported action buttons.
41 """ 37 """
61 and a reason why it cannot. 57 and a reason why it cannot.
62 @rtype tuple of (bool, str) 58 @rtype tuple of (bool, str)
63 """ 59 """
64 return True, "" 60 return True, ""
65 61
66 def setRepl(self, on):
67 """
68 Public method to set the REPL status and dependent status.
69
70 @param on flag indicating the active status
71 @type bool
72 """
73 self.__replActive = on
74
75 def canStartPlotter(self): 62 def canStartPlotter(self):
76 """ 63 """
77 Public method to determine, if a Plotter can be started. 64 Public method to determine, if a Plotter can be started.
78 65
79 @return tuple containing a flag indicating it is safe to start a 66 @return tuple containing a flag indicating it is safe to start a
80 Plotter and a reason why it cannot. 67 Plotter and a reason why it cannot.
81 @rtype tuple of (bool, str) 68 @rtype tuple of (bool, str)
82 """ 69 """
83 return True, "" 70 return True, ""
84
85 def setPlotter(self, on):
86 """
87 Public method to set the Plotter status and dependent status.
88
89 @param on flag indicating the active status
90 @type bool
91 """
92 self.__plotterActive = on
93 71
94 def canRunScript(self): 72 def canRunScript(self):
95 """ 73 """
96 Public method to determine, if a script can be executed. 74 Public method to determine, if a script can be executed.
97 75
119 File Manager and a reason why it cannot. 97 File Manager and a reason why it cannot.
120 @rtype tuple of (bool, str) 98 @rtype tuple of (bool, str)
121 """ 99 """
122 return True, "" 100 return True, ""
123 101
124 def setFileManager(self, on):
125 """
126 Public method to set the File Manager status and dependent status.
127
128 @param on flag indicating the active status
129 @type bool
130 """
131 self.__fileManagerActive = on
132
133 @pyqtSlot() 102 @pyqtSlot()
134 def handleDataFlood(self): 103 def handleDataFlood(self):
135 """ 104 """
136 Public slot handling a data flood from the device. 105 Public slot handling a data flood from the device.
137 """ 106 """

eric ide

mercurial