QtiPlot 0.9.8.2
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
Spectrogram Class Reference

#include <Spectrogram.h>

List of all members.

Public Types

enum  ColorMapPolicy { GrayScale, Default, Custom }

Public Member Functions

virtual QwtDoubleRect boundingRect () const
void clearLabels ()
int colorBarWidth ()
LinearColorMap colorMap ()
LinearColorMapcolorMapPointer ()
ColorMapPolicy colorMapPolicy ()
int colorScaleAxis ()
virtual QPen contourPen (double level) const
QList< QPen > contourPenList ()
Spectrogramcopy (Graph *g)
Graphgraph ()
bool hasColorScale ()
bool hasLabels ()
bool hasSelectedLabels ()
QColor labelsColor ()
QFont labelsFont ()
QList< PlotMarker * > labelsList ()
double labelsRotation ()
bool labelsWhiteOut ()
double labelsXOffset ()
double labelsYOffset ()
int levels ()
Matrixmatrix ()
void moveLabel (const QPoint &pos)
QwtDoubleInterval range () const
QString saveToString ()
 Used when saving a project file.
bool selectedLabels (const QPoint &pos)
void selectLabel (bool on)
void setColorBarWidth (int width)
void setColorMapPen (bool on=true)
void setColorScaleAxis (int axis)
void setContourLevels (const QwtValueList &levels)
void setContourLinePen (int index, const QPen &pen)
void setContourPenList (QList< QPen > lst)
void setCustomColorMap (const LinearColorMap &map)
void setDefaultColorMap ()
void setGrayScale ()
void setLabelOffset (int index, double x, double y)
void setLabelsColor (const QColor &c)
void setLabelsFont (const QFont &font)
void setLabelsOffset (double x, double y)
void setLabelsRotation (double angle)
void setLabelsWhiteOut (bool whiteOut)
void setLevelsNumber (int levels)
bool setMatrix (Matrix *m, bool useFormula=false)
bool setUseMatrixFormula (bool on=true)
virtual void setVisible (bool on)
void showColorScale (int axis, bool on=true)
void showContourLineLabels (bool show=true)
 Spectrogram (Graph *graph, Matrix *m)
void updateData ()
bool useColorMapPen ()
bool useMatrixFormula ()

Protected Member Functions

void createLabels ()
virtual void drawContourLines (QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QwtRasterData::ContourLines &lines) const
virtual QImage renderImage (const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QwtDoubleRect &rect) const
void updateLabels (QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QwtRasterData::ContourLines &lines) const

Protected Attributes

int color_axis
 Axis used to display the color scale.
LinearColorMap color_map
ColorMapPolicy color_map_policy
 Flags.
double d_click_pos_x
 Keep track of the coordinates of the point where the user clicked when selecting the labels.
double d_click_pos_y
bool d_color_map_pen
 Flag telling if we use the color map to calculate the pen (QwtPlotSpectrogram::contourPen()).
Graphd_graph
 Pointer to the parent plot.
double d_labels_angle
QColor d_labels_color
 Labels color.
QFont d_labels_font
 Labels font.
QList< PlotMarker * > d_labels_list
 List of the text labels associated to this spectrogram.
double d_labels_x_offset
double d_labels_y_offset
Matrixd_matrix
 Pointer to the source data matrix.
QList< QPen > d_pen_list
PlotMarkerd_selected_label
 Keeps track of the plot marker on which the user clicked when selecting the labels.
bool d_show_labels
 Flag telling if we display the labels.
bool d_use_matrix_formula
 Flag telling that we evaluate the matrix expression instead of using the matrix data.
bool d_white_out_labels
 Flag telling if we paint a white background for the labels.

Member Enumeration Documentation

Enumerator:
GrayScale 
Default 
Custom 

Constructor & Destructor Documentation

Spectrogram::Spectrogram ( Graph graph,
Matrix m 
)

References range(), and setContourLevels().

Referenced by copy().


Member Function Documentation

QwtDoubleRect Spectrogram::boundingRect ( ) const [virtual]

References Matrix::boundingRect(), and d_matrix.

Referenced by Graph::closestCurve().

void Spectrogram::clearLabels ( )
int Spectrogram::colorBarWidth ( )

References color_axis, and d_graph.

Referenced by PlotDialog::setActiveCurve().

LinearColorMap Spectrogram::colorMap ( ) [inline]
LinearColorMap* Spectrogram::colorMapPointer ( ) [inline]

References color_map.

ColorMapPolicy Spectrogram::colorMapPolicy ( ) [inline]

References color_map_policy.

Referenced by PlotDialog::setActiveCurve().

int Spectrogram::colorScaleAxis ( ) [inline]
QPen Spectrogram::contourPen ( double  level) const [virtual]
QList<QPen> Spectrogram::contourPenList ( ) [inline]

References d_pen_list.

Spectrogram * Spectrogram::copy ( Graph g)
void Spectrogram::createLabels ( ) [protected]
void Spectrogram::drawContourLines ( QPainter *  p,
const QwtScaleMap &  xMap,
const QwtScaleMap &  yMap,
const QwtRasterData::ContourLines &  lines 
) const [protected, virtual]
Graph* Spectrogram::graph ( ) [inline]

References d_graph.

bool Spectrogram::hasColorScale ( )

References color_axis, and d_graph.

Referenced by PlotDialog::setActiveCurve(), and showColorScale().

bool Spectrogram::hasLabels ( ) [inline]

References d_show_labels.

Referenced by PlotDialog::setActiveCurve().

bool Spectrogram::hasSelectedLabels ( )

References d_selected_label.

Referenced by PlotDialog::setActiveCurve().

QColor Spectrogram::labelsColor ( ) [inline]

References d_labels_color.

Referenced by PlotDialog::setActiveCurve().

QFont Spectrogram::labelsFont ( ) [inline]

References d_labels_font.

QList<PlotMarker *> Spectrogram::labelsList ( ) [inline]

References d_labels_list.

Referenced by copy().

double Spectrogram::labelsRotation ( ) [inline]

References d_labels_angle.

Referenced by PlotDialog::setActiveCurve().

bool Spectrogram::labelsWhiteOut ( ) [inline]
double Spectrogram::labelsXOffset ( ) [inline]

References d_labels_x_offset.

Referenced by PlotDialog::setActiveCurve().

double Spectrogram::labelsYOffset ( ) [inline]

References d_labels_y_offset.

Referenced by PlotDialog::setActiveCurve().

int Spectrogram::levels ( ) [inline]
Matrix* Spectrogram::matrix ( ) [inline]
void Spectrogram::moveLabel ( const QPoint &  pos)
QwtDoubleInterval Spectrogram::range ( ) const
QImage Spectrogram::renderImage ( const QwtScaleMap &  xMap,
const QwtScaleMap &  yMap,
const QwtDoubleRect &  rect 
) const [protected, virtual]
QString Spectrogram::saveToString ( )
bool Spectrogram::selectedLabels ( const QPoint &  pos)
void Spectrogram::selectLabel ( bool  on)
void Spectrogram::setColorBarWidth ( int  width)

References color_axis, and d_graph.

Referenced by PlotDialog::acceptParams(), and Graph::copyCurves().

void Spectrogram::setColorMapPen ( bool  on = true)
void Spectrogram::setColorScaleAxis ( int  axis) [inline]

References color_axis.

Referenced by Graph::plotSpectrogram().

void Spectrogram::setContourLevels ( const QwtValueList &  levels)
void Spectrogram::setContourLinePen ( int  index,
const QPen &  pen 
)
void Spectrogram::setContourPenList ( QList< QPen >  lst)
void Spectrogram::setCustomColorMap ( const LinearColorMap map)
void Spectrogram::setDefaultColorMap ( )
void Spectrogram::setGrayScale ( )
void Spectrogram::setLabelOffset ( int  index,
double  x,
double  y 
)
void Spectrogram::setLabelsColor ( const QColor &  c)
void Spectrogram::setLabelsFont ( const QFont &  font)

References d_labels_font, and d_labels_list.

Referenced by Graph::restoreSpectrogram().

void Spectrogram::setLabelsOffset ( double  x,
double  y 
)
void Spectrogram::setLabelsRotation ( double  angle)
void Spectrogram::setLabelsWhiteOut ( bool  whiteOut)
void Spectrogram::setLevelsNumber ( int  levels)

References range(), and setContourLevels().

Referenced by Graph::restoreSpectrogram().

bool Spectrogram::setMatrix ( Matrix m,
bool  useFormula = false 
)
bool Spectrogram::setUseMatrixFormula ( bool  on = true)
void Spectrogram::setVisible ( bool  on) [virtual]
void Spectrogram::showColorScale ( int  axis,
bool  on = true 
)
void Spectrogram::showContourLineLabels ( bool  show = true)
void Spectrogram::updateData ( )
void Spectrogram::updateLabels ( QPainter *  p,
const QwtScaleMap &  xMap,
const QwtScaleMap &  yMap,
const QwtRasterData::ContourLines &  lines 
) const [protected]
bool Spectrogram::useColorMapPen ( ) [inline]

References d_color_map_pen.

Referenced by PlotDialog::setActiveCurve().

bool Spectrogram::useMatrixFormula ( ) [inline]

Member Data Documentation

int Spectrogram::color_axis [protected]
double Spectrogram::d_click_pos_x [protected]

Keep track of the coordinates of the point where the user clicked when selecting the labels.

Referenced by moveLabel(), and selectedLabels().

double Spectrogram::d_click_pos_y [protected]

Referenced by moveLabel(), and selectedLabels().

bool Spectrogram::d_color_map_pen [protected]

Flag telling if we use the color map to calculate the pen (QwtPlotSpectrogram::contourPen()).

Referenced by contourPen(), copy(), saveToString(), setColorMapPen(), setContourLinePen(), setContourPenList(), and useColorMapPen().

double Spectrogram::d_labels_angle [protected]
QColor Spectrogram::d_labels_color [protected]
QFont Spectrogram::d_labels_font [protected]
QList<PlotMarker *> Spectrogram::d_labels_list [protected]
double Spectrogram::d_labels_x_offset [protected]
double Spectrogram::d_labels_y_offset [protected]

Pointer to the source data matrix.

Referenced by boundingRect(), matrix(), range(), saveToString(), setMatrix(), setUseMatrixFormula(), and updateData().

QList<QPen> Spectrogram::d_pen_list [protected]

Keeps track of the plot marker on which the user clicked when selecting the labels.

Referenced by hasSelectedLabels(), moveLabel(), selectedLabels(), and selectLabel().

bool Spectrogram::d_show_labels [protected]

Flag telling if we display the labels.

Referenced by copy(), createLabels(), drawContourLines(), hasLabels(), saveToString(), and showContourLineLabels().

Flag telling that we evaluate the matrix expression instead of using the matrix data.

Referenced by saveToString(), setMatrix(), setUseMatrixFormula(), updateData(), and useMatrixFormula().

Flag telling if we paint a white background for the labels.

Referenced by copy(), createLabels(), labelsWhiteOut(), saveToString(), and setLabelsWhiteOut().


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