개정판 872fdf6f
add manual paring automation
Change-Id: I0c5df086c3a789f87b1ef253604da06f44deca2d
DTI_PID/DTI_PID/OPCRelationDialog.py | ||
---|---|---|
2 | 2 |
""" This is OPC Relation dialog module """ |
3 | 3 | |
4 | 4 |
import os |
5 |
from re import match |
|
5 | 6 |
import sys |
6 | 7 |
from PyQt5.QtCore import * |
7 | 8 |
from PyQt5.QtGui import * |
... | ... | |
131 | 132 |
for opc in opcs: |
132 | 133 |
item = QTableWidgetItem(opc['Drawing']) |
133 | 134 |
item.setFlags(Qt.ItemIsEnabled) |
135 |
item.tag = opc['tag'] |
|
134 | 136 |
self.ui.tableWidgetTarget.setItem(row, 0, item) |
135 | 137 |
item = QTableWidgetItem(opc['Line No']) |
136 | 138 |
item.setFlags(Qt.ItemIsEnabled) |
... | ... | |
214 | 216 |
self.ui.tableWidgetSource.item(current.row(), 6).setText( |
215 | 217 |
self.ui.tableWidgetTarget.item(item.row(), 3).text()) |
216 | 218 | |
219 |
matches = [row for row in range(self.ui.tableWidgetSource.rowCount()) \ |
|
220 |
if self.ui.tableWidgetSource.item(row, 0).tag is self.ui.tableWidgetTarget.item(item.row(), 0).tag] |
|
221 |
if matches: |
|
222 |
self.ui.tableWidgetSource.item(matches[0], 4).setText( |
|
223 |
self.ui.tableWidgetSource.item(current.row(), 0).text()) |
|
224 |
self.ui.tableWidgetSource.item(matches[0], 5).setText( |
|
225 |
self.ui.tableWidgetSource.item(current.row(), 1).text()) |
|
226 |
self.ui.tableWidgetSource.item(matches[0], 6).setText( |
|
227 |
self.ui.tableWidgetSource.item(current.row(), 3).text()) |
|
228 | ||
217 | 229 |
def eventFilter(self, source, event): |
218 | 230 |
""" display mouse position of graphics view """ |
219 | 231 |
if (event.type() == QKeyEvent.KeyPress): |
내보내기 Unified diff