개정판 ad62a73a
dev issue #488: edit source
DTI_PID/DTI_PID/ItemPropertyTableWidget.py | ||
---|---|---|
409 | 409 |
@date 18.04.27 |
410 | 410 |
''' |
411 | 411 |
def initNoteCell(self, noteNoStr, noteContentsList): |
412 |
self.setItem(0, 1, QTableWidgetItem(noteNoStr)) |
|
412 |
import re |
|
413 |
result = ''.join(re.findall('\d*', noteNoStr)) |
|
414 |
|
|
415 |
self.setItem(0, 1, QTableWidgetItem(result)) |
|
413 | 416 |
|
414 | 417 |
row = self.rowCount() |
415 | 418 |
count = 1 |
DTI_PID/DTI_PID/Shapes/QEngineeringNoteItem.py | ||
---|---|---|
30 | 30 |
|
31 | 31 |
def __init__(self, parent=None): |
32 | 32 |
QEngineeringTextItem.__init__(self, parent) |
33 |
|
|
34 |
self.noteNo = '' |
|
35 | 33 |
|
36 | 34 |
self.title = None |
37 | 35 |
self.conetents = None |
DTI_PID/DTI_PID/TextItemFactory.py | ||
---|---|---|
310 | 310 |
configs = appDocData.getConfigs('Note No Tag Rule', 'Note No Suffix') |
311 | 311 |
suffix = configs[0].value if 1 == len(configs) else '' |
312 | 312 |
|
313 |
if QRegExpValidator(QRegExp('^{}NOTE\s\d+{}$'.format(prefix, suffix))).validate(text, 0)[0] == QValidator.Acceptable :
|
|
313 |
if QRegExpValidator(QRegExp('^\{}NOTE\s\d+\{}$'.format(prefix, suffix))).validate(text, 0)[0] == QValidator.Acceptable :
|
|
314 | 314 |
return True |
315 | 315 |
else: |
316 | 316 |
return False |
내보내기 Unified diff