QtiPlot  0.9.8.2
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Spectrogram Class Reference

#include <Spectrogram.h>

Inheritance diagram for Spectrogram:

Public Types

enum  ColorMapPolicy { GrayScale, Default, Custom }
 

Public Member Functions

virtual QwtDoubleRect boundingRect () const
 
void clearLabels ()
 
int colorBarWidth ()
 
LinearColorMap colorMap ()
 
LinearColorMap * colorMapPointer ()
 
ColorMapPolicy colorMapPolicy ()
 
int colorScaleAxis ()
 
virtual QPen contourPen (double level) const
 
QList< QPen > contourPenList ()
 
Spectrogram * copy (Graph *g)
 
Graph * graph ()
 
bool hasColorScale ()
 
bool hasLabels ()
 
bool hasSelectedLabels ()
 
QColor labelsColor ()
 
QFont labelsFont ()
 
QList< PlotMarker * > labelsList ()
 
double labelsRotation ()
 
bool labelsWhiteOut ()
 
double labelsXOffset ()
 
double labelsYOffset ()
 
int levels ()
 
Matrix * matrix ()
 
void moveLabel (const QPoint &pos)
 
QwtDoubleInterval range () const
 
QString saveToString ()
 Used when saving a project file. More...
 
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. More...
 
LinearColorMap color_map
 
ColorMapPolicy color_map_policy
 Flags. More...
 
double d_click_pos_x
 Keep track of the coordinates of the point where the user clicked when selecting the labels. More...
 
double d_click_pos_y
 
bool d_color_map_pen
 Flag telling if we use the color map to calculate the pen (QwtPlotSpectrogram::contourPen()). More...
 
Graph * d_graph
 Pointer to the parent plot. More...
 
double d_labels_angle
 
QColor d_labels_color
 Labels color. More...
 
QFont d_labels_font
 Labels font. More...
 
QList< PlotMarker * > d_labels_list
 List of the text labels associated to this spectrogram. More...
 
double d_labels_x_offset
 
double d_labels_y_offset
 
Matrix * d_matrix
 Pointer to the source data matrix. More...
 
QList< QPen > d_pen_list
 
PlotMarker * d_selected_label
 Keeps track of the plot marker on which the user clicked when selecting the labels. More...
 
bool d_show_labels
 Flag telling if we display the labels. More...
 
bool d_use_matrix_formula
 Flag telling that we evaluate the matrix expression instead of using the matrix data. More...
 
bool d_white_out_labels
 Flag telling if we paint a white background for the labels. More...
 

Member Enumeration Documentation

◆ ColorMapPolicy

Enumerator
GrayScale 
Default 
Custom 

Constructor & Destructor Documentation

◆ Spectrogram()

Spectrogram::Spectrogram ( Graph *  graph,
Matrix *  m 
)

References range(), and setContourLevels().

Referenced by copy().

Member Function Documentation

◆ boundingRect()

QwtDoubleRect Spectrogram::boundingRect ( ) const
virtual

◆ clearLabels()

void Spectrogram::clearLabels ( )

◆ colorBarWidth()

int Spectrogram::colorBarWidth ( )

◆ colorMap()

LinearColorMap Spectrogram::colorMap ( )
inline

◆ colorMapPointer()

LinearColorMap* Spectrogram::colorMapPointer ( )
inline

◆ colorMapPolicy()

ColorMapPolicy Spectrogram::colorMapPolicy ( )
inline

◆ colorScaleAxis()

int Spectrogram::colorScaleAxis ( )
inline

◆ contourPen()

QPen Spectrogram::contourPen ( double  level) const
virtual

◆ contourPenList()

QList<QPen> Spectrogram::contourPenList ( )
inline

◆ copy()

Spectrogram * Spectrogram::copy ( Graph *  g)

◆ createLabels()

void Spectrogram::createLabels ( )
protected

◆ drawContourLines()

void Spectrogram::drawContourLines ( QPainter *  p,
const QwtScaleMap &  xMap,
const QwtScaleMap &  yMap,
const QwtRasterData::ContourLines &  lines 
) const
protectedvirtual

◆ graph()

Graph* Spectrogram::graph ( )
inline

References d_graph.

◆ hasColorScale()

bool Spectrogram::hasColorScale ( )

◆ hasLabels()

bool Spectrogram::hasLabels ( )
inline

References d_show_labels.

Referenced by PlotDialog::setActiveCurve().

◆ hasSelectedLabels()

bool Spectrogram::hasSelectedLabels ( )

◆ labelsColor()

QColor Spectrogram::labelsColor ( )
inline

◆ labelsFont()

QFont Spectrogram::labelsFont ( )
inline

References d_labels_font, and setLabelsFont().

◆ labelsList()

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

References d_labels_list, and showContourLineLabels().

Referenced by copy().

◆ labelsRotation()

double Spectrogram::labelsRotation ( )
inline

◆ labelsWhiteOut()

bool Spectrogram::labelsWhiteOut ( )
inline

◆ labelsXOffset()

double Spectrogram::labelsXOffset ( )
inline

References d_labels_x_offset.

Referenced by PlotDialog::setActiveCurve().

◆ labelsYOffset()

double Spectrogram::labelsYOffset ( )
inline

◆ levels()

int Spectrogram::levels ( )
inline

◆ matrix()

Matrix* Spectrogram::matrix ( )
inline

◆ moveLabel()

void Spectrogram::moveLabel ( const QPoint &  pos)

◆ range()

QwtDoubleInterval Spectrogram::range ( ) const

◆ renderImage()

QImage Spectrogram::renderImage ( const QwtScaleMap &  xMap,
const QwtScaleMap &  yMap,
const QwtDoubleRect &  rect 
) const
protectedvirtual

◆ saveToString()

QString Spectrogram::saveToString ( )

◆ selectedLabels()

bool Spectrogram::selectedLabels ( const QPoint &  pos)

◆ selectLabel()

void Spectrogram::selectLabel ( bool  on)

◆ setColorBarWidth()

void Spectrogram::setColorBarWidth ( int  width)

◆ setColorMapPen()

void Spectrogram::setColorMapPen ( bool  on = true)

◆ setColorScaleAxis()

void Spectrogram::setColorScaleAxis ( int  axis)
inline

◆ setContourLevels()

void Spectrogram::setContourLevels ( const QwtValueList &  levels)

◆ setContourLinePen()

void Spectrogram::setContourLinePen ( int  index,
const QPen &  pen 
)

◆ setContourPenList()

void Spectrogram::setContourPenList ( QList< QPen >  lst)

◆ setCustomColorMap()

void Spectrogram::setCustomColorMap ( const LinearColorMap &  map)

◆ setDefaultColorMap()

void Spectrogram::setDefaultColorMap ( )

◆ setGrayScale()

void Spectrogram::setGrayScale ( )

◆ setLabelOffset()

void Spectrogram::setLabelOffset ( int  index,
double  x,
double  y 
)

◆ setLabelsColor()

void Spectrogram::setLabelsColor ( const QColor &  c)

◆ setLabelsFont()

void Spectrogram::setLabelsFont ( const QFont &  font)

◆ setLabelsOffset()

void Spectrogram::setLabelsOffset ( double  x,
double  y 
)

◆ setLabelsRotation()

void Spectrogram::setLabelsRotation ( double  angle)

◆ setLabelsWhiteOut()

void Spectrogram::setLabelsWhiteOut ( bool  whiteOut)

◆ setLevelsNumber()

void Spectrogram::setLevelsNumber ( int  levels)

References range(), and setContourLevels().

Referenced by levels(), and Graph::restoreSpectrogram().

◆ setMatrix()

bool Spectrogram::setMatrix ( Matrix *  m,
bool  useFormula = false 
)

◆ setUseMatrixFormula()

bool Spectrogram::setUseMatrixFormula ( bool  on = true)

◆ setVisible()

void Spectrogram::setVisible ( bool  on)
virtual

◆ showColorScale()

void Spectrogram::showColorScale ( int  axis,
bool  on = true 
)

◆ showContourLineLabels()

void Spectrogram::showContourLineLabels ( bool  show = true)

◆ updateData()

void Spectrogram::updateData ( )

◆ updateLabels()

void Spectrogram::updateLabels ( QPainter *  p,
const QwtScaleMap &  xMap,
const QwtScaleMap &  yMap,
const QwtRasterData::ContourLines &  lines 
) const
protected

◆ useColorMapPen()

bool Spectrogram::useColorMapPen ( )
inline

References d_color_map_pen.

Referenced by PlotDialog::setActiveCurve().

◆ useMatrixFormula()

bool Spectrogram::useMatrixFormula ( )
inline

Member Data Documentation

◆ color_axis

int Spectrogram::color_axis
protected

◆ color_map

LinearColorMap Spectrogram::color_map
protected

◆ color_map_policy

ColorMapPolicy Spectrogram::color_map_policy
protected

◆ d_click_pos_x

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().

◆ d_click_pos_y

double Spectrogram::d_click_pos_y
protected

Referenced by moveLabel(), and selectedLabels().

◆ d_color_map_pen

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().

◆ d_graph

Graph* Spectrogram::d_graph
protected

◆ d_labels_angle

double Spectrogram::d_labels_angle
protected

◆ d_labels_color

QColor Spectrogram::d_labels_color
protected

◆ d_labels_font

QFont Spectrogram::d_labels_font
protected

◆ d_labels_list

QList<PlotMarker *> Spectrogram::d_labels_list
protected

◆ d_labels_x_offset

double Spectrogram::d_labels_x_offset
protected

◆ d_labels_y_offset

double Spectrogram::d_labels_y_offset
protected

◆ d_matrix

Matrix* Spectrogram::d_matrix
protected

◆ d_pen_list

QList<QPen> Spectrogram::d_pen_list
protected

◆ d_selected_label

PlotMarker* Spectrogram::d_selected_label
protected

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

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

◆ d_show_labels

bool Spectrogram::d_show_labels
protected

Flag telling if we display the labels.

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

◆ d_use_matrix_formula

bool Spectrogram::d_use_matrix_formula
protected

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

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

◆ d_white_out_labels

bool Spectrogram::d_white_out_labels
protected

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: