Package schrodinger :: Package application :: Package msv :: Package gui :: Module view_dialog :: Class ToggleOption
[hide private]
[frames] | no frames]

Class ToggleOption

       object --+                
                |                
sip.simplewrapper --+            
                    |            
          sip.wrapper --+        
                        |        
     PyQt4.QtCore.QObject --+    
                            |    
            Qt.QtCore.QObject --+
                                |
                               ToggleOption

An instance handles one side of a SideBySideToggle

Instance Methods [hide private]
 
clicked(...)
 
__init__(self, text, value, font, parent=None)
x.__init__(...) initializes x; see help(type(x)) for signature
ClickableLabel
_makeLabel(self, text)
Makes a label with the specified text
 
select(self, selected=True)
Changes the label's stylesheet to indicate whether it is selected
 
onLabelClicked(self)
Emits value when the label is clicked

Inherited from Qt.QtCore.QObject: connect, emit

Inherited from PyQt4.QtCore.QObject: __getattr__, blockSignals, childEvent, children, connectNotify, customEvent, deleteLater, destroyed, disconnect, disconnectNotify, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, event, 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.QtCore.QObject: staticMetaObject

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, text, value, font, parent=None)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • text (str) - The textual representation of the toggle option's value
  • value (object) - The value represented by the toggle option
  • font (QtGui.QFont) - The font object to use to calculate label dimensions
Overrides: object.__init__

_makeLabel(self, text)

 

Makes a label with the specified text

Parameters:
  • text (str) - The text to set on the label
Returns: ClickableLabel
A label with the appropriate text

select(self, selected=True)

 

Changes the label's stylesheet to indicate whether it is selected

Parameters:
  • selected (bool) - Whether to select the label