Stacked Graphs
Geometry & Aesthetics
 All Classes Functions Variables Enumerations
Public Types | Public Member Functions | Static Public Attributes | List of all members
GraphColorizer Class Reference

Class provides coloring for the graph layers by using linear interpolation. More...

#include <graphcolorizer.h>

Public Types

enum  ColoringAttribute { OnsetTime = 0, Volatility, SIZE_OF_ENUM }
 List of attributes which can be used to calculate an appropriate color value.
 

Public Member Functions

 GraphColorizer (QObject *parent)
 
void SetColors (QColor const beginColor, QColor const endColor)
 Sets the colors which define the start and end color of the linearly interpolated color gradient used to define the stacked graphs layer colors. More...
 
void Set2DColoring (bool enable)
 Sets a flag which enables 2D coloring: alpha value of color changes according to the layours sum value. More...
 
void Colorize (DataSet &const dataset, ColoringAttribute attr)
 Assigns each dataitem a color value according to the set begin/end colors and coloring attribute. More...
 

Static Public Attributes

static const char *const coloringAttribute_str [ColoringAttribute::SIZE_OF_ENUM] ={"OnsetTime", "Volatility"}
 String value of the attributes used to display in the GUI.
 

Detailed Description

Class provides coloring for the graph layers by using linear interpolation.

Member Function Documentation

void GraphColorizer::Colorize ( DataSet &const  dataset,
ColoringAttribute  attr 
)

Assigns each dataitem a color value according to the set begin/end colors and coloring attribute.

Parameters
datasetthe data which should be colorized
attrthe attribute which is used to determine the color
void GraphColorizer::Set2DColoring ( bool  enable)

Sets a flag which enables 2D coloring: alpha value of color changes according to the layours sum value.

Parameters
enablethe set flag: true...enable 2D coloring, false...disable 2D coloring
void GraphColorizer::SetColors ( QColor const  beginColor,
QColor const  endColor 
)

Sets the colors which define the start and end color of the linearly interpolated color gradient used to define the stacked graphs layer colors.

Parameters
beginColorthe start color of the linear gradient
endColorthe end color of the linear gradient

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