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

Pie plot class. More...

#include <PieCurve.h>

Inheritance diagram for PieCurve:
DataCurve PlotCurve

Public Member Functions

PieLabeladdLabel (PieLabel *l, bool clone=false)
void clearLabels ()
 Clears the list of attached text labels.
void clone (PieCurve *c)
QColor color (int i) const
bool counterClockwise ()
int firstColor ()
bool fixedLabelsPosition ()
double horizontalOffset ()
void initLabels ()
bool labelCategories ()
bool labelsAutoFormat ()
double labelsEdgeDistance ()
QList< PieLabel * > labelsList ()
bool labelsPercentagesFormat ()
bool labelsValuesFormat ()
void loadData ()
Qt::BrushStyle pattern ()
 PieCurve (Table *t, const QString &name, int startRow, int endRow)
int radius ()
void setBrushStyle (const Qt::BrushStyle &style)
void setCounterClockwise (bool on)
void setFirstColor (int index)
void setFixedLabelsPosition (bool on)
void setHorizontalOffset (double d)
void setLabelCategories (bool on)
void setLabelPercentagesFormat (bool on)
void setLabelsAutoFormat (bool on)
void setLabelsEdgeDistance (double d)
void setLabelValuesFormat (bool on)
void setRadius (int size)
void setStartAzimuth (double angle)
void setThickness (double t)
void setViewAngle (double a)
double startAzimuth ()
double thickness ()
double viewAngle ()
- Public Member Functions inherited from DataCurve
void addErrorBars (ErrorBarsCurve *c)
 Adds a single error bars curve to the list of attached error bars.
void clearErrorBars ()
 Clears the list of attached error bars.
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.
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.
void remove ()
void removeErrorBars (ErrorBarsCurve *c)
 Remove a single error bars curve from the list of attached error bars.
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.
virtual void updateColumnNames (const QString &oldName, const QString &newName, bool updateTableName)
virtual bool updateData (Table *t, const QString &colName)
virtual void updateLabelsPosition ()
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.
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.
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.
int type ()
 Sort of rtti()
double xOffset ()
double yOffset ()

Private Member Functions

void draw (QPainter *painter, const QwtScaleMap &xMap, const QwtScaleMap &yMap, int from, int to) const
void drawDisk (QPainter *painter, const QwtScaleMap &xMap, const QwtScaleMap &yMap) const
void drawSlices (QPainter *painter, const QwtScaleMap &xMap, const QwtScaleMap &yMap, int from, int to) const

Private Attributes

bool d_auto_labeling
bool d_categories
bool d_counter_clockwise
double d_edge_dist
int d_first_color
bool d_fixed_labels_pos
double d_horizontal_offset
bool d_percentages
int d_pie_ray
double d_start_azimuth
QVarLengthArray< int > d_table_rows
 Stores table row indices to be displayed in PieLabels if d_categories is true.
QList< PieLabel * > d_texts_list
double d_thickness
bool d_values
double d_view_angle

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
virtual void loadLabels ()
bool validCurveType ()
- 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.
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.
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.
QFont d_labels_font
QList< PlotMarker * > d_labels_list
 List of the text labels associated to this curve.
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.
bool d_show_labels
int d_start_row
Tabled_table
 The data source table.
bool d_white_out_labels
QString d_x_column
 The name of the column used for abscissae values.
Tabled_x_table
 The data source table in case X and Y datasets are from different tables.

Detailed Description

Pie plot class.

Constructor & Destructor Documentation

PieCurve::PieCurve ( Table t,
const QString &  name,
int  startRow,
int  endRow 
)

Member Function Documentation

PieLabel * PieCurve::addLabel ( PieLabel l,
bool  clone = false 
)
void PieCurve::clearLabels ( )

Clears the list of attached text labels.

Reimplemented from DataCurve.

References d_auto_labeling, d_texts_list, and LegendWidget::setText().

void PieCurve::clone ( PieCurve c)
QColor PieCurve::color ( int  i) const
bool PieCurve::counterClockwise ( )
inline
void PieCurve::draw ( QPainter *  painter,
const QwtScaleMap &  xMap,
const QwtScaleMap &  yMap,
int  from,
int  to 
) const
private

References drawDisk(), and drawSlices().

void PieCurve::drawDisk ( QPainter *  painter,
const QwtScaleMap &  xMap,
const QwtScaleMap &  yMap 
) const
private
void PieCurve::drawSlices ( QPainter *  painter,
const QwtScaleMap &  xMap,
const QwtScaleMap &  yMap,
int  from,
int  to 
) const
private
int PieCurve::firstColor ( )
inline
bool PieCurve::fixedLabelsPosition ( )
inline
double PieCurve::horizontalOffset ( )
inline
void PieCurve::initLabels ( )
bool PieCurve::labelCategories ( )
inline
bool PieCurve::labelsAutoFormat ( )
inline
double PieCurve::labelsEdgeDistance ( )
inline
QList<PieLabel *> PieCurve::labelsList ( )
inline
bool PieCurve::labelsPercentagesFormat ( )
inline
bool PieCurve::labelsValuesFormat ( )
inline
void PieCurve::loadData ( )
virtual
Qt::BrushStyle PieCurve::pattern ( )
inline
int PieCurve::radius ( )
inline
void PieCurve::setBrushStyle ( const Qt::BrushStyle &  style)
void PieCurve::setCounterClockwise ( bool  on)
inline
void PieCurve::setFirstColor ( int  index)
inline
void PieCurve::setFixedLabelsPosition ( bool  on)
inline
void PieCurve::setHorizontalOffset ( double  d)
inline
void PieCurve::setLabelCategories ( bool  on)
inline

References d_categories.

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

void PieCurve::setLabelPercentagesFormat ( bool  on)
inline
void PieCurve::setLabelsAutoFormat ( bool  on)
inline
void PieCurve::setLabelsEdgeDistance ( double  d)
inline

References d_edge_dist.

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

void PieCurve::setLabelValuesFormat ( bool  on)
inline

References d_values.

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

void PieCurve::setRadius ( int  size)
inline

References d_pie_ray.

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

void PieCurve::setStartAzimuth ( double  angle)
inline
void PieCurve::setThickness ( double  t)
inline

References d_thickness.

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

void PieCurve::setViewAngle ( double  a)
inline

References d_view_angle.

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

double PieCurve::startAzimuth ( )
inline
double PieCurve::thickness ( )
inline
double PieCurve::viewAngle ( )
inline

Member Data Documentation

bool PieCurve::d_auto_labeling
private
bool PieCurve::d_categories
private
bool PieCurve::d_counter_clockwise
private
double PieCurve::d_edge_dist
private
int PieCurve::d_first_color
private
bool PieCurve::d_fixed_labels_pos
private
double PieCurve::d_horizontal_offset
private
bool PieCurve::d_percentages
private
int PieCurve::d_pie_ray
private
double PieCurve::d_start_azimuth
private
QVarLengthArray<int> PieCurve::d_table_rows
private

Stores table row indices to be displayed in PieLabels if d_categories is true.

Referenced by clone(), drawDisk(), drawSlices(), loadData(), and PieCurve().

QList<PieLabel *> PieCurve::d_texts_list
private
double PieCurve::d_thickness
private
bool PieCurve::d_values
private
double PieCurve::d_view_angle
private

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