개정판 8aece8c1
issue #000: hmb attr test
Change-Id: Iea3114e00ebf3ca3163fefb8bbbec73e977f9dc0
DTI_PID/DTI_PID/SymbolAttrEditorDialog.py | ||
---|---|---|
109 | 109 |
from ItemDataExportDialog import QItemDataExportDialog |
110 | 110 |
|
111 | 111 |
row = self.ui.tableWidgetAttr.indexAt(self.sender().pos()).row() |
112 |
col = self.ui.tableWidgetAttr.indexAt(self.sender().pos()).column() |
|
112 |
#col = self.ui.tableWidgetAttr.indexAt(self.sender().pos()).column()
|
|
113 | 113 |
|
114 | 114 |
if text == 'HMB': |
115 | 115 |
hmb = QComboBox() |
116 | 116 |
names = [''] |
117 | 117 |
QItemDataExportDialog.add_hmb_header(names) |
118 | 118 |
hmb.addItems(names) |
119 |
hmb.currentTextChanged.connect(self.changeHMB) |
|
119 | 120 |
self.ui.tableWidgetAttr.takeItem(row, 1) |
120 | 121 |
self.ui.tableWidgetAttr.setCellWidget(row, 1, hmb) |
121 | 122 |
else: |
... | ... | |
123 | 124 |
self.ui.tableWidgetAttr.removeCellWidget(row, 1) |
124 | 125 |
self.ui.tableWidgetAttr.setItem(row, 1, QTableWidgetItem()) |
125 | 126 |
|
127 |
def changeHMB(self, text): |
|
128 |
row = self.ui.tableWidgetAttr.indexAt(self.sender().pos()).row() |
|
129 |
#col = self.ui.tableWidgetAttr.indexAt(self.sender().pos()).column() |
|
130 |
|
|
131 |
item = QTableWidgetItem('HMB ' + text) |
|
132 |
self.ui.tableWidgetAttr.takeItem(row, 2) |
|
133 |
self.ui.tableWidgetAttr.setItem(row, 2, item) |
|
134 |
|
|
126 | 135 |
def cell_double_clicked(self, row, column): |
127 | 136 |
if self._symbolType is None or not (column is 6 or column is 7): return |
128 | 137 |
if hasattr(self.ui.tableWidgetAttr.item(row, 0), 'tag') and \ |
... | ... | |
254 | 263 |
result = hmb.findText(attr.Attribute) |
255 | 264 |
if result: |
256 | 265 |
hmb.setCurrentIndex(result) |
266 |
hmb.currentTextChanged.connect(self.changeHMB) |
|
257 | 267 |
|
258 | 268 |
item = QTableWidgetItem(str(attr.AttrAt)) # Attribute At |
259 | 269 |
if attr.IsProp and attr.IsProp >= 2: |
내보내기 Unified diff