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


Python ModelessDialog.__init__方法代码示例

本文整理汇总了Python中chimera.baseDialog.ModelessDialog.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python ModelessDialog.__init__方法的具体用法?Python ModelessDialog.__init__怎么用?Python ModelessDialog.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在chimera.baseDialog.ModelessDialog的用法示例。


在下文中一共展示了ModelessDialog.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from chimera.baseDialog import ModelessDialog [as 别名]
# 或者: from chimera.baseDialog.ModelessDialog import __init__ [as 别名]
	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,代码行数:9,代码来源:noteDialog.py

示例2: __init__

# 需要导入模块: from chimera.baseDialog import ModelessDialog [as 别名]
# 或者: from chimera.baseDialog.ModelessDialog import __init__ [as 别名]
    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,代码行数:36,代码来源:RecorderGUI.py

示例3: __init__

# 需要导入模块: from chimera.baseDialog import ModelessDialog [as 别名]
# 或者: from chimera.baseDialog.ModelessDialog import __init__ [as 别名]
    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,代码行数:31,代码来源:DemoEditor.py

示例4: __init__

# 需要导入模块: from chimera.baseDialog import ModelessDialog [as 别名]
# 或者: from chimera.baseDialog.ModelessDialog import __init__ [as 别名]
	def __init__(self, residue, resType, lib, sessionData=None):
		self._sesHandlerID = chimera.triggers.addHandler(SAVE_SESSION,
							self._sessionCB, None)
		self.residue = residue
		self.lib = lib
		self.resType = resType
		self.title = "%s Side-Chain Rotamers" % residue
		if sessionData:
			self.bbdep, self.rotamers, self.tableData = sessionData
		else:
			from Rotamers import getRotamers
			self.bbdep, self.rotamers = getRotamers(residue,
					log=True, lib=lib, resType=resType)
			from Midas import linewidth, color
			linewidth(2, self.rotamers)
			color('byhet', self.rotamers)
			chimera.openModels.add(self.rotamers,
					sameAs=residue.molecule, hidden=True, noprefs=True)
			registerAttribute(chimera.Molecule, "chis")
			registerAttribute(chimera.Molecule, "rotamerProb")
			self.tableData = None
		self.resHandlerID = chimera.triggers.addHandler(
					'Residue', self._resChangeCB, None)
		self.dependentDialogInfo = [('Clashes', 'clash'),
				('H-Bonds', 'hbond'), ('Density', 'volume')]
		for label, ddn in self.dependentDialogInfo:
			setattr(self, ddn + "Dialog", None)
		ModelessDialog.__init__(self)
开发者ID:davem22101,项目名称:semanticscience,代码行数:30,代码来源:gui.py

示例5: __init__

# 需要导入模块: from chimera.baseDialog import ModelessDialog [as 别名]
# 或者: from chimera.baseDialog.ModelessDialog import __init__ [as 别名]
	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,代码行数:10,代码来源:ksdsspDialog.py

示例6: __init__

# 需要导入模块: from chimera.baseDialog import ModelessDialog [as 别名]
# 或者: from chimera.baseDialog.ModelessDialog import __init__ [as 别名]
	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,代码行数:10,代码来源:pdbHeadersDialog.py

示例7: __init__

# 需要导入模块: from chimera.baseDialog import ModelessDialog [as 别名]
# 或者: from chimera.baseDialog.ModelessDialog import __init__ [as 别名]
	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,代码行数:13,代码来源:pbgPanel.py

示例8: __init__

# 需要导入模块: from chimera.baseDialog import ModelessDialog [as 别名]
# 或者: from chimera.baseDialog.ModelessDialog import __init__ [as 别名]
	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,代码行数:13,代码来源:base.py

示例9: __init__

# 需要导入模块: from chimera.baseDialog import ModelessDialog [as 别名]
# 或者: from chimera.baseDialog.ModelessDialog import __init__ [as 别名]
	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,代码行数:13,代码来源:Cluster.py

示例10: __init__

# 需要导入模块: from chimera.baseDialog import ModelessDialog [as 别名]
# 或者: from chimera.baseDialog.ModelessDialog import __init__ [as 别名]
	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,代码行数:15,代码来源:confDialog.py

示例11: __init__

# 需要导入模块: from chimera.baseDialog import ModelessDialog [as 别名]
# 或者: from chimera.baseDialog.ModelessDialog import __init__ [as 别名]
	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,代码行数:17,代码来源:RmsdMap.py

示例12: __init__

# 需要导入模块: from chimera.baseDialog import ModelessDialog [as 别名]
# 或者: from chimera.baseDialog.ModelessDialog import __init__ [as 别名]
	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,代码行数:17,代码来源:modelInspector.py

示例13: __init__

# 需要导入模块: from chimera.baseDialog import ModelessDialog [as 别名]
# 或者: from chimera.baseDialog.ModelessDialog import __init__ [as 别名]
	def __init__(self, viewdock, *args, **kw):
		self.viewdock = viewdock
		self.results = viewdock.results
		self.compounds = Set()
		self.selected = None
		self.valueCache = {}
		self._isMapped = False
		self._colAddHandler = None
		self._colDelHandler = None
		self._colUpdHandler = None
		self._needChangeCompounds = False
		ModelessDialog.__init__(self, *args, **kw)
		self._exitHandler = self.viewdock.triggers.addHandler(
						self.viewdock.EXIT,
						self._exit, None)
		self._cpdChgHandler = self.viewdock.triggers.addHandler(
						self.viewdock.COMPOUND_STATE_CHANGED,
						self._compoundStateChanged,
						None)
开发者ID:davem22101,项目名称:semanticscience,代码行数:21,代码来源:FilterDialog.py

示例14: __init__

# 需要导入模块: from chimera.baseDialog import ModelessDialog [as 别名]
# 或者: from chimera.baseDialog.ModelessDialog import __init__ [as 别名]
	def __init__(self, seqCanvas):
		self.seqCanvas = seqCanvas
		seqCanvas.mainCanvas.bind('<ButtonPress-1>', self._mouseDownCB)
		seqCanvas.mainCanvas.bind('<ButtonRelease-1>', self._mouseUpCB)
		seqCanvas.mainCanvas.bind('<B1-Motion>', self._mouseDragCB)
		seqCanvas.mainCanvas.bind('<Button-3>',
				lambda e: self._focusCB(e, pref="residue"))
		seqCanvas.mainCanvas.bind('<Shift-Button-3>',
				lambda e: self._focusCB(e, pref="region"))
		self.title = "Region Browser for " + seqCanvas.mav.title
		self._dragLines = []
		self._dragRegion = None
		self._prevDrag = None
		self._bboxes = []
		self._afterID = None
		self._highlightedRegion = None
		self.regions = []
		self.associatedRegions = {}
		self.renameDialogs = {}
		self._scfDialog = None
		ModelessDialog.__init__(self)
开发者ID:davem22101,项目名称:semanticscience,代码行数:23,代码来源:RegionBrowser.py

示例15: __init__

# 需要导入模块: from chimera.baseDialog import ModelessDialog [as 别名]
# 或者: from chimera.baseDialog.ModelessDialog import __init__ [as 别名]
    def __init__(self, num, width, height, img_src, **kw):
        """num is the number of panels the wizard is to contain
        width is the desired width of each panel, in pixels
        height is the desired height of each panel, in pixels
        img_src is the absolute path to a .gif file containing
        an image to appear in the left-hand side of the wizard
        """

        self.panel_width = width
        self.panel_height = height

        self.img_src = img_src
        
        if kw.has_key('img_bg_color'):
            self.img_bg_color = kw['img_bg_color']
        else:
            self.img_bg_color = None
        
        self.numPanels = num
        self.pCurrent = 0
        self.pFrames =  [None] * self.numPanels
        
        ModelessDialog.__init__(self)
开发者ID:davem22101,项目名称:semanticscience,代码行数:25,代码来源:WizShell.py


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