프로젝트

일반

사용자정보

개정판 a21fbf2e

IDa21fbf2ed217318954bdcbac1e8f990989633108
상위 ed948580
하위 ff9dfd35

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

fixed issue #622:
- 저장후 Wheel Event시 줌이 됨(스크롤이 되어야 함)

차이점 보기:

DTI_PID/DTI_PID/Commands/DefaultCommand.py
101 101
                        self.copySymbol(QApplication.clipboard().text())
102 102
                elif 'keyPressEvent' == param[0] and (event.modifiers() == Qt.ControlModifier and event.key() == Qt.Key_S):
103 103
                    self.imageViewer.mainWindow.saveToXml(True)
104
                    #import XmlGenerator as xg
105
                    #from AppDocData import AppDocData
106
                    #docData = AppDocData.instance()
107
                    #xg.writeXmlOnScene(docData.imgName, docData.imgWidth, docData.imgHeight, self.imageViewer.scene)
108
                    #QMessageBox.about(self.imageViewer, "알림", "정상적으로 저장되었습니다.")
109 104

  
110 105
                self.isTreated = False
111 106
            else:
DTI_PID/DTI_PID/QtImageViewer.py
386 386

  
387 387
        QGraphicsView.keyReleaseEvent(self, event)
388 388

  
389
    '''
390
        @brief      mouse wheel event
391
        @autor      humkyung
392
        @date       
393
    '''
389 394
    def wheelEvent(self, event):
390
        if self.isPressCtrl == True:
395
        if event.modifiers() == Qt.ControlModifier:
391 396
            if self.canZoom and self.hasImage():
392 397
                numDegrees = event.angleDelta() / 8
393 398
                if numDegrees is not None:
......
395 400
                        self.zoomImage(True, event)
396 401
                    elif numDegrees.y() < 0:
397 402
                        self.zoomImage(False, event)
398
                #print("Zoomable")
399
                #numDegrees = event.angleDelta().y() // 8
400
                #numSteps = numDegrees // 15
401
                #self.numScheduledScalings = self.numScheduledScalings + numSteps
402
                #if self.numScheduledScalings * numSteps < 0:
403
                #    self.numScheduledScalings = numSteps
404
                #self.scaleFactor = 1.0 + (self.numScheduledScalings / 300.0)
405
                #print("scaleFactor : " + str(self.scaleFactor))
406
                #self.scale(self.scaleFactor, self.scaleFactor)
407 403
        else:
408 404
            super().wheelEvent(event)
409 405

  

내보내기 Unified diff

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