#include <Graph.h>
Public Member Functions | |
Graph (QWidget *parent=0, const char *name=0) | |
~Graph (void) | |
void | setTitle (const char *title) |
void | setDescriptions (const vector< const char * > &desc) |
void | setDisplayType (GraphDisplayType type) |
void | clear (void) |
void | setValues (const vector< vector< double > > &plots) |
void | addValue (const vector< double > &plotitem) |
void | setDisplaySize (unsigned int display_size) |
unsigned int | getDisplaySize (void) const |
void | setColor (const QColor &col) |
void | setColor (const vector< QColor > &colors) |
void | setMax (const double maximum) |
void | setMargins (unsigned int margin_bars=2, unsigned int margin_left=4, unsigned int margin_right=4, unsigned int margin_up=4, unsigned int margin_down=4) |
Protected Member Functions | |
void | paintEvent (QPaintEvent *ev) |
Private Member Functions | |
void | plotFunction (const vector< double > &plot, const QColor &col, const vector< const char * > &desc) |
const QColor & | selectColor (const unsigned int idx) const |
Private Attributes | |
GraphDisplayType | type |
double | max |
vector< vector< double > > | plots |
vector< QColor > | colors |
vector< const char * > | desc |
const char * | title |
unsigned int | display_size |
QPainter * | painter |
unsigned int | margin_left |
unsigned int | margin_right |
unsigned int | margin_down |
unsigned int | margin_up |
unsigned int | margin_bars |
Shows a number of discrete input vectors as multiple function plots within one widget. Rather unflexible and trimmed for use within the neural network result GUI part. Function plots can plot only positive values, while Barchart and Waveform objects can plot negatives, too.
|
Default QT-style constructor.
|
|
Default destructor. |
|
Add a plot item to the end of the current plot content.
|
|
Clear the plot data and associated colors. |
|
Get the current amount to be plotted. Note: Only applicable for Function type plots.
|
|
QT paintEvent method, used to redraw the modified screen content.
|
|
Plot a single graph.
|
|
Select the appropiate color.
|
|
Setter for individual plot colors.
|
|
Setter for the default plot color.
|
|
Set the bar descriptions. The placement and meaning of the descriptions are interpreted according to the graph type. For Waveform and Function type graphs the text is displayed at the right border, after each graph trail. The array of descriptions refers to one description per graph. For Barchart and BarchartPositive type of graphs however, the descriptions refer to single bars and will be displayed right under each bar.
|
|
Set a fixed amount of values to plot. Note: Only applicable for Function plots. When more than display size items are given to plot, only the last display size items are shown, the first are discarded.
|
|
Set the display type of the widget.
|
|
Set the margins to be used for the chart. All margins are specified as pixels.
|
|
Setter for the maximum display value. For the Waveform display, the negative value is used as minimum.
|
|
Set the graph title.
|
|
Setter for the function plot content.
|
|
Respective color for each plot. When .size() is zero, the default color is used (black). |
|
Descriptions for individual bars, used only with Barchart and BarchartPositive type of graphs. |
|
Amount of plot items to display (only used for Function plots) Zero means scale appropiatly. |
|
Margin between individual bars (only Barchart types). |
|
Margin to the downward widget border. |
|
Margin to the left widget border. |
|
Margin to the right widget border. |
|
Margin to the upward widget border. |
|
The maximum displayable value. Used for all three chart types. |
|
The QT painter needed to (re-) draw the canvas. Initialized once upon object construction and used from there. |
|
The values to be displayed. Can be negative when negative is true. |
|
The overall plot title. Once set through the constructor. |
|
Type of display used to visualize data. |