프로젝트

일반

사용자정보

개정판 3d6ff047

ID3d6ff04730d0a4a1d137f49026ab7de6d54cb991
상위 ce795f07
하위 e630a2aa

백흠경이(가) 6년 이상 전에 추가함

- change file name QEngineeringAbstractItem to EngineeringAbstractItem

차이점 보기:

DTI_PID/DTI_PID/Shapes/EngineeringAbstractItem.py
1
# coding: utf-8
2

  
3
'''
4
    @history    2018.05.15  Jeongwoo    Remove Parent Object [QObject]
5
'''
6
class QEngineeringAbstractItem:
7
    '''
8
        @history    2018.05.15  Jeongwoo    Remove call super
9
                    2018.05.17  Jeongwoo    Add DEFAULT_COLOR Variable
10
    '''
11
    DEFAULT_COLOR = '#0000FF'
12
    def __init__(self, parent=None):
13
        self._color = self.DEFAULT_COLOR # default color
14
        self._owner = None
15
        self.connectors = []
16

  
17
    '''
18
        @brief      Abstract method. Variable [color] is RGB hex code
19
        @author     Jeongwoo
20
        @date       2018.05.11
21
    '''
22
    def setColor(self, color):
23
        raise NotImplementedError
24

  
25
    '''
26
        @brief  return color
27
        @author Jeongwoo
28
        @date   2018.05.11
29
    '''
30
    def getColor(self):
31
        return self._color
32

  
33
    '''
34
        @brief  getter of owner
35
        @author humkyung
36
        @date   2018.05.12
37
    '''
38
    @property
39
    def owner(self):
40
        return self._owner 
41

  
42
    '''
43
        @brief  setter of owner
44
        @author humkyung
45
        @date   2018.05.12
46
    '''
47
    @owner.setter
48
    def owner(self, value):
49
        self._owner = value
50

  
51
    '''
52
        @brief  write to xml
53
        @author humkyung
54
        @date   2018.05.16
55
    '''
56
    def toXml(self):
57
        pass
58

  
59
    '''
60
        @brief  write attribute to xml
61
        @author humkyung
62
        @date   2018.05.16
63
    '''
64
    def toXmlAsAttribute(self, parent):
65
        pass
DTI_PID/DTI_PID/Shapes/EngineeringGuidelineItem.py
15 15
    except ImportError:
16 16
        raise ImportError("ImageViewerQt: Requires PyQt5 or PyQt4.")
17 17

  
18
from QEngineeringAbstractItem import QEngineeringAbstractItem
18
from EngineeringAbstractItem import QEngineeringAbstractItem
19 19
from EngineeringPolylineItem import QEngineeringPolylineItem
20 20
from GraphicsBoundingBoxItem import QGraphicsBoundingBoxItem
21 21
import shapely
......
30 30
    def __init__(self, vertices=[], parent=None):
31 31
        try:
32 32
            QGraphicsLineItem.__init__(self, parent)
33
            QEngineeringAbstractItem.__init__(self)
34

  
33 35
            self.setFlags(QGraphicsItem.ItemIsSelectable|QGraphicsItem.ItemIsFocusable)
34 36

  
35 37
            self.setAcceptHoverEvents(True)
DTI_PID/DTI_PID/Shapes/EngineeringLineItem.py
15 15
    except ImportError:
16 16
        raise ImportError("ImageViewerQt: Requires PyQt5 or PyQt4.")
17 17

  
18
from QEngineeringAbstractItem import QEngineeringAbstractItem
18
from EngineeringAbstractItem import QEngineeringAbstractItem
19 19
from EngineeringPolylineItem import QEngineeringPolylineItem
20 20
from GraphicsBoundingBoxItem import QGraphicsBoundingBoxItem
21 21
import shapely
......
35 35

  
36 36
        try:
37 37
            QGraphicsLineItem.__init__(self, parent)
38
            QEngineeringAbstractItem.__init__(self)
39

  
38 40
            self.setPen(QPen(Qt.blue, 4, Qt.SolidLine)) # set default pen
39 41
            self.isCreated = True 
40 42

  
41
            self.connectors = []
42 43
            self._owner = None
43 44
            self._flowMark = None
44 45
            self._lineType = 'Primary'
DTI_PID/DTI_PID/Shapes/EngineeringPolylineItem.py
11 11
        from PyQt4.QtGui import QGraphicsView, QGraphicsScene, QImage, QPixmap, QPainterPath, QFileDialog, QColor
12 12
    except ImportError:
13 13
        raise ImportError("ImageViewerQt: Requires PyQt5 or PyQt4.")
14
from QEngineeringAbstractItem import QEngineeringAbstractItem
14
from EngineeringAbstractItem import QEngineeringAbstractItem
15 15

  
16 16
class QEngineeringPolylineItem(QGraphicsPathItem, QEngineeringAbstractItem):
17 17
    onRemoved = pyqtSignal(QGraphicsItem)
DTI_PID/DTI_PID/Shapes/EngineeringRunItem.py
12 12
    except ImportError:
13 13
        raise ImportError("ImageViewerQt: Requires PyQt5 or PyQt4.")
14 14

  
15
from QEngineeringAbstractItem import QEngineeringAbstractItem
15
from EngineeringAbstractItem import QEngineeringAbstractItem
16 16

  
17 17
class QEngineeringRunItem(QEngineeringAbstractItem):
18 18
    def __init__(self):
DTI_PID/DTI_PID/Shapes/EngineeringTextItem.py
17 17
from GraphicsBoundingBoxItem import QGraphicsBoundingBoxItem
18 18
from OcrResultDialog import QOcrResultDialog
19 19
from AppDocData import *
20
from QEngineeringAbstractItem import QEngineeringAbstractItem
20
from EngineeringAbstractItem import QEngineeringAbstractItem
21 21

  
22 22
class QEngineeringTextItem(QGraphicsTextItem, QEngineeringAbstractItem):
23 23
    HIGHLIGHT = '#BC4438'
DTI_PID/DTI_PID/Shapes/EngineeringUnknownItem.py
16 16
from EngineeringPolylineItem import QEngineeringPolylineItem
17 17
from GraphicsBoundingBoxItem import QGraphicsBoundingBoxItem
18 18
from AppDocData import *
19
from QEngineeringAbstractItem import QEngineeringAbstractItem
19
from EngineeringAbstractItem import QEngineeringAbstractItem
20 20

  
21 21
class QEngineeringUnknownItem(QEngineeringPolylineItem, QEngineeringAbstractItem):
22 22
    HIGHLIGHT = '#BC4438'
DTI_PID/DTI_PID/Shapes/GraphicsBoundingBoxItem.py
11 11
    except ImportError:
12 12
        raise ImportError("ImageViewerQt: Requires PyQt5 or PyQt4.")
13 13

  
14
class QGraphicsBoundingBoxItem(QGraphicsRectItem):
14
from EngineeringAbstractItem import QEngineeringAbstractItem
15

  
16
class QGraphicsBoundingBoxItem(QGraphicsRectItem, QEngineeringAbstractItem):
15 17
    onRemoved = pyqtSignal(QGraphicsItem)
16 18

  
17 19
    def __init__(self, x, y, width, height):
18 20
        from EngineeringConnectorItem import QEngineeringConnectorItem
19 21

  
20 22
        QGraphicsRectItem.__init__(self, x, y, width, height)
23
        QEngineeringAbstractItem.__init__(self)
24

  
21 25
        self.setAcceptHoverEvents(True)
22 26
        self.setAcceptTouchEvents(True)
23 27
        self.isEntered = False
......
26 30
        self.isSymbol = False
27 31
        self.isCreated = False
28 32
        self._vertices = []
29
        self.connectors = []
30 33
        
31 34
        ## create connectors for corner
32 35
        connector = QEngineeringConnectorItem(self)
DTI_PID/DTI_PID/Shapes/QEngineeringAbstractItem.py
1
# coding: utf-8
2

  
3
'''
4
    @history    2018.05.15  Jeongwoo    Remove Parent Object [QObject]
5
'''
6
class QEngineeringAbstractItem:
7
    '''
8
        @history    2018.05.15  Jeongwoo    Remove call super
9
                    2018.05.17  Jeongwoo    Add DEFAULT_COLOR Variable
10
    '''
11
    DEFAULT_COLOR = '#0000FF'
12
    def __init__(self, parent=None):
13
        self._color = self.DEFAULT_COLOR # default color
14
        self._owner = None
15

  
16
    '''
17
        @brief      Abstract method. Variable [color] is RGB hex code
18
        @author     Jeongwoo
19
        @date       2018.05.11
20
    '''
21
    def setColor(self, color):
22
        raise NotImplementedError
23

  
24
    '''
25
        @brief  return color
26
        @author Jeongwoo
27
        @date   2018.05.11
28
    '''
29
    def getColor(self):
30
        return self._color
31

  
32
    '''
33
        @brief  getter of owner
34
        @author humkyung
35
        @date   2018.05.12
36
    '''
37
    @property
38
    def owner(self):
39
        return self._owner 
40

  
41
    '''
42
        @brief  setter of owner
43
        @author humkyung
44
        @date   2018.05.12
45
    '''
46
    @owner.setter
47
    def owner(self, value):
48
        self._owner = value
49

  
50
    '''
51
        @brief  write to xml
52
        @author humkyung
53
        @date   2018.05.16
54
    '''
55
    def toXml(self):
56
        pass
57

  
58
    '''
59
        @brief  write attribute to xml
60
        @author humkyung
61
        @date   2018.05.16
62
    '''
63
    def toXmlAsAttribute(self, parent):
64
        pass
DTI_PID/DTI_PID/Shapes/QEngineeringFlowArrowItem.py
10 10
        from PyQt4.QtGui import QGraphicsView, QGraphicsScene, QImage, QPixmap, QPainterPath, QFileDialog, QColor
11 11
    except ImportError:
12 12
        raise ImportError("ImageViewerQt: Requires PyQt5 or PyQt4.")
13
import QEngineeringAbstractItem
14 13

  
15
class QEngineeringFlowArrowItem(QGraphicsPathItem, QEngineeringAbstractItem.QEngineeringAbstractItem):
14
from EngineeringAbstractItem import QEngineeringAbstractItem
15

  
16
class QEngineeringFlowArrowItem(QGraphicsPathItem, QEngineeringAbstractItem):
16 17
    SIZE = 40
17 18

  
18 19
    def __init__(self, pt, dir, parent=None):
DTI_PID/DTI_PID/Shapes/SymbolSvgItem.py
12 12

  
13 13
from AppDocData import *
14 14
from EngineeringConnectorItem import QEngineeringConnectorItem
15
from QEngineeringAbstractItem import QEngineeringAbstractItem
15
from EngineeringAbstractItem import QEngineeringAbstractItem
16 16
from UserInputAttribute import UserInputAttribute
17 17
import SelectAttributeCommand
18 18

  
......
43 43
        self.origin = None
44 44
        self.loc = None
45 45
        self.size = None
46
        self.connectors = []
47 46
        self.attrs = [] # attributes
48 47
        self._owner = None
49 48
        self.parentSymbol = ''
DTI_PID/DTI_PID/SmartFEED.nsi
750 750
  File "dist\SmartFEED\Shapes\EngineeringPolylineItem.py"
751 751
  File "dist\SmartFEED\Shapes\EngineeringRunItem.py"
752 752
  File "dist\SmartFEED\Shapes\EngineeringUnknownItem.py"
753
  File "dist\SmartFEED\Shapes\QEngineeringAbstractItem.py"
753
  File "dist\SmartFEED\Shapes\EngineeringAbstractItem.py"
754 754
  File "dist\SmartFEED\Shapes\QEngineeringEquipmentItem.py"
755 755
  File "dist\SmartFEED\Shapes\QEngineeringFlowArrowItem.py"
756 756
  File "dist\SmartFEED\Shapes\QEngineeringInstrumentItem.py"
......
772 772
  File "dist\SmartFEED\Shapes\__pycache__\EngineeringRunItem.cpython-36.pyc"
773 773
  File "dist\SmartFEED\Shapes\__pycache__\EngineeringUnknownItem.cpython-36.pyc"
774 774
  File "dist\SmartFEED\Shapes\__pycache__\GraphicsPolylineItem.cpython-36.pyc"
775
  File "dist\SmartFEED\Shapes\__pycache__\QEngineeringAbstractItem.cpython-36.pyc"
775
  File "dist\SmartFEED\Shapes\__pycache__\EngineeringAbstractItem.cpython-36.pyc"
776 776
  File "dist\SmartFEED\Shapes\__pycache__\QEngineeringConnectorItem.cpython-36.pyc"
777 777
  File "dist\SmartFEED\Shapes\__pycache__\QEngineeringEquipmentItem.cpython-36.pyc"
778 778
  File "dist\SmartFEED\Shapes\__pycache__\QEngineeringFlowArrowItem.cpython-36.pyc"
......
3016 3016
  Delete "$INSTDIR\Shapes\__pycache__\QEngineeringFlowArrowItem.cpython-36.pyc"
3017 3017
  Delete "$INSTDIR\Shapes\__pycache__\QEngineeringEquipmentItem.cpython-36.pyc"
3018 3018
  Delete "$INSTDIR\Shapes\__pycache__\QEngineeringConnectorItem.cpython-36.pyc"
3019
  Delete "$INSTDIR\Shapes\__pycache__\QEngineeringAbstractItem.cpython-36.pyc"
3019
  Delete "$INSTDIR\Shapes\__pycache__\EngineeringAbstractItem.cpython-36.pyc"
3020 3020
  Delete "$INSTDIR\Shapes\__pycache__\GraphicsPolylineItem.cpython-36.pyc"
3021 3021
  Delete "$INSTDIR\Shapes\__pycache__\EngineeringUnknownItem.cpython-36.pyc"
3022 3022
  Delete "$INSTDIR\Shapes\__pycache__\EngineeringRunItem.cpython-36.pyc"
......
3037 3037
  Delete "$INSTDIR\Shapes\QEngineeringInstrumentItem.py"
3038 3038
  Delete "$INSTDIR\Shapes\QEngineeringFlowArrowItem.py"
3039 3039
  Delete "$INSTDIR\Shapes\QEngineeringEquipmentItem.py"
3040
  Delete "$INSTDIR\Shapes\QEngineeringAbstractItem.py"
3040
  Delete "$INSTDIR\Shapes\EngineeringAbstractItem.py"
3041 3041
  Delete "$INSTDIR\Shapes\EngineeringUnknownItem.py"
3042 3042
  Delete "$INSTDIR\Shapes\EngineeringRunItem.py"
3043 3043
  Delete "$INSTDIR\Shapes\EngineeringPolylineItem.py"

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)