개정판 2bea7809
issue #563: sym attr code table first step test
Change-Id: I594949aa335c9cf03178a26059b34e7c9b36440b
DTI_PID/DTI_PID/SymbolAttrCodeTableDialog.py | ||
---|---|---|
35 | 35 |
@brief accept dialog |
36 | 36 |
''' |
37 | 37 |
def accept(self): |
38 |
import uuid |
|
39 |
|
|
38 | 40 |
try: |
41 |
self.code_data = [] |
|
39 | 42 |
self.isAccepted = False |
40 | 43 |
|
41 |
pass |
|
44 |
tabText = self.getTabText() |
|
45 |
table = self.findTableWidget(tabText) |
|
46 |
|
|
47 |
for row in range(table.rowCount()): |
|
48 |
if table.isRowHidden(row): |
|
49 |
continue |
|
50 |
else: |
|
51 |
uid = table.item(row, 0).text() if table.item(row, 0).text() else str(uuid.uuid4()) |
|
52 |
code = table.item(row, 1).text() |
|
53 |
description = table.item(row, 2).text() if table.item(row, 2) is not None else '' |
|
54 |
allowables = table.item(row, 3).text() if table.item(row, 3) is not None else '' |
|
55 |
|
|
56 |
if code: |
|
57 |
self.code_data.append((uid, code, description, allowables)) |
|
58 |
|
|
59 |
self.isAccepted = True |
|
42 | 60 |
QDialog.accept(self) |
43 | 61 |
|
44 | 62 |
except Exception as ex: |
DTI_PID/DTI_PID/SymbolAttrEditorDialog.py | ||
---|---|---|
90 | 90 |
(isAccept, code_data) = dialog.showDialog() |
91 | 91 |
|
92 | 92 |
if isAccept: |
93 |
self.ui.tableWidgetAttr.item(row, 6).tag = code_data
|
|
93 |
self.ui.tableWidgetAttr.item(row, 7).tag = code_data
|
|
94 | 94 |
|
95 | 95 |
graphicsView = App.mainWnd().graphicsView |
96 | 96 |
if dialog.code_area: |
내보내기 Unified diff