<s> from __future__ import absolute_import , division , print_function <EOL> import os <EOL> from glue . external . qt import QtGui <EOL> from glue . utils . qt import load_ui , connect_color <EOL> from glue . utils . qt . widget_properties import ValueProperty , connect_value <EOL> class HistogramLayerStyleWidget ( QtGui . QWidget ) : <EOL> alpha = ValueProperty ( '<STR_LIT>' , value_range = ( <NUM_LIT:0> , <NUM_LIT:1> ) ) <EOL> def __init__ ( self , layer_artist ) : <EOL> super ( HistogramLayerStyleWidget , self ) . __init__ ( ) <EOL> self . ui = load_ui ( '<STR_LIT>' , self , <EOL> directory = os . path . dirname ( __file__ ) ) <EOL> self . layer = layer_artist . layer <EOL> self . _connect_global ( ) <EOL> self . ui . label_color . setColor ( self . layer . style . color ) <EOL> self . alpha = self . layer . style . alpha <EOL> def _connect_global ( self ) : <EOL> connect_color ( self . layer . style , '<STR_LIT>' , self . ui . label_color ) <EOL> connect_value ( self . layer . style , '<STR_LIT>' , self . ui . slider_alpha , value_range = ( <NUM_LIT:0> , <NUM_LIT:1> ) ) </s>
