개정판 cf1c8d90
issue #000: save on going
Change-Id: I0c40969847d7671eefbdd7c4274d29526e466571
DTI_PID/DTI_PID/HMBDialog.py | ||
---|---|---|
37 | 37 |
self.layouts = [self.ui.gridLayout_3] |
38 | 38 |
self.views = [self.ui.tableViewHMB] |
39 | 39 |
|
40 |
self.fill_hmb_data() |
|
40 |
if self.fill_hmb_data(): |
|
41 |
self.ui.buttonBox.button(QDialogButtonBox.Ok).setText(self.tr('Save')) |
|
42 |
|
|
41 | 43 |
self.ui.toolButtonHMBFilePath.clicked.connect(self.on_open_hmb_file) |
42 | 44 |
except Exception as ex: |
43 | 45 |
from App import App |
... | ... | |
53 | 55 |
|
54 | 56 |
try: |
55 | 57 |
hmbs = AppDocData.instance().get_hmb_data(None) |
56 |
if not hmbs: |
|
57 |
return |
|
58 |
if True:#not hmbs:
|
|
59 |
return False
|
|
58 | 60 |
|
59 | 61 |
for index in range(len(hmbs[0].datas)): |
60 | 62 |
if index != 0: |
... | ... | |
92 | 94 |
self.views[index].setEditTriggers(QAbstractItemView.NoEditTriggers) |
93 | 95 |
self.views[index].setAlternatingRowColors(True) |
94 | 96 |
self.ui.tabWidget.setTabText(self.ui.tabWidget.indexOf(self.tabs[index]), hmbs[0].datas[index][0].case) |
97 |
|
|
98 |
return True |
|
95 | 99 |
except Exception as ex: |
96 | 100 |
from App import App |
97 | 101 |
from AppDocData import MessageType |
... | ... | |
100 | 104 |
f"{sys.exc_info()[-1].tb_lineno}" |
101 | 105 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
102 | 106 |
|
107 |
return False |
|
108 |
|
|
103 | 109 |
class Worker(QThread): |
104 | 110 |
finished = pyqtSignal() |
105 | 111 |
|
... | ... | |
175 | 181 |
os.getcwd(), "excel files (*.xlsx)", options=options) |
176 | 182 |
if file: |
177 | 183 |
self.ui.lineEditHMBFilePath.setText(file) |
184 |
self.ui.buttonBox.button(QDialogButtonBox.Ok).setText(self.tr('Import')) |
|
185 |
else: |
|
186 |
self.ui.buttonBox.button(QDialogButtonBox.Ok).setText(self.tr('Save')) |
|
178 | 187 |
|
179 | 188 |
def accept(self): |
180 | 189 |
"""accept dialog""" |
181 |
#from HMBTable import HMBTable, HMBData |
|
182 |
#from SymbolAttr import SymbolAttr |
|
190 |
|
|
191 |
if self.ui.buttonBox.button(QDialogButtonBox.Ok).text() == 'Import': |
|
192 |
self.import_hmb() |
|
193 |
else: |
|
194 |
self.save_hmb() |
|
195 |
|
|
196 |
def save_hmb(self): |
|
197 |
""" save hmb data """ |
|
198 |
pass |
|
199 |
|
|
200 |
def import_hmb(self): |
|
201 |
""" import hmb excel """ |
|
183 | 202 |
|
184 | 203 |
def on_finished(): |
185 | 204 |
self.fill_hmb_data() |
minorTools/xmlTextSearcher.py | ||
---|---|---|
3 | 3 |
def finder(): |
4 | 4 |
print("finder start") |
5 | 5 |
|
6 |
targetText = ['>DE-SUPERHEATER']
|
|
7 |
path = 'W:\ID2_Project\RLPP\Temp'
|
|
6 |
targetText = ['>gate cap drain']
|
|
7 |
path = 'W:\ID2_Project\Eurochem\Temp'
|
|
8 | 8 |
|
9 | 9 |
print("target : " + str(len(targetText))) |
10 | 10 |
print("path : " + path) |
내보내기 Unified diff