개정판 4747c73a
readme.html 수정
Change-Id: I81349116759007ac1a0a7ed302633d02f29aeec3
HYTOS/HYTOS/AppDocData.py | ||
---|---|---|
314 | 314 |
docver_list.append(version.parse(ver)) |
315 | 315 |
docver_list.sort() |
316 | 316 |
|
317 |
configs = self.getConfigs('Version', 'Doc_ver')
|
|
317 |
configs = self.getConfigs('Version', 'Doc_Ver')
|
|
318 | 318 |
doc_version = version.parse('0.0.0.0') |
319 | 319 |
if configs: |
320 | 320 |
doc_version = version.parse(configs[0].value) |
321 | 321 |
|
322 |
if not configs or app_version > doc_version:
|
|
322 |
if app_version > doc_version: |
|
323 | 323 |
for i in docver_list: |
324 | 324 |
if app_version >= i > doc_version: |
325 | 325 |
sqlFiles.append(f'DocVer_{i}.sql') |
326 | 326 |
cursor.execute( |
327 |
f"insert or replace into Configuration values ('Version', 'Doc_ver', '{string_main_version}');")
|
|
327 |
f"insert or replace into Configuration values ('Version', 'Doc_Ver', '{string_main_version}');")
|
|
328 | 328 |
elif app_version < doc_version: |
329 | 329 |
return False |
330 | 330 |
else: |
... | ... | |
343 | 343 |
|
344 | 344 |
conn.commit() |
345 | 345 |
|
346 |
return True |
|
346 | 347 |
# Catch the exception |
347 | 348 |
except Exception as ex: |
348 | 349 |
from App import App |
349 | 350 |
# Roll back any change if something goes wrong |
350 | 351 |
conn.rollback() |
351 | 352 |
|
352 |
message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename,
|
|
353 |
sys.exc_info()[-1].tb_lineno)
|
|
353 |
message = f'error occurred({repr(ex)}) in {sys.exc_info()[-1].tb_frame.f_code.co_filename}:' \
|
|
354 |
f'{sys.exc_info()[-1].tb_lineno}'
|
|
354 | 355 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
355 | 356 |
|
356 | 357 |
''' |
HYTOS/HYTOS/Commands/FlipCommand.py | ||
---|---|---|
7 | 7 |
from PyQt5.QtGui import * |
8 | 8 |
from PyQt5.QtWidgets import * |
9 | 9 |
|
10 |
|
|
11 | 10 |
class FlipCommand(QUndoCommand): |
12 | 11 |
"""This is flip command class""" |
13 | 12 |
onSuccess = pyqtSignal() |
... | ... | |
30 | 29 |
item.flip_symbol(self._flip == 1) |
31 | 30 |
|
32 | 31 |
self._scene.update() |
33 |
|
|
34 | 32 |
self._flipped = False |
35 | 33 |
|
36 | 34 |
def redo(self): |
HYTOS/HYTOS/MainWindow.py | ||
---|---|---|
2631 | 2631 |
app_doc_data.activeDrawing = drawing |
2632 | 2632 |
|
2633 | 2633 |
success = app_doc_data.build_drawing_database(drawing.path) |
2634 |
if success == False:
|
|
2634 |
if not success:
|
|
2635 | 2635 |
QMessageBox.information(self, self.tr('Warning'), self.tr( |
2636 | 2636 |
'The App version is lower than the document version. Please update.')) |
2637 | 2637 |
return |
... | ... | |
2665 | 2665 |
|
2666 | 2666 |
self.load_components(components) |
2667 | 2667 |
|
2668 |
""" TODO: 확인 필요 |
|
2669 |
# Loops 와 Output 을 만들기 위해 Calculation 을 한다 |
|
2670 |
for hmb in app_doc_data.activeDrawing.hmbTable._hmbs: |
|
2671 |
if hmb.phase_type: |
|
2672 |
Calculation(hmb) |
|
2673 |
cmd = HydroCalculationCommand(self.graphicsView) |
|
2674 |
cmd.execute(None) |
|
2675 |
cmd.execute_second(None) |
|
2676 |
|
|
2677 |
app_doc_data.activeDrawing.loops = cmd.loops |
|
2678 |
|
|
2679 |
self.display_loops() |
|
2680 |
self.display_output() |
|
2681 |
|
|
2682 |
self.load_HMB() |
|
2683 |
""" |
|
2684 | 2668 |
self.calculation() |
2685 | 2669 |
finally: |
2686 | 2670 |
self.progress.setValue(self.progress.maximum()) |
... | ... | |
2693 | 2677 |
self.graphicsView.setPalette(palette) |
2694 | 2678 |
|
2695 | 2679 |
except Exception as ex: |
2696 |
message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename,
|
|
2697 |
sys.exc_info()[-1].tb_lineno)
|
|
2680 |
message = f'error occurred({repr(ex)}) in {sys.exc_info()[-1].tb_frame.f_code.co_filename}:' \
|
|
2681 |
f'{sys.exc_info()[-1].tb_lineno}'
|
|
2698 | 2682 |
self.addMessage.emit(MessageType.Error, message) |
2699 | 2683 |
|
2700 | 2684 |
def saveAs_drawing(self, sourceDb): |
... | ... | |
3257 | 3241 |
item.setVisible(True) |
3258 | 3242 |
|
3259 | 3243 |
except Exception as ex: |
3260 |
message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename,
|
|
3261 |
sys.exc_info()[-1].tb_lineno)
|
|
3244 |
message = f'error occurred({repr(ex)}) in {sys.exc_info()[-1].tb_frame.f_code.co_filename}:' \
|
|
3245 |
f'{sys.exc_info()[-1].tb_lineno}'
|
|
3262 | 3246 |
self.addMessage.emit(MessageType.Error, message) |
3263 | 3247 |
finally: |
3264 | 3248 |
pass |
... | ... | |
3275 | 3259 |
def addTextItemToScene(self, textItem): |
3276 | 3260 |
textItem.addTextItemToScene(self.graphicsView.scene) |
3277 | 3261 |
|
3278 |
''' |
|
3279 |
@brief Remove added item on same place and Add GraphicsItem |
|
3280 |
@author Jeongwoo |
|
3281 |
@date 2018.05.29 |
|
3282 |
@history 2018.06.18 Jeongwoo Set Z-index |
|
3283 |
''' |
|
3284 |
|
|
3285 |
def addLineItemToScene(self, lineItem): |
|
3286 |
self.graphicsView.scene.addItem(lineItem) |
|
3287 |
|
|
3288 |
''' |
|
3289 |
@brief Check Number |
|
3290 |
@author kyouho |
|
3291 |
@date 2018.08.20 |
|
3292 |
''' |
|
3293 |
|
|
3294 |
def isNumber(self, num): |
|
3295 |
p = re.compile('(^[0-9]+$)') |
|
3296 |
result = p.match(num) |
|
3297 |
|
|
3298 |
if result: |
|
3299 |
return True |
|
3300 |
else: |
|
3301 |
return False |
|
3302 |
|
|
3303 |
''' |
|
3304 |
@brief find overlap Connector |
|
3305 |
@author kyouho |
|
3306 |
@date 2018.08.28 |
|
3307 |
''' |
|
3308 |
|
|
3309 |
def findOverlapConnector(self, connectorItem): |
|
3310 |
from shapely.geometry import Point |
|
3311 |
from EngineeringConnectorItem import QEngineeringConnectorItem |
|
3312 |
itemList = [] |
|
3313 |
|
|
3314 |
x = connectorItem.center()[0] |
|
3315 |
y = connectorItem.center()[1] |
|
3316 |
|
|
3317 |
connectors = [item for item in self.graphicsView.scene.items() if |
|
3318 |
type(item) is QEngineeringConnectorItem and item != connectorItem] |
|
3319 |
for connector in connectors: |
|
3320 |
if Point(x, y).distance(Point(connector.center()[0], connector.center()[1])) < 5: |
|
3321 |
itemList.append(connector.parent) |
|
3322 |
|
|
3323 |
return itemList |
|
3324 |
|
|
3325 | 3262 |
def add_data(self, table_widget, name, value, unit, separation=None, is_cell_merge=None, foregroundcolor=None): |
3326 | 3263 |
def make_table_widget_item(name: str, alignment, backgroundcolor=None, |
3327 | 3264 |
foregroundcolor=None) -> QTableWidgetItem: |
readme.html | ||
---|---|---|
37 | 37 |
<td style="padding-left: 5px; font-weight: bold;" colspan="2"><font color="white" size="3">CHANGES</font></td> |
38 | 38 |
</tr> |
39 | 39 |
|
40 |
<tr><td style="tr-title" colspan="2" bgcolor=lightgray><strong>3.4.3.0 [2021.06.1]</strong></td></tr> |
|
41 |
<tr><td class="filesChanged">1.</td><td>Flip, Rotation 기능 추가</td></tr> |
|
42 |
<tr><td class="filesChanged">2.</td><td>Polygon으로 객체를 선택하는 기능 추가</td></tr> |
|
43 |
|
|
40 | 44 |
<tr><td style="tr-title" colspan="2" bgcolor=lightgray><strong>3.3.3.0 [2021.05.10]</strong></td></tr> |
41 | 45 |
<tr><td class="filesChanged">1.</td><td>Callout 항목의 폰트 크기 및 색상 설정 오류 수정</td></tr> |
42 | 46 |
<tr><td class="filesChanged">2.</td><td>글자 굵기 옵션 추가</td></tr> |
내보내기 Unified diff