def test_quickinfo(gui, atoms): gui.new_atoms(atoms) # (Note: String can be in any language) refstring = _('Single image loaded.') infostring = info(gui) assert refstring in infostring dia = gui.quick_info_window() # This is a bit weird and invasive ... txt = dia.things[0].text assert refstring in txt
def quick_info_window(self, key=None): from ase.gui.quickinfo import info info_win = ui.Window(_('Quick Info')) info_win.add(info(self)) # Update quickinfo window when we change frame def update(window): exists = window.exists if exists: # Only update if we exist window.things[0].text = info(self) return exists self.attach(update, info_win)
def update(window): exists = window.exists if exists: # Only update if we exist window.things[0].text = info(self) return exists
def quick_info_window(self): from ase.gui.quickinfo import info ui.Window('Quick Info').add(info(self))
def quick_info_window(self, key=None): from ase.gui.quickinfo import info ui.Window(_('Quick Info')).add(info(self))