コード例 #1
0
 def __init__(self, controller, parent=None):
     AbstractPathTool.__init__(self, controller, parent)
     self.dialog = QDialog()
     self.buttons = []
     self.seqBox = None
     self.chosenStandardSequence = None  # state for tab switching
     self.customSequenceIsValid = False  # state for tab switching
     self.useCustomSequence = False  # for applying sequence
     self.validatedSequenceToApply = None
     self.initDialog()
コード例 #2
0
ファイル: addseqtool.py プロジェクト: alaindomissy/cadnano2
 def __init__(self, controller, parent=None):
     AbstractPathTool.__init__(self, controller, parent)
     self.dialog = QDialog()
     self.buttons = []
     self.seqBox = None
     self.chosenStandardSequence = None  # state for tab switching
     self.customSequenceIsValid = False  # state for tab switching
     self.useCustomSequence = False  # for applying sequence
     self.validatedSequenceToApply = None
     self.initDialog()
コード例 #3
0
ファイル: addseqtool.py プロジェクト: MatthewMcAteer/cadnano2
 def updateLocation(self, pathHelix, scenePos, *args):
     AbstractPathTool.updateLocation(self, pathHelix, scenePos, *args)
     if pathHelix == None:
         return
     posItem = pathHelix.mapFromScene(scenePos)
     strandType, baseIdx = self.baseAtPoint(pathHelix, posItem)
     vh = pathHelix.vhelix()
     if strandType == StrandType.Scaffold:
         oppositeStrand = StrandType.Staple
     else:
         oppositeStrand = StrandType.Scaffold
     if vh.hasLoopOrSkipAt(strandType, baseIdx) > 0:
         loopBases = vh.hasLoopOrSkipAt(strandType, baseIdx)
         compLoopBases = vh.hasLoopOrSkipAt(oppositeStrand, baseIdx)
         if loopBases != compLoopBases and strandType == StrandType.Staple:
             newLoc = pathHelix.baseLocation(strandType, baseIdx)
             if self.pos() != newLoc:
                 self.setPos(*newLoc)
             if not self.isVisible():
                 self.show()
             return
     if vh.hasEmptyAt(strandType, baseIdx):
         if self.isVisible():
             self.hide()
         return
     fivePBase = pathHelix.vhelix().fivePEndOfSegmentThrough(StrandType.Scaffold, baseIdx)
     if fivePBase == None:
         self.hide()
     else:
         vh, strandType, idx = fivePBase
         phg = pathHelix.pathHelixGroup()
         ph2 = phg.pathHelixForVHelix(vh)
         fivePBaseLoc = QPointF(*ph2.baseLocation(strandType, idx))
         fivePBaseLocSelfCoords = pathHelix.mapFromItem(ph2, fivePBaseLoc)
         self.setPos(fivePBaseLocSelfCoords)
         if not self.isVisible():
             self.show()
コード例 #4
0
ファイル: addseqtool.py プロジェクト: MatthewMcAteer/cadnano2
 def __init__(self, controller, parent=None):
     AbstractPathTool.__init__(self, controller, parent)
コード例 #5
0
ファイル: forcetool.py プロジェクト: MatthewMcAteer/cadnano2
 def hoverMovePathHelix(self, pathHelix, event):
     AbstractPathTool.hoverMovePathHelix(self, pathHelix, event)
     self.updateDrag(pathHelix, event)
コード例 #6
0
ファイル: forcetool.py プロジェクト: MatthewMcAteer/cadnano2
 def setActive(self, willBeActive):
     AbstractPathTool.setActive(self, willBeActive)
     self.updateDrag(None, None, mustEnd=True)