#NEWLINE# def _pixelPosToRangeValue( self , pos , opt ) : #NEWLINE# #INDENT# ' Map the pos argument to a value in the slider range\n\n        ' #NEWLINE# style = self . style ( ) #NEWLINE# groove_rect = style . subControlRect ( style . CC_Slider , groove_rect , style . SC_SliderGroove , self ) #NEWLINE# thumb_rect = style . subControlRect ( style . CC_Slider , opt , style . SC_SliderHandle , self ) #NEWLINE# if ( self . orientation ( ) == Qt . Horizontal ) : #NEWLINE# #INDENT# thumb_width = thumb_rect . width ( ) #NEWLINE# slider_min = groove_rect . x ( ) #NEWLINE# slider_max = ( ( groove_rect . right ( ) - thumb_width ) + 1 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# thumb_height = thumb_rect . height ( ) #NEWLINE# slider_min = groove_rect . y ( ) #NEWLINE# slider_max = ( ( groove_rect . bottom ( ) - thumb_height ) + 1 ) #NEWLINE# #UNINDENT# value = style . sliderValueFromPosition ( self . minimum ( ) , self . maximum ( ) , ( pos - slider_min ) , ( slider_max - slider_min ) , opt . upsideDown ) #NEWLINE# return value