Package mcbase :: Package widgets :: Module mcnumberfield :: Class MCNumberField
[hide private]
[frames] | no frames]

Class MCNumberField

source code


Combined label and number edit widget.

Instance Methods [hide private]
 
__init__(self, parent=None)
Initializes the number edit from MCNumberEdit.
source code
 
triggerEditingFinished(self)
Emits a custom signal when the underlying line edit's text is changed
source code
string
get(self)
Returns current number edit text in unicode.
source code
 
set(self, numStr)
Sets the current number edit number
source code
 
prepareWidgetVisual(self)
Sets up the custom widget.
source code
 
getOrientation(self)
Returns keyboardMode state
source code
 
setOrientation(self, mode=Qt.Horizontal)
Makes virtual keyboard available if mode is True.
source code
 
resetOrientation(self)
Resets keyboardMode state
source code
 
getLabel(self)
Returns the widget's label
source code
 
setLabel(self, label='') source code
 
getText(self)
Returns the widget's text
source code
 
setText(self, text='')
Sets the widget's text
source code
 
getSize(self)
Returns the widget's size
source code
 
setSize(self, size=0)
Sets the widget's size
source code
 
applyModelConstraints(self, saClass)
Adjusts the widget in accordance with the given ORM data.
source code
 
getModelCode(self)
Returns modelCode (Inherited from mcbase.widgets.mcwidget.MCWidget)
source code
 
resetModelCode(self)
Resets the modelCode of the widget (Inherited from mcbase.widgets.mcwidget.MCWidget)
source code
 
setModelCode(self, modelCode=None)
Sets the modelCode of the widget (Inherited from mcbase.widgets.mcwidget.MCWidget)
source code

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

Class Variables [hide private]
  orientation = pyqtProperty('Qt::Orientation', fget= getOrienta...
  label = pyqtProperty('QString', fget= getLabel, fset= setLabel)
  text = pyqtProperty('QString', fget= getText, fset= setText)
  size = pyqtProperty('int', fget= getSize, fset= setSize)
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, parent=None)
(Constructor)

source code 

Initializes the number edit from MCNumberEdit.

Overrides: object.__init__

get(self)

source code 

Returns current number edit text in unicode.

Returns: string
Current text

set(self, numStr)

source code 

Sets the current number edit number

Parameters:
  • numStr (string) - Text to be set to number edit.

applyModelConstraints(self, saClass)

source code 

Adjusts the widget in accordance with the given ORM data. Maximum length and other types of validators are created here. If modelCode property of the object is set, it is used, otherwise objectName property is used to determine the database mapping class.

Parameters:
  • saClass - Sqlalchemy class to be used by the widget.

Class Variable Details [hide private]

orientation

Value:
pyqtProperty('Qt::Orientation', fget= getOrientation, fset= setOrienta\
tion, freset= resetOrientation)