当前位置: 首页>>代码示例>>Python>>正文


Python baseDialog.ModelessDialog类代码示例

本文整理汇总了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)
开发者ID:davem22101,项目名称:semanticscience,代码行数:7,代码来源:noteDialog.py

示例2: destroy

	def destroy(self):
		self.mainDialog = None
		if self.readScriptDialog:
			self.readScriptDialog.destroy()
		if self.saveDialog:
			self.saveDialog.destroy()
		ModelessDialog.destroy(self)
开发者ID:davem22101,项目名称:semanticscience,代码行数:7,代码来源:gui.py

示例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)
开发者ID:davem22101,项目名称:semanticscience,代码行数:33,代码来源:gui.py

示例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")
开发者ID:davem22101,项目名称:semanticscience,代码行数:34,代码来源:RecorderGUI.py

示例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
开发者ID:davem22101,项目名称:semanticscience,代码行数:29,代码来源:DemoEditor.py

示例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)
开发者ID:davem22101,项目名称:semanticscience,代码行数:8,代码来源:ksdsspDialog.py

示例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)
开发者ID:davem22101,项目名称:semanticscience,代码行数:8,代码来源:pdbHeadersDialog.py

示例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)
开发者ID:davem22101,项目名称:semanticscience,代码行数:9,代码来源:AssociationsDialog.py

示例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)
开发者ID:davem22101,项目名称:semanticscience,代码行数:11,代码来源:Cluster.py

示例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)
开发者ID:davem22101,项目名称:semanticscience,代码行数:11,代码来源:pbgPanel.py

示例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)
开发者ID:davem22101,项目名称:semanticscience,代码行数:11,代码来源:base.py

示例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)
开发者ID:davem22101,项目名称:semanticscience,代码行数:13,代码来源:confDialog.py

示例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)
开发者ID:davem22101,项目名称:semanticscience,代码行数:14,代码来源:RegionBrowser.py

示例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)
开发者ID:davem22101,项目名称:semanticscience,代码行数:15,代码来源:modelInspector.py

示例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)
开发者ID:davem22101,项目名称:semanticscience,代码行数:15,代码来源:RmsdMap.py


注:本文中的chimera.baseDialog.ModelessDialog类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。