개정판 853c2faf
issue #000: flip key on goning
Change-Id: I1c50e51e1bcc4712665eca949cd8feee248e7e26
DTI_PID/DTI_PID/Shapes/SymbolSvgItem.py | ||
---|---|---|
622 | 622 |
self.changeStandardPoint() |
623 | 623 |
elif event.key() == Qt.Key_C: |
624 | 624 |
self.changeConnPoint() |
625 |
|
|
625 |
elif event.key() == Qt.Key_F: |
|
626 |
self.flipSymbol() |
|
627 |
|
|
626 | 628 |
''' |
627 | 629 |
@brief connect attribute |
628 | 630 |
@author humkyung |
... | ... | |
1265 | 1267 |
if connector.connectedItem is not None: |
1266 | 1268 |
try: |
1267 | 1269 |
connector.connectedItem.removeSymbol(self) |
1268 |
except: |
|
1270 |
except Exception as ex:
|
|
1269 | 1271 |
from App import App |
1270 | 1272 |
from AppDocData import MessageType |
1271 | 1273 |
|
... | ... | |
1285 | 1287 |
rect.moveTo(self.loc[0], self.loc[1]) |
1286 | 1288 |
return rect |
1287 | 1289 |
|
1290 |
def flipSymbol(self): |
|
1291 |
''' |
|
1292 |
@brief remove item when user press delete key |
|
1293 |
@author humkyung |
|
1294 |
@date 2018.04.23 |
|
1295 |
''' |
|
1296 |
if self.flip is 0: |
|
1297 |
self.flip = 1 |
|
1298 |
else: |
|
1299 |
self.flip = 0 |
|
1300 |
|
|
1301 |
currentPoint = self.getCurrentPoint() |
|
1302 |
self.reSettingSymbol(currentPoint, self.angle) |
|
1303 |
|
|
1288 | 1304 |
''' |
1289 | 1305 |
@brief rotate Symbol |
1290 | 1306 |
@author kyouho |
... | ... | |
1311 | 1327 |
|
1312 | 1328 |
self.size[0], self.size[1] = self.size[1], self.size[0] |
1313 | 1329 |
|
1330 |
scene = self.scene() |
|
1331 |
#self.scene().removeItem(self) |
|
1332 |
#self.addSvgItemToScene(scene) |
|
1314 | 1333 |
currentPoint = self.getCurrentPoint() |
1315 | 1334 |
self.reSettingSymbol(currentPoint, self.angle) |
1316 | 1335 |
|
... | ... | |
1326 | 1345 |
transform.rotateRadians(-angle) |
1327 | 1346 |
transform.translate(-standardPoint[0], -standardPoint[1]) |
1328 | 1347 |
|
1348 |
if self.flip is 1: |
|
1349 |
transform.scale(-1.0, 1.0) |
|
1350 |
transform.translate(-self.size[0], 0) |
|
1351 |
|
|
1329 | 1352 |
self.setTransform(transform) |
1330 | 1353 |
|
1331 | 1354 |
from EngineeringLineItem import QEngineeringLineItem |
DTI_PID/DTI_PID/TextDetector.py | ||
---|---|---|
182 | 182 |
w = rect[1].width() |
183 | 183 |
h = rect[1].height() |
184 | 184 |
img = contourImg[y:y+h, x:x+w] |
185 |
## DEBUG |
|
185 | 186 |
#if angle == 0: |
186 | 187 |
# filePath = os.path.join(project.getTempPath(), "Tile", "H-{}-{}-{}-{}.png".format(x,y,w,h)) |
187 | 188 |
#else: |
188 | 189 |
# filePath = os.path.join(project.getTempPath(), "Tile", "V-{}-{}-{}-{}.png".format(x,y,w,h)) |
189 | 190 |
#cv2.imwrite(filePath, img) |
191 |
## up to here |
|
190 | 192 |
|
191 | 193 |
return list |
192 | 194 |
|
내보내기 Unified diff