개정판 d8703c24
build issue #665: test
DTI_PID/DTI_PID/ItemDataAddEditDialog.py | ||
---|---|---|
40 | 40 |
appDocData = AppDocData.instance() |
41 | 41 |
self.newColName = self.ui.lineEdit.text() |
42 | 42 |
|
43 |
if not self.validationCheck(newColName): |
|
43 |
if not self.validationCheck(self.newColName):
|
|
44 | 44 |
QMessageBox.warning(self, self.tr('INFO'), self.tr('Please check column name')) |
45 | 45 |
return |
46 | 46 |
self.isAccepted = True |
... | ... | |
59 | 59 |
# QDialog.accept(self) |
60 | 60 |
#else: |
61 | 61 |
# QDialog.reject(self) |
62 |
|
|
62 |
|
|
63 | 63 |
QDialog.accept(self) |
64 | 64 |
|
65 | 65 |
def reject(self): |
66 | 66 |
QDialog.reject(self) |
67 | 67 |
|
68 | 68 |
def validationCheck(self, colName): |
69 |
if colName == '' |
|
69 |
if colName == '':
|
|
70 | 70 |
return False |
71 | 71 |
for col in self.colList: |
72 | 72 |
if col == colName: |
73 | 73 |
return False |
74 | 74 |
for record in self.history: |
75 |
if recort[1] == colName:
|
|
75 |
if record[1] == colName:
|
|
76 | 76 |
return False |
77 | 77 |
return True |
DTI_PID/DTI_PID/ItemDataFormatDialog.py | ||
---|---|---|
283 | 283 |
isAccepted, newHistory = item_data_format_dialog.showDialog() |
284 | 284 |
if isAccepted: |
285 | 285 |
history.append(newHistory) |
286 |
item = QListWidgetItem(newColName)
|
|
286 |
item = QListWidgetItem(newHistory[1])
|
|
287 | 287 |
item.setSizeHint(QSize(25, 25)) |
288 | 288 |
alist.addItem(item) |
289 | 289 |
for logical in range(alist.count()): |
... | ... | |
319 | 319 |
if isAccepted: |
320 | 320 |
#print('added') |
321 | 321 |
history.append(newHistory) |
322 |
item = QListWidgetItem(newColName)
|
|
322 |
item = QListWidgetItem(newHistory[1])
|
|
323 | 323 |
item.setSizeHint(QSize(25, 25)) |
324 | 324 |
alist.addItem(item) |
325 | 325 |
|
... | ... | |
378 | 378 |
docData = AppDocData.instance() |
379 | 379 |
configs = [] |
380 | 380 |
for index in range(len(self.tableWidgets)): |
381 |
# table column apply |
|
382 |
addedCol = [] |
|
383 |
editedCol = [] |
|
384 |
for history in self.colHistory[index]: |
|
385 |
if history[0] is not None: # edit |
|
386 |
isNewAddedCol = False |
|
387 |
for index in range(len(addedCol)): |
|
388 |
if addedCol[index] == history[0]: |
|
389 |
isNewAddedCol = True |
|
390 |
addedCol[index] = history[1] |
|
391 |
break |
|
392 |
if not isNewAddedCol: |
|
393 |
editedCol.append(history) |
|
394 |
else: # add |
|
395 |
addedCol.append(history[1]) |
|
396 |
for added in addedCol: |
|
397 |
docData.add_column_into_table(dbListName[index], added) |
|
398 |
for edited in editedCol: |
|
399 |
docData.edit_column_Name_in_table(dbListName[index], edited[0], edited[1]) |
|
400 |
|
|
401 |
# column order save |
|
381 | 402 |
headerCount = self.tableWidgets[index].columnCount() |
382 | 403 |
currentCol = [] |
383 | 404 |
logicalList = [] |
내보내기 Unified diff