equal
deleted
inserted
replaced
23 #Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
23 #Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
24 |
24 |
25 import wx |
25 import wx |
26 import wx.lib.buttons |
26 import wx.lib.buttons |
27 import wx.lib.agw.customtreectrl as CT |
27 import wx.lib.agw.customtreectrl as CT |
|
28 |
|
29 try: |
|
30 import matplotlib |
|
31 matplotlib.use('WX') |
|
32 USE_MPL = True |
|
33 except: |
|
34 USE_MPL = False |
28 |
35 |
29 from PLCControler import ITEMS_VARIABLE, ITEM_CONFIGURATION, ITEM_RESOURCE, ITEM_POU, ITEM_TRANSITION, ITEM_ACTION |
36 from PLCControler import ITEMS_VARIABLE, ITEM_CONFIGURATION, ITEM_RESOURCE, ITEM_POU, ITEM_TRANSITION, ITEM_ACTION |
30 from util.BitmapLibrary import GetBitmap |
37 from util.BitmapLibrary import GetBitmap |
31 |
38 |
32 class PouInstanceVariablesPanel(wx.Panel): |
39 class PouInstanceVariablesPanel(wx.Panel): |
144 |
151 |
145 panel = wx.Panel(self.VariablesList) |
152 panel = wx.Panel(self.VariablesList) |
146 |
153 |
147 buttons = [] |
154 buttons = [] |
148 if var_infos["class"] in ITEMS_VARIABLE: |
155 if var_infos["class"] in ITEMS_VARIABLE: |
149 if (var_infos["debug"] and self.Debug and |
156 if (not USE_MPL and var_infos["debug"] and self.Debug and |
150 (self.Controller.IsOfType(var_infos["type"], "ANY_NUM", True) or |
157 (self.Controller.IsOfType(var_infos["type"], "ANY_NUM", True) or |
151 self.Controller.IsOfType(var_infos["type"], "ANY_BIT", True))): |
158 self.Controller.IsOfType(var_infos["type"], "ANY_BIT", True))): |
152 graph_button = wx.lib.buttons.GenBitmapButton(panel, |
159 graph_button = wx.lib.buttons.GenBitmapButton(panel, |
153 bitmap=GetBitmap("instance_graph"), |
160 bitmap=GetBitmap("instance_graph"), |
154 size=wx.Size(28, 28), style=wx.NO_BORDER) |
161 size=wx.Size(28, 28), style=wx.NO_BORDER) |