개정판 64e4303a
issue #481: fix and 000 add hot key
Change-Id: I264204d1d5079da97c65f33b4ed019dba24a408e
DTI_PID/DTI_PID/MainWindow.py | ||
---|---|---|
266 | 266 |
for item in self.graphicsView.scene.items(): |
267 | 267 |
if type(item) is QEngineeringErrorItem: |
268 | 268 |
item.transfer.onRemoved.emit(item) |
269 |
if type(item) is QEngineeringLineItem or issubclass(type(item), SymbolSvgItem): |
|
269 |
elif type(item) is QEngineeringLineItem or issubclass(type(item), SymbolSvgItem):
|
|
270 | 270 |
for error in item.validate(): |
271 | 271 |
errors.append(error) |
272 | 272 |
|
... | ... | |
1269 | 1269 |
if checked: |
1270 | 1270 |
checked.setChecked(False) |
1271 | 1271 |
self.graphicsView.useDefaultCommand() |
1272 |
elif event.key() == Qt.Key_1: |
|
1273 |
if self.actionImage_Drawing.isChecked(): |
|
1274 |
self.onViewImageDrawing(False) |
|
1275 |
self.actionImage_Drawing.setChecked(False) |
|
1276 |
else: |
|
1277 |
self.onViewImageDrawing(True) |
|
1278 |
self.actionImage_Drawing.setChecked(True) |
|
1279 |
elif event.key() == Qt.Key_2: |
|
1280 |
if self.actionViewText.isChecked(): |
|
1281 |
self.onViewText(False) |
|
1282 |
self.actionViewText.setChecked(False) |
|
1283 |
else: |
|
1284 |
self.onViewText(True) |
|
1285 |
self.actionViewText.setChecked(True) |
|
1286 |
elif event.key() == Qt.Key_3: |
|
1287 |
if self.actionViewSymbol.isChecked(): |
|
1288 |
self.onViewSymbol(False) |
|
1289 |
self.actionViewSymbol.setChecked(False) |
|
1290 |
else: |
|
1291 |
self.onViewSymbol(True) |
|
1292 |
self.actionViewSymbol.setChecked(True) |
|
1293 |
elif event.key() == Qt.Key_4: |
|
1294 |
if self.actionViewLine.isChecked(): |
|
1295 |
self.onViewLine(False) |
|
1296 |
self.actionViewLine.setChecked(False) |
|
1297 |
else: |
|
1298 |
self.onViewLine(True) |
|
1299 |
self.actionViewLine.setChecked(True) |
|
1300 |
elif event.key() == Qt.Key_5: |
|
1301 |
if self.actionViewUnknown.isChecked(): |
|
1302 |
self.onViewUnknown(False) |
|
1303 |
self.actionViewUnknown.setChecked(False) |
|
1304 |
else: |
|
1305 |
self.onViewUnknown(True) |
|
1306 |
self.actionViewUnknown.setChecked(True) |
|
1307 |
elif event.key() == Qt.Key_6: |
|
1308 |
if self.actionViewInconsistency.isChecked(): |
|
1309 |
self.onViewInconsistency(False) |
|
1310 |
self.actionViewInconsistency.setChecked(False) |
|
1311 |
else: |
|
1312 |
self.onViewInconsistency(True) |
|
1313 |
self.actionViewInconsistency.setChecked(True) |
|
1272 | 1314 |
|
1273 | 1315 |
QMainWindow.keyPressEvent(self, event) |
1274 | 1316 |
except Exception as ex: |
내보내기 Unified diff