PyANGKernel.GKViewModeStyle¶
- class GKViewModeStyle¶
-
Synopsis¶
Methods¶
def
__init__()def
addRange()def
appliesTo()def
doRotate()def
getColorType()def
getColumn()def
getCondition()def
getFromScale()def
getRange()def
getRanges()def
getScaleByLane()def
getStyleType()def
getToScale()def
getTypeOwner()def
getUnits()def
matchCondition()def
removeRange()def
setColorType()def
setColumn()def
setCondition()def
setDoRotate()def
setDrawScale()def
setScaleByLane()def
setStyleType()def
setUnits()def
sortRanges()def
usesColumn()def
usesType()
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
Detailed Description¶
A visualization attribute style based in the value of an object attribute. It has several entries, each entry contains a range of values. In function of the object attribute value one of the entries is chosen. Note that a
GKViewModeStylemodifies only one visualization attribute.The internal name of the centroid configuration folder is “GKModel::viewStyles” The external name is “View Styles”
- class GKViewModeStyleType¶
This enum defines the various visualization attributes that can be modified.
Warning
keep GKViewModeStyleTypeSize consistent with it.
- class GKViewModeStyleVariableType¶
This enum defines if the visualization attribute will be modified discretely (one value per range) or continuously (interpolated values).
- class GKViewModeStyleColorType¶
This enum defines the way the brush and the pen are affected: - ePen: only the pen is visible and modified, no special brush is drawn. - eBrush: only the brush is visible and modified, no special pen is drawn. - eBoth: like eBrush, but with a black solid pen.
- __init__()¶
- addRange(range)¶
- Parameters:
range –
GKViewModeStyleRange
Adds a new range
- addRange(value[, asDefault=false])
- Parameters:
value – str
asDefault – bool
- Return type:
adds a regexp string value DISCRETE
- addRange(value[, asDefault=false])
- Parameters:
value – float
asDefault – bool
- Return type:
adds a range value DISCRETE
- addRange(value, numberValue[, asDefault=false])
- Parameters:
value – str
numberValue – float
asDefault – bool
- Return type:
adds a regexp string value DISCRETE initializing the from and to fields too
- addRange(from, to[, asDefault=false])
- Parameters:
from – float
to – float
asDefault – bool
- Return type:
adds a range entry as: [from, to) CONTINUOUS
Gets if
GKTypeinheriting from type owner are included- applyToSubtypes(apply)¶
- Parameters:
apply – bool
Sets if
GKTypeinheriting from type owner are includedReturns true if the view mode style rotates the painting according to the object’s angle.
See also
- getColorType()¶
- Return type:
Returns the color type
Returns the column
- getCondition()¶
- Return type:
Returns the condition
- getDefaultRange()¶
- Return type:
returns the default range
UnknownCommandGKViewModeStyle::setNormalizerColumn
return the from scale value
internal name of this style… there are functions that require some styles and they use this attribute to find the style (since the name is user editable and the ID depends of the moment of creation). It’s a good idea to set a unique value for this field (among all the other styles).
When drawing numeric labels, the precision.
Gets the max normalizer.
- getRange(value)¶
- Parameters:
value – str
- Return type:
returns the range for this value
- getRange(from[, to=0.0])
- Parameters:
from – float
to – float
- Return type:
returns the range for a value (from and to equal to the range values). For discrete variables the “to” parameter is not use.
- getRange(obj, modelConn, context)
- Parameters:
obj –
GKObjectmodelConn –
GKModelConnectioncontext –
GKContext
- Return type:
returns the range for this value
- getRangeByIndex(pos)¶
- Parameters:
pos – int
- Return type:
returns the range at pos (fron 0 to
getRanges().size()-1)- getRanges()¶
- Return type:
.list of GKViewModeStyleRange
returns all ranges
- getRangesForStackedBandsColumns(obj, modelConn, context)¶
- Parameters:
obj –
GKObjectmodelConn –
GKModelConnectioncontext –
GKContext
- Return type:
Dictionary with keys of type .int and values of type GKViewModeStyleRange.
returns the range for the value of each of the Diagram Columns (if any)
- getStyleType()¶
- Return type:
Returns the style type
return the to scale value
Returns the type
Return the units
- getVariableType()¶
- Return type:
Returns the variable type
returns whether the view mode style visibility depends of scale or not
- matchCondition(obj, modelConn[, context=GKContext.anyContext])¶
- Parameters:
obj –
GKObjectmodelConn –
GKModelConnectioncontext –
GKContext
- Return type:
Returns true if the object fits the condition
- removeAllRanges()¶
removes all ranges
- removeRange(range)¶
- Parameters:
range –
GKViewModeStyleRange
Removes the specified range. *
Warning
The specified range MUST be contained in the
GKViewModeStyle.- setColorType(aType)¶
- Parameters:
aType –
GKViewModeStyleColorType
Sets the color type
Sets the column of a specified type
- setCondition(cond)¶
- Parameters:
cond –
GKMultiCondition
Sets a condition to filter objects
- setDefaultRange(range)¶
- Parameters:
range –
GKViewModeStyleRange
sets the default range
Set a column that will normalize the values of the style column (dividing by). If
setUseNormalizing(True) is set then we will normalize the value by the maximum value in all the objects. IfsetUseNormalizing(False) we will take the object value.- setDoRotate(rotate)¶
- Parameters:
rotate – bool
See
doRotate.See also
- setDrawScale(afrom, ato)¶
- Parameters:
afrom – int
ato – int
Sets the drawing scale
- setInternalName(iname)¶
- Parameters:
iname – str
internal name of this style… there are functions that require some styles and they use this attribute to find the style (since the name is user editable and the ID depends of the moment of creation). It’s a good idea to set a unique value for this field (among all the other styles).
- setLabelDecimalPlaces(value)¶
- Parameters:
value – int
When drawing numeric labels, the precision.
- setLabelRoundingToZeroPlaces(value)¶
- Parameters:
value – int
- setMaxNormalizer(value)¶
- Parameters:
value – float
Sets the max normalizer.
- setScaleByLane(scale)¶
- Parameters:
scale – bool
- setScaleDependand(value)¶
- Parameters:
value – bool
sets whether the view mode style visibility depends of scale or not
See also
- setShowLabelAsPercentage(enabled)¶
- Parameters:
enabled – bool
Sets the label to be shown as percentage
See also
- setStyleType(aType)¶
- Parameters:
aType –
GKViewModeStyleType
Sets the style type
Sets the units
- setUseNormalizing(normalize)¶
- Parameters:
normalize – bool
UnknownCommandGKViewModeStyle::setNormalizerColumn
- setVariableType(aType)¶
- Parameters:
aType –
GKViewModeStyleVariableType
Sets the variable type
Gets whether the label is set to be shown as percentage
See also
- sortRanges()¶
Sort ranges by from value
UnknownCommandGKViewModeStyle::setNormalizerColumn
Returns true if the column is used in this style (or any of its ranges).
returns if the style is visible at a specified scale value