ui-utils

logger

color-utils

pipeLion.ui.utils.colorManager.backdropGradient(centerX, centerY, radius, color)[source]

method returns a circular gradient depending on a given center, radius and color

Parameters:
  • centerX (int) – center of the gradient
  • centerX – center of the gradient
  • radius (int) – desired radius
  • color (QColor) – color of the gradient
Returns:

a gradient

Return type:

QRadialGradient

pipeLion.ui.utils.colorManager.blackPen = <PyQt4.QtGui.QPen object at 0x3926c90>

default blackPen

pipeLion.ui.utils.colorManager.connectionColors = {'Project': <PyQt4.QtGui.QColor object at 0x3926f30>, 'default': <PyQt4.QtGui.QColor object at 0x41e8c20>, 'Shot': <PyQt4.QtGui.QColor object at 0x41e8c90>, 'Sequence': <PyQt4.QtGui.QColor object at 0x3926ec0>}

dictionary of connection-colors each type which Connection-Class-Name should have a different color if you add a new connection and want it to be shown differently, you can assign different QColors to it

pipeLion.ui.utils.colorManager.connectionPens = {'Project': 1, 'default': 1, 'Shot': 2, 'Sequence': 1}

dictionary of connection-pens each type which Connection-Class-Name shoukd have a different look if you add a new connection and want it to be shown differently, you can assign different Qt.PenStyle to it:

Qt.NoPen        0       no line at all. For example, QPainter.drawRect() fills but does not draw any boundary line.
Qt.SolidLine    1       A plain line.
Qt.DashLine     2       Dashes separated by a few pixels.
Qt.DotLine      3       Dots separated by a few pixels.
Qt.DashDotLine  4       Alternate dots and dashes.
Qt.DashDotDotLine       5       One dash, two dots, one dash, two dots.
Qt.CustomDashLine       6       A custom pattern defined using QPainterPathStroker.setDashPattern().
pipeLion.ui.utils.colorManager.getColorFromObject(inputObject)[source]

method is a wrapper for getColorFromString as it converts the given objects class name to a string

Parameters:inputObject (variant object) – any object
Returns:a color
Return type:QColor
pipeLion.ui.utils.colorManager.getColorFromString(inputString)[source]

calculates a color by using the hash-code of the given string

Parameters:inputString (string) – string which should be converted
Returns:a color
Return type:QColor
pipeLion.ui.utils.colorManager.getConnectionBrush(asset)[source]

returns the brush for a connection

Parameters:asset (AbstractAsset) – an asset
Returns:a brush from the connectionColors dictionary
Return type:QBrush
pipeLion.ui.utils.colorManager.getConnectionPen(asset)[source]

returns the brush for a connection

Parameters:asset (AbstractAsset) – an asset
Returns:a pen from the connectionPens and connectionColors dictionary
Return type:QPen
pipeLion.ui.utils.colorManager.getSelectionBrush(baseColor)[source]

calculates the color for selected objects

Parameters:baseColor (QColor) – color of an unselected object
Returns:the color the object shoud get if selected
Return type:QColor
pipeLion.ui.utils.colorManager.getUrgencyBrush(urgency)[source]

function returns a brush depending on the urgency of an asset:

urgency == 2 -->bad
urgency == 1 -->middle
any other case -->good
Parameters:urgency (int) – assets urgency
Returns:a brush from the stateColors dictionary
Return type:QBrush
pipeLion.ui.utils.colorManager.h1 = <PyQt4.QtGui.QFont object at 0x41e8050>

header-font

pipeLion.ui.utils.colorManager.h2 = <PyQt4.QtGui.QFont object at 0x41e8750>

header2-font

pipeLion.ui.utils.colorManager.shadowBrush = <PyQt4.QtGui.QBrush object at 0x3926c20>

shadow brush

pipeLion.ui.utils.colorManager.shadowColor = <PyQt4.QtGui.QColor object at 0x3926e50>

shadow color

pipeLion.ui.utils.colorManager.stateColors = {'middle': <PyQt4.QtGui.QColor object at 0x3a2c6e0>, 'bad': <PyQt4.QtGui.QColor object at 0x3a2ce50>, 'good': <PyQt4.QtGui.QColor object at 0x3a2c600>}

dictionary of colors by state

pipeLion.ui.utils.colorManager.userColors = {'assigned': <PyQt4.QtGui.QImage object at 0x39269f0>, 'none': <PyQt4.QtGui.QImage object at 0x3926de0>, 'you': <PyQt4.QtGui.QImage object at 0x3926750>}

icons of different user-types

pipeLion.ui.utils.colorManager.whitePen = <PyQt4.QtGui.QPen object at 0x3926fa0>

default white pen

Table Of Contents

Previous topic

generic-ui

This Page