camelot.camelot.view.validator.Validator

Package camelot :: Package camelot :: Package view :: Module validator :: Class Validator |
[hide private]
[frames] | no frames]

# Class Validator

source code

A validator class validates an entity before flushing it to the database and provides the user with feedback if the entity is not ready to flush

Instance Methods | [hide private]
__init__(self, admin, model) x.__init__(...) initializes x; see x.__class__.__doc__ for signature | source code
objectValidity(self, entity_instance) Returns: list of messages explaining invalid data empty list if object is valid | source code
isValid(self, row) Verify if a row in a model is 'valid' meaning it could be flushed to the database | source code
validityMessages(self, row) | source code
validityMessage(self, row, parent) Inform the user about the validity of the data at row, by showing a message box, this function can only be called if isValid has been called and is finished within the model thread | source code
Inherited from `PyQt4.QtCore.QObject`: `blockSignals`, `childEvent`, `children`, `connect`, `connectNotify`, `customEvent`, `deleteLater`, `disconnect`, `disconnectNotify`, `dumpObjectInfo`, `dumpObjectTree`, `dynamicPropertyNames`, `emit`, `event`, `eventFilter`, `findChild`, `findChildren`, `inherits`, `installEventFilter`, `isWidgetType`, `killTimer`, `metaObject`, `moveToThread`, `objectName`, `parent`, `property`, `receivers`, `removeEventFilter`, `sender`, `setObjectName`, `setParent`, `setProperty`, `signalsBlocked`, `startTimer`, `thread`, `timerEvent`, `tr`, `trUtf8` Inherited from `sip.wrapper`: `__delattr__`, `__getattribute__`, `__new__`, `__setattr__` Inherited from `object`: `__hash__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__str__`

Class Variables | [hide private]
Inherited from `PyQt4.QtCore.QObject`: `staticMetaObject`

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, admin, model) (Constructor) | source code
x.__init__(...) initializes x; see x.__class__.__doc__ for signature Overrides: object.__init__ (inherited documentation)

### objectValidity(self, entity_instance) | source code
Returns: list of messages explaining invalid data empty list if object is valid