BinToBlack.cxx
Go to the documentation of this file.
1 
12 #include "BinToBlack.h"
13 
14 namespace hippodraw {
15 
17 BinToBlack ( const char * name )
18  : BinToColor ( name )
19 {
20 }
21 
22 BinToBlack::BinToBlack ( const BinToBlack & bin_to_color )
23  : BinToColor ( bin_to_color )
24 {
25 }
26 
28 {
29  return new BinToBlack ( *this );
30 }
31 
32 void
34 doubleToColor ( double, Color & color ) const
35 {
36  // PlotterBase * plotter = Inspector:: getPlotter ();
37  // if ( !plotter ) return;
38 
39  //const Color & rep_color = plotter->repColor();
40  //QColor color_temp ( rep_color.getRed(),
41 // rep_color.getGreen(),
42 // rep_color.getBlue() );
43  // color_temp = QColorDialog::getColor ( color_temp );
44  //if ( color_temp.isValid() == false ) return;
45 
46  //int red = color_temp.red();
47  //int green = color_temp.green();
48  //int blue = color_temp.blue();
49 
50  int red=color.getRed();
51  int green=color.getGreen();
52  int blue=color.getBlue();
53 
54  color.setColor ( red, green, blue );
55 }
56 
57 bool
60 {
61  return true;
62 }
63 
64 } // namespace hippodraw
65 
BinToBlack class interface.
virtual void doubleToColor(double value, Color &color) const
This function does the actual calculation that transforms the given value into a color using the curr...
Definition: BinToBlack.cxx:34
The base class for the value to the color transformation.
Definition: BinToColor.h:30
void setColor(const std::string &)
Sets the color.
Definition: Color.cxx:112
int getRed() const
Definition: Color.cxx:164
A Color class for creating the color object following the standard RGB color space.
Definition: Color.h:37
int getGreen() const
Definition: Color.cxx:169
virtual bool acceptChangeColor() const
Returns true if object can accept changing color,i.e.
Definition: BinToBlack.cxx:59
The class derived from the BinToColor class.
Definition: BinToBlack.h:30
virtual BinToColor * clone() const
Creates a copy of itself.
Definition: BinToBlack.cxx:27
int getBlue() const
Definition: Color.cxx:174
BinToBlack(const char *name)
The constructor.
Definition: BinToBlack.cxx:17

Generated for HippoDraw Class Library by doxygen