QtiPlot  0.9.8.2
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
BoxCurve Class Reference

Box curve. More...

#include <BoxCurve.h>

Inheritance diagram for BoxCurve:
DataCurve PlotCurve

Public Types

enum  BoxStyle {
  NoBox, Rect, Diamond, WindBox,
  Notch
}
 
enum  LabelsDisplayPolicy { Percentage, Value, PercentageValue, ValuePercentage }
 
enum  Range {
  None, SD, SE, r25_75,
  r10_90, r5_95, r1_99, MinMax,
  UserDef
}
 

Public Member Functions

virtual QwtDoubleRect boundingRect () const
 
 BoxCurve (Table *t, const QString &name, int startRow=0, int endRow=-1)
 
double boxRange ()
 
int boxRangeType ()
 
int boxStyle ()
 
int boxWidth ()
 
void copy (BoxCurve *b)
 
bool hasBoxLabels ()
 
bool hasWhiskerLabels ()
 
LabelsDisplayPolicy labelsDisplayPolicy ()
 
void loadData ()
 
QwtSymbol::Style maxStyle ()
 
QwtSymbol::Style meanStyle ()
 
double median ()
 
QwtSymbol::Style minStyle ()
 
QwtSymbol::Style p1Style ()
 
QwtSymbol::Style p99Style ()
 
double quantile (double f)
 
void setBoxRange (int type, double coeff)
 
void setBoxStyle (int style)
 
void setBoxWidth (int width)
 
void setLabelsDisplayPolicy (const LabelsDisplayPolicy &policy)
 
void setMaxStyle (QwtSymbol::Style s)
 
void setMeanStyle (QwtSymbol::Style s)
 
void setMinStyle (QwtSymbol::Style s)
 
void setP1Style (QwtSymbol::Style s)
 
void setP99Style (QwtSymbol::Style s)
 
void setWhiskersRange (int type, double coeff=0.0)
 
void showBoxLabels (bool on=true)
 
void showWhiskerLabels (bool on=true)
 
QString statistics ()
 
double whiskersRange ()
 
int whiskersRangeType ()
 
- Public Member Functions inherited from DataCurve
void addErrorBars (ErrorBarsCurve *c)
 Adds a single error bars curve to the list of attached error bars. More...
 
void clearErrorBars ()
 Clears the list of attached error bars. More...
 
void clearLabels ()
 Clears the list of attached text labels. More...
 
void clone (DataCurve *c)
 
 DataCurve (Table *t, const QString &xColName, const QString &name, int startRow=0, int endRow=-1)
 
 DataCurve (Table *xt, const QString &xColName, Table *yt, const QString &name, int startRow=0, int endRow=-1)
 
void enableSpeedMode ()
 
int endRow ()
 
QList< ErrorBarsCurve * > errorBarsList ()
 The list of attached error bars. More...
 
bool hasLabels ()
 
bool hasSelectedLabels ()
 
bool hasVisibleLabels ()
 
bool isFullRange ()
 
int labelsAlignment ()
 
QColor labelsColor ()
 
QString labelsColumnName ()
 
QFont labelsFont ()
 
double labelsRotation ()
 
bool labelsWhiteOut ()
 
int labelsXOffset ()
 
int labelsYOffset ()
 
void moveLabels (const QPoint &pos)
 
virtual QStringList plotAssociation ()
 A list of data sources for this curve. More...
 
void remove ()
 
void removeErrorBars (ErrorBarsCurve *c)
 Remove a single error bars curve from the list of attached error bars. More...
 
void restoreLabels (const QStringList &lst)
 
virtual QString saveToString ()
 
bool selectedLabels (const QPoint &pos)
 
void setDataSource (Table *yt, int ycol=1, Table *xt=NULL, int xcol=0)
 
void setFullRange ()
 
void setLabelsAlignment (int flags)
 
void setLabelsColor (const QColor &c)
 
void setLabelsColumnName (const QString &name)
 
void setLabelsFont (const QFont &font)
 
void setLabelsOffset (int x, int y)
 
void setLabelsRotation (double angle)
 
void setLabelsSelected (bool on=true)
 
void setLabelsWhiteOut (bool whiteOut=true)
 
void setRowRange (int startRow, int endRow)
 
void setVisible (bool on)
 
void setVisibleLabels (bool on=true)
 
void setXColumnName (const QString &name)
 
int startRow ()
 
Tabletable ()
 
int tableRow (int point)
 Returns the row index in the data source table corresponding to the data point index. More...
 
virtual void updateColumnNames (const QString &oldName, const QString &newName, bool updateTableName)
 
virtual bool updateData (Table *t, const QString &colName)
 
QString xColumnName ()
 
TablexTable ()
 
- Public Member Functions inherited from PlotCurve
void enableSideLines (bool on)
 
 PlotCurve (const QString &name=QString())
 
int plotStyle ()
 The plot style of the curve. More...
 
void restoreCurveLayout (const QStringList &lst)
 
QString saveCurveLayout ()
 
QString saveCurveSymbolImage ()
 
void setPlotStyle (int s)
 
void setSkipSymbolsCount (int count)
 Set the number of symbols not to be drawn: usefull for large data sets. More...
 
void setType (int t)
 
void setXOffset (double dx)
 
void setYOffset (double dy)
 
bool sideLinesEnabled ()
 
int skipSymbolsCount ()
 Returns the number of symbols not to be drawn. More...
 
int type ()
 Sort of rtti() More...
 
double xOffset ()
 
double yOffset ()
 

Private Member Functions

void createLabel (double val)
 
void draw (QPainter *painter, const QwtScaleMap &xMap, const QwtScaleMap &yMap, int from, int to) const
 
void drawBox (QPainter *painter, const QwtScaleMap &xMap, const QwtScaleMap &yMap, double *dat, int size) const
 
void drawSymbols (QPainter *painter, const QwtScaleMap &xMap, const QwtScaleMap &yMap, double *dat, int size) const
 
QString labelPercentage (int index)
 
QString labelText (int index, double val)
 
virtual void loadLabels ()
 
double * statisticValues ()
 
void updateLabels (bool updateText=true)
 
void updateLabelsPosition ()
 

Private Attributes

double b_coeff
 
int b_range
 
int b_style
 
int b_width
 
bool d_box_labels
 
LabelsDisplayPolicy d_labels_display
 
bool d_whiskers_labels
 
QwtSymbol::Style max_style
 
QwtSymbol::Style mean_style
 
QwtSymbol::Style min_style
 
QwtSymbol::Style p1_style
 
QwtSymbol::Style p99_style
 
double w_coeff
 
int w_range
 

Additional Inherited Members

- Protected Member Functions inherited from DataCurve
virtual void drawCurve (QPainter *p, int style, const QwtScaleMap &xMap, const QwtScaleMap &yMap, int from, int to) const
 
bool validCurveType ()
 
- Protected Member Functions inherited from PlotCurve
QwtDoubleRect boundingRect () const
 
void drawSideLines (QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, int from, int to) const
 
void drawSticks (QPainter *p, const QwtScaleMap &xMap, const QwtScaleMap &yMap, int from, int to) const
 
virtual void drawSymbols (QPainter *p, const QwtSymbol &, const QwtScaleMap &xMap, const QwtScaleMap &yMap, int from, int to) const
 Draw symbols. More...
 
- Protected Attributes inherited from DataCurve
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
 
std::vector< DataRanged_data_ranges
 
int d_end_row
 
QList< ErrorBarsCurve * > d_error_bars
 List of the error bar curves associated to this curve. More...
 
int d_labels_align
 
double d_labels_angle
 
QColor d_labels_color
 
QString d_labels_column
 The name of the column used for text labels. More...
 
QFont d_labels_font
 
QList< PlotMarker * > d_labels_list
 List of the text labels associated to this curve. More...
 
int d_labels_x_offset
 
int d_labels_y_offset
 
PlotMarkerd_selected_label
 Keeps track of the plot marker on which the user clicked when selecting the labels. More...
 
bool d_show_labels
 
int d_start_row
 
Tabled_table
 The data source table. More...
 
bool d_white_out_labels
 
QString d_x_column
 The name of the column used for abscissae values. More...
 
Tabled_x_table
 The data source table in case X and Y datasets are from different tables. More...
 
- Protected Attributes inherited from PlotCurve
int d_plot_style
 
bool d_side_lines
 
int d_skip_symbols
 
int d_type
 
double d_x_offset
 
double d_y_offset
 

Detailed Description

Box curve.

Member Enumeration Documentation

§ BoxStyle

Enumerator
NoBox 
Rect 
Diamond 
WindBox 
Notch 

§ LabelsDisplayPolicy

Enumerator
Percentage 
Value 
PercentageValue 
ValuePercentage 

§ Range

Enumerator
None 
SD 
SE 
r25_75 
r10_90 
r5_95 
r1_99 
MinMax 
UserDef 

Constructor & Destructor Documentation

§ BoxCurve()

BoxCurve::BoxCurve ( Table t,
const QString &  name,
int  startRow = 0,
int  endRow = -1 
)

Member Function Documentation

§ boundingRect()

QwtDoubleRect BoxCurve::boundingRect ( ) const
virtual

§ boxRange()

double BoxCurve::boxRange ( )
inline

§ boxRangeType()

int BoxCurve::boxRangeType ( )
inline

§ boxStyle()

int BoxCurve::boxStyle ( )
inline

§ boxWidth()

int BoxCurve::boxWidth ( )
inline

§ copy()

void BoxCurve::copy ( BoxCurve b)

§ createLabel()

void BoxCurve::createLabel ( double  val)
private

§ draw()

void BoxCurve::draw ( QPainter *  painter,
const QwtScaleMap &  xMap,
const QwtScaleMap &  yMap,
int  from,
int  to 
) const
private

References drawBox(), and drawSymbols().

Referenced by median().

§ drawBox()

void BoxCurve::drawBox ( QPainter *  painter,
const QwtScaleMap &  xMap,
const QwtScaleMap &  yMap,
double *  dat,
int  size 
) const
private

References b_coeff, b_range, b_style, b_width, Diamond, median(), NoBox, Notch, Rect, SD, SE, w_coeff, w_range, and WindBox.

Referenced by draw(), and median().

§ drawSymbols()

void BoxCurve::drawSymbols ( QPainter *  painter,
const QwtScaleMap &  xMap,
const QwtScaleMap &  yMap,
double *  dat,
int  size 
) const
private

References max_style, mean_style, min_style, p1_style, and p99_style.

Referenced by draw(), and median().

§ hasBoxLabels()

bool BoxCurve::hasBoxLabels ( )
inline

References d_box_labels, and showBoxLabels().

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

§ hasWhiskerLabels()

bool BoxCurve::hasWhiskerLabels ( )
inline

§ labelPercentage()

QString BoxCurve::labelPercentage ( int  index)
private

References b_coeff, b_range, SD, SE, w_coeff, and w_range.

Referenced by labelText(), and median().

§ labelsDisplayPolicy()

LabelsDisplayPolicy BoxCurve::labelsDisplayPolicy ( )
inline

References d_labels_display, and setLabelsDisplayPolicy().

Referenced by copy().

§ labelText()

QString BoxCurve::labelText ( int  index,
double  val 
)
private

§ loadData()

void BoxCurve::loadData ( )
virtual

§ loadLabels()

void BoxCurve::loadLabels ( )
privatevirtual

§ maxStyle()

QwtSymbol::Style BoxCurve::maxStyle ( )
inline

§ meanStyle()

QwtSymbol::Style BoxCurve::meanStyle ( )
inline

§ median()

double BoxCurve::median ( )
inline

§ minStyle()

QwtSymbol::Style BoxCurve::minStyle ( )
inline

§ p1Style()

QwtSymbol::Style BoxCurve::p1Style ( )
inline

§ p99Style()

QwtSymbol::Style BoxCurve::p99Style ( )
inline

§ quantile()

double BoxCurve::quantile ( double  f)

Referenced by median().

§ setBoxRange()

void BoxCurve::setBoxRange ( int  type,
double  coeff 
)

§ setBoxStyle()

void BoxCurve::setBoxStyle ( int  style)

§ setBoxWidth()

void BoxCurve::setBoxWidth ( int  width)
inline

§ setLabelsDisplayPolicy()

void BoxCurve::setLabelsDisplayPolicy ( const LabelsDisplayPolicy policy)

References d_labels_display, and updateLabels().

Referenced by labelsDisplayPolicy().

§ setMaxStyle()

void BoxCurve::setMaxStyle ( QwtSymbol::Style  s)
inline

§ setMeanStyle()

void BoxCurve::setMeanStyle ( QwtSymbol::Style  s)
inline

§ setMinStyle()

void BoxCurve::setMinStyle ( QwtSymbol::Style  s)
inline

§ setP1Style()

void BoxCurve::setP1Style ( QwtSymbol::Style  s)
inline

§ setP99Style()

void BoxCurve::setP99Style ( QwtSymbol::Style  s)
inline

§ setWhiskersRange()

void BoxCurve::setWhiskersRange ( int  type,
double  coeff = 0.0 
)

§ showBoxLabels()

void BoxCurve::showBoxLabels ( bool  on = true)

§ showWhiskerLabels()

void BoxCurve::showWhiskerLabels ( bool  on = true)

§ statistics()

QString BoxCurve::statistics ( )

§ statisticValues()

double * BoxCurve::statisticValues ( )
private

References b_coeff, b_range, SD, SE, w_coeff, and w_range.

Referenced by loadLabels(), median(), and updateLabels().

§ updateLabels()

void BoxCurve::updateLabels ( bool  updateText = true)
private

§ updateLabelsPosition()

void BoxCurve::updateLabelsPosition ( )
inlineprivatevirtual

Reimplemented from DataCurve.

References min_style, and updateLabels().

§ whiskersRange()

double BoxCurve::whiskersRange ( )
inline

§ whiskersRangeType()

int BoxCurve::whiskersRangeType ( )
inline

Member Data Documentation

§ b_coeff

double BoxCurve::b_coeff
private

§ b_range

int BoxCurve::b_range
private

§ b_style

int BoxCurve::b_style
private

§ b_width

int BoxCurve::b_width
private

§ d_box_labels

bool BoxCurve::d_box_labels
private

§ d_labels_display

LabelsDisplayPolicy BoxCurve::d_labels_display
private

§ d_whiskers_labels

bool BoxCurve::d_whiskers_labels
private

§ max_style

QwtSymbol::Style BoxCurve::max_style
private

§ mean_style

QwtSymbol::Style BoxCurve::mean_style
private

§ min_style

QwtSymbol::Style BoxCurve::min_style
private

§ p1_style

QwtSymbol::Style BoxCurve::p1_style
private

Referenced by copy(), drawSymbols(), p1Style(), and setP1Style().

§ p99_style

QwtSymbol::Style BoxCurve::p99_style
private

§ w_coeff

double BoxCurve::w_coeff
private

§ w_range

int BoxCurve::w_range
private

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