Package schrodinger :: Package application :: Package bioluminate :: Package actions :: Module factory :: Class SAction
[hide private]
[frames] | no frames]

Class SAction

       object --+                
                |                
sip.simplewrapper --+            
                    |            
          sip.wrapper --+        
                        |        
     PyQt4.QtCore.QObject --+    
                            |    
          PyQt4.QtGui.QAction --+
                                |
                               SAction

A QAction that enforces standards that are expected by some BioLuminate methods. The setObjectName method is used and the name conforms to the global ACTION_NAME variable in the factory module.

Nested Classes [hide private]

Inherited from PyQt4.QtGui.QAction: ActionEvent, MenuRole, Priority, SoftKeyRole

Instance Methods [hide private]
 
__init__(self, parent, name, text='', tooltip='', status_tip='', icon=None, base64_icon=None, slot=None, parent_slot=None, checkable=False, checked=False, visible=True, data=None, shortcut=None)
Create a SAction object
 
connectSlot(self, slot_callable=None, slot_name=None)
Connects action to a slot by either supplying a callable or a method name that belongs to the action's parent widget.
 
disconnectSlots(self)
Disconnects slots connected to this action.

Inherited from PyQt4.QtGui.QAction: actionGroup, activate, associatedGraphicsWidgets, associatedWidgets, autoRepeat, changed, data, event, font, hover, hovered, icon, iconText, isCheckable, isChecked, isEnabled, isIconVisibleInMenu, isSeparator, isVisible, menu, menuRole, parentWidget, priority, setActionGroup, setAutoRepeat, setCheckable, setChecked, setData, setDisabled, setEnabled, setFont, setIcon, setIconText, setIconVisibleInMenu, setMenu, setMenuRole, setPriority, setSeparator, setShortcut, setShortcutContext, setShortcuts, setSoftKeyRole, setStatusTip, setText, setToolTip, setVisible, setWhatsThis, shortcut, shortcutContext, shortcuts, showStatusText, softKeyRole, statusTip, text, toggle, toggled, toolTip, trigger, triggered, whatsThis

Inherited from PyQt4.QtCore.QObject: __getattr__, blockSignals, childEvent, children, connect, connectNotify, customEvent, deleteLater, destroyed, disconnect, disconnectNotify, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, emit, eventFilter, findChild, findChildren, inherits, installEventFilter, isWidgetType, killTimer, metaObject, moveToThread, objectName, parent, property, pyqtConfigure, receivers, removeEventFilter, sender, senderSignalIndex, setObjectName, setParent, setProperty, signalsBlocked, startTimer, thread, timerEvent, tr, trUtf8

Inherited from sip.simplewrapper: __new__

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

Class Variables [hide private]

Inherited from PyQt4.QtGui.QAction: AboutQtRole, AboutRole, ApplicationSpecificRole, HighPriority, Hover, LowPriority, NegativeSoftKey, NoRole, NoSoftKey, NormalPriority, PositiveSoftKey, PreferencesRole, QuitRole, SelectSoftKey, TextHeuristicRole, Trigger

Inherited from PyQt4.QtCore.QObject: staticMetaObject

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, parent, name, text='', tooltip='', status_tip='', icon=None, base64_icon=None, slot=None, parent_slot=None, checkable=False, checked=False, visible=True, data=None, shortcut=None)
(Constructor)

 

Create a SAction object

Parameters:
  • parent - The parent object of this action. This is used for all parent_slot calls.
  • name (str) - This will be used to name the object. The name will have "action_" prepended to it.
  • text (str) - The text to use for the action menus and toolbars
  • tooltip (str) - The action's tooltip
  • status_tip - The string to show in the status bar when the action is hovered over.
  • status_tip - The string to show in the status bar when the action is hovered over.
  • icon (string) - The icon path used to create a QtGui.QIcon
  • base64_icon (base64 encoded string) - The base64 encoded icon string
  • slot (callable) - The function called when action is executed
  • parent_slot (string) - The name of the parent function called when action is executed
  • checkable (bool) - Whether action has on/off state.
  • checkable (bool) - Whether action is on or off. Only good when checkable is True.
  • visible (bool) - Whether the action is shown or hidden
  • data (mixed) - Data associated with action
  • shortcut (string) - Shortcut to action
Overrides: object.__init__

connectSlot(self, slot_callable=None, slot_name=None)

 

Connects action to a slot by either supplying a callable or a method name that belongs to the action's parent widget. The slot_callable will override slot_name if both are passed in.

Parameters:
  • slot_callable (callable) - A function passed in to connect to the action
  • slot_name (string) - A method name found in the actions parent