개정판 78b49c9b
Set button color of area dialog
DTI_PID/DTI_PID/QAreaConfigurationDialog.py | ||
---|---|---|
41 | 41 |
self.ui.lineEditDrawing.setText('({},{}),({},{})'.format(int(matches[0].x), int(matches[0].y), int(matches[0].x + matches[0].width), int(matches[0].y + matches[0].height))) |
42 | 42 |
self.ui.lineEditDrawing.tag.setPen(QPen(Qt.red, 10, Qt.SolidLine)) |
43 | 43 |
self.parent().graphicsView.scene.addItem(self.ui.lineEditDrawing.tag) |
44 |
self.ui.pushButtonDrawingArea.setStyleSheet('background-color: red') |
|
44 | 45 |
|
45 | 46 |
matches = [x for x in areas if x.name=='Note'] |
46 | 47 |
self.ui.lineEditNote.tag = QGraphicsBoundingBoxItem(matches[0].x, matches[0].y, matches[0].width, matches[0].height) if len(matches) == 1 else None |
47 | 48 |
if self.ui.lineEditNote.tag is not None: |
48 | 49 |
self.ui.lineEditNote.setText('({},{}),({},{})'.format(int(matches[0].x), int(matches[0].y), int(matches[0].x + matches[0].width), int(matches[0].y + matches[0].height))) |
49 |
self.ui.lineEditNote.tag.setPen(QPen(Qt.red, 10, Qt.SolidLine))
|
|
50 |
self.ui.lineEditNote.tag.setPen(QPen(Qt.blue, 10, Qt.SolidLine))
|
|
50 | 51 |
self.parent().graphicsView.scene.addItem(self.ui.lineEditNote.tag) |
52 |
self.ui.pushButtonNoteArea.setStyleSheet('background-color: blue') |
|
51 | 53 |
|
52 | 54 |
matches = [x for x in areas if x.name=='History Data'] |
53 | 55 |
self.ui.lineEditHistoryData.tag = QGraphicsBoundingBoxItem(matches[0].x, matches[0].y, matches[0].width, matches[0].height) if len(matches) == 1 else None |
54 | 56 |
if self.ui.lineEditHistoryData.tag is not None: |
55 | 57 |
self.ui.lineEditHistoryData.setText('({},{}),({},{})'.format(int(matches[0].x), int(matches[0].y), int(matches[0].x + matches[0].width), int(matches[0].y + matches[0].height))) |
56 |
self.ui.lineEditHistoryData.tag.setPen(QPen(Qt.red, 10, Qt.SolidLine))
|
|
58 |
self.ui.lineEditHistoryData.tag.setPen(QPen(Qt.magenta, 10, Qt.SolidLine))
|
|
57 | 59 |
self.parent().graphicsView.scene.addItem(self.ui.lineEditHistoryData.tag) |
60 |
self.ui.pushButtonHistoryDataArea.setStyleSheet('background-color: magenta') |
|
58 | 61 |
|
59 | 62 |
matches = [x for x in areas if x.name=='Area'] |
60 | 63 |
self.ui.lineEditArea.tag = QGraphicsBoundingBoxItem(matches[0].x, matches[0].y, matches[0].width, matches[0].height) if len(matches) == 1 else None |
61 | 64 |
if self.ui.lineEditArea.tag is not None: |
62 | 65 |
self.ui.lineEditArea.setText('({},{}),({},{})'.format(int(matches[0].x), int(matches[0].y), int(matches[0].x + matches[0].width), int(matches[0].y + matches[0].height))) |
63 |
self.ui.lineEditArea.tag.setPen(QPen(Qt.red, 10, Qt.SolidLine))
|
|
66 |
self.ui.lineEditArea.tag.setPen(QPen(Qt.green, 10, Qt.SolidLine))
|
|
64 | 67 |
self.parent().graphicsView.scene.addItem(self.ui.lineEditArea.tag) |
68 |
self.ui.pushButtonAreaArea.setStyleSheet('background-color: green') |
|
65 | 69 |
|
66 | 70 |
matches = [x for x in areas if x.name=='Drawing No'] |
67 | 71 |
self.ui.lineEditDrawingNo.tag = QGraphicsBoundingBoxItem(matches[0].x, matches[0].y, matches[0].width, matches[0].height) if len(matches) == 1 else None |
68 | 72 |
if self.ui.lineEditDrawingNo.tag is not None: |
69 | 73 |
self.ui.lineEditDrawingNo.setText('({},{}),({},{})'.format(int(matches[0].x), int(matches[0].y), int(matches[0].x + matches[0].width), int(matches[0].y + matches[0].height))) |
70 |
self.ui.lineEditDrawingNo.tag.setPen(QPen(Qt.red, 10, Qt.SolidLine))
|
|
74 |
self.ui.lineEditDrawingNo.tag.setPen(QPen(Qt.cyan, 10, Qt.SolidLine))
|
|
71 | 75 |
self.parent().graphicsView.scene.addItem(self.ui.lineEditDrawingNo.tag) |
76 |
self.ui.pushButtonDrawingNoArea.setStyleSheet('background-color: cyan') |
|
72 | 77 |
|
73 | 78 |
matches = [x for x in areas if x.name=='Rev No'] |
74 | 79 |
self.ui.lineEditRevNo.tag = QGraphicsBoundingBoxItem(matches[0].x, matches[0].y, matches[0].width, matches[0].height) if len(matches) == 1 else None |
75 | 80 |
if self.ui.lineEditRevNo.tag is not None: |
76 | 81 |
self.ui.lineEditRevNo.setText('({},{}),({},{})'.format(int(matches[0].x), int(matches[0].y), int(matches[0].x + matches[0].width), int(matches[0].y + matches[0].height))) |
77 |
self.ui.lineEditRevNo.tag.setPen(QPen(Qt.red, 10, Qt.SolidLine))
|
|
82 |
self.ui.lineEditRevNo.tag.setPen(QPen(Qt.yellow, 10, Qt.SolidLine))
|
|
78 | 83 |
self.parent().graphicsView.scene.addItem(self.ui.lineEditRevNo.tag) |
84 |
self.ui.pushButtonRevNoArea.setStyleSheet('background-color: yellow') |
|
79 | 85 |
# up to here |
80 | 86 |
|
81 | 87 |
self.ui.pushButtonDrawingArea.clicked.connect(self.selectDrawingArea) |
내보내기 Unified diff