Marx2DGraph Class Reference
[MarsyasQt]

Fully-featured realvec plotting Qt object

Marx2DGraph provides 2D graphing for Marsyas where the ordinates are given by a marsyas realvec object and the abscissa a per sample spacing. Plot types are give in Marx2DGraph.h and include points, precsion, linear and polynomial interpolation. More...

#include <Marx2DGraph.h>


Public Member Functions

void addLabel (std::string)
 addLabel
void displayXaxis (bool)
 displayXaxis
 Marx2DGraph (int size=0, QWidget *parent=0)
 The real constructor.
 Marx2DGraph (QWidget *parent=0)
 A default constructor.
void setAntialias (bool)
 setAntialias
void setAxisDisplayType (int)
 setAxisDisplayType
void setBGColor (QColor)
 setBGColor
bool setBuffer (Marsyas::realvec &)
 setBuffer
void setGraphDataColor (QColor)
 setGraphDataColor
void setGraphDataLineSize (float)
 setGraphDataLineSize
void setGraphDataPointSize (float)
 setGraphDataPointSize
void setGraphDataPointType (int)
 setGraphDataPointType
void setGraphLabelsAndAxisColor (QColor)
 setGraphLabelsAndAxisColor
void setPlotType (int)
 setPlotType
void setShowAxisScale (bool)
 setShowAxisScale
void setXAxisLabel (std::string)
 setXAxisLabel
void setXAxisLabelOn (bool)
 setXAxisLabel
void setYAxisLabel (std::string)
 setYAxisLabel
void setYAxisLabelOn (bool)
 setYAxisLabel


Detailed Description

Fully-featured realvec plotting Qt object

Marx2DGraph provides 2D graphing for Marsyas where the ordinates are given by a marsyas realvec object and the abscissa a per sample spacing. Plot types are give in Marx2DGraph.h and include points, precsion, linear and polynomial interpolation.

Definition at line 41 of file Marx2DGraph.h.


Constructor & Destructor Documentation

Marx2DGraph ( QWidget *  parent = 0  ) 

A default constructor.

A default constructor when buffer size isn't otherwise specified.

Definition at line 31 of file Marx2DGraph.cpp.

Marx2DGraph ( int  size = 0,
QWidget *  parent = 0 
)

The real constructor.

The real constructor

Parameters:
size an integer giving buffer size
parent a pointer to the parent widget

Definition at line 46 of file Marx2DGraph.cpp.


Member Function Documentation

void addLabel ( std::string  lb  ) 

addLabel

Give the graph a label and update the graphic.

Parameters:
lb a string providing the label

Definition at line 431 of file Marx2DGraph.cpp.

void displayXaxis ( bool  tf  ) 

displayXaxis

Toggles whether the X axis is drawn.

Parameters:
bool on/off

Definition at line 107 of file Marx2DGraph.cpp.

void setAntialias ( bool  tf  ) 

setAntialias

Toggles antialiasing on and off. When rapidly redrawing plot buffers, such as in plotting realtime audio output, antialias will probably need to be turned off, which is the default configuration.

Definition at line 299 of file Marx2DGraph.cpp.

void setAxisDisplayType ( int  type  ) 

setAxisDisplayType

Controls how the axis will be drawn: enum { CONNECTED, BROKEN }.

Parameters:
type an int given by the enumeration above

Definition at line 184 of file Marx2DGraph.cpp.

void setBGColor ( QColor  c  ) 

setBGColor

Set the background color of the graph. The default color is white.

Parameters:
c a QColor object

Definition at line 226 of file Marx2DGraph.cpp.

bool setBuffer ( Marsyas::realvec rv  ) 

setBuffer

Set the buffer and automatically update the graphics.

Parameters:
*b a pointer to an array of floats
s the size of the buffer
Returns:
bool true if the buffer's successfully updated

Definition at line 330 of file Marx2DGraph.cpp.

References realvec::getSize().

void setGraphDataColor ( QColor  c  ) 

setGraphDataColor

Change the plot color.

Parameters:
c a QColor object

Definition at line 197 of file Marx2DGraph.cpp.

void setGraphDataLineSize ( float  p  ) 

setGraphDataLineSize

Set the graph line thickness when plotting style is LINEAR_INTERPOLATION or POLYNOMIAL_INTERPOLATION.

Parameters:
p a float such as magnitude 2.0

Definition at line 270 of file Marx2DGraph.cpp.

void setGraphDataPointSize ( float  p  ) 

setGraphDataPointSize

Set the point size when the graph type is POINT.

Parameters:
p a float such as magnitude 5.0

Definition at line 240 of file Marx2DGraph.cpp.

void setGraphDataPointType ( int  t  ) 

setGraphDataPointType

Set the point style when the graph type is POINT. Options are given in the enumeration: enum { CIRCLES, SQUARES, XS };

Parameters:
t an int corresponding to the above enum

Definition at line 255 of file Marx2DGraph.cpp.

void setGraphLabelsAndAxisColor ( QColor  c  ) 

setGraphLabelsAndAxisColor

Change the labels and axis colors, ie. labels and axis are displayed in the same color

Parameters:
c a QColor object

Definition at line 212 of file Marx2DGraph.cpp.

void setPlotType ( int  type  ) 

setPlotType

Choose the style of the plot: enum { POINTS, PRECISION, LINEAR_INTERPOLATION, POLYNOMIAL_INTERPOLATION }.

Parameters:
type an int corresponding to the above enumeration

Definition at line 285 of file Marx2DGraph.cpp.

void setShowAxisScale ( bool  tf  ) 

setShowAxisScale

Toggle the displaying of axis scale label.

Parameters:
bool true/false is on/off respectively

Definition at line 313 of file Marx2DGraph.cpp.

void setXAxisLabel ( std::string  m  ) 

setXAxisLabel

Add a label below and center of the x axis.

Parameters:
string message

Definition at line 121 of file Marx2DGraph.cpp.

void setXAxisLabelOn ( bool  tf  ) 

setXAxisLabel

Add a label below and center of the x axis.

Parameters:
string message

Definition at line 149 of file Marx2DGraph.cpp.

void setYAxisLabel ( std::string  m  ) 

setYAxisLabel

Add a label below and center of the y axis.

Parameters:
string message

Definition at line 135 of file Marx2DGraph.cpp.

void setYAxisLabelOn ( bool  tf  ) 

setYAxisLabel

Add a label below and center of the y axis.

Parameters:
string message

Definition at line 166 of file Marx2DGraph.cpp.


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

Generated on Wed May 23 00:02:24 2012 for Marsyas by  doxygen 1.5.6