src/eric7/QScintilla/QsciScintillaCompat.py

branch
eric7
changeset 10257
904c71a0e37f
parent 10244
1b67aa43ec93
child 10346
96b387d43981
equal deleted inserted replaced
10256:1b728f26d1ae 10257:904c71a0e37f
612 startPos = self.positionFromLineIndex(startLine, startIndex) 612 startPos = self.positionFromLineIndex(startLine, startIndex)
613 endPos = self.positionFromLineIndex(endLine, endIndex) 613 endPos = self.positionFromLineIndex(endLine, endIndex)
614 614
615 self.SendScintilla(QsciScintilla.SCI_SETRECTANGULARSELECTIONANCHOR, startPos) 615 self.SendScintilla(QsciScintilla.SCI_SETRECTANGULARSELECTIONANCHOR, startPos)
616 self.SendScintilla(QsciScintilla.SCI_SETRECTANGULARSELECTIONCARET, endPos) 616 self.SendScintilla(QsciScintilla.SCI_SETRECTANGULARSELECTIONCARET, endPos)
617
618 def setRectangularSelectionModifier(self, modifier):
619 """
620 Public method to set the modifier key used to create a rectangular selection by
621 doing a mouse drag.
622
623 @param modifier modifier key to be used
624 @type Qt.KeyboardModifier
625 """
626 sciModifier = {
627 Qt.KeyboardModifier.ControlModifier: QsciScintilla.SCMOD_CTRL,
628 Qt.KeyboardModifier.AltModifier: QsciScintilla.SCMOD_ALT,
629 Qt.KeyboardModifier.MetaModifier: QsciScintilla.SCMOD_SUPER,
630 }.get(modifier, QsciScintilla.SCMOD_CTRL)
631 self.SendScintilla(
632 QsciScintilla.SCI_SETRECTANGULARSELECTIONMODIFIER, sciModifier
633 )
617 634
618 def getSelectionCount(self): 635 def getSelectionCount(self):
619 """ 636 """
620 Public method to get the number of active selections. 637 Public method to get the number of active selections.
621 638

eric ide

mercurial