개정판 4d0869ef
issue #663: instrument recognition on going
Change-Id: I278072f127eca25da2cbf8a712e494fc8a03bb3d
DTI_PID/DTI_PID/ConfigurationDialog.py | ||
---|---|---|
478 | 478 |
else: |
479 | 479 |
self.ui.radioButtonOCRLocal.setChecked(True) |
480 | 480 |
self.ui.radioButtonOCRServer.setChecked(False) |
481 |
configs = docData.getConfigs('Project', 'Operation') |
|
482 |
if configs: |
|
483 |
size = int(configs[0].value) |
|
484 |
self.ui.radioButtonOpModeGenenal.setChecked(True if size == 1 else False) |
|
485 |
self.ui.radioButtonOpModeInst.setChecked(True if size == -1 else False) |
|
486 |
else: |
|
487 |
self.ui.radioButtonOpModeGenenal.setChecked(True) |
|
488 |
self.ui.radioButtonOpModeInst.setChecked(False) |
|
481 | 489 |
|
482 | 490 |
# connect signals and slots |
483 | 491 |
self.ui.pushButtonAddProperty.clicked.connect(self.addLineProperty) |
... | ... | |
1124 | 1132 |
configs.append(Config('Engine', 'Text Area', '1' if self.ui.radioButtonTextAreaLocal.isChecked() else '-1')) |
1125 | 1133 |
configs.append(Config('Engine', 'Symbol', '1' if self.ui.radioButtonSymbolLocal.isChecked() else '-1')) |
1126 | 1134 |
configs.append(Config('Engine', 'OCR', '1' if self.ui.radioButtonOCRLocal.isChecked() else '-1')) |
1135 |
configs.append(Config('Project', 'Operation', '1' if self.ui.radioButtonOpModeGenenal.isChecked() else '-1')) |
|
1127 | 1136 |
|
1128 | 1137 |
docData.saveConfigs(configs) |
1129 | 1138 |
docData.updateProjectUnit('Imperial' if self.ui.radioButtonSizeUnitImaperial.isChecked() else 'Metric') |
DTI_PID/DTI_PID/Configuration_UI.py | ||
---|---|---|
675 | 675 |
self.gridLayout_22.setObjectName("gridLayout_22") |
676 | 676 |
self.gridLayout_21 = QtWidgets.QGridLayout() |
677 | 677 |
self.gridLayout_21.setObjectName("gridLayout_21") |
678 |
self.groupBox_12 = QtWidgets.QGroupBox(self.tabETC) |
|
679 |
self.groupBox_12.setObjectName("groupBox_12") |
|
680 |
self.gridLayout_24 = QtWidgets.QGridLayout(self.groupBox_12) |
|
681 |
self.gridLayout_24.setObjectName("gridLayout_24") |
|
682 |
self.gridLayout_32 = QtWidgets.QGridLayout() |
|
683 |
self.gridLayout_32.setObjectName("gridLayout_32") |
|
684 |
spacerItem6 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) |
|
685 |
self.gridLayout_32.addItem(spacerItem6, 0, 2, 1, 1) |
|
686 |
self.label_36 = QtWidgets.QLabel(self.groupBox_12) |
|
687 |
self.label_36.setMinimumSize(QtCore.QSize(200, 0)) |
|
688 |
self.label_36.setObjectName("label_36") |
|
689 |
self.gridLayout_32.addWidget(self.label_36, 0, 0, 1, 1) |
|
690 |
self.horizontalLayout_5 = QtWidgets.QHBoxLayout() |
|
691 |
self.horizontalLayout_5.setObjectName("horizontalLayout_5") |
|
692 |
self.radioButtonBackTextYes = QtWidgets.QRadioButton(self.groupBox_12) |
|
693 |
self.radioButtonBackTextYes.setObjectName("radioButtonBackTextYes") |
|
694 |
self.buttonGroup_4 = QtWidgets.QButtonGroup(ConfigurationDialog) |
|
695 |
self.buttonGroup_4.setObjectName("buttonGroup_4") |
|
696 |
self.buttonGroup_4.addButton(self.radioButtonBackTextYes) |
|
697 |
self.horizontalLayout_5.addWidget(self.radioButtonBackTextYes) |
|
698 |
self.radioButtonBackTextNo = QtWidgets.QRadioButton(self.groupBox_12) |
|
699 |
self.radioButtonBackTextNo.setObjectName("radioButtonBackTextNo") |
|
700 |
self.buttonGroup_4.addButton(self.radioButtonBackTextNo) |
|
701 |
self.horizontalLayout_5.addWidget(self.radioButtonBackTextNo) |
|
702 |
self.gridLayout_32.addLayout(self.horizontalLayout_5, 0, 1, 1, 1) |
|
703 |
self.gridLayout_24.addLayout(self.gridLayout_32, 0, 0, 1, 1) |
|
704 |
self.gridLayout_21.addWidget(self.groupBox_12, 1, 0, 1, 1) |
|
705 | 678 |
self.groupBox_11 = QtWidgets.QGroupBox(self.tabETC) |
706 | 679 |
self.groupBox_11.setObjectName("groupBox_11") |
707 | 680 |
self.gridLayout_23 = QtWidgets.QGridLayout(self.groupBox_11) |
... | ... | |
730 | 703 |
self.label_34 = QtWidgets.QLabel(self.groupBox_11) |
731 | 704 |
self.label_34.setObjectName("label_34") |
732 | 705 |
self.gridLayout_31.addWidget(self.label_34, 2, 0, 1, 1) |
733 |
spacerItem7 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
|
734 |
self.gridLayout_31.addItem(spacerItem7, 1, 2, 1, 1)
|
|
706 |
spacerItem6 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
|
|
707 |
self.gridLayout_31.addItem(spacerItem6, 1, 2, 1, 1)
|
|
735 | 708 |
self.label_30 = QtWidgets.QLabel(self.groupBox_11) |
736 | 709 |
self.label_30.setObjectName("label_30") |
737 | 710 |
self.gridLayout_31.addWidget(self.label_30, 1, 0, 1, 1) |
... | ... | |
767 | 740 |
self.gridLayout_31.addWidget(self.spinBoxSaveAlarm, 0, 1, 1, 1) |
768 | 741 |
self.gridLayout_23.addLayout(self.gridLayout_31, 0, 0, 1, 1) |
769 | 742 |
self.gridLayout_21.addWidget(self.groupBox_11, 0, 0, 1, 1) |
743 |
self.groupBox_12 = QtWidgets.QGroupBox(self.tabETC) |
|
744 |
self.groupBox_12.setObjectName("groupBox_12") |
|
745 |
self.gridLayout_24 = QtWidgets.QGridLayout(self.groupBox_12) |
|
746 |
self.gridLayout_24.setObjectName("gridLayout_24") |
|
747 |
self.gridLayout_32 = QtWidgets.QGridLayout() |
|
748 |
self.gridLayout_32.setObjectName("gridLayout_32") |
|
749 |
spacerItem7 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) |
|
750 |
self.gridLayout_32.addItem(spacerItem7, 0, 2, 1, 1) |
|
751 |
self.label_36 = QtWidgets.QLabel(self.groupBox_12) |
|
752 |
self.label_36.setMinimumSize(QtCore.QSize(200, 0)) |
|
753 |
self.label_36.setObjectName("label_36") |
|
754 |
self.gridLayout_32.addWidget(self.label_36, 0, 0, 1, 1) |
|
755 |
self.horizontalLayout_5 = QtWidgets.QHBoxLayout() |
|
756 |
self.horizontalLayout_5.setObjectName("horizontalLayout_5") |
|
757 |
self.radioButtonBackTextYes = QtWidgets.QRadioButton(self.groupBox_12) |
|
758 |
self.radioButtonBackTextYes.setObjectName("radioButtonBackTextYes") |
|
759 |
self.buttonGroup_4 = QtWidgets.QButtonGroup(ConfigurationDialog) |
|
760 |
self.buttonGroup_4.setObjectName("buttonGroup_4") |
|
761 |
self.buttonGroup_4.addButton(self.radioButtonBackTextYes) |
|
762 |
self.horizontalLayout_5.addWidget(self.radioButtonBackTextYes) |
|
763 |
self.radioButtonBackTextNo = QtWidgets.QRadioButton(self.groupBox_12) |
|
764 |
self.radioButtonBackTextNo.setObjectName("radioButtonBackTextNo") |
|
765 |
self.buttonGroup_4.addButton(self.radioButtonBackTextNo) |
|
766 |
self.horizontalLayout_5.addWidget(self.radioButtonBackTextNo) |
|
767 |
self.gridLayout_32.addLayout(self.horizontalLayout_5, 0, 1, 1, 1) |
|
768 |
self.gridLayout_24.addLayout(self.gridLayout_32, 0, 0, 1, 1) |
|
769 |
self.gridLayout_21.addWidget(self.groupBox_12, 1, 0, 1, 1) |
|
770 | 770 |
self.groupBox_13 = QtWidgets.QGroupBox(self.tabETC) |
771 | 771 |
self.groupBox_13.setObjectName("groupBox_13") |
772 | 772 |
self.gridLayout_38 = QtWidgets.QGridLayout(self.groupBox_13) |
... | ... | |
831 | 831 |
self.gridLayout_37.addLayout(self.horizontalLayout_9, 2, 1, 1, 1) |
832 | 832 |
self.gridLayout_38.addLayout(self.gridLayout_37, 0, 0, 1, 1) |
833 | 833 |
self.gridLayout_21.addWidget(self.groupBox_13, 2, 0, 1, 1) |
834 |
self.groupBox_14 = QtWidgets.QGroupBox(self.tabETC) |
|
835 |
self.groupBox_14.setObjectName("groupBox_14") |
|
836 |
self.gridLayout_41 = QtWidgets.QGridLayout(self.groupBox_14) |
|
837 |
self.gridLayout_41.setObjectName("gridLayout_41") |
|
838 |
self.gridLayout_36 = QtWidgets.QGridLayout() |
|
839 |
self.gridLayout_36.setObjectName("gridLayout_36") |
|
840 |
self.label_55 = QtWidgets.QLabel(self.groupBox_14) |
|
841 |
self.label_55.setMinimumSize(QtCore.QSize(200, 0)) |
|
842 |
self.label_55.setObjectName("label_55") |
|
843 |
self.gridLayout_36.addWidget(self.label_55, 0, 0, 1, 1) |
|
844 |
spacerItem9 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) |
|
845 |
self.gridLayout_36.addItem(spacerItem9, 0, 2, 1, 1) |
|
846 |
self.horizontalLayout_12 = QtWidgets.QHBoxLayout() |
|
847 |
self.horizontalLayout_12.setObjectName("horizontalLayout_12") |
|
848 |
self.radioButtonOpModeGenenal = QtWidgets.QRadioButton(self.groupBox_14) |
|
849 |
self.radioButtonOpModeGenenal.setObjectName("radioButtonOpModeGenenal") |
|
850 |
self.horizontalLayout_12.addWidget(self.radioButtonOpModeGenenal) |
|
851 |
self.radioButtonOpModeInst = QtWidgets.QRadioButton(self.groupBox_14) |
|
852 |
self.radioButtonOpModeInst.setObjectName("radioButtonOpModeInst") |
|
853 |
self.horizontalLayout_12.addWidget(self.radioButtonOpModeInst) |
|
854 |
self.gridLayout_36.addLayout(self.horizontalLayout_12, 0, 1, 1, 1) |
|
855 |
self.gridLayout_41.addLayout(self.gridLayout_36, 0, 0, 1, 1) |
|
856 |
self.gridLayout_21.addWidget(self.groupBox_14, 3, 0, 1, 1) |
|
834 | 857 |
self.gridLayout_22.addLayout(self.gridLayout_21, 0, 0, 1, 1) |
835 |
spacerItem9 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
|
836 |
self.gridLayout_22.addItem(spacerItem9, 3, 0, 1, 1)
|
|
858 |
spacerItem10 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
|
|
859 |
self.gridLayout_22.addItem(spacerItem10, 3, 0, 1, 1)
|
|
837 | 860 |
self.tabWidget.addTab(self.tabETC, "") |
838 | 861 |
self.gridLayout.addWidget(self.tabWidget, 0, 0, 1, 1) |
839 | 862 |
|
... | ... | |
1010 | 1033 |
self.radioButtonProperty.setText(_translate("ConfigurationDialog", "Property")) |
1011 | 1034 |
self.label_25.setText(_translate("ConfigurationDialog", "Color Representation")) |
1012 | 1035 |
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tabLineColor), _translate("ConfigurationDialog", "Line No Color")) |
1013 |
self.groupBox_12.setTitle(_translate("ConfigurationDialog", "Visual")) |
|
1014 |
self.label_36.setText(_translate("ConfigurationDialog", "Background Text Transparency")) |
|
1015 |
self.radioButtonBackTextYes.setText(_translate("ConfigurationDialog", "Yes")) |
|
1016 |
self.radioButtonBackTextNo.setText(_translate("ConfigurationDialog", "No")) |
|
1017 | 1036 |
self.groupBox_11.setTitle(_translate("ConfigurationDialog", "Program Data")) |
1018 | 1037 |
self.radioButtonLoadXmlOnly.setText(_translate("ConfigurationDialog", "XML Only")) |
1019 | 1038 |
self.radioButtonLoadXmlYes.setText(_translate("ConfigurationDialog", "XML Frist")) |
... | ... | |
1025 | 1044 |
self.pushButtonClearAccessInfo.setText(_translate("ConfigurationDialog", "Clear")) |
1026 | 1045 |
self.label_31.setText(_translate("ConfigurationDialog", "Clear Drawing Access Information")) |
1027 | 1046 |
self.label_49.setText(_translate("ConfigurationDialog", "Save Alarm(min)")) |
1047 |
self.groupBox_12.setTitle(_translate("ConfigurationDialog", "Visual")) |
|
1048 |
self.label_36.setText(_translate("ConfigurationDialog", "Background Text Transparency")) |
|
1049 |
self.radioButtonBackTextYes.setText(_translate("ConfigurationDialog", "Yes")) |
|
1050 |
self.radioButtonBackTextNo.setText(_translate("ConfigurationDialog", "No")) |
|
1028 | 1051 |
self.groupBox_13.setTitle(_translate("ConfigurationDialog", "Recognition Engine")) |
1029 | 1052 |
self.radioButtonTextAreaLocal.setText(_translate("ConfigurationDialog", "Local")) |
1030 | 1053 |
self.radioButtonTextAreaServer.setText(_translate("ConfigurationDialog", "Server")) |
... | ... | |
1037 | 1060 |
self.label_51.setText(_translate("ConfigurationDialog", "Symbol")) |
1038 | 1061 |
self.radioButtonSymbolLocal.setText(_translate("ConfigurationDialog", "Local")) |
1039 | 1062 |
self.radioButtonSymbolServer.setText(_translate("ConfigurationDialog", "Server")) |
1063 |
self.groupBox_14.setTitle(_translate("ConfigurationDialog", "Project")) |
|
1064 |
self.label_55.setText(_translate("ConfigurationDialog", "Operation Mode")) |
|
1065 |
self.radioButtonOpModeGenenal.setText(_translate("ConfigurationDialog", "Genenal")) |
|
1066 |
self.radioButtonOpModeInst.setText(_translate("ConfigurationDialog", "Instrument")) |
|
1040 | 1067 |
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tabETC), _translate("ConfigurationDialog", "ETC")) |
1041 | 1068 |
|
1042 | 1069 |
import MainWindow_rc |
DTI_PID/DTI_PID/MainWindow.py | ||
---|---|---|
2411 | 2411 |
self.tableWidgetInconsistency.removeRow(row) |
2412 | 2412 |
break |
2413 | 2413 |
|
2414 |
if item.scene() is not None: item.scene().removeItem(item) |
|
2414 |
if item.scene() is not None: |
|
2415 |
item.scene().removeItem(item) |
|
2415 | 2416 |
del item |
2416 | 2417 |
else: |
2418 |
remove_scene = item.scene() |
|
2417 | 2419 |
self.itemTreeWidget.itemRemoved(item) |
2418 | 2420 |
|
2419 |
matches = [_item for _item in self.graphicsView.scene().items() if
|
|
2421 |
matches = [_item for _item in remove_scene.items() if
|
|
2420 | 2422 |
hasattr(_item, 'connectors') and [connector for connector in _item.connectors if |
2421 | 2423 |
connector.connectedItem is item]] |
2422 | 2424 |
for match in matches: |
... | ... | |
2436 | 2438 |
if type(item) is QEngineeringLineItem and item in app_doc_data.lines: |
2437 | 2439 |
app_doc_data.lines.remove(item) |
2438 | 2440 |
|
2439 |
matches = [_item for _item in self.graphicsView.scene().items() if
|
|
2441 |
matches = [_item for _item in remove_scene.items() if
|
|
2440 | 2442 |
type(_item) is QEngineeringLineNoTextItem] |
2441 | 2443 |
matches.extend([lineNo for lineNo in app_doc_data.tracerLineNos if |
2442 | 2444 |
type(lineNo) is QEngineeringTrimLineNoTextItem]) |
... | ... | |
2457 | 2459 |
app_doc_data.tracerLineNos.pop(app_doc_data.tracerLineNos.index(match)) |
2458 | 2460 |
# break |
2459 | 2461 |
|
2460 |
matches = [_item for _item in self.graphicsView.scene().items() if hasattr(_item, 'owner')]
|
|
2462 |
matches = [_item for _item in remove_scene.items() if hasattr(_item, 'owner')]
|
|
2461 | 2463 |
for match in matches: |
2462 | 2464 |
if match.owner is item: |
2463 | 2465 |
match.owner = None |
2464 | 2466 |
|
2465 |
matches = [_item for _item in self.graphicsView.scene().items() if hasattr(_item, 'attrs')]
|
|
2467 |
matches = [_item for _item in remove_scene.items() if hasattr(_item, 'attrs')]
|
|
2466 | 2468 |
# done = False |
2467 | 2469 |
for match in matches: |
2468 | 2470 |
assocs = match.associations() |
... | ... | |
2482 | 2484 |
message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, |
2483 | 2485 |
sys.exc_info()[-1].tb_lineno) |
2484 | 2486 |
self.addMessage.emit(MessageType.Error, message) |
2487 |
''' |
|
2488 |
finally: |
|
2489 |
if hasattr(item, '_cond'): |
|
2490 |
item._cond.wakeAll() |
|
2491 |
''' |
|
2485 | 2492 |
|
2486 | 2493 |
def connect_attributes(self, MainWindow): |
2487 | 2494 |
"""connect attributes to symbol""" |
DTI_PID/DTI_PID/RecognitionDialog.py | ||
---|---|---|
92 | 92 |
add_predata_to_scene = pyqtSignal(Drawing, QGraphicsScene, bool, bool, bool, bool, bool) |
93 | 93 |
clear_scene = pyqtSignal(QGraphicsScene, QGraphicsScene, QGraphicsScene) |
94 | 94 |
preset_execute = pyqtSignal(QGraphicsScene, str, str, str, str) |
95 |
onRemoved = pyqtSignal(list) |
|
95 | 96 |
|
96 | 97 |
def __init__(self, mutex, cond): |
97 | 98 |
super(Worker, self).__init__() |
... | ... | |
1348 | 1349 |
worker.preset_execute.emit(worker.scene, preset[0], preset[1], preset[2], preset[3]) |
1349 | 1350 |
worker.cond.wait(worker.mutex) |
1350 | 1351 |
|
1352 |
# remove piping line and text for instrument mode |
|
1353 |
try: |
|
1354 |
configs = app_doc_data.getConfigs('Project', 'Operation') |
|
1355 |
instrument = int(configs[0].value) if configs else 1 |
|
1356 |
remove_items = [] |
|
1357 |
if instrument == -1: |
|
1358 |
# remove piping line |
|
1359 |
for line in reversed(app_doc_data.lines): |
|
1360 |
if line.is_piping(True): |
|
1361 |
app_doc_data.lines.remove(line) |
|
1362 |
app_doc_data.allItems.remove(line) |
|
1363 |
remove_items.append(line) |
|
1364 |
''' |
|
1365 |
for item in app_doc_data.lines + app_doc_data.symbols: |
|
1366 |
for conn in item.connectors: |
|
1367 |
if conn.connectedItem is line: |
|
1368 |
conn.connectedItem = None |
|
1369 |
''' |
|
1370 |
|
|
1371 |
# remove text |
|
1372 |
for text in reversed([text for text in app_doc_data.texts if type(text) is QEngineeringTextItem]): |
|
1373 |
contained = False |
|
1374 |
for symbol in app_doc_data.symbols: |
|
1375 |
if symbol.includes([text.sceneBoundingRect().center().x(), text.sceneBoundingRect().center().y()]): |
|
1376 |
contained = True |
|
1377 |
break |
|
1378 |
if not contained: |
|
1379 |
remove_items.append(text) |
|
1380 |
|
|
1381 |
worker.onRemoved.emit(remove_items) |
|
1382 |
worker.cond.wait(worker.mutex) |
|
1383 |
|
|
1384 |
except Exception as ex: |
|
1385 |
message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, |
|
1386 |
sys.exc_info()[-1].tb_lineno) |
|
1387 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
|
1388 |
# up to here |
|
1389 |
|
|
1351 | 1390 |
worker.save_scene.emit(worker.scene) |
1352 | 1391 |
worker.cond.wait(worker.mutex) |
1353 | 1392 |
|
... | ... | |
3428 | 3467 |
self.obj.add_detected_items_to_scene.connect(self.add_detected_items_to_scene) |
3429 | 3468 |
self.obj.save_scene.connect(self.save_scene) |
3430 | 3469 |
self.obj.preset_execute.connect(self.preset_execute) |
3470 |
self.obj.onRemoved.connect(self.onRemoved) |
|
3431 | 3471 |
self.obj.add_predata_to_scene.connect(self.add_predata_to_scene) |
3432 | 3472 |
self.obj.clear_scene.connect(self.clear_scene) |
3433 | 3473 |
|
... | ... | |
3545 | 3585 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
3546 | 3586 |
finally: |
3547 | 3587 |
self.cond.wakeAll() |
3588 |
|
|
3589 |
def onRemoved(self, items): |
|
3590 |
""" run preset """ |
|
3591 |
from App import App |
|
3592 |
|
|
3593 |
try: |
|
3594 |
for item in items: |
|
3595 |
item.transfer.onRemoved.emit(item) |
|
3596 |
|
|
3597 |
except Exception as ex: |
|
3598 |
message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, |
|
3599 |
sys.exc_info()[-1].tb_lineno) |
|
3600 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
|
3601 |
finally: |
|
3602 |
pass |
|
3603 |
#self.cond.wakeAll() |
|
3548 | 3604 |
|
3549 | 3605 |
def preset_execute(self, scene, find_symbol, replace_symbol, replace_action, condition): |
3550 | 3606 |
""" run preset """ |
... | ... | |
3625 | 3681 |
conn.transfer.onPosChanged.connect(line.onConnectorPosChaned) |
3626 | 3682 |
|
3627 | 3683 |
# insert flange |
3628 |
configs = app_doc_data.getConfigs('Default', 'Flange') |
|
3629 |
flange_name = configs[0].value if 1 == len(configs) else 'flange' |
|
3630 |
for flange in flanges: |
|
3631 |
svg = QtImageViewer.createSymbolObject(flange_name) |
|
3632 |
if svg: |
|
3633 |
QtImageViewer.matchSymbolToLine(scene, svg, QPointF(flange[0], flange[1]), strict=True, auto=True) |
|
3634 |
|
|
3635 |
for unknown in app_doc_data.unknowns + app_doc_data.lineIndicators: |
|
3636 |
scene.addItem(unknown) |
|
3684 |
configs = app_doc_data.getConfigs('Project', 'Operation') |
|
3685 |
instrument = int(configs[0].value) if configs else 1 |
|
3686 |
if instrument == 1: |
|
3687 |
configs = app_doc_data.getConfigs('Default', 'Flange') |
|
3688 |
flange_name = configs[0].value if 1 == len(configs) else 'flange' |
|
3689 |
for flange in flanges: |
|
3690 |
svg = QtImageViewer.createSymbolObject(flange_name) |
|
3691 |
if svg: |
|
3692 |
QtImageViewer.matchSymbolToLine(scene, svg, QPointF(flange[0], flange[1]), strict=True, auto=True) |
|
3693 |
|
|
3694 |
for unknown in app_doc_data.unknowns + app_doc_data.lineIndicators: |
|
3695 |
scene.addItem(unknown) |
|
3637 | 3696 |
|
3638 | 3697 |
except Exception as ex: |
3639 | 3698 |
message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, |
DTI_PID/DTI_PID/UI/Configuration.ui | ||
---|---|---|
1423 | 1423 |
<layout class="QGridLayout" name="gridLayout_22"> |
1424 | 1424 |
<item row="0" column="0"> |
1425 | 1425 |
<layout class="QGridLayout" name="gridLayout_21"> |
1426 |
<item row="1" column="0"> |
|
1427 |
<widget class="QGroupBox" name="groupBox_12"> |
|
1428 |
<property name="title"> |
|
1429 |
<string>Visual</string> |
|
1430 |
</property> |
|
1431 |
<layout class="QGridLayout" name="gridLayout_24"> |
|
1432 |
<item row="0" column="0"> |
|
1433 |
<layout class="QGridLayout" name="gridLayout_32"> |
|
1434 |
<item row="0" column="2"> |
|
1435 |
<spacer name="horizontalSpacer_4"> |
|
1436 |
<property name="orientation"> |
|
1437 |
<enum>Qt::Horizontal</enum> |
|
1438 |
</property> |
|
1439 |
<property name="sizeHint" stdset="0"> |
|
1440 |
<size> |
|
1441 |
<width>40</width> |
|
1442 |
<height>20</height> |
|
1443 |
</size> |
|
1444 |
</property> |
|
1445 |
</spacer> |
|
1446 |
</item> |
|
1447 |
<item row="0" column="0"> |
|
1448 |
<widget class="QLabel" name="label_36"> |
|
1449 |
<property name="minimumSize"> |
|
1450 |
<size> |
|
1451 |
<width>200</width> |
|
1452 |
<height>0</height> |
|
1453 |
</size> |
|
1454 |
</property> |
|
1455 |
<property name="text"> |
|
1456 |
<string>Background Text Transparency</string> |
|
1457 |
</property> |
|
1458 |
</widget> |
|
1459 |
</item> |
|
1460 |
<item row="0" column="1"> |
|
1461 |
<layout class="QHBoxLayout" name="horizontalLayout_5"> |
|
1462 |
<item> |
|
1463 |
<widget class="QRadioButton" name="radioButtonBackTextYes"> |
|
1464 |
<property name="text"> |
|
1465 |
<string>Yes</string> |
|
1466 |
</property> |
|
1467 |
<attribute name="buttonGroup"> |
|
1468 |
<string notr="true">buttonGroup_4</string> |
|
1469 |
</attribute> |
|
1470 |
</widget> |
|
1471 |
</item> |
|
1472 |
<item> |
|
1473 |
<widget class="QRadioButton" name="radioButtonBackTextNo"> |
|
1474 |
<property name="text"> |
|
1475 |
<string>No</string> |
|
1476 |
</property> |
|
1477 |
<attribute name="buttonGroup"> |
|
1478 |
<string notr="true">buttonGroup_4</string> |
|
1479 |
</attribute> |
|
1480 |
</widget> |
|
1481 |
</item> |
|
1482 |
</layout> |
|
1483 |
</item> |
|
1484 |
</layout> |
|
1485 |
</item> |
|
1486 |
</layout> |
|
1487 |
</widget> |
|
1488 |
</item> |
|
1489 | 1426 |
<item row="0" column="0"> |
1490 | 1427 |
<widget class="QGroupBox" name="groupBox_11"> |
1491 | 1428 |
<property name="title"> |
... | ... | |
1633 | 1570 |
</layout> |
1634 | 1571 |
</widget> |
1635 | 1572 |
</item> |
1573 |
<item row="1" column="0"> |
|
1574 |
<widget class="QGroupBox" name="groupBox_12"> |
|
1575 |
<property name="title"> |
|
1576 |
<string>Visual</string> |
|
1577 |
</property> |
|
1578 |
<layout class="QGridLayout" name="gridLayout_24"> |
|
1579 |
<item row="0" column="0"> |
|
1580 |
<layout class="QGridLayout" name="gridLayout_32"> |
|
1581 |
<item row="0" column="2"> |
|
1582 |
<spacer name="horizontalSpacer_4"> |
|
1583 |
<property name="orientation"> |
|
1584 |
<enum>Qt::Horizontal</enum> |
|
1585 |
</property> |
|
1586 |
<property name="sizeHint" stdset="0"> |
|
1587 |
<size> |
|
1588 |
<width>40</width> |
|
1589 |
<height>20</height> |
|
1590 |
</size> |
|
1591 |
</property> |
|
1592 |
</spacer> |
|
1593 |
</item> |
|
1594 |
<item row="0" column="0"> |
|
1595 |
<widget class="QLabel" name="label_36"> |
|
1596 |
<property name="minimumSize"> |
|
1597 |
<size> |
|
1598 |
<width>200</width> |
|
1599 |
<height>0</height> |
|
1600 |
</size> |
|
1601 |
</property> |
|
1602 |
<property name="text"> |
|
1603 |
<string>Background Text Transparency</string> |
|
1604 |
</property> |
|
1605 |
</widget> |
|
1606 |
</item> |
|
1607 |
<item row="0" column="1"> |
|
1608 |
<layout class="QHBoxLayout" name="horizontalLayout_5"> |
|
1609 |
<item> |
|
1610 |
<widget class="QRadioButton" name="radioButtonBackTextYes"> |
|
1611 |
<property name="text"> |
|
1612 |
<string>Yes</string> |
|
1613 |
</property> |
|
1614 |
<attribute name="buttonGroup"> |
|
1615 |
<string notr="true">buttonGroup_4</string> |
|
1616 |
</attribute> |
|
1617 |
</widget> |
|
1618 |
</item> |
|
1619 |
<item> |
|
1620 |
<widget class="QRadioButton" name="radioButtonBackTextNo"> |
|
1621 |
<property name="text"> |
|
1622 |
<string>No</string> |
|
1623 |
</property> |
|
1624 |
<attribute name="buttonGroup"> |
|
1625 |
<string notr="true">buttonGroup_4</string> |
|
1626 |
</attribute> |
|
1627 |
</widget> |
|
1628 |
</item> |
|
1629 |
</layout> |
|
1630 |
</item> |
|
1631 |
</layout> |
|
1632 |
</item> |
|
1633 |
</layout> |
|
1634 |
</widget> |
|
1635 |
</item> |
|
1636 | 1636 |
<item row="2" column="0"> |
1637 | 1637 |
<widget class="QGroupBox" name="groupBox_13"> |
1638 | 1638 |
<property name="title"> |
... | ... | |
1769 | 1769 |
</layout> |
1770 | 1770 |
</widget> |
1771 | 1771 |
</item> |
1772 |
<item row="3" column="0"> |
|
1773 |
<widget class="QGroupBox" name="groupBox_14"> |
|
1774 |
<property name="title"> |
|
1775 |
<string>Project</string> |
|
1776 |
</property> |
|
1777 |
<layout class="QGridLayout" name="gridLayout_41"> |
|
1778 |
<item row="0" column="0"> |
|
1779 |
<layout class="QGridLayout" name="gridLayout_36"> |
|
1780 |
<item row="0" column="0"> |
|
1781 |
<widget class="QLabel" name="label_55"> |
|
1782 |
<property name="minimumSize"> |
|
1783 |
<size> |
|
1784 |
<width>200</width> |
|
1785 |
<height>0</height> |
|
1786 |
</size> |
|
1787 |
</property> |
|
1788 |
<property name="text"> |
|
1789 |
<string>Operation Mode</string> |
|
1790 |
</property> |
|
1791 |
</widget> |
|
1792 |
</item> |
|
1793 |
<item row="0" column="2"> |
|
1794 |
<spacer name="horizontalSpacer_9"> |
|
1795 |
<property name="orientation"> |
|
1796 |
<enum>Qt::Horizontal</enum> |
|
1797 |
</property> |
|
1798 |
<property name="sizeHint" stdset="0"> |
|
1799 |
<size> |
|
1800 |
<width>40</width> |
|
1801 |
<height>20</height> |
|
1802 |
</size> |
|
1803 |
</property> |
|
1804 |
</spacer> |
|
1805 |
</item> |
|
1806 |
<item row="0" column="1"> |
|
1807 |
<layout class="QHBoxLayout" name="horizontalLayout_12"> |
|
1808 |
<item> |
|
1809 |
<widget class="QRadioButton" name="radioButtonOpModeGenenal"> |
|
1810 |
<property name="text"> |
|
1811 |
<string>Genenal</string> |
|
1812 |
</property> |
|
1813 |
</widget> |
|
1814 |
</item> |
|
1815 |
<item> |
|
1816 |
<widget class="QRadioButton" name="radioButtonOpModeInst"> |
|
1817 |
<property name="text"> |
|
1818 |
<string>Instrument</string> |
|
1819 |
</property> |
|
1820 |
</widget> |
|
1821 |
</item> |
|
1822 |
</layout> |
|
1823 |
</item> |
|
1824 |
</layout> |
|
1825 |
</item> |
|
1826 |
</layout> |
|
1827 |
</widget> |
|
1828 |
</item> |
|
1772 | 1829 |
</layout> |
1773 | 1830 |
</item> |
1774 | 1831 |
<item row="3" column="0"> |
내보내기 Unified diff