本文整理汇总了Python中chimera.baseDialog.ModelessDialog类的典型用法代码示例。如果您正苦于以下问题:Python ModelessDialog类的具体用法?Python ModelessDialog怎么用?Python ModelessDialog使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ModelessDialog类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, models):
self.models = models
if len(models) > 1:
self.title = "Add Note to %d Models" % (len(models))
else:
self.title = "Add Note to %s" % models[0].name
ModelessDialog.__init__(self)
示例2: destroy
def destroy(self):
self.mainDialog = None
if self.readScriptDialog:
self.readScriptDialog.destroy()
if self.saveDialog:
self.saveDialog.destroy()
ModelessDialog.destroy(self)
示例3: __init__
def __init__(self, mol=None, seq=None, blastData=None, sessionData=None):
self.loaded = {}
self.reference = mol
if isinstance(self.reference, StructureSequence):
self.molecule = self.reference.molecule
elif isinstance(self.reference, Molecule):
self.molecule = self.reference
self.sequence = seq # for session data only
if seq is None:
self.seq, self.refResList = self._makeSeq(mol)
else:
self.seq = seq
if self.reference:
seq, resList = self._makeSeq(mol)
self.refResList = self._getResidues(self.seq,
seq, resList)
if blastData:
self.initBlast(*blastData)
else:
self.initSession(*sessionData)
self.title = "Blast: %s" % self.basename
ModelessDialog.__init__(self)
if not blastData:
self._updateLoadButton()
if self.molecule:
self.closeHandler = chimera.openModels.addRemoveHandler(
self._modelClosedCB, None)
else:
self.closeHandler = None
self.sesHandler = chimera.triggers.addHandler(
SAVE_SESSION,
self._sessionCB, None)
chimera.extension.manager.registerInstance(self)
示例4: __init__
def __init__(self):
self.director = None
self.this_dir = os.path.split(os.path.abspath(__file__))[0]
ModelessDialog.__init__(self)
self.cache_width = None
self.cache_height = None
## get the width and height when the frame options are expanded
self.frmOptionsFrame.grid(row=FRM_OPTS_ROW ,column=0, columnspan=3, sticky='nsew')
chimera.tkgui.app.update_idletasks()
self.frm_width, self.frm_height = \
(self.frmOptionsFrame.winfo_width(), self.frmOptionsFrame.winfo_height())
self.frmOptionsFrame.grid_forget()
chimera.tkgui.app.update_idletasks()
## get the width and height when the movie options are expanded
self.movOptionsFrame.grid(row=MOV_OPTS_ROW,column=0, columnspan=3, sticky='nsew')
chimera.tkgui.app.update_idletasks()
self.mov_width, self.mov_height = \
(self.movOptionsFrame.winfo_width(), self.movOptionsFrame.winfo_height())
self.movOptionsFrame.grid_forget()
chimera.tkgui.app.update_idletasks()
w,h = map(int,self.getCurrentDimensions())
self._toplevel.wm_geometry('%sx%s' % (w+30,h+20))
#self.director.adjustGfxSize()
chimera.tkgui.app.after(1000, self.showStatus, "Click the record button to start capturing frames")
示例5: __init__
def __init__(self, src_path = None):
self.currentPanelId = -1
self.panels = []
self.unique_id = 0
ModelessDialog.__init__(self)
self.NULL_PANEL = Panel(-1, self, name="")
self.NULL_PANEL.cmdStack.delB.configure(state="disabled")
self.NULL_PANEL.cmdStack.addB.configure(state="disabled")
self.NULL_PANEL.undoStack.delB.configure(state="disabled")
self.NULL_PANEL.undoStack.addB.configure(state="disabled")
self.refreshPanelInfo(-1)
self.save_path = None
self.updateWindowTitle()
self.gTitleOption.set("Chimera Demo")
if src_path:
self.loadDemo(src_path)
self.setSavePath(src_path)
self.updateWindowTitle()
self._toplevel.bind('<KeyRelease>', self.keyReleaseCB)
self._DIRTY = False
self._cached_save = None
示例6: __init__
def __init__(self, models):
self.models = models
if len(models) > 1:
name = "Multiple Models"
else:
name = models[0].name
self.title = "Compute Secondary Structure for %s" % name
ModelessDialog.__init__(self)
示例7: __init__
def __init__(self, model):
self.title = 'PDB Headers for %s' % model.name
self.model = model
from chimera import preferences
self.prefs = preferences.addCategory("PDB headers dialog",
preferences.HiddenCategory,
optDict={"ordering": "Alphabetical"})
ModelessDialog.__init__(self)
示例8: destroy
def destroy(self):
self.mav.triggers.deleteHandler(ADD_ASSOC,
self.addAssocHandlerID)
self.mav.triggers.deleteHandler(DEL_ASSOC,
self.delAssocHandlerID)
self.mav = None
chimera.openModels.deleteAddHandler(self.addHandlerID)
chimera.openModels.deleteRemoveHandler(self.removeHandlerID)
ModelessDialog.destroy(self)
示例9: __init__
def __init__(self, movie, startFrame, stride, endFrame, useSel,
ignoreBulk, ignoreHyds):
self.movie = movie
self.movie.subdialogs.append(self)
self.startFrame = startFrame
self.stride = stride
self.endFrame = endFrame
self.useSel = useSel
self.ignoreBulk = ignoreBulk
self.ignoreHyds = ignoreHyds
ModelessDialog.__init__(self)
示例10: __init__
def __init__(self, groupPanel):
self.groupPanel = groupPanel
options = {
"shownButs": {},
"executionList": ['attributes...'],
"shownColumns": {}
}
self.prefs = preferences.addCategory("Pseudobond Group Panel",
preferences.HiddenCategory,
optDict=options)
ModelessDialog.__init__(self)
示例11: __init__
def __init__(self, modelList, subSelection, *args, **kw):
from chimera import preferences
self._removeHandler = None
for m in modelList:
m.preclusterColor = m.color
self.subSelection = subSelection
self._cluster(modelList)
ModelessDialog.__init__(self, *args, **kw)
chimera.extension.manager.registerInstance(self)
self._removeHandler = chimera.openModels.addRemoveHandler(
self._modelsChanged, None)
示例12: __init__
def __init__(self, modelPanel):
self.modelPanel = modelPanel
options = {
"freqButs": {},
"executionList": ['attributes...'],
"shownColumns": {},
"showColor": False,
"lastUse": None
}
self.prefs = preferences.addCategory("Model Panel",
preferences.HiddenCategory,
optDict=options)
ModelessDialog.__init__(self)
示例13: destroy
def destroy(self):
self.regionListing.hlist._widgetCache.clear()
self.seqCanvas.mav.triggers.deleteHandler(DEL_ASSOC,
self.delAssocHandlerID)
if hasattr(self,'_selChangeHandler') and self._selChangeHandler:
chimera.triggers.deleteHandler("selection changed",
self._selChangeHandler)
if self._scfDialog:
self._scfDialog.destroy()
self._scfDialog = None
for rd in self.renameDialogs.values():
rd.destroy()
self.renameDialogs.clear()
ModelessDialog.destroy(self)
示例14: __init__
def __init__(self, model):
self.model = model
self.setInCallback = False
self.title = "%s attributes (model %s)" % (
readableName(model), model.oslIdent()[1:])
self.triggers = [('Model', chimera.triggers.addHandler(
'Model', self._refreshCB, None))]
self.refreshFuncs = {}
self.refreshFuncs['Model'] = []
if isinstance(self.model, chimera.Molecule) \
and len(self.model.pdbHeaders) > 0:
self.buttons = self.buttons + ["PDB Headers..."]
ModelessDialog.__init__(self)
示例15: __init__
def __init__(self, movie, startFrame, stride, endFrame, useSel, minRmsd,
maxRmsd, ignoreBulk, ignoreHyds, recolor):
self.movie = movie
self.movie.subdialogs.append(self)
self.startFrame = startFrame
self.stride = stride
self.endFrame = endFrame
self.useSel = useSel
self.minRmsd = minRmsd
self.maxRmsd = maxRmsd
self.ignoreBulk = ignoreBulk
self.ignoreHyds = ignoreHyds
self.recolor = recolor
self.title = self.titleFmt % (minRmsd, maxRmsd)
ModelessDialog.__init__(self)