Package mcbase :: Package widgets :: Module mcdatefield :: Class MCDateField
[hide private]
[frames] | no frames]

Class MCDateField

source code


Combined label and date edit widget.

Instance Methods [hide private]
 
__init__(self, parent=None)
Initializes the date edit from MCDateEdit.
source code
datetime.date
get(self)
Returns current date
source code
 
set(self, date)
Sets the date.
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 date edit from MCDateEdit.

Overrides: object.__init__

get(self)

source code 

Returns current date

Returns: datetime.date
Current date

set(self, date)

source code 

Sets the date.

Parameters:
  • date (datetime.date) - Date to be set to date 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)