PyANGKernel.GKCondition¶
- class GKCondition¶
The
GKConditionclass allows to define a test about the value of aGKColumnin aGKObject, comparing it to a QString value using a GKObjectComparer::Operator. (note: a QString value2 is also needed if the GKObjectComparer::Operator needs two values ; like GKObjectComparer::eRange, for example)Synopsis¶
Methods¶
def
__init__()def
compile()def
getColumn()def
getGuiUnits()def
getLinkType()def
getOperator()def
getSecondValue()def
getValue()def
match()def
setColumn()def
setGuiUnits()def
setLinkType()def
setModel()def
setOperator()def
setSecondValue()def
setValue()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
- class LinkType¶
- __init__()¶
- __init__(column, op, value[, value2=""[, guiUnits=false[, atype=GKCondition.LinkType.eNone]]])
- compile()¶
Prepare the condition.
The column to evaluate
Returns true if the values are given in GUI units, false if they are system units (so no conversion is needed)
Returns wether the condition will ignore diacritics
The link operation with the next condition (and/or)
The column to evaluate when the first column content is a
GKObjectThe operator
When using the range operator, the second value
The value to look for
- match(obj[, context=GKContext.anyContext[, modelConn=None]])¶
- Parameters:
obj –
GKObjectcontext –
GKContextmodelConn –
GKModelConnection
- Return type:
Return true if the object match the condition.
- match(obj, value, isANumber[, modelConn=None])
- Parameters:
obj –
GKObjectvalue – str
isANumber – bool
modelConn –
GKModelConnection
- Return type:
Return true if the object match the condition. This allows the user to get the matching value.
The column to evaluate
- setGuiUnits(guiUnits)¶
- Parameters:
guiUnits – bool
If set to true, values will be interpreted as GUI units, so they will get properly converted to System units before comparing. If false, no conversion will be performed.
- setIgnoreDiacritics(ignore)¶
- Parameters:
ignore – bool
If set to true, the comparison of strings will be done ignoring the diacritic marks.
The link operation with the next condition (and/or)
The column to evaluate when the first column content is a
GKObjectThe operator
- setSecondValue(value)¶
- Parameters:
value – str
When using the range operator, the second value
- setValue(value)¶
- Parameters:
value – str
The value to look for