36 from CustomGrid import CustomGrid |
36 from CustomGrid import CustomGrid |
37 from CustomTable import CustomTable |
37 from CustomTable import CustomTable |
38 from LocationCellEditor import LocationCellEditor |
38 from LocationCellEditor import LocationCellEditor |
39 from util.BitmapLibrary import GetBitmap |
39 from util.BitmapLibrary import GetBitmap |
40 from PLCControler import _VariableInfos |
40 from PLCControler import _VariableInfos |
41 |
41 from util.TranslationCatalogs import NoTranslate |
42 #------------------------------------------------------------------------------- |
42 #------------------------------------------------------------------------------- |
43 # Helpers |
43 # Helpers |
44 #------------------------------------------------------------------------------- |
44 #------------------------------------------------------------------------------- |
45 |
45 |
46 [TITLE, EDITORTOOLBAR, FILEMENU, EDITMENU, DISPLAYMENU, PROJECTTREE, |
46 [TITLE, EDITORTOOLBAR, FILEMENU, EDITMENU, DISPLAYMENU, PROJECTTREE, |
47 POUINSTANCEVARIABLESPANEL, LIBRARYTREE, SCALING, PAGETITLES |
47 POUINSTANCEVARIABLESPANEL, LIBRARYTREE, SCALING, PAGETITLES |
48 ] = range(10) |
48 ] = range(10) |
49 |
49 |
50 |
50 |
51 def GetVariableTableColnames(location): |
51 def GetVariableTableColnames(location): |
52 _ = lambda x: x |
52 _ = NoTranslate |
53 if location: |
53 if location: |
54 return ["#", _("Name"), _("Class"), _("Type"), _("Location"), _("Initial Value"), _("Option"), _("Documentation")] |
54 return ["#", _("Name"), _("Class"), _("Type"), _("Location"), _("Initial Value"), _("Option"), _("Documentation")] |
55 return ["#", _("Name"), _("Class"), _("Type"), _("Initial Value"), _("Option"), _("Documentation")] |
55 return ["#", _("Name"), _("Class"), _("Type"), _("Initial Value"), _("Option"), _("Documentation")] |
56 |
56 |
57 |
57 |
58 def GetOptions(constant=True, retain=True, non_retain=True): |
58 def GetOptions(constant=True, retain=True, non_retain=True): |
59 _ = lambda x: x |
59 _ = NoTranslate |
60 options = [""] |
60 options = [""] |
61 if constant: |
61 if constant: |
62 options.append(_("Constant")) |
62 options.append(_("Constant")) |
63 if retain: |
63 if retain: |
64 options.append(_("Retain")) |
64 options.append(_("Retain")) |
69 |
69 |
70 OPTIONS_DICT = dict([(_(option), option) for option in GetOptions()]) |
70 OPTIONS_DICT = dict([(_(option), option) for option in GetOptions()]) |
71 |
71 |
72 |
72 |
73 def GetFilterChoiceTransfer(): |
73 def GetFilterChoiceTransfer(): |
74 _ = lambda x: x |
74 _ = NoTranslate |
75 return {_("All"): _("All"), _("Interface"): _("Interface"), |
75 return {_("All"): _("All"), _("Interface"): _("Interface"), |
76 _(" Input"): _("Input"), _(" Output"): _("Output"), _(" InOut"): _("InOut"), |
76 _(" Input"): _("Input"), _(" Output"): _("Output"), _(" InOut"): _("InOut"), |
77 _(" External"): _("External"), _("Variables"): _("Variables"), _(" Local"): _("Local"), |
77 _(" External"): _("External"), _("Variables"): _("Variables"), _(" Local"): _("Local"), |
78 _(" Temp"): _("Temp"), _("Global"): _("Global")} # , _("Access") : _("Access")} |
78 _(" Temp"): _("Temp"), _("Global"): _("Global")} # , _("Access") : _("Access")} |
79 |
79 |