개정판 f7d568a9
issue #563: fix replace table ui, fix instrument run tracing
Change-Id: I42049e51ee717fd8c47cd45af60f2e1c10acd710
DTI_PID/DTI_PID/CustomCodeTables_UI.py | ||
---|---|---|
22 | 22 |
self.gridLayout.setObjectName("gridLayout") |
23 | 23 |
self.horizontalLayout = QtWidgets.QHBoxLayout() |
24 | 24 |
self.horizontalLayout.setObjectName("horizontalLayout") |
25 |
self.checkBoxAllowable = QtWidgets.QCheckBox(CustomCodeTables) |
|
26 |
self.checkBoxAllowable.setObjectName("checkBoxAllowable") |
|
27 |
self.horizontalLayout.addWidget(self.checkBoxAllowable) |
|
28 | 25 |
self.buttonBox = QtWidgets.QDialogButtonBox(CustomCodeTables) |
29 | 26 |
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) |
30 | 27 |
self.buttonBox.setObjectName("buttonBox") |
... | ... | |
64 | 61 |
def retranslateUi(self, CustomCodeTables): |
65 | 62 |
_translate = QtCore.QCoreApplication.translate |
66 | 63 |
CustomCodeTables.setWindowTitle(_translate("CustomCodeTables", "Custom Code Tables")) |
67 |
self.checkBoxAllowable.setText(_translate("CustomCodeTables", "Auto Allowable")) |
|
68 | 64 |
self.groupBoxTitleBlock.setTitle(_translate("CustomCodeTables", "Custom Tables")) |
69 | 65 |
self.pushButtonAdd.setText(_translate("CustomCodeTables", "+")) |
70 | 66 |
self.pushButtonDelete.setText(_translate("CustomCodeTables", "-")) |
DTI_PID/DTI_PID/LineNoTracer.py | ||
---|---|---|
1638 | 1638 |
|
1639 | 1639 |
for item in items: |
1640 | 1640 |
if item in connected_items_list: |
1641 |
continue |
|
1641 |
matches = [conn.connectedItem for conn in item.connectors if conn.connectedItem and conn.connectedItem not in connected_items_list] |
|
1642 |
if matches: |
|
1643 |
connected_items_list.extend(matches) |
|
1644 |
break |
|
1642 | 1645 |
else: |
1643 | 1646 |
matches = [conn for conn in item.connectors if conn.connectedItem and conn.connectedItem in connected_items_list] |
1644 | 1647 |
if matches: |
DTI_PID/DTI_PID/Shapes/EngineeringAbstractItem.py | ||
---|---|---|
357 | 357 |
if key.Attribute == prop: |
358 | 358 |
return value |
359 | 359 |
|
360 |
return '' |
|
361 |
|
|
360 | 362 |
def getAttributes(self, findOwner=False): |
361 | 363 |
"""calculate all attributes of item""" |
362 | 364 |
import re |
DTI_PID/DTI_PID/Shapes/SymbolSvgItem.py | ||
---|---|---|
1992 | 1992 |
""" return new attribute code """ |
1993 | 1993 |
from AppDocData import AppDocData |
1994 | 1994 |
from CodeTables import CodeTable |
1995 |
import re |
|
1995 | 1996 |
|
1996 | 1997 |
try: |
1997 | 1998 |
start_item = None |
... | ... | |
2018 | 2019 |
for value in table.values: |
2019 | 2020 |
if not [attr for attr in value[2] if 'attr(' in attr]: |
2020 | 2021 |
for item in items: |
2021 |
if old_code in value[1] and item.name in value[2]: |
|
2022 |
match = re.search(value[1][0], old_code, re.DOTALL) |
|
2023 |
if (old_code in value[1] or (match and match.start() is 0 and match.end() is len(old_code))) \ |
|
2024 |
and item.name in value[2]: |
|
2022 | 2025 |
dx = item.origin[0] - self.origin[0] |
2023 | 2026 |
dy = item.origin[1] - self.origin[1] |
2024 | 2027 |
length = math.sqrt(dx*dx + dy*dy) |
... | ... | |
2030 | 2033 |
new_codes.append([0, value[3]]) |
2031 | 2034 |
elif len(value[2]) == 2: |
2032 | 2035 |
for item in items: |
2033 |
if old_code in value[1] and item.name in value[2]: |
|
2036 |
match = re.search(value[1][0], old_code, re.DOTALL) |
|
2037 |
if (old_code in value[1] or (match and match.start() is 0 and match.end() is len(old_code))) \ |
|
2038 |
and item.name in value[2]: |
|
2034 | 2039 |
dx = item.origin[0] - self.origin[0] |
2035 | 2040 |
dy = item.origin[1] - self.origin[1] |
2036 | 2041 |
length = math.sqrt(dx*dx + dy*dy) |
DTI_PID/DTI_PID/UI/CustomCodeTables.ui | ||
---|---|---|
26 | 26 |
<item row="2" column="0"> |
27 | 27 |
<layout class="QHBoxLayout" name="horizontalLayout"> |
28 | 28 |
<item> |
29 |
<widget class="QCheckBox" name="checkBoxAllowable"> |
|
30 |
<property name="text"> |
|
31 |
<string>Auto Allowable</string> |
|
32 |
</property> |
|
33 |
</widget> |
|
34 |
</item> |
|
35 |
<item> |
|
36 | 29 |
<widget class="QDialogButtonBox" name="buttonBox"> |
37 | 30 |
<property name="standardButtons"> |
38 | 31 |
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> |
내보내기 Unified diff