개정판 1728447a
issue #1061: 기기 크기 변경 수정
Change-Id: I47094debeff4f5def273aee62ae060e812b26189
HYTOS/HYTOS/QtImageViewer.py | ||
---|---|---|
556 | 556 |
import symbol |
557 | 557 |
|
558 | 558 |
symbol = AppDocData.instance().getSymbolByQuery('uid', uid) |
559 |
svgFileName = symbol.getName() |
|
559 |
svgFileName = symbol.sName |
|
560 |
svgType = symbol.sType |
|
561 |
svgAngle = 0 |
|
562 |
svgScale = 1 |
|
563 |
svgOrigin = symbol.originalPoint |
|
560 | 564 |
svgFilePath = os.path.join(AppDocData.instance().getCurrentProject().getSvgFilePath(), symbol.getCategory(), symbol.getType(), svgFileName+'.svg') |
561 | 565 |
svg = SymbolSvgItem.createItem(symbol.getType(), svgFilePath) |
562 | 566 |
connPts = None |
563 |
strConnPts = symbol.getConnectionPoint()
|
|
567 |
strConnPts = symbol.connectionPoint
|
|
564 | 568 |
if strConnPts is not None and strConnPts != '': |
565 | 569 |
connPts = [(float(x.split(',')[0]), float(x.split(',')[1])) if len(x.split(',')) == 2 else (x.split(',')[0], float(x.split(',')[1]), float(x.split(',')[2])) \ |
566 | 570 |
for x in strConnPts.split('/')] |
567 | 571 |
|
568 |
svg.buildItem(svgFileName, symbol.getType(), 0, None, None, connPts, uid)
|
|
572 |
svg.buildItem(svgFileName, svgType, svgAngle, svgScale, None, svgOrigin, connPts, uid)
|
|
569 | 573 |
|
570 | 574 |
return svg |
571 | 575 |
|
HYTOS/HYTOS/Shapes/EngineeringStreamlineItem.py | ||
---|---|---|
362 | 362 |
|
363 | 363 |
if selectedPhaseType: |
364 | 364 |
if selectedPhaseType == 'Vapor': |
365 |
dev = 1
|
|
365 |
self.show_VaporDialog()
|
|
366 | 366 |
elif selectedPhaseType == 'Liquid': |
367 |
dev = 1
|
|
367 |
self.show_LiquidDialog()
|
|
368 | 368 |
elif selectedPhaseType == 'Mixed': |
369 |
dev = 1
|
|
369 |
self.show_MixedDialog()
|
|
370 | 370 |
|
371 |
def show_VaporDialog(self): |
|
372 |
from Phase_VaporDialog import QPhase_VaporDialog |
|
373 |
|
|
374 |
dialog = QPhase_VaporDialog() |
|
375 |
dialog.showDialog(self) |
|
376 |
|
|
377 |
def show_LiquidDialog(self): |
|
378 |
from Phase_LiquidDialog import QPhase_LiquidDialog |
|
379 |
|
|
380 |
dialog = QPhase_LiquidDialog() |
|
381 |
dialog.showDialog(self) |
|
382 |
|
|
383 |
def show_MixedDialog(self): |
|
384 |
from Phase_MixedDialog import QPhase_MixedDialog |
|
385 |
|
|
386 |
dialog = QPhase_MixedDialog() |
|
387 |
dialog.showDialog(self) |
|
371 | 388 |
|
372 | 389 |
def keyPressEvent(self, event): |
373 | 390 |
from App import App |
HYTOS/HYTOS/Shapes/SymbolSvgItem.py | ||
---|---|---|
227 | 227 |
''' |
228 | 228 |
def buildItem(self, name, _type, angle, scale, loc, origin, connPts, dbUid=None, pointsUids=None): |
229 | 229 |
try: |
230 |
docData = AppDocData.instance() |
|
231 | 230 |
self.name = name |
232 | 231 |
self.type = _type |
233 | 232 |
self.angle = angle |
234 | 233 |
self._scale = scale |
235 | 234 |
self.loc = loc |
236 |
self.origin = origin |
|
235 |
|
|
236 |
docData = AppDocData.instance() |
|
237 | 237 |
if dbUid is None: |
238 | 238 |
symbolInfo = docData.getSymbolByQuery('name', name) |
239 | 239 |
else: |
240 | 240 |
symbolInfo = docData.getSymbolByQuery('UID', dbUid) |
241 |
|
|
241 | 242 |
self.dbUid = symbolInfo.uid |
242 | 243 |
self.category = symbolInfo.sCategory |
243 | 244 |
originalPoint = symbolInfo.getOriginalPoint().split(',') |
... | ... | |
279 | 280 |
# (connPts[index][1], connPts[index][2]) if len(connPts[index]) == 3 else \ |
280 | 281 |
# (connPts[index][1], connPts[index][2]) if len(connPts[index]) == 4 else None |
281 | 282 |
|
283 |
|
|
282 | 284 |
tooltip = '<b>{}</b><br>{}={}'.format(str(self.uid), self.type, self.name) |
283 | 285 |
self.setToolTip(tooltip) |
284 | 286 |
except Exception as ex: |
내보내기 Unified diff