Package schrodinger :: Package ui :: Module picking :: Class PickMixedToggle
[hide private]
[frames] | no frames]

Class PickMixedToggle

 object --+    
          |    
_PickToggle --+
              |
             PickMixedToggle

Class allowing to pick atom or bond depending on internal state.

Instance Methods [hide private]
 
__init__(self, checkbox, pick_atom_function, pick_bond_function, pick_atom_text='Pick an atom', pick_bond_text='Pick a bond')
Initialize picker class.
 
_command(self)
Gets called when checkbutton is checked or unchecked
 
setPickAtom(self, state)
Turn pick atom mode on and off.
 
setPickBond(self, state)
Convenience function to turn pick atom mode on and off.

Inherited from _PickToggle: fullCommand, on, start, stop

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, checkbox, pick_atom_function, pick_bond_function, pick_atom_text='Pick an atom', pick_bond_text='Pick a bond')
(Constructor)

 

Initialize picker class.

Parameters:
  • checkbox (QtGui.QCheckBox) - pick toggle
  • pick_atom_function (function) - this function is called when atom is picked. Must be a callable function that accepts one arguments (atom number).
  • pick_bond_function - this function is called when bond is picked. Must be a callable function that accepts two arguments (bond atoms).
  • pick_atom_text (str) - atom pick text that will be displayed in Maestro's status area (default "Pick an atom").
  • pick_bond_text (str) - bond pick text that will be displayed in Maestro's status area (default "Pick an atom").
  • param_bond_function (function)
Overrides: object.__init__

setPickAtom(self, state)

 

Turn pick atom mode on and off. If it's off bonds will be picked instead.

Parameters:
  • state (bool) - True or False, if True atoms will be picked. Otherwise bonds will be picked.

setPickBond(self, state)

 

Convenience function to turn pick atom mode on and off. If its off bonds will be picked instead.

Parameters:
  • state (bool) - True or False, if True bonds will be picked. Otherwise atoms will be picked.