CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
Vispa.Views.PropertyView.LabelItem Class Reference
Inheritance diagram for Vispa.Views.PropertyView.LabelItem:

Public Member Functions

def __init__
 
def property
 

Private Attributes

 _property
 

Detailed Description

A QTableWidgetItem with a convenient constructor. 

Definition at line 377 of file PropertyView.py.

Constructor & Destructor Documentation

def Vispa.Views.PropertyView.LabelItem.__init__ (   self,
  argument,
  color = Qt.white 
)
Constructor.

Argument may be either a string or a Property object.
If argument is the latter the property's user info will be used for the label's tooltip.

Definition at line 380 of file PropertyView.py.

381  def __init__(self, argument, color=Qt.white):
382  """ Constructor.
383 
384  Argument may be either a string or a Property object.
385  If argument is the latter the property's user info will be used for the label's tooltip.
386  """
387  if isinstance(argument, Property):
388  tooltip = argument.name() + " (" + argument.userInfo() + ")"
389  name = argument.name()
390  self._property = argument
391  else:
392  tooltip = argument
393  name = argument
394  self._property = None
395 
396  QTableWidgetItem.__init__(self, name)
397  self.setToolTip(tooltip)
398  self.setFlags(Qt.ItemIsEnabled)
399  self.setBackgroundColor(color)

Member Function Documentation

def Vispa.Views.PropertyView.LabelItem.property (   self)

Definition at line 400 of file PropertyView.py.

References Vispa.Views.PropertyView.ClosableProperty._property, and Vispa.Views.PropertyView.LabelItem._property.

401  def property(self):
402  return self._property

Member Data Documentation

Vispa.Views.PropertyView.LabelItem._property
private

Definition at line 389 of file PropertyView.py.

Referenced by Vispa.Plugins.ConfigEditor.ToolDataAccessor.ToolDataAccessor.properties(), and Vispa.Views.PropertyView.LabelItem.property().