Package mcbase :: Package widgets :: Module mccombofield :: Class MCComboField
[hide private]
[frames] | no frames]

Class MCComboField

source code


Combined label and combo box widget.

Instance Methods [hide private]
 
__init__(self, parent=None)
Initializes the combo box from MCComboBox.
source code
string
get(self)
Returns current combo box value
source code
 
set(self, value)
Sets the current combo box.
source code
 
init(self, value)
Initializes the current combo box.
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
 
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)
  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 combo box from MCComboBox.

Overrides: object.__init__

get(self)

source code 

Returns current combo box value

Returns: string
Current text

set(self, value)

source code 

Sets the current combo box.

Parameters:
  • value (string) - Text to be selected

init(self, value)

source code 

Initializes the current combo box.

Parameters:
  • value (string) - List to be added

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)