<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>HippoDraw Class Library</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> <link rel="shortcut icon" href="hippoApp.ico"> </head><body> <!-- Generated by Doxygen 1.6.2 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li><a href="dirs.html"><span>Directories</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> <div class="navpath"><a class="el" href="dir_e91d7d57230b93275afa36a649c1c346.html">colorreps</a> </div> </div> <div class="contents"> <h1>BinToBlack.cxx</h1><a href="BinToBlack_8cxx.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <a name="l00012"></a>00012 <span class="preprocessor">#include "<a class="code" href="BinToBlack_8h.html" title="BinToBlack class interface.">BinToBlack.h</a>"</span> <a name="l00013"></a>00013 <a name="l00014"></a>00014 <span class="keyword">namespace </span>hippodraw { <a name="l00015"></a>00015 <a name="l00016"></a><a class="code" href="classhippodraw_1_1BinToBlack.html#a1437f84be44f0932e59bdcc0bfb962e7">00016</a> <a class="code" href="classhippodraw_1_1BinToBlack.html#a1437f84be44f0932e59bdcc0bfb962e7" title="The constructor.">BinToBlack::</a> <a name="l00017"></a>00017 <a class="code" href="classhippodraw_1_1BinToBlack.html#a1437f84be44f0932e59bdcc0bfb962e7" title="The constructor.">BinToBlack</a> ( <span class="keyword">const</span> <span class="keywordtype">char</span> * name ) <a name="l00018"></a>00018 : <a class="code" href="classhippodraw_1_1BinToColor.html" title="The base class for the value to the color transformation.">BinToColor</a> ( name ) <a name="l00019"></a>00019 { <a name="l00020"></a>00020 } <a name="l00021"></a><a class="code" href="classhippodraw_1_1BinToBlack.html#a9dd7763646aee6fd5d56af8466620118">00021</a> <a name="l00022"></a>00022 <a class="code" href="classhippodraw_1_1BinToBlack.html#a1437f84be44f0932e59bdcc0bfb962e7" title="The constructor.">BinToBlack::BinToBlack</a> ( <span class="keyword">const</span> <a class="code" href="classhippodraw_1_1BinToBlack.html" title="The class derived from the BinToColor class.">BinToBlack</a> & bin_to_color ) <a name="l00023"></a>00023 : <a class="code" href="classhippodraw_1_1BinToColor.html" title="The base class for the value to the color transformation.">BinToColor</a> ( bin_to_color ) <a name="l00024"></a>00024 { <a name="l00025"></a>00025 } <a name="l00026"></a><a class="code" href="classhippodraw_1_1BinToBlack.html#acf2d9ae0de44b8efbce24084b3ea5184">00026</a> <a name="l00027"></a>00027 <a class="code" href="classhippodraw_1_1BinToColor.html" title="The base class for the value to the color transformation.">BinToColor</a> * <a class="code" href="classhippodraw_1_1BinToBlack.html#acf2d9ae0de44b8efbce24084b3ea5184" title="Creates a copy of itself.">BinToBlack:: clone</a> ()<span class="keyword"> const</span> <a name="l00028"></a>00028 <span class="keyword"></span>{ <a name="l00029"></a>00029 <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="classhippodraw_1_1BinToBlack.html#a1437f84be44f0932e59bdcc0bfb962e7" title="The constructor.">BinToBlack</a> ( *<span class="keyword">this</span> ); <a name="l00030"></a>00030 } <a name="l00031"></a>00031 <a name="l00032"></a>00032 <span class="keywordtype">void</span> <a name="l00033"></a><a class="code" href="classhippodraw_1_1BinToBlack.html#a63a596c7bccb4282016c1a5a4f0cf8a0">00033</a> <a class="code" href="classhippodraw_1_1BinToBlack.html#a63a596c7bccb4282016c1a5a4f0cf8a0" title="This function does the actual calculation that transforms the given value into a...">BinToBlack::</a> <a name="l00034"></a>00034 <a class="code" href="classhippodraw_1_1BinToBlack.html#a63a596c7bccb4282016c1a5a4f0cf8a0" title="This function does the actual calculation that transforms the given value into a...">doubleToColor</a> ( <span class="keywordtype">double</span>, <a class="code" href="classhippodraw_1_1Color.html" title="A Color class for creating the color object following the standard RGB color space...">Color</a> & color )<span class="keyword"> const</span> <a name="l00035"></a>00035 <span class="keyword"></span>{ <a name="l00036"></a>00036 <span class="comment">// PlotterBase * plotter = Inspector:: getPlotter ();</span> <a name="l00037"></a>00037 <span class="comment">// if ( !plotter ) return;</span> <a name="l00038"></a>00038 <a name="l00039"></a>00039 <span class="comment">//const Color & rep_color = plotter->repColor();</span> <a name="l00040"></a>00040 <span class="comment">//QColor color_temp ( rep_color.getRed(),</span> <a name="l00041"></a>00041 <span class="comment">// rep_color.getGreen(),</span> <a name="l00042"></a>00042 <span class="comment">// rep_color.getBlue() );</span> <a name="l00043"></a>00043 <span class="comment">// color_temp = QColorDialog::getColor ( color_temp );</span> <a name="l00044"></a>00044 <span class="comment">//if ( color_temp.isValid() == false ) return;</span> <a name="l00045"></a>00045 <a name="l00046"></a>00046 <span class="comment">//int red = color_temp.red();</span> <a name="l00047"></a>00047 <span class="comment">//int green = color_temp.green();</span> <a name="l00048"></a>00048 <span class="comment">//int blue = color_temp.blue();</span> <a name="l00049"></a>00049 <a name="l00050"></a>00050 <span class="keywordtype">int</span> red=color.<a class="code" href="classhippodraw_1_1Color.html#a554f0bc3f055386ee8d8af3bed2270e0">getRed</a>(); <a name="l00051"></a>00051 <span class="keywordtype">int</span> green=color.<a class="code" href="classhippodraw_1_1Color.html#a2f7edccf0a09b1eb61bdca066be488ce">getGreen</a>(); <a name="l00052"></a>00052 <span class="keywordtype">int</span> blue=color.<a class="code" href="classhippodraw_1_1Color.html#a6ef3a4782f8f919620728bc62e80f1e1">getBlue</a>(); <a name="l00053"></a>00053 <a name="l00054"></a>00054 color.<a class="code" href="classhippodraw_1_1Color.html#aff0b32998d700c5a25a89f1b0304b035" title="Sets the color.">setColor</a> ( red, green, blue ); <a name="l00055"></a>00055 } <a name="l00056"></a>00056 <a name="l00057"></a>00057 <span class="keywordtype">bool</span> <a name="l00058"></a><a class="code" href="classhippodraw_1_1BinToBlack.html#a7bac923c9e9891d5f395654c6b9d72f0">00058</a> <a class="code" href="classhippodraw_1_1BinToBlack.html#a7bac923c9e9891d5f395654c6b9d72f0" title="Returns true if object can accept changing color,i.e.">BinToBlack::</a> <a name="l00059"></a>00059 <a class="code" href="classhippodraw_1_1BinToBlack.html#a7bac923c9e9891d5f395654c6b9d72f0" title="Returns true if object can accept changing color,i.e.">acceptChangeColor</a> ()<span class="keyword"> const</span> <a name="l00060"></a>00060 <span class="keyword"></span>{ <a name="l00061"></a>00061 <span class="keywordflow">return</span> <span class="keyword">true</span>; <a name="l00062"></a>00062 } <a name="l00063"></a>00063 <a name="l00064"></a>00064 } <span class="comment">// namespace hippodraw</span> <a name="l00065"></a>00065 </pre></div></div> <hr size="1"><address style="align: right;"><small> Generated for HippoDraw Class Library by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0> </a> </small></address> </body> </html>