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', enable_lasso=False)
Initialize picker class.
 
_getEnableLasso(self)
 
_setEnableLasso(self, new_value)
 
_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]
  enable_lasso

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', enable_lasso=False)
(Constructor)

 

Initialize picker class.

@param checkbox: pick toggle
@type checkbox: L{QtGui.QCheckBox}

@param pick_atom_function: this function is called when atom is picked.
Must be a callable function that accepts one arguments (atom number, or
    ASL if enable_lasso is True).
@type pick_atom_function: function

@param pick_bond_function: this function is called when bond is picked.
Must be a callable function that accepts two arguments (bond atoms).
@type param_bond_function: function

@param pick_atom_text: atom pick text that will be displayed in
Maestro's status area (default "Pick an atom").
@type pick_atom_text: str

@param pick_bond_text: bond pick text that will be displayed in
Maestro's status area (default "Pick an atom").
@type pick_bond_text: str

@param enable_lasso: Whether to allow multiple atoms to be selected
    simultaneously via lasso.
@type enable_lasso=False

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.

Property Details [hide private]

enable_lasso

Get Method:
_getEnableLasso(self)
Set Method:
_setEnableLasso(self, new_value)