개정판 74cb8d10
dev issue #627: edit note data list table
DTI_PID/DTI_PID/ItemDataExportDialog.py | ||
---|---|---|
260 | 260 |
noteTable.horizontalHeaderItem(1).setSizeHint(QSize(25, 25)) |
261 | 261 |
|
262 | 262 |
# UID column hide |
263 |
#lineTable.hideColumn(0)
|
|
264 |
#equipTable.hideColumn(0)
|
|
265 |
#instTable.hideColumn(0)
|
|
266 |
#noteTable.hideColumn(0)
|
|
263 |
lineTable.hideColumn(0) |
|
264 |
equipTable.hideColumn(0) |
|
265 |
instTable.hideColumn(0) |
|
266 |
noteTable.hideColumn(0) |
|
267 | 267 |
|
268 | 268 |
# talbe Data 설정 |
269 | 269 |
self.settingLineData() |
... | ... | |
661 | 661 |
from QEngineeringNoteItem import QEngineeringNoteItem |
662 | 662 |
items = [item for item in self.parent.graphicsView.scene.items() if type(item) is QEngineeringNoteItem] |
663 | 663 |
for item in items: |
664 |
self.sceneNoteData[str(item.uid)] = item.getNoteDataList() |
|
664 |
loopIndex = 1 |
|
665 |
for note in item.getNoteDataList(): |
|
666 |
note[0] = str(item.uid) + "-" + str(loopIndex) |
|
667 |
self.sceneNoteData[str(item.uid) + "-" + str(loopIndex)] = note |
|
668 |
loopIndex += 1 |
|
665 | 669 |
|
666 | 670 |
''' self.equipmentDataList |
667 | 671 |
@brief save Datas |
DTI_PID/DTI_PID/Shapes/QEngineeringNoteItem.py | ||
---|---|---|
87 | 87 |
@date 2018.10.10 |
88 | 88 |
''' |
89 | 89 |
def getNoteDataList(self): |
90 |
|
|
90 | 91 |
dataList = [] |
91 | 92 |
try: |
92 | 93 |
from AppDocData import AppDocData |
... | ... | |
95 | 96 |
|
96 | 97 |
docData = AppDocData.instance() |
97 | 98 |
|
98 |
for index in range(len(noteColumnList)): |
|
99 |
dataList.append('') |
|
99 |
noteContentsList = self.findNoteContents(self.text()) |
|
100 |
for noteDescription in noteContentsList: |
|
101 |
data = [] |
|
102 |
for index in range(len(noteColumnList)): |
|
103 |
data.append('') |
|
104 |
|
|
105 |
data[0] = str(self.uid) |
|
106 |
import re |
|
107 |
data[1] = ''.join(re.findall('\d*', self.text())) |
|
108 |
data[2] = noteDescription |
|
109 |
data[3] = docData.imgName |
|
100 | 110 |
|
101 |
dataList[0] = str(self.uid) |
|
102 |
dataList[2] = self.text() |
|
103 |
dataList[3] = docData.imgName |
|
111 |
dataList.append(data) |
|
104 | 112 |
|
105 | 113 |
except Exception as ex: |
106 | 114 |
print('error occured({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)) |
내보내기 Unified diff