CMS 3D CMS Logo

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

Public Member Functions

def __init__
 
def createButton
 
def setValue
 
def value
 
- Public Member Functions inherited from Vispa.Views.PropertyView.TextEditWithButtonProperty
def __init__
 
def button
 
def buttonClicked
 
def createButton
 
def createLineEdit
 
def createTextEdit
 
def enterEvent
 
def hasButton
 
def keyPressEvent
 
def leaveEvent
 
def lineEdit
 
def properyHeight
 
def readOnly
 
def setAutohideButton
 
def setHighlighted
 
def setMultiline
 
def setReadOnly
 
def setToolTip
 
def setValue
 
def strValue
 
def textEdit
 
def value
 
def valueChanged
 
- Public Member Functions inherited from Vispa.Views.PropertyView.Property
def __init__
 
def categoryName
 
def deletable
 
def labelDoubleClicked
 
def name
 
def propertyView
 
def properyHeight
 
def setDeletable
 
def setHighlighted
 
def setName
 
def setPropertyView
 
def setReadOnly
 
def setUserInfo
 
def setValue
 
def userInfo
 
def value
 
def valueChanged
 

Static Public Attributes

 AUTHIDE_BUTTON = False
 
string USER_INFO = "Double field"
 
- Static Public Attributes inherited from Vispa.Views.PropertyView.TextEditWithButtonProperty
 AUTOHIDE_BUTTON = True
 
string BUTTON_LABEL = ''
 
- Static Public Attributes inherited from Vispa.Views.PropertyView.Property
int DEFAULT_HEIGHT = 20
 
string USER_INFO = "General property"
 

Private Member Functions

def _toString
 

Additional Inherited Members

- Public Attributes inherited from Vispa.Views.PropertyView.TextEditWithButtonProperty
 autohideButtonFlag
 

Detailed Description

TextEditWithButtonProperty which holds float numbers.

Definition at line 891 of file PropertyView.py.

Constructor & Destructor Documentation

def Vispa.Views.PropertyView.DoubleProperty.__init__ (   self,
  name,
  value,
  categoryName = None 
)
Constructor

Definition at line 899 of file PropertyView.py.

900  def __init__(self, name, value, categoryName=None):
901  """ Constructor
902  """
903  TextEditWithButtonProperty.__init__(self, name, value, categoryName=None)

Member Function Documentation

def Vispa.Views.PropertyView.DoubleProperty._toString (   self,
  object 
)
private

Definition at line 908 of file PropertyView.py.

Referenced by Vispa.Views.PropertyView.DoubleProperty.setValue().

909  def _toString(self, object):
910  if isinstance(object, float):
911  return "%.10g" % object
912  else:
913  return str(object)
def Vispa.Views.PropertyView.DoubleProperty.createButton (   self)
Do not create a button.

Definition at line 904 of file PropertyView.py.

905  def createButton(self):
906  """ Do not create a button."""
907  pass
def Vispa.Views.PropertyView.DoubleProperty.setValue (   self,
  value 
)

Definition at line 914 of file PropertyView.py.

References Vispa.Views.PropertyView.DoubleProperty._toString().

915  def setValue(self, value):
916  TextEditWithButtonProperty.setValue(self, self._toString(value))
def Vispa.Views.PropertyView.DoubleProperty.value (   self)
Transform text to float and return.

Definition at line 917 of file PropertyView.py.

Referenced by Types.string.configValue(), Types.FileInPath.configValue(), Mixins.UsingBlock.dumpPython(), Types.int32.insertInto(), Types.uint32.insertInto(), Types.int64.insertInto(), Types.uint64.insertInto(), Mixins.UsingBlock.insertInto(), Types.double.insertInto(), Types.bool.insertInto(), Types.string.insertInto(), Types.FileInPath.insertInto(), Types.vint32.insertInto(), Types.vuint32.insertInto(), Types.vint64.insertInto(), Types.vuint64.insertInto(), Types.vdouble.insertInto(), Types.vbool.insertInto(), and Types.vstring.insertInto().

918  def value(self):
919  """ Transform text to float and return.
920  """
921  try:
922  return float(TextEditWithButtonProperty.value(self))
923  except:
924  try:
925  return float.fromhex(TextEditWithButtonProperty.value(self))
926  except:
return ValueError("Entered value is not of type double.")

Member Data Documentation

Vispa.Views.PropertyView.DoubleProperty.AUTHIDE_BUTTON = False
static

Definition at line 897 of file PropertyView.py.

string Vispa.Views.PropertyView.DoubleProperty.USER_INFO = "Double field"
static

Definition at line 895 of file PropertyView.py.