개정판 0d00ce0c
issue #49: 복사/붙여넣기 기능 추가
Change-Id: I3707828b2d226c4275621308ebc51161fc88f698
DTI_PID/DTI_PID/CodeTableDialog.py | ||
---|---|---|
190 | 190 |
""" |
191 | 191 |
|
192 | 192 |
self.checkRowAndAddRow(tabText, table) |
193 |
elif (e.key() == Qt.Key_C) and (e.modifiers() & Qt.ControlModifier): |
|
194 |
tab = self.ui.tabWidget.widget(self.ui.tabWidget.currentIndex()) |
|
195 |
table = tab.findChild(QTableWidget) |
|
196 |
if table: |
|
197 |
self.copy_selection(table) |
|
198 |
elif (e.key() == Qt.Key_V) and (e.modifiers() & Qt.ControlModifier): |
|
199 |
tab = self.ui.tabWidget.widget(self.ui.tabWidget.currentIndex()) |
|
200 |
table = tab.findChild(QTableWidget) |
|
201 |
if table: |
|
202 |
self.paste_selection(table) |
|
193 | 203 |
except Exception as ex: |
194 |
print('error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, |
|
195 |
sys.exc_info()[-1].tb_lineno)) |
|
204 |
from App import App |
|
205 |
message = 'error occurred({}) in {}:{}'.format(repr(ex), sys.exc_info()[-1].tb_frame.f_code.co_filename, |
|
206 |
sys.exc_info()[-1].tb_lineno) |
|
207 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
|
208 |
|
|
209 |
def copy_selection(self, table_widget): |
|
210 |
"""copy selected text to clipboard""" |
|
211 |
|
|
212 |
import io |
|
213 |
import csv |
|
214 |
|
|
215 |
selection = table_widget.selectedIndexes() |
|
216 |
if selection: |
|
217 |
rows = sorted(index.row() for index in selection) |
|
218 |
columns = sorted(index.column() for index in selection) |
|
219 |
rowcount = rows[-1] - rows[0] + 1 |
|
220 |
colcount = columns[-1] - columns[0] + 1 |
|
221 |
table = [[''] * colcount for _ in range(rowcount)] |
|
222 |
for index in selection: |
|
223 |
row = index.row() - rows[0] |
|
224 |
column = index.column() - columns[0] |
|
225 |
table[row][column] = index.data() |
|
226 |
stream = io.StringIO() |
|
227 |
csv.writer(stream, delimiter='\t').writerows(table) |
|
228 |
QApplication.clipboard().setText(stream.getvalue()) |
|
229 |
|
|
230 |
def paste_selection(self, table_widget): |
|
231 |
"""paste text of clipboard to table widget""" |
|
232 |
|
|
233 |
import io |
|
234 |
import csv |
|
235 |
|
|
236 |
selection = table_widget.selectedIndexes() |
|
237 |
if selection: |
|
238 |
model = table_widget.model() |
|
239 |
|
|
240 |
buffer = QApplication.clipboard().text() |
|
241 |
rows = sorted(index.row() for index in selection) |
|
242 |
columns = sorted(index.column() for index in selection) |
|
243 |
reader = csv.reader(io.StringIO(buffer), delimiter='\t') |
|
244 |
if len(rows) == 1 and len(columns) == 1: |
|
245 |
for i, line in enumerate(reader): |
|
246 |
for j, cell in enumerate(line): |
|
247 |
model.setData(model.index(rows[0] + i, columns[0] + j), cell) |
|
248 |
else: |
|
249 |
arr = [[cell for cell in row] for row in reader] |
|
250 |
for index in selection: |
|
251 |
row = index.row() - rows[0] |
|
252 |
column = index.column() - columns[0] |
|
253 |
model.setData(model.index(index.row(), index.column()), arr[row][column]) |
|
196 | 254 |
|
197 | 255 |
''' |
198 | 256 |
@brief Add new row |
DTI_PID/DTI_PID/CodeTables.py | ||
---|---|---|
5 | 5 |
|
6 | 6 |
from AppDocData import AppDocData |
7 | 7 |
|
8 |
|
|
8 | 9 |
class CodeTable: |
9 | 10 |
""" This is code table class """ |
10 | 11 |
|
... | ... | |
13 | 14 |
def __init__(self, name, values): |
14 | 15 |
self.name = name |
15 | 16 |
if self.name != "NOMINALDIAMETER": |
16 |
self.values = [(x[0], x[1], x[2], x[3].split(',')) for x in values]
|
|
17 |
self.values = [(x[0], x[1], x[2], x[3].split(',')) for x in values] |
|
17 | 18 |
else: |
18 | 19 |
self.values = values |
19 | 20 |
|
... | ... | |
52 | 53 |
|
53 | 54 |
from NominalPipeSize import NominalPipeSizeTable |
54 | 55 |
|
55 |
_table_name = table_name.upper().replace(' ','') |
|
56 |
_table_name = table_name.upper().replace(' ', '')
|
|
56 | 57 |
if _table_name == 'NOMINALDIAMETER': |
57 | 58 |
return NominalPipeSizeTable.instance() |
58 | 59 |
elif _table_name not in CodeTable.TABLES: |
... | ... | |
64 | 65 |
|
65 | 66 |
@staticmethod |
66 | 67 |
def clearTables(): |
67 |
CodeTable.TABLES = {} |
|
68 |
CodeTable.TABLES = {} |
DTI_PID/DTI_PID/HMBDialog.py | ||
---|---|---|
4 | 4 |
""" |
5 | 5 |
import os |
6 | 6 |
import sys |
7 |
|
|
7 | 8 |
sys.path.insert(0, os.path.dirname(os.path.realpath(__file__)) + '\\Commands') |
8 | 9 |
import FenceCommand |
9 | 10 |
|
... | ... | |
21 | 22 |
from GraphicsBoundingBoxItem import QGraphicsBoundingBoxItem |
22 | 23 |
import Configuration_Area_UI |
23 | 24 |
|
25 |
|
|
24 | 26 |
class Worker(QObject): |
25 | 27 |
from PyQt5.QtCore import QThread |
26 | 28 |
from PyQt5.QtWidgets import QApplication, QLabel, QWidget, QGridLayout, QListWidget |
... | ... | |
40 | 42 |
2018.05.30 Jeongwoo Remove import recognizeLine and self.xmlPath and remove parameter on recognizeLine.emit() (xmlPath) |
41 | 43 |
Change signal name (drawDetectedItems) |
42 | 44 |
''' |
43 |
def work(self): # A slot takes no params |
|
45 |
|
|
46 |
def work(self): # A slot takes no params |
|
44 | 47 |
try: |
45 | 48 |
self.recognizeText.emit(self) |
46 | 49 |
except Exception as ex: |
47 |
print('error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)) |
|
50 |
print('error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, |
|
51 |
sys.exc_info()[-1].tb_lineno)) |
|
52 |
|
|
48 | 53 |
|
49 | 54 |
class QHMBDialog(QDialog): |
50 | 55 |
def __init__(self, parent): |
... | ... | |
55 | 60 |
self.ui.setupUi(self) |
56 | 61 |
self.ui.tableWidgetHMBRecord.setHorizontalHeaderLabels(['Name', 'Unit']) |
57 | 62 |
self.ui.tableWidgetHMBRecord.horizontalHeaderItem(0).setSizeHint(QSize(25, 25)) |
58 |
|
|
63 |
|
|
59 | 64 |
# add splitter widget |
60 | 65 |
splitter = QSplitter(Qt.Vertical) |
61 | 66 |
splitter.addWidget(self.ui.groupBoxHMBRecord) |
... | ... | |
69 | 74 |
self.ui.pushButtonHMBArea.clicked.connect(self.onSelectHMBArea) |
70 | 75 |
self.ui.pushButtonRecognizeText.clicked.connect(self.onRecognizeText) |
71 | 76 |
self.ui.pushButtonDelHMBData.clicked.connect(self.onDelHMBData) |
72 |
|
|
77 |
|
|
73 | 78 |
self._cmd = FenceCommand.FenceCommand(self.parent().graphicsView) |
74 | 79 |
self._cmd.onSuccess.connect(self.onAreaSelected) |
75 | 80 |
|
... | ... | |
114 | 119 |
fixedCols = self.ui.tableWidgetHMBRecord.columnCount() |
115 | 120 |
streamNos = sorted(list(appDocData.hmbTable.streamNos())) |
116 | 121 |
self.ui.tableWidgetHMBData.setColumnCount(fixedCols + len(streamNos)) |
117 |
for col in range(2, self.ui.tableWidgetHMBData.columnCount()):
|
|
122 |
for col in range(2, self.ui.tableWidgetHMBData.columnCount()): |
|
118 | 123 |
streamNo = streamNos[col - 2] |
119 | 124 |
datas = appDocData.hmbTable.dataOfStreamNo(streamNo) |
120 | 125 |
for data in datas: |
... | ... | |
125 | 130 |
if data.name == name and data.unit == unit: |
126 | 131 |
selectedRow = row |
127 | 132 |
break |
128 |
|
|
133 |
|
|
129 | 134 |
if selectedRow != -1: |
130 | 135 |
item = QTableWidgetItem(data.value) |
131 | 136 |
item.setData(Qt.UserRole, data) |
132 | 137 |
self.ui.tableWidgetHMBData.setItem(selectedRow, col, item) |
133 |
|
|
138 |
|
|
134 | 139 |
self.ui.tableWidgetHMBData.setHorizontalHeaderLabels(['Name', 'Unit'] + streamNos) |
135 | 140 |
self.ui.tableWidgetHMBData.horizontalHeaderItem(0).setSizeHint(QSize(25, 25)) |
136 | 141 |
# up to here |
137 |
self.ui.tableWidgetHMBData.cellChanged.connect(self.cellValueChanged) # connect to slot after setting data
|
|
142 |
self.ui.tableWidgetHMBData.cellChanged.connect(self.cellValueChanged) # connect to slot after setting data |
|
138 | 143 |
|
139 | 144 |
''' |
140 | 145 |
@brief cellValueChange event |
141 | 146 |
@author humkyung |
142 | 147 |
@date 2018.07.16 |
143 | 148 |
''' |
149 |
|
|
144 | 150 |
def cellValueChanged(self, row, column): |
145 | 151 |
from HMBTable import HMBData |
146 | 152 |
|
... | ... | |
148 | 154 |
item = self.ui.tableWidgetHMBData.item(row, column) |
149 | 155 |
data = item.data(Qt.UserRole) |
150 | 156 |
if data is not None: |
151 |
data.value = self.ui.tableWidgetHMBData.item(row, column).text()
|
|
157 |
data.value = self.ui.tableWidgetHMBData.item(row, column).text() |
|
152 | 158 |
else: |
153 | 159 |
data = HMBData() |
154 |
data.name = self.ui.tableWidgetHMBData.item(row, 0).text()
|
|
155 |
data.unit = self.ui.tableWidgetHMBData.item(row, 1).text()
|
|
156 |
data.value = self.ui.tableWidgetHMBData.item(row, column).text()
|
|
160 |
data.name = self.ui.tableWidgetHMBData.item(row, 0).text() |
|
161 |
data.unit = self.ui.tableWidgetHMBData.item(row, 1).text() |
|
162 |
data.value = self.ui.tableWidgetHMBData.item(row, column).text() |
|
157 | 163 |
item.setData(Qt.UserRole, data) |
158 |
|
|
164 |
|
|
159 | 165 |
if data.name == 'STREAM NO': |
160 | 166 |
streamNo = data.value |
161 | 167 |
header = self.ui.tableWidgetHMBData.horizontalHeaderItem(column) |
... | ... | |
164 | 170 |
else: |
165 | 171 |
header = QTableWidgetItem(streamNo) |
166 | 172 |
self.ui.tableWidgetHMBData.setHorizontalHeaderItem(column, header) |
167 |
|
|
173 |
|
|
168 | 174 |
for row in range(self.ui.tableWidgetHMBData.rowCount()): |
169 | 175 |
item = self.ui.tableWidgetHMBData.item(row, column) |
170 | 176 |
if item is not None: |
... | ... | |
173 | 179 |
elif data.streamNo is None: |
174 | 180 |
data.streamNo = self.ui.tableWidgetHMBData.item(0, column).data(Qt.UserRole).streamNo |
175 | 181 |
except Exception as ex: |
176 |
print('error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)) |
|
182 |
print('error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, |
|
183 |
sys.exc_info()[-1].tb_lineno)) |
|
177 | 184 |
|
178 | 185 |
''' |
179 | 186 |
@brief add a record |
180 | 187 |
@author humkyung |
181 | 188 |
@date 2018.07.11 |
182 | 189 |
''' |
190 |
|
|
183 | 191 |
def onAddRecord(self): |
184 | 192 |
rows = self.ui.tableWidgetHMBRecord.rowCount() |
185 | 193 |
self.ui.tableWidgetHMBRecord.setRowCount(rows + 1) |
... | ... | |
189 | 197 |
@author humkyung |
190 | 198 |
@date 2018.07.11 |
191 | 199 |
''' |
200 |
|
|
192 | 201 |
def onDelRecord(self): |
193 | 202 |
model = self.ui.tableWidgetHMBRecord.model() |
194 | 203 |
|
... | ... | |
201 | 210 |
@author humkyung |
202 | 211 |
@date 2018.07.11 |
203 | 212 |
''' |
213 |
|
|
204 | 214 |
def onSelectHMBArea(self): |
205 | 215 |
self._cmd.tag = self.ui.lineEditHMBArea |
206 | 216 |
self.parent().graphicsView.command = self._cmd |
... | ... | |
210 | 220 |
@author humkyung |
211 | 221 |
@date 2018.07.11 |
212 | 222 |
''' |
213 |
def onAreaSelected(self, x, y , width, height): |
|
223 |
|
|
224 |
def onAreaSelected(self, x, y, width, height): |
|
214 | 225 |
THICKNESS = 3 |
215 | 226 |
|
216 | 227 |
if self._cmd.tag is self.ui.lineEditHMBArea: |
... | ... | |
232 | 243 |
@author humkyung |
233 | 244 |
@date 2018.07.11 |
234 | 245 |
''' |
246 |
|
|
235 | 247 |
def onRecognizeText(self): |
236 |
if len(self.ui.lineEditColumnWidth.text()) > 0 and len(self.ui.lineEditRowHeight.text()) > 0 and len(self.ui.lineEditHMBArea.text()) > 0: |
|
248 |
if len(self.ui.lineEditColumnWidth.text()) > 0 and len(self.ui.lineEditRowHeight.text()) > 0 and len( |
|
249 |
self.ui.lineEditHMBArea.text()) > 0: |
|
237 | 250 |
self.ui.buttonBox.setEnabled(False) |
238 | 251 |
self.ui.progressBar.setValue(0) |
239 | 252 |
self.startThread() |
... | ... | |
243 | 256 |
@author humkyung |
244 | 257 |
@date 2018.07.13 |
245 | 258 |
''' |
259 |
|
|
246 | 260 |
def onDelHMBData(self): |
247 | 261 |
try: |
248 | 262 |
model = self.ui.tableWidgetHMBData.model() |
... | ... | |
262 | 276 |
|
263 | 277 |
self.ui.tableWidgetHMBData.hideColumn(item.column()) |
264 | 278 |
except Exception as ex: |
265 |
print('error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)) |
|
279 |
print('error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, |
|
280 |
sys.exc_info()[-1].tb_lineno)) |
|
266 | 281 |
|
267 | 282 |
''' |
268 | 283 |
@brief recognize text in selected area |
269 | 284 |
@author humkyung |
270 | 285 |
@date 2018.07.11 |
271 | 286 |
''' |
287 |
|
|
272 | 288 |
def recognizeText(self, worker): |
273 | 289 |
from TextDetector import TextDetector |
274 | 290 |
|
... | ... | |
276 | 292 |
appDocData = AppDocData.instance() |
277 | 293 |
|
278 | 294 |
textDetector = TextDetector() |
279 |
img = appDocData.imgSrc[round(worker.area[1]):round(worker.area[1]+worker.area[3]), round(worker.area[0]):round(worker.area[0]+worker.area[2])] |
|
295 |
img = appDocData.imgSrc[round(worker.area[1]):round(worker.area[1] + worker.area[3]), |
|
296 |
round(worker.area[0]):round(worker.area[0] + worker.area[2])] |
|
280 | 297 |
texts = textDetector.getTextAreaInfo(img, worker.area[0], worker.area[1]) |
281 |
textDetector.recognizeText(appDocData.imgSrc, (worker.area[0], worker.area[1]), texts, [], worker, None, len(texts)) |
|
298 |
textDetector.recognizeText(appDocData.imgSrc, (worker.area[0], worker.area[1]), texts, [], worker, None, |
|
299 |
len(texts)) |
|
282 | 300 |
worker.textInfoList = textDetector.textInfoList.copy() |
283 | 301 |
except Exception as ex: |
284 |
print('error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)) |
|
302 |
print('error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, |
|
303 |
sys.exc_info()[-1].tb_lineno)) |
|
285 | 304 |
finally: |
286 | 305 |
worker.finished.emit() |
287 | 306 |
|
... | ... | |
290 | 309 |
@author humkyung |
291 | 310 |
@date 2018.07.12 |
292 | 311 |
''' |
312 |
|
|
293 | 313 |
def startThread(self): |
294 | 314 |
import re |
295 | 315 |
|
296 | 316 |
self.ui.buttonBox.setDisabled(True) |
297 | 317 |
|
298 | 318 |
# 1 - create Worker and Thread inside the Form |
299 |
self.obj = Worker() # no parent!
|
|
319 |
self.obj = Worker() # no parent! |
|
300 | 320 |
self.obj.columnWidth = float(self.ui.lineEditColumnWidth.text()) |
301 | 321 |
self.obj.rowHeight = float(self.ui.lineEditRowHeight.text()) |
302 |
found = re.findall('\d+', self.ui.lineEditHMBArea.text()) |
|
322 |
found = re.findall('\\d+', self.ui.lineEditHMBArea.text())
|
|
303 | 323 |
self.obj.area = [float(x) for x in found] |
304 |
self.thread = QThread() # no parent!
|
|
324 |
self.thread = QThread() # no parent! |
|
305 | 325 |
|
306 | 326 |
# 2 - Move the Worker object to the Thread object |
307 | 327 |
self.obj.moveToThread(self.thread) |
... | ... | |
313 | 333 |
|
314 | 334 |
# 4 - Connect Thread started signal to Worker operational slot method |
315 | 335 |
self.thread.started.connect(self.obj.work) |
316 |
|
|
336 |
|
|
317 | 337 |
# 5 - Thread finished signal will close the app if you want! |
318 | 338 |
self.thread.finished.connect(self.dlgExit) |
319 | 339 |
|
... | ... | |
325 | 345 |
@author humkyung |
326 | 346 |
@date 2018.07.12 |
327 | 347 |
''' |
348 |
|
|
328 | 349 |
def updateProgress(self, maxValue): |
329 | 350 |
if maxValue != -1: |
330 | 351 |
self.ui.progressBar.setMaximum(maxValue) |
... | ... | |
337 | 358 |
@author humkyung |
338 | 359 |
@date 2018.07.12 |
339 | 360 |
''' |
361 |
|
|
340 | 362 |
def dlgExit(self): |
341 | 363 |
from HMBTable import HMBData |
342 | 364 |
|
... | ... | |
352 | 374 |
col = int((text.x - self.obj.area[0]) / self.obj.columnWidth) |
353 | 375 |
row = int((text.y - self.obj.area[1]) / self.obj.rowHeight) |
354 | 376 |
data = HMBData() |
355 |
data.name = self.ui.tableWidgetHMBData.item(row, 0).text() if self.ui.tableWidgetHMBData.item(row, 0) is not None else '' |
|
356 |
data.unit = self.ui.tableWidgetHMBData.item(row, 1).text() if self.ui.tableWidgetHMBData.item(row, 1) is not None else '' |
|
377 |
data.name = self.ui.tableWidgetHMBData.item(row, 0).text() if self.ui.tableWidgetHMBData.item(row, |
|
378 |
0) is not None else '' |
|
379 |
data.unit = self.ui.tableWidgetHMBData.item(row, 1).text() if self.ui.tableWidgetHMBData.item(row, |
|
380 |
1) is not None else '' |
|
357 | 381 |
data.value = item.text() |
358 | 382 |
item.setData(Qt.UserRole, data) |
359 | 383 |
self.ui.tableWidgetHMBData.setItem(row, fixedColumns + col, item) |
360 | 384 |
if data.name == 'STREAM NO': |
361 | 385 |
self.ui.tableWidgetHMBData.horizontalHeaderItem(col).setText(data.value) |
362 |
|
|
386 |
|
|
363 | 387 |
self.ui.progressBar.setValue(self.ui.progressBar.maximum()) |
364 | 388 |
self.ui.buttonBox.setEnabled(True) |
365 | 389 |
except Exception as ex: |
366 |
print('error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)) |
|
390 |
print('error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, |
|
391 |
sys.exc_info()[-1].tb_lineno)) |
|
367 | 392 |
finally: |
368 | 393 |
pass |
369 | 394 |
|
370 | 395 |
def keyPressEvent(self, e): |
371 |
if (e.key() == Qt.Key_C) and (e.modifiers() & Qt.ControlModifier) and self.ui.tableWidgetHMBData.hasFocus():
|
|
396 |
if (e.key() == Qt.Key_C) and (e.modifiers() & Qt.ControlModifier) and self.ui.tableWidgetHMBData.hasFocus(): |
|
372 | 397 |
self.copySelection() |
373 | 398 |
|
374 | 399 |
def copySelection(self): |
375 |
""" |
|
376 |
copy selected text to clipboard |
|
377 |
""" |
|
400 |
"""copy selected text to clipboard""" |
|
378 | 401 |
import io |
379 | 402 |
import csv |
380 | 403 |
|
... | ... | |
396 | 419 |
''' |
397 | 420 |
@brief accept dialog |
398 | 421 |
''' |
422 |
|
|
399 | 423 |
def accept(self): |
400 |
from HMBTable import HMBTable,HMBData |
|
424 |
from HMBTable import HMBTable, HMBData
|
|
401 | 425 |
|
402 | 426 |
try: |
403 | 427 |
configs = [] |
... | ... | |
410 | 434 |
unit = item.text() if item is not None else '' |
411 | 435 |
configs.append(Config('HMB Record{}'.format(row), 'Name', name)) |
412 | 436 |
configs.append(Config('HMB Record{}'.format(row), 'Unit', unit)) |
413 |
|
|
437 |
|
|
414 | 438 |
configs.append(Config('HMB Data', 'Column Width', self.ui.lineEditColumnWidth.text())) |
415 | 439 |
configs.append(Config('HMB Data', 'Row Height', self.ui.lineEditRowHeight.text())) |
416 |
configs.append(Config('HMB Data', 'Record Direction', 'Horizontal' if self.ui.radioButtonHorizontal.isChecked() else 'Vertical')) |
|
440 |
configs.append(Config('HMB Data', 'Record Direction', |
|
441 |
'Horizontal' if self.ui.radioButtonHorizontal.isChecked() else 'Vertical')) |
|
417 | 442 |
|
418 | 443 |
appDocData = AppDocData.instance() |
419 | 444 |
appDocData.saveConfigs(configs) |
... | ... | |
428 | 453 |
if item is not None: |
429 | 454 |
data = item.data(Qt.UserRole) |
430 | 455 |
appDocData.hmbTable.append(data) |
431 |
|
|
456 |
|
|
432 | 457 |
appDocData.hmbTable.saveData() |
433 | 458 |
# up to here |
434 | 459 |
except Exception as ex: |
435 |
print('error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, sys.exc_info()[-1].tb_lineno)) |
|
460 |
print('error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename, |
|
461 |
sys.exc_info()[-1].tb_lineno)) |
|
436 | 462 |
finally: |
437 | 463 |
if self.ui.lineEditHMBArea.tag is not None: |
438 | 464 |
self.parent().graphicsView.scene.removeItem(self.ui.lineEditHMBArea.tag) |
... | ... | |
442 | 468 |
''' |
443 | 469 |
@brief reject dialog |
444 | 470 |
''' |
471 |
|
|
445 | 472 |
def reject(self): |
446 | 473 |
if self.ui.lineEditHMBArea.tag is not None: |
447 | 474 |
self.parent().graphicsView.scene.removeItem(self.ui.lineEditHMBArea.tag) |
내보내기 Unified diff