rem stringlengths 0 322k | add stringlengths 0 2.05M | context stringlengths 8 228k |
|---|---|---|
self.toolsSimulatorAction.setIconSet(QIconSet(self.image76)) | self.toolsSimulatorAction.setIconSet(QIconSet(self.image74)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.toolsAddBondAction.setIconSet(QIconSet(self.image77)) | self.toolsAddBondAction.setIconSet(QIconSet(self.image75)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.toolsDeleteBondAction.setIconSet(QIconSet(self.image78)) | self.toolsDeleteBondAction.setIconSet(QIconSet(self.image76)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.toolsSelectAtomsAction.setIconSet(QIconSet(self.image79)) | self.toolsSelectAtomsAction.setIconSet(QIconSet(self.image77)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.toolsSelectMoleculesAction.setIconSet(QIconSet(self.image80)) | self.toolsSelectMoleculesAction.setIconSet(QIconSet(self.image78)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.toolsMoveMoleculeAction.setIconSet(QIconSet(self.image81)) self.toolsSelectAction = QAction(self.toolsModeActionGroup,"toolsSelectAction") self.toolsSelectAction.setToggleAction(1) self.toolsSelectAction.setOn(0) self.toolsSelectAction.setIconSet(QIconSet(self.image82)) self.toolsSelectJigsAction = QAction(self.to... | self.toolsMoveMoleculeAction.setOn(1) self.toolsMoveMoleculeAction.setEnabled(1) self.toolsMoveMoleculeAction.setIconSet(QIconSet(self.image79)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.modifyStretchAction.setIconSet(QIconSet(self.image84)) | self.modifyStretchAction.setIconSet(QIconSet(self.image80)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.moveMolXAction.setIconSet(QIconSet(self.image85)) | self.moveMolXAction.setIconSet(QIconSet(self.image81)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.moveMolYAction.setIconSet(QIconSet(self.image86)) | self.moveMolYAction.setIconSet(QIconSet(self.image82)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.moveMolZAction.setIconSet(QIconSet(self.image87)) | self.moveMolZAction.setIconSet(QIconSet(self.image83)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.moveMolRotXAction.setIconSet(QIconSet(self.image88)) | self.moveMolRotXAction.setIconSet(QIconSet(self.image84)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.moveMolRotYAction.setIconSet(QIconSet(self.image89)) | self.moveMolRotYAction.setIconSet(QIconSet(self.image85)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.moveMolRotZAction.setIconSet(QIconSet(self.image90)) | self.moveMolRotZAction.setIconSet(QIconSet(self.image86)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.moveMolFreeAction.setIconSet(QIconSet(self.image91)) | self.moveMolFreeAction.setIconSet(QIconSet(self.image87)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.rotateMolFreeAction.setIconSet(QIconSet(self.image92)) | self.rotateMolFreeAction.setIconSet(QIconSet(self.image88)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.moveRotateMolAction.setIconSet(QIconSet(self.image93)) self.selectActionGroup = QActionGroup(self,"selectActionGroup") self.selectActionGroup.setUsesDropDown(0) self.selectAtomsAction = QAction(self.selectActionGroup,"selectAtomsAction") self.selectAtomsAction.setToggleAction(1) self.selectAtomsAction.setIconSet(Q... | self.moveRotateMolAction.setIconSet(QIconSet(self.image89)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.nullAction.setIconSet(QIconSet(self.image94)) | self.nullAction.setEnabled(1) self.nullAction.setIconSet(QIconSet(self.image90)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.jigsStatAction.setIconSet(QIconSet(self.image95)) | self.jigsStatAction.setIconSet(QIconSet(self.image91)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.helpWhatsThisAction.setIconSet(QIconSet(self.image96)) | self.helpWhatsThisAction.setIconSet(QIconSet(self.image92)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.movieResetAction.setIconSet(QIconSet(self.image97)) | self.movieResetAction.setIconSet(QIconSet(self.image93)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.moviePlayRevActiveAction.setIconSet(QIconSet(self.image98)) | self.moviePlayRevActiveAction.setIconSet(QIconSet(self.image94)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.moviePlayActiveAction.setIconSet(QIconSet(self.image99)) | self.moviePlayActiveAction.setIconSet(QIconSet(self.image95)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.movieMoveToEndAction.setIconSet(QIconSet(self.image100)) | self.movieMoveToEndAction.setIconSet(QIconSet(self.image96)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.moviePauseAction.setIconSet(QIconSet(self.image101)) | self.moviePauseAction.setIconSet(QIconSet(self.image97)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.moviePlayAction.setIconSet(QIconSet(self.image102)) | self.moviePlayAction.setIconSet(QIconSet(self.image98)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.modifyAlignCommonAxisAction.setIconSet(QIconSet(self.image74)) | self.modifyAlignCommonAxisAction.setIconSet(QIconSet(self.image99)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.movieNextFrameAction.setIconSet(QIconSet(self.image103)) | self.movieNextFrameAction.setIconSet(QIconSet(self.image100)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.moviePrevFrameAction.setIconSet(QIconSet(self.image104)) | self.moviePrevFrameAction.setIconSet(QIconSet(self.image101)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.moviePlayRevAction.setIconSet(QIconSet(self.image105)) | self.moviePlayRevAction.setIconSet(QIconSet(self.image102)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.movieInfoAction.setIconSet(QIconSet(self.image106)) | self.movieInfoAction.setIconSet(QIconSet(self.image103)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.zoomWindowAction.setIconSet(QIconSet(self.image107)) | self.zoomWindowAction.setIconSet(QIconSet(self.image104)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.panWindowAction.setIconSet(QIconSet(self.image108)) | self.panWindowAction.setIconSet(QIconSet(self.image105)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.rotateWindowAction.setIconSet(QIconSet(self.image109)) | self.rotateWindowAction.setIconSet(QIconSet(self.image106)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.jigsThermoAction.setIconSet(QIconSet(self.image110)) | self.jigsThermoAction.setIconSet(QIconSet(self.image107)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.resize(QSize(1115,1150).expandedTo(self.minimumSizeHint())) | self.resize(QSize(1115,1156).expandedTo(self.minimumSizeHint())) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.connect(self.ccGraphiteAction,SIGNAL("activated()"),self.gridGraphite) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() | |
self.connect(self.selectAtomsAction,SIGNAL("activated()"),self.toolsSelectAtoms) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() | |
self.connect(self.selectJigsAction,SIGNAL("activated()"),self.toolsSelectJigs) self.connect(self.selectMoleculesAction,SIGNAL("activated()"),self.toolsSelectMolecules) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() | |
self.connect(self.toolsAlignToCommonAxisAction,SIGNAL("activated()"),self.toolsAlignToCommonAxis) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() | |
self.connect(self.toolsSelectAction,SIGNAL("activated()"),self.toolsSelect) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() | |
self.connect(self.toolsSelectJigsAction,SIGNAL("activated()"),self.toolsSelectJigs) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() | |
self.ccGraphiteAction.setText(self.__tr("Graphite")) self.ccGraphiteAction.setMenuText(self.__tr("Graphite")) | def languageChange(self): self.setCaption(self.__tr("nanoENGINEER-1")) self.fileOpenAction.setText(self.__tr("Open")) self.fileOpenAction.setMenuText(self.__tr("&Open...")) self.fileOpenAction.setAccel(self.__tr("Ctrl+O")) self.fileSaveAction.setText(self.__tr("Save")) self.fileSaveAction.setMenuText(self.__tr("&Save")... | |
self.toolsAlignToCommonAxisAction.setText(self.__tr("Align To Common Axis")) self.toolsAlignToCommonAxisAction.setMenuText(self.__tr("A&lign To Common Axis")) self.toolsAlignToCommonAxisAction.setToolTip(self.__tr("Align To Common Axis")) | def languageChange(self): self.setCaption(self.__tr("nanoENGINEER-1")) self.fileOpenAction.setText(self.__tr("Open")) self.fileOpenAction.setMenuText(self.__tr("&Open...")) self.fileOpenAction.setAccel(self.__tr("Ctrl+O")) self.fileSaveAction.setText(self.__tr("Save")) self.fileSaveAction.setMenuText(self.__tr("&Save")... | |
self.toolsSelectAction.setText(self.__tr("Select")) self.toolsSelectAction.setMenuText(self.__tr("&Select")) self.toolsSelectAction.setToolTip(self.__tr("Select")) self.toolsSelectJigsAction.setText(self.__tr("Select Jigs")) self.toolsSelectJigsAction.setToolTip(self.__tr("Select Jigs")) self.toolsSelectJigsAction.setM... | def languageChange(self): self.setCaption(self.__tr("nanoENGINEER-1")) self.fileOpenAction.setText(self.__tr("Open")) self.fileOpenAction.setMenuText(self.__tr("&Open...")) self.fileOpenAction.setAccel(self.__tr("Ctrl+O")) self.fileSaveAction.setText(self.__tr("Save")) self.fileSaveAction.setMenuText(self.__tr("&Save")... | |
self.selectActionGroup.setText(self.__tr("Select Group")) self.selectAtomsAction.setText(self.__tr("Select Atoms")) self.selectAtomsAction.setToolTip(self.__tr("Select Atoms")) self.selectAtomsAction.setMenuText(self.__tr("Select Atoms")) self.selectMoleculesAction.setText(self.__tr("Select Molecules")) self.selectMole... | def languageChange(self): self.setCaption(self.__tr("nanoENGINEER-1")) self.fileOpenAction.setText(self.__tr("Open")) self.fileOpenAction.setMenuText(self.__tr("&Open...")) self.fileOpenAction.setAccel(self.__tr("Ctrl+O")) self.fileSaveAction.setText(self.__tr("Save")) self.fileSaveAction.setMenuText(self.__tr("&Save")... | |
for i in range(10): | for i in range(20): | def oneFrame(self): # On each step we do verlet, using u_old and u to compute # u_new. Then we move each particle from u to u_new. Then # we move u to u_old, and u_new to u. for i in range(10): self.equationsOfMotion() self.paintEvent(None) |
"<b>Currently not implemented</b>."\ | def createWhatsThis(self): ############################################## # File Toolbar ############################################## #### Open File #### fileOpenText = "<u><b>Open File</b></u> (Ctrl + O)</b></p><br> "\ "<p><img source=\"fileopen\"><br> "\ "Opens a new file."\ "</p>" QMimeSourceFactory.default... | |
"the Undo command. <b>Currently not implemented</b>."\ | "the Undo command."\ | def createWhatsThis(self): ############################################## # File Toolbar ############################################## #### Open File #### fileOpenText = "<u><b>Open File</b></u> (Ctrl + O)</b></p><br> "\ "<p><img source=\"fileopen\"><br> "\ "Opens a new file."\ "</p>" QMimeSourceFactory.default... |
def posn_str(self, atm): """return the position of an atom (or, any vector -- kluge, sorry) as a string for use in our status messages """ try: x,y,z = atm.posn() except AttributeError: x,y,z = atm return "(%.2f, %.2f, %.2f)" % (x,y,z) | def bareMotion(self, event, singOnly=False): doPaint = 0 if self.o.selatom: self.o.selatom.molecule.changeapp() self.o.selatom = None doPaint = 1 p1, p2 = self.o.mousepoints(event) z = norm(p1-p2) x = cross(self.o.up,z) y = cross(z,x) mat = transpose(V(x,y,z)) for mol in self.o.assy.molecules: if not mol.hidden: a = mo... | |
if self.w.pasteP and self.pastable: self.pasteBond(a) elif not self.w.pasteP: self.attach(el, a) | a0 = a.singlet_neighbor() if self.w.pasteP: if self.pastable: thing, desc = self.pasteBond(a) if thing: status = "replaced open bond on %r with %s (%s)" % (a0, thing.name, desc) else: status = desc else: status = "nothing selected to paste" else: a1, desc = self.attach(el, a) if a1 != None: status = "replaced ope... | def leftDown(self, event): """If there's nothing nearby, deposit a new atom. If cursor is on a singlet, deposit an atom bonded to it. If it is a real atom, drag it around. """ a = self.o.selatom el = PeriodicTable[self.w.Element] self.modified = 1 self.o.assy.modified = 1 if a: # if something was "lit up" if a.element... |
if self.w.pasteP and self.pastable: self.pasteFree(atomPos) self.dragmol = None elif not self.w.pasteP: | if self.w.pasteP: if self.pastable: thing, desc = self.pasteFree(atomPos) self.dragmol = None status = "pasted %s (%s) at %s" % (thing.name, desc, self.posn_str(atomPos)) else: status = "nothing selected to paste" else: | def leftDown(self, event): """If there's nothing nearby, deposit a new atom. If cursor is on a singlet, deposit an atom bonded to it. If it is a real atom, drag it around. """ a = self.o.selatom el = PeriodicTable[self.w.Element] self.modified = 1 self.o.assy.modified = 1 if a: # if something was "lit up" if a.element... |
if len(m.singlets)==0: return if len(m.singlets)>1 and not m.hotspot: return | if len(m.singlets)==0: return None, "no open bonds in %r (only pasteable in empty space)" % m.name if len(m.singlets)>1 and not m.hotspot: return None, "%r has %d open bonds, but none has been set as its hotspot" % (m.name, len(m.singlets)) | def pasteBond(self, sing): m = self.pastable if len(m.singlets)==0: return if len(m.singlets)>1 and not m.hotspot: return numol = self.pastable.copy(None) # bruce 041116 added by (implicitly, by default) cauterize = 1 # to mol.copy(); change this to cauterize = 0 here if unwanted, # and for other uses of mol.copy in th... |
self.o.assy.addmol(numol) bond_at_singlets(hs,sing) | bond_at_singlets(hs,sing) self.o.assy.addmol(numol) return numol, "copy of %r" % m.name | def pasteBond(self, sing): m = self.pastable if len(m.singlets)==0: return if len(m.singlets)>1 and not m.hotspot: return numol = self.pastable.copy(None) # bruce 041116 added by (implicitly, by default) cauterize = 1 # to mol.copy(); change this to cauterize = 0 here if unwanted, # and for other uses of mol.copy in th... |
if not el.numbonds: return | if not el.numbonds: return (None, "%s makes no bonds; can't attach one to an open bond" % el.name) | def attach(self, el, singlet): if not el.numbonds: return spot = self.findSpot(el, singlet) pl = [] mol = singlet.molecule cr = el.rcovalent |
self.bond1(el, singlet, spot) | a = self.bond1(el, singlet, spot) | def attach(self, el, singlet): if not el.numbonds: return spot = self.findSpot(el, singlet) pl = [] mol = singlet.molecule cr = el.rcovalent |
self.bond2(el,pl) | a = self.bond2(el,pl) | def attach(self, el, singlet): if not el.numbonds: return spot = self.findSpot(el, singlet) pl = [] mol = singlet.molecule cr = el.rcovalent |
self.bond3(el,pl) | a = self.bond3(el,pl) | def attach(self, el, singlet): if not el.numbonds: return spot = self.findSpot(el, singlet) pl = [] mol = singlet.molecule cr = el.rcovalent |
self.bond4(el,pl) | a = self.bond4(el,pl) | def attach(self, el, singlet): if not el.numbonds: return spot = self.findSpot(el, singlet) pl = [] mol = singlet.molecule cr = el.rcovalent |
self.o.paintGL() | self.o.paintGL() return a, desc | def attach(self, el, singlet): if not el.numbonds: return spot = self.findSpot(el, singlet) pl = [] mol = singlet.molecule cr = el.rcovalent |
if self.filtered(): return | def kill(self): """Public method: kill an atom: unpick it, remove it from its jigs, remove its bonds, then remove it from its molecule. Do all necessary invalidations. (Note that molecules left with no atoms, by this or any other op, will themselves be killed.) """ if self.filtered(): return # Fixes bug 1599. mark 06... | |
def get_povray_color(lights): def getColor(amb, dif): rst = min(amb + dif * 0.125, 1.0) return "<%f, %f, %f>"%(rst, rst, rst) ((a0,d0,e0),(a1,d1,e1),(a2,d2,e2)) = lights if e0: c1 = getColor(a0, d0) else: c1 = None if e1: c2 = getColor(a1, d1) else: c2 = None if e2: c3 = getColor(a2, d2) else: c3 = None return c1,... | def get_povray_color(lights): def getColor(amb, dif): rst = min(amb + dif * 0.125, 1.0) return "<%f, %f, %f>"%(rst, rst, rst) ((a0,d0,e0),(a1,d1,e1),(a2,d2,e2)) = lights if e0: c1 = getColor(a0, d0) else: c1 = None if e1: c2 = getColor(a1, d1) else: c2 = None if e2: c3 = getColor(a2, d2) else: c3 = None return c1,... | |
f.write("// Recommended window size: width=%d, height=%d \n\n"%(glpane.width, glpane.height)) | f.write("// Recommended window size: width=%d, height=%d \n"%(glpane.width, glpane.height)) f.write("// Suggested command line switches: +A +W%d +H%d\n\n"%(glpane.width, glpane.height)) | def writepovfile(part, glpane, filename): #bruce 050927 replaced assy argument with part and glpane args, added docstring "write the given part into a new POV-Ray file with the given name, using glpane and glpane.mode for lightig, color, etc" f = open(filename,"w") ## bruce 050325 removed this (no effect except on assy... |
light1 = (glpane.out + glpane.left + glpane.up) * 10.0 light2 = (glpane.right + glpane.up) * 10.0 light3 = glpane.right + glpane.down + glpane.out/2.0 color1, color2, color3 = get_povray_color(glpane._lights) if color1: f.write("\nlight_source {\n " + povpoint(light1) + "\n color " + color1 + " parallel\n}\n") if... | def writepovfile(part, glpane, filename): #bruce 050927 replaced assy argument with part and glpane args, added docstring "write the given part into a new POV-Ray file with the given name, using glpane and glpane.mode for lightig, color, etc" f = open(filename,"w") ## bruce 050325 removed this (no effect except on assy... | |
def writepovlighting(f, glpane): '''Writes a light source record for each light (if enabled) and the 'Atomic' finish record. These records impact the lighting affect. ''' pos1 = (glpane.right * -50) + (glpane.up * 70) + (glpane.out * 30) pos2 = (glpane.right * -20) + (glpane.up * 20) + (glpane.out * 20) pos3... | def writepovfile(part, glpane, filename): #bruce 050927 replaced assy argument with part and glpane args, added docstring "write the given part into a new POV-Ray file with the given name, using glpane and glpane.mode for lightig, color, etc" f = open(filename,"w") ## bruce 050325 removed this (no effect except on assy... | |
cspheres.append((st[0],st[1],st[2],rt,use_colors)) | cspheres.append((st[0],st[1],st[2],rt,atoms[i])) | def compute_memo(self, chunk): """If drawing chunk in this display mode can be optimized by precomputing some info from chunk's appearance, compute that info and return it. If this computation requires preference values, access them as env.prefs[key], and that will cause the memo to be removed (invalidated) when that p... |
method = 0 (tm, nm) = ps.CreateSurface(cspheres, level, method) | method = 2 ((em,pm,am), nm) = ps.CreateSurface(cspheres, level, method) cm = [] if True: for i in range(len(am)): if am[i] == 0: cm.append((0.5,0.5,0.5)) if am[i] == 0: cm.append((0.5,0.5,0.5)) if am[i] == 1: cm.append((0.79,0,0)) if am[i] == 2: cm.append((0.77,0.77,0.77)) if am[i] == 3: cm.append((0.38,0.38,0.38)) if ... | def compute_memo(self, chunk): """If drawing chunk in this display mode can be optimized by precomputing some info from chunk's appearance, compute that info and return it. If this computation requires preference values, access them as env.prefs[key], and that will cause the memo to be removed (invalidated) when that p... |
self.set_cmdname('Move Atom') | if self.drag_multiple_atoms: self.set_cmdname('Move Atoms') else: self.set_cmdname('Move Atom') | def atomLeftUp(self, a, event): # Was atomClicked(). mark 060220. '''Real atom <a> was clicked, so select, unselect or delete it based on the current modkey. - If no modkey is pressed, clear the selection and pick atom <a>. - If Shift is pressed, pick <a>, adding it to the current selection. - If Ctrl is pressed, unpi... |
return | def atomLeftDouble(self): # mark 060308 '''Atom double click event handler for the left mouse button. ''' if self.o.modkeys == 'Control': self.o.assy.unselectConnected( [ self.obj_doubleclicked ] ) elif self.o.modkeys == 'Shift+Control': self.o.assy.deleteConnected( self.neighbors_of_last_deleted_atom ) else: self.o.as... | |
nochange = True | pass | def jigLeftUp(self, j, event): '''Jig <j> was clicked, so select, unselect or delete it based on the current modkey. - If no modkey is pressed, clear the selection and pick jig <j>. - If Shift is pressed, pick <j>, adding it to the current selection. - If Ctrl is pressed, unpick <j>, removing it from the current selec... |
env.history.message("unpicked %r" % j) | env.history.message("Unselected %r" % j.name) | def jigLeftUp(self, j, event): '''Jig <j> was clicked, so select, unselect or delete it based on the current modkey. - If no modkey is pressed, clear the selection and pick jig <j>. - If Shift is pressed, pick <j>, adding it to the current selection. - If Ctrl is pressed, unpick <j>, removing it from the current selec... |
env.history.message("deleted %r" % j.name) for a in j.atoms[:]: self.atoms_of_last_deleted_jig.append(a) | env.history.message("Deleted %r" % j.name) self.atoms_of_last_deleted_jig.extend(j.atoms) | def jigLeftUp(self, j, event): '''Jig <j> was clicked, so select, unselect or delete it based on the current modkey. - If no modkey is pressed, clear the selection and pick jig <j>. - If Shift is pressed, pick <j>, adding it to the current selection. - If Ctrl is pressed, unpick <j>, removing it from the current selec... |
'''Jig <j> was double clicked, so select, unselect or delete it based on the current modkey. | '''Jig <j> was double clicked, so select, unselect or delete its atoms based on the current modkey. | def jigLeftDouble(self): '''Jig <j> was double clicked, so select, unselect or delete it based on the current modkey. - If no modkey is pressed, pick the jig's atoms. - If Shift is pressed, pick the jig's atoms, adding them to the current selection. - If Ctrl is pressed, unpick the jig's atoms, removing them from the ... |
for a in self.obj_doubleclicked.atoms[:]: | for a in self.obj_doubleclicked.atoms: | def jigLeftDouble(self): '''Jig <j> was double clicked, so select, unselect or delete it based on the current modkey. - If no modkey is pressed, pick the jig's atoms. - If Shift is pressed, pick the jig's atoms, adding them to the current selection. - If Ctrl is pressed, unpick the jig's atoms, removing them from the ... |
for a in self.atoms_of_last_deleted_jig[:]: a.kill() else: for a in self.obj_doubleclicked.atoms[:]: | atoms = self.atoms_of_last_deleted_jig self.atoms_of_last_deleted_jig = [] if atoms: self.set_cmdname("Delete Jig's Atoms") env.history.message("Deleted jig's %d atoms" % len(atoms)) self.w.win_update() for a in atoms: a.kill() else: for a in self.obj_doubleclicked.atoms: | def jigLeftDouble(self): '''Jig <j> was double clicked, so select, unselect or delete it based on the current modkey. - If no modkey is pressed, pick the jig's atoms. - If Shift is pressed, pick the jig's atoms, adding them to the current selection. - If Ctrl is pressed, unpick the jig's atoms, removing them from the ... |
layout22 = QHBoxLayout(None,0,6,"layout22") self.okPB = QPushButton(self,"okPB") layout22.addWidget(self.okPB) self.cancelPB = QPushButton(self,"cancelPB") layout22.addWidget(self.cancelPB) LightingToolDialogLayout.addLayout(layout22,3,0) | def __init__(self,parent = None,name = None,modal = 0,fl = 0): QDialog.__init__(self,parent,name,modal,fl) | |
self.okPB.setText(self.__tr("Save")) self.cancelPB.setText(self.__tr("Cancel")) | def languageChange(self): self.setCaption(self.__tr("Lighting")) self.okPB.setText(self.__tr("Save")) self.cancelPB.setText(self.__tr("Cancel")) self.light1CB.setText(self.__tr("On")) self.textLabel2_4.setText(self.__tr("Light Source #1:")) self.textLabel1_4.setText(self.__tr("Ambient Brightness:")) self.textLabel1_3_2... | |
raise Exception("Povray for the Mac is confusing because it doesn't appear to have a " + "command-line interface as it does on Windows and Linux") | povray_bin, povray_exe = os.path.split(env.prefs[povray_path_prefs_key]) povray_dir, bin = os.path.split(povray_bin) povray_libpath = os.path.normpath(os.path.join(povray_dir, "include")) | def write_povray_ini_file(povray_ini_fname, povrayscene_file, width, height, output_type='png'): '''Write <povray_ini> file. The output image is placed next to the <povrayscene_file> file with the extension based on <output_type>. <width>, <height> are the width and height of the rendered image. (int) <output_type> is ... |
self.image0 = QPixmap() self.image0.loadFromData(image0_data,"PNG") self.image4 = QPixmap() self.image4.loadFromData(image4_data,"PNG") self.image10 = QPixmap() self.image10.loadFromData(image10_data,"PNG") self.image34 = QPixmap() self.image34.loadFromData(image34_data,"PNG") self.image37 = QPixmap() self.image37.load... | self.image0 = QPixmap(image0_data) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.displayActionGroup = QActionGroup(self,"displayActionGroup") self.displayActionGroup.setUsesDropDown(0) self.dispLinesAction = QAction(self.displayActionGroup,"dispLinesAction") self.dispLinesAction.setToggleAction(0) self.dispLinesAction.setIconSet(QIconSet(self.image12)) self.dispTubesAction = QAction(self.displ... | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() | |
self.dispBGColorAction.setIconSet(QIconSet(self.image18)) | self.dispBGColorAction.setIconSet(QIconSet(self.image12)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.selectAllAction.setIconSet(QIconSet(self.image19)) | self.selectAllAction.setIconSet(QIconSet(self.image13)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.selectNoneAction.setIconSet(QIconSet(self.image20)) | self.selectNoneAction.setIconSet(QIconSet(self.image14)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.selectInvertAction.setIconSet(QIconSet(self.image21)) | self.selectInvertAction.setIconSet(QIconSet(self.image15)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.toolsRevolveAction.setIconSet(QIconSet(self.image22)) | self.toolsRevolveAction.setIconSet(QIconSet(self.image16)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.toolsExtrudeAction.setIconSet(QIconSet(self.image23)) | self.toolsExtrudeAction.setIconSet(QIconSet(self.image17)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.toolsCookieCutAction.setIconSet(QIconSet(self.image24)) | self.toolsCookieCutAction.setIconSet(QIconSet(self.image18)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.toolsSimulatorAction.setIconSet(QIconSet(self.image25)) | self.toolsSimulatorAction.setIconSet(QIconSet(self.image19)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.ccAddLayerAction.setIconSet(QIconSet(self.image26)) | self.ccAddLayerAction.setIconSet(QIconSet(self.image20)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.toolsDoneAction.setIconSet(QIconSet(self.image27)) | self.toolsDoneAction.setIconSet(QIconSet(self.image21)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.toolsCancelAction.setIconSet(QIconSet(self.image28)) | self.toolsCancelAction.setIconSet(QIconSet(self.image22)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.editDeleteAction.setIconSet(QIconSet(self.image29)) | self.editDeleteAction.setIconSet(QIconSet(self.image23)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.dispObjectColorAction.setIconSet(QIconSet(self.image30)) | self.dispObjectColorAction.setIconSet(QIconSet(self.image24)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.dispOpenBondsAction.setIconSet(QIconSet(self.image31)) | self.dispOpenBondsAction.setIconSet(QIconSet(self.image25)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.modifyHydrogenateAction.setIconSet(QIconSet(self.image32)) | self.modifyHydrogenateAction.setIconSet(QIconSet(self.image26)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.modifyPassivateAction.setIconSet(QIconSet(self.image33)) | self.modifyPassivateAction.setIconSet(QIconSet(self.image27)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.jigsMotorAction.setIconSet(QIconSet(self.image34)) | self.jigsMotorAction.setIconSet(QIconSet(self.image28)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.modifyMinimizeAction.setIconSet(QIconSet(self.image35)) | self.modifyMinimizeAction.setIconSet(QIconSet(self.image29)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.elemChangePTableAction.setIconSet(QIconSet(self.image36)) | self.elemChangePTableAction.setIconSet(QIconSet(self.image30)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.toolsMovieAction.setIconSet(QIconSet(self.image37)) | self.toolsMovieAction.setIconSet(QIconSet(self.image31)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
self.dispTrihedronAction.setIconSet(QIconSet(self.image38)) | self.dispTrihedronAction.setIconSet(QIconSet(self.image32)) | def __init__(self,parent = None,name = None,fl = 0): QMainWindow.__init__(self,parent,name,fl) self.statusBar() |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.