Table Of Contents

Previous topic

pyviblib.gui.images

Next topic

pyviblib.gui.rendering

This Page

pyviblib.gui.main

Main graphical user interface of PyVib2

Classes

Main
the main window of PyVib2
Author:Maxim Fedorovsky
class pyviblib.gui.main.Main(master, startfiles=None)

The main window of PyVib2.

The following properties are exposed:
master
reference to the root Tkinter.Tk object
settings
dictionary with some application settings
lastdir
last visited directory
vibmolecules
list of molecules with the normal modes
windows
list of opened windows
exp_spectra_windows
list of opened windows with experimental spectra
thumbnails
list of thumnails
The following methods are exported:
add_molecule()
add a molecule to the main window
register_window()
register a window in the Windows menu
unregister_window()
unregister a window from the Windows menu
remove_thumbnail()
remove a thumbnail from the thumbnail pane
activate()
activate a window
update_thumbnails()
update the thumbnails

Initializer of the class.

Parameters:
  • master – must be a reference to the root Tkinter.Tk object
  • startfiles – list of files to be opened at startup
activate(window=None)

Activate a window.

Parameter:window – window to be activated (default None) if None, activate oneself

Note

this does not (yet) work under KDE, but does under IceWM (or MS Windows).

add_molecule(mol)

Add a thumbnail for a given molecule to the main window.

Parameter:mol – molecule to be added
register_window(window)

Register a new window in the Windows menu.

Parameter:window – the window to be registered must be a subclass of pyviblib.gui.windows.BaseWindow
remove_thumbnail(thmb)

Remove a thumbnail from the thumbnail pane.

Parameter:thmb – thumbnail to be removed
unregister_window(window)

Remove a window from the Windows menu.

Parameter:window – the window to be registered must be a subclass of pyviblib.gui.windows.BaseWindow
update_thumbnails()
Update the thumbnails.

SourceForge.net Logo