equal
deleted
inserted
replaced
1 #!/usr/bin/env python |
1 #!/usr/bin/env python |
2 # -*- coding: utf-8 -*- |
2 # -*- coding: utf-8 -*- |
3 # This file is part of Beremiz |
3 # This file is part of Beremiz |
4 # See COPYING file for copyrights details. |
4 # See COPYING file for copyrights details. |
5 |
5 |
6 from __future__ import absolute_import |
6 |
7 from util.TranslationCatalogs import NoTranslate |
7 from util.TranslationCatalogs import NoTranslate |
8 _ = NoTranslate |
8 _ = NoTranslate |
9 |
9 |
10 ITEMS_EDITABLE = [ |
10 ITEMS_EDITABLE = [ |
11 ITEM_PROJECT, |
11 ITEM_PROJECT, |
14 ITEM_TRANSITION, |
14 ITEM_TRANSITION, |
15 ITEM_ACTION, |
15 ITEM_ACTION, |
16 ITEM_CONFIGURATION, |
16 ITEM_CONFIGURATION, |
17 ITEM_RESOURCE, |
17 ITEM_RESOURCE, |
18 ITEM_DATATYPE |
18 ITEM_DATATYPE |
19 ] = range(8) |
19 ] = list(range(8)) |
20 |
20 |
21 ITEMS_UNEDITABLE = [ |
21 ITEMS_UNEDITABLE = [ |
22 ITEM_DATATYPES, |
22 ITEM_DATATYPES, |
23 ITEM_FUNCTION, |
23 ITEM_FUNCTION, |
24 ITEM_FUNCTIONBLOCK, |
24 ITEM_FUNCTIONBLOCK, |
26 ITEM_TRANSITIONS, |
26 ITEM_TRANSITIONS, |
27 ITEM_ACTIONS, |
27 ITEM_ACTIONS, |
28 ITEM_CONFIGURATIONS, |
28 ITEM_CONFIGURATIONS, |
29 ITEM_RESOURCES, |
29 ITEM_RESOURCES, |
30 ITEM_PROPERTIES |
30 ITEM_PROPERTIES |
31 ] = range(8, 17) |
31 ] = list(range(8, 17)) |
32 |
32 |
33 ITEMS_VARIABLE = [ |
33 ITEMS_VARIABLE = [ |
34 ITEM_VAR_LOCAL, |
34 ITEM_VAR_LOCAL, |
35 ITEM_VAR_GLOBAL, |
35 ITEM_VAR_GLOBAL, |
36 ITEM_VAR_EXTERNAL, |
36 ITEM_VAR_EXTERNAL, |
37 ITEM_VAR_TEMP, |
37 ITEM_VAR_TEMP, |
38 ITEM_VAR_INPUT, |
38 ITEM_VAR_INPUT, |
39 ITEM_VAR_OUTPUT, |
39 ITEM_VAR_OUTPUT, |
40 ITEM_VAR_INOUT |
40 ITEM_VAR_INOUT |
41 ] = range(17, 24) |
41 ] = list(range(17, 24)) |
42 |
42 |
43 ITEM_CONFNODE = 25 |
43 ITEM_CONFNODE = 25 |
44 |
44 |
45 VAR_CLASS_INFOS = { |
45 VAR_CLASS_INFOS = { |
46 "Local": ("localVars", ITEM_VAR_LOCAL), |
46 "Local": ("localVars", ITEM_VAR_LOCAL), |
68 LOCATIONS_ITEMS = [LOCATION_CONFNODE, |
68 LOCATIONS_ITEMS = [LOCATION_CONFNODE, |
69 LOCATION_MODULE, |
69 LOCATION_MODULE, |
70 LOCATION_GROUP, |
70 LOCATION_GROUP, |
71 LOCATION_VAR_INPUT, |
71 LOCATION_VAR_INPUT, |
72 LOCATION_VAR_OUTPUT, |
72 LOCATION_VAR_OUTPUT, |
73 LOCATION_VAR_MEMORY] = range(6) |
73 LOCATION_VAR_MEMORY] = list(range(6)) |
74 |
74 |
75 UNEDITABLE_NAMES = [_("User-defined POUs"), _("Functions"), _("Function Blocks"), |
75 UNEDITABLE_NAMES = [_("User-defined POUs"), _("Functions"), _("Function Blocks"), |
76 _("Programs"), _("Data Types"), _("Transitions"), _("Actions"), |
76 _("Programs"), _("Data Types"), _("Transitions"), _("Actions"), |
77 _("Configurations"), _("Resources"), _("Properties")] |
77 _("Configurations"), _("Resources"), _("Properties")] |
78 |
78 |