개정판 1430097d
display connectivity on result property window
DTI_PID/DTI_PID/Shapes/QEngineeringLineItem.py | ||
---|---|---|
336 | 336 |
return False |
337 | 337 |
|
338 | 338 |
''' |
339 |
@brief arrange position
|
|
339 |
@brief arrange vertex order
|
|
340 | 340 |
@author humkyung |
341 | 341 |
@date 2018.07.04 |
342 | 342 |
''' |
343 |
def arrangePosition(self, arranged):
|
|
343 |
def arrangeVertexOrder(self, arranged):
|
|
344 | 344 |
import math |
345 | 345 |
|
346 | 346 |
lhs = [arranged.startPoint(), arranged.endPoint()] |
... | ... | |
689 | 689 |
self.buildItem() |
690 | 690 |
self.update() |
691 | 691 |
|
692 |
''' |
|
693 |
@brief update line type |
|
694 |
@author humkyung |
|
695 |
@date 2018.07.05 |
|
696 |
''' |
|
697 |
def updateLineType(self): |
|
698 |
from QEngineeringInstrumentItem import QEngineeringInstrumentItem |
|
699 |
|
|
700 |
if len(self.conns) == 2: |
|
701 |
lines = [item for item in self.conns if item is not None and type(item) is QEngineeringLineItem] |
|
702 |
insts = [item for item in self.conns if item is not None and type(item) is QEngineeringInstrumentItem] |
|
703 |
|
|
704 |
if (len(lines) == 1 and len(insts) == 1) or (len(lines) == 0 and len(insts) == 1): |
|
705 |
instType = insts[0].measuredVariableCode + insts[0].typeModifier |
|
706 |
if instType in ['FT', 'PT', 'TT']: |
|
707 |
self.lineType = 'Connect To Process' |
|
708 |
elif len(insts) == 2: |
|
709 |
self.lineType = 'Electric' |
|
710 |
|
|
692 | 711 |
def hoverEnterEvent(self, event): |
693 | 712 |
pass |
694 | 713 |
|
내보내기 Unified diff