4.58. umbra.ui.widgets.variable_QPushButton

variable_QPushButton.py

Platform:
Windows, Linux, Mac Os X.
Description:
Defines the Variable_QPushButton class.

Others:

4.58.1. Module Attributes

umbra.ui.widgets.variable_QPushButton.LOGGER

4.58.2. Classes

class umbra.ui.widgets.variable_QPushButton.Variable_QPushButton(parent=None, state=True, colors=(<PyQt4.QtGui.QColor object at 0x10c932cf8>, <PyQt4.QtGui.QColor object at 0x10c932d70>), labels=(u'Yes', u'No'))[source]

Bases: PyQt4.QtGui.QPushButton

Defines a QPushButton subclass providing a button with different colors and labels depending on its clicked state.

Initializes the class.

Parameters:
  • parent (QObject) – Widget parent.
  • state (bool) – Current button state.
  • colors (tuple) – Button colors.
  • labels (tuple) – Button texts.
state[source]

Property for self.__state attribute.

Returns:self.__state.
Return type:bool
colors[source]

Property for self.__colors attribute.

Returns:self.__colors.
Return type:tuple
labels[source]

Property for self.__labels attribute.

Returns:self.__labels.
Return type:tuple