개정판 b4c3e73a
issue #563: symbol attribute code table done, testing
Change-Id: Icc679d26fa75dd045faf18799be184004f204dc6
DTI_PID/DTI_PID/SymbolAttrCodeTableDialog.py | ||
---|---|---|
14 | 14 |
import SymbolAttrCodeTable_UI |
15 | 15 |
|
16 | 16 |
class SymbolAttrCodeTableDialog(QCodeTableDialog): |
17 |
def __init__(self, parent, symbol_attribute_uid): |
|
17 |
def __init__(self, parent, symbol_attribute_uid, tableDatas=None):
|
|
18 | 18 |
QCodeTableDialog.__init__(self, parent, 'SymbolAttributeCodeTable') |
19 | 19 |
|
20 | 20 |
self.ui = SymbolAttrCodeTable_UI.Ui_AttributeCodeTable() |
... | ... | |
30 | 30 |
self.ui.buttonBox.accepted.connect(self.accept) |
31 | 31 |
self.ui.buttonBox.rejected.connect(self.reject) |
32 | 32 |
|
33 |
self.settingTable('SymbolAttributeCodeTable', symbol_attribute_uid=symbol_attribute_uid) |
|
33 |
self.settingTable('SymbolAttributeCodeTable', symbol_attribute_uid=symbol_attribute_uid, tableDatas=tableDatas)
|
|
34 | 34 |
''' |
35 | 35 |
@brief accept dialog |
36 | 36 |
''' |
... | ... | |
51 | 51 |
uid = table.item(row, 0).text() if table.item(row, 0).text() else str(uuid.uuid4()) |
52 | 52 |
code = table.item(row, 1).text() |
53 | 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 ''
|
|
54 |
allowables = table.item(row, 3).text().split(',') if table.item(row, 3) is not None else []
|
|
55 | 55 |
|
56 | 56 |
if code: |
57 | 57 |
self.code_data.append((uid, code, description, allowables)) |
내보내기 Unified diff