COPASI API  4.16.103
Public Member Functions | Protected Attributes | List of all members
CColorScale1 Class Reference

#include <CColorScale.h>

Inheritance diagram for CColorScale1:
Inheritance graph
Collaboration diagram for CColorScale1:
Collaboration graph

Public Member Functions

 CColorScale1 ()
virtual QColor getColor (const C_FLOAT64 &number)
void setThreshold (const C_FLOAT64 &n)
- Public Member Functions inherited from CColorScale
 CColorScale ()
virtual void finishAutomaticParameterCalculation ()
bool isUsed () const
virtual void passValue (const C_FLOAT64 &)
void setIsUsed (bool f)
virtual void startAutomaticParameterCalculation ()
virtual ~CColorScale ()

Protected Attributes

C_FLOAT64 m1

Detailed Description

This returns white, if the absolute value of the number is smaller than the threshold. Otherwise if it is positive, the color is green, if negative red.

Definition at line 82 of file CColorScale.h.

Constructor & Destructor Documentation

CColorScale1::CColorScale1 ( )

Definition at line 23 of file CColorScale.cpp.

24  : m1(1e-4)
25 {}
C_FLOAT64 m1
Definition: CColorScale.h:92

Member Function Documentation

QColor CColorScale1::getColor ( const C_FLOAT64 number)

this method maps a number to a color.

Implements CColorScale.

Definition at line 28 of file CColorScale.cpp.

References m1.

29 {
30  QColor color;
32  if (fabs(number) < m1)
33  color = QColor(250, 250, 250);
34  else if (number > 0)
35  color = QColor(200, 255, 200);
36  else
37  color = QColor(255, 200, 200);
39  return color;
40 }
C_FLOAT64 m1
Definition: CColorScale.h:92
void CColorScale1::setThreshold ( const C_FLOAT64 n)

Definition at line 87 of file CColorScale.h.

References m1.

87 {m1 = n;};
C_FLOAT64 m1
Definition: CColorScale.h:92

Member Data Documentation

C_FLOAT64 CColorScale1::m1

Definition at line 92 of file CColorScale.h.

Referenced by getColor(), and setThreshold().

The documentation for this class was generated from the following files: