PyANGKernel.GKCondition

class GKCondition

The GKCondition class allows to define a test about the value of a GKColumn in a GKObject , 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

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]]])
Parameters:
compile()

Prepare the condition.

getColumn()
Return type:

GKColumn

The column to evaluate

getGuiUnits()
Return type:

bool

Returns true if the values are given in GUI units, false if they are system units (so no conversion is needed)

getIgnoreDiacritics()
Return type:

bool

Returns wether the condition will ignore diacritics

getLinkType()
Return type:

LinkType

The link operation with the next condition (and/or)

getObjectColumn()
Return type:

GKColumn

The column to evaluate when the first column content is a GKObject

getOperator()
Return type:

Operator

The operator

getSecondValue()
Return type:

str

When using the range operator, the second value

getValue()
Return type:

str

The value to look for

match(obj[, context=GKContext.anyContext[, modelConn=None]])
Parameters:
Return type:

bool

Return true if the object match the condition.

match(obj, value, isANumber[, modelConn=None])
Parameters:
Return type:

bool

Return true if the object match the condition. This allows the user to get the matching value.

setColumn(column)
Parameters:

columnGKColumn

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.

setLinkType(atype)
Parameters:

atypeLinkType

The link operation with the next condition (and/or)

setModel(amodel)
Parameters:

amodelGKModel

setObjectColumn(column)
Parameters:

columnGKColumn

The column to evaluate when the first column content is a GKObject

setOperator(op)
Parameters:

opOperator

The operator

setSecondValue(value)
Parameters:

value – str

When using the range operator, the second value

setValue(value)
Parameters:

value – str

The value to look for