개정판 bda81ed4
issue #000: add validation check to connect attrib
Change-Id: Ice53988b9cbbe713e62e5f8e31ac0074f52979c3
DTI_PID/DTI_PID/ConnectAttrDialog.py | ||
---|---|---|
66 | 66 |
self.ui.pushButtonStart.setFocus() |
67 | 67 |
self.ui.buttonBox.setEnabled(True) |
68 | 68 |
self.ui.listWidget.model().rowsInserted.connect(self.rowInserted) ## connect to func rowInserted(self, item) |
69 |
self.isAccepted = False
|
|
69 |
self.isRunned = False
|
|
70 | 70 |
|
71 | 71 |
self.ui.pushButtonStart.clicked.connect(self.connStart) |
72 | 72 |
|
... | ... | |
80 | 80 |
self.ui.pushButtonStart.setEnabled(False) |
81 | 81 |
self.ui.progressBar.setValue(0) |
82 | 82 |
self.startThread() |
83 |
self.isRunned = True |
|
83 | 84 |
""" for DEBUG |
84 | 85 |
from LineNoTracer import connectAttrImpl |
85 | 86 |
connectAttrImpl(self) |
... | ... | |
102 | 103 |
def addListItem(self, msg): |
103 | 104 |
self.ui.listWidget.addItem(msg) |
104 | 105 |
|
105 |
def accept(self): |
|
106 |
self.isAccepted = True |
|
107 |
QDialog.accept(self) |
|
108 |
|
|
109 | 106 |
''' |
110 | 107 |
@brief update progressbar with given value |
111 | 108 |
@author humkyung |
DTI_PID/DTI_PID/ConnectAttr_UI.py | ||
---|---|---|
1 | 1 |
# -*- coding: utf-8 -*- |
2 | 2 |
|
3 |
# Form implementation generated from reading ui file '.\UI\dlgConnectAttr.ui'
|
|
3 |
# Form implementation generated from reading ui file './UI/dlgConnectAttr.ui'
|
|
4 | 4 |
# |
5 | 5 |
# Created by: PyQt5 UI code generator 5.11.3 |
6 | 6 |
# |
... | ... | |
27 | 27 |
self.progressBar.setProperty("value", 0) |
28 | 28 |
self.progressBar.setObjectName("progressBar") |
29 | 29 |
self.horizontalLayout.addWidget(self.progressBar) |
30 |
self.checkBoxValidation = QtWidgets.QCheckBox(ConnectAttr) |
|
31 |
self.checkBoxValidation.setObjectName("checkBoxValidation") |
|
32 |
self.horizontalLayout.addWidget(self.checkBoxValidation) |
|
30 | 33 |
self.buttonBox = QtWidgets.QDialogButtonBox(ConnectAttr) |
31 | 34 |
self.buttonBox.setEnabled(False) |
32 | 35 |
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) |
... | ... | |
64 | 67 |
def retranslateUi(self, ConnectAttr): |
65 | 68 |
_translate = QtCore.QCoreApplication.translate |
66 | 69 |
ConnectAttr.setWindowTitle(_translate("ConnectAttr", "Connect Attribute")) |
70 |
self.checkBoxValidation.setText(_translate("ConnectAttr", "Close with Validation Check")) |
|
67 | 71 |
self.checkBoxUpdateLineType.setText(_translate("ConnectAttr", "Update Line Type")) |
68 | 72 |
self.pushButtonStart.setText(_translate("ConnectAttr", "Start")) |
69 | 73 |
|
74 |
|
|
75 |
if __name__ == "__main__": |
|
76 |
import sys |
|
77 |
app = QtWidgets.QApplication(sys.argv) |
|
78 |
ConnectAttr = QtWidgets.QDialog() |
|
79 |
ui = Ui_ConnectAttr() |
|
80 |
ui.setupUi(ConnectAttr) |
|
81 |
ConnectAttr.show() |
|
82 |
sys.exit(app.exec_()) |
|
83 |
|
DTI_PID/DTI_PID/LineNoTracer.py | ||
---|---|---|
395 | 395 |
notes = [] |
396 | 396 |
#flow_marks = [] |
397 | 397 |
|
398 |
for error_item in [item for item in worker.graphicsView.scene.items() if type(item) is QEngineeringErrorItem]: |
|
399 |
error_item.transfer.onRemoved.emit(error_item) |
|
400 |
|
|
398 | 401 |
for end_break in [item for item in worker.graphicsView.scene.items() if type(item) is QEngineeringEndBreakItem]: |
399 | 402 |
if not end_break.prop('Freeze'): |
400 | 403 |
end_break.transfer.onRemoved.emit(end_break) |
DTI_PID/DTI_PID/MainWindow.py | ||
---|---|---|
1721 | 1721 |
|
1722 | 1722 |
try: |
1723 | 1723 |
self.dlgConnectAttr = QConnectAttrDialog(self, self.graphicsView) |
1724 |
if QDialog.Accepted == self.dlgConnectAttr.exec_(): |
|
1724 |
self.dlgConnectAttr.exec_() |
|
1725 |
if self.dlgConnectAttr.isRunned: |
|
1725 | 1726 |
self.itemTreeWidget.InitLineNoItems() |
1726 | 1727 |
|
1727 | 1728 |
# construct line no item |
... | ... | |
1734 | 1735 |
self.itemTreeWidget.addTreeItem(item, connectedItem) |
1735 | 1736 |
# up to here |
1736 | 1737 |
|
1738 |
self.tableWidgetInconsistency.clearContents() |
|
1739 |
if self.dlgConnectAttr.ui.checkBoxValidation.isChecked(): |
|
1740 |
self.onValidation() |
|
1741 |
|
|
1737 | 1742 |
self.graphicsView.invalidateScene() |
1738 | 1743 |
except Exception as ex: |
1739 | 1744 |
message = 'error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno) |
DTI_PID/DTI_PID/Shapes/SymbolSvgItem.py | ||
---|---|---|
235 | 235 |
|
236 | 236 |
def validate(self): |
237 | 237 |
''' |
238 |
@brief validation check : flow
|
|
238 |
@brief validation check |
|
239 | 239 |
@author euisung |
240 | 240 |
@date 2019.04.16 |
241 | 241 |
''' |
DTI_PID/DTI_PID/UI/dlgConnectAttr.ui | ||
---|---|---|
34 | 34 |
</property> |
35 | 35 |
</widget> |
36 | 36 |
</item> |
37 |
<item> |
|
38 |
<widget class="QCheckBox" name="checkBoxValidation"> |
|
39 |
<property name="text"> |
|
40 |
<string>Close with Validation Check</string> |
|
41 |
</property> |
|
42 |
</widget> |
|
43 |
</item> |
|
37 | 44 |
<item alignment="Qt::AlignRight"> |
38 | 45 |
<widget class="QDialogButtonBox" name="buttonBox"> |
39 | 46 |
<property name="enabled"> |
내보내기 Unified diff