Stellarium  0.90.0
List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends
QCPGraph Class Reference
+ Inheritance diagram for QCPGraph:
+ Collaboration diagram for QCPGraph:

Public Types

enum  LineStyle {
  lsNone, lsLine, lsStepLeft, lsStepRight,
  lsStepCenter, lsImpulse
}
 
enum  ErrorType { etNone, etKey, etValue, etBoth }
 

Public Member Functions

 QCPGraph (QCPAxis *keyAxis, QCPAxis *valueAxis)
 
QCPDataMapdata () const
 
LineStyle lineStyle () const
 
QCPScatterStyle scatterStyle () const
 
ErrorType errorType () const
 
QPen errorPen () const
 
double errorBarSize () const
 
bool errorBarSkipSymbol () const
 
QCPGraphchannelFillGraph () const
 
bool adaptiveSampling () const
 
void setData (QCPDataMap *data, bool copy=false)
 
void setData (const QVector< double > &key, const QVector< double > &value)
 
void setDataKeyError (const QVector< double > &key, const QVector< double > &value, const QVector< double > &keyError)
 
void setDataKeyError (const QVector< double > &key, const QVector< double > &value, const QVector< double > &keyErrorMinus, const QVector< double > &keyErrorPlus)
 
void setDataValueError (const QVector< double > &key, const QVector< double > &value, const QVector< double > &valueError)
 
void setDataValueError (const QVector< double > &key, const QVector< double > &value, const QVector< double > &valueErrorMinus, const QVector< double > &valueErrorPlus)
 
void setDataBothError (const QVector< double > &key, const QVector< double > &value, const QVector< double > &keyError, const QVector< double > &valueError)
 
void setDataBothError (const QVector< double > &key, const QVector< double > &value, const QVector< double > &keyErrorMinus, const QVector< double > &keyErrorPlus, const QVector< double > &valueErrorMinus, const QVector< double > &valueErrorPlus)
 
void setLineStyle (LineStyle ls)
 
void setScatterStyle (const QCPScatterStyle &style)
 
void setErrorType (ErrorType errorType)
 
void setErrorPen (const QPen &pen)
 
void setErrorBarSize (double size)
 
void setErrorBarSkipSymbol (bool enabled)
 
void setChannelFillGraph (QCPGraph *targetGraph)
 
void setAdaptiveSampling (bool enabled)
 
void addData (const QCPDataMap &dataMap)
 
void addData (const QCPData &data)
 
void addData (double key, double value)
 
void addData (const QVector< double > &keys, const QVector< double > &values)
 
void removeDataBefore (double key)
 
void removeDataAfter (double key)
 
void removeData (double fromKey, double toKey)
 
void removeData (double key)
 
virtual void clearData ()
 
virtual double selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=0) const
 
void rescaleAxes (bool onlyEnlarge, bool includeErrorBars) const
 
void rescaleKeyAxis (bool onlyEnlarge, bool includeErrorBars) const
 
void rescaleValueAxis (bool onlyEnlarge, bool includeErrorBars) const
 
- Public Member Functions inherited from QCPAbstractPlottable
 QCPAbstractPlottable (QCPAxis *keyAxis, QCPAxis *valueAxis)
 
QString name () const
 
bool antialiasedFill () const
 
bool antialiasedScatters () const
 
bool antialiasedErrorBars () const
 
QPen pen () const
 
QPen selectedPen () const
 
QBrush brush () const
 
QBrush selectedBrush () const
 
QCPAxiskeyAxis () const
 
QCPAxisvalueAxis () const
 
bool selectable () const
 
bool selected () const
 
void setName (const QString &name)
 
void setAntialiasedFill (bool enabled)
 
void setAntialiasedScatters (bool enabled)
 
void setAntialiasedErrorBars (bool enabled)
 
void setPen (const QPen &pen)
 
void setSelectedPen (const QPen &pen)
 
void setBrush (const QBrush &brush)
 
void setSelectedBrush (const QBrush &brush)
 
void setKeyAxis (QCPAxis *axis)
 
void setValueAxis (QCPAxis *axis)
 
Q_SLOT void setSelectable (bool selectable)
 
Q_SLOT void setSelected (bool selected)
 
virtual bool addToLegend ()
 
virtual bool removeFromLegend () const
 
void rescaleAxes (bool onlyEnlarge=false) const
 
void rescaleKeyAxis (bool onlyEnlarge=false) const
 
void rescaleValueAxis (bool onlyEnlarge=false) const
 
- Public Member Functions inherited from QCPLayerable
 QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=0)
 
bool visible () const
 
QCustomPlotparentPlot () const
 
QCPLayerableparentLayerable () const
 
QCPLayerlayer () const
 
bool antialiased () const
 
void setVisible (bool on)
 
Q_SLOT bool setLayer (QCPLayer *layer)
 
bool setLayer (const QString &layerName)
 
void setAntialiased (bool enabled)
 
bool realVisibility () const
 

Protected Member Functions

virtual void draw (QCPPainter *painter)
 
virtual void drawLegendIcon (QCPPainter *painter, const QRectF &rect) const
 
virtual QCPRange getKeyRange (bool &foundRange, SignDomain inSignDomain=sdBoth) const
 
virtual QCPRange getValueRange (bool &foundRange, SignDomain inSignDomain=sdBoth) const
 
virtual QCPRange getKeyRange (bool &foundRange, SignDomain inSignDomain, bool includeErrors) const
 
virtual QCPRange getValueRange (bool &foundRange, SignDomain inSignDomain, bool includeErrors) const
 
virtual void drawFill (QCPPainter *painter, QVector< QPointF > *lineData) const
 
virtual void drawScatterPlot (QCPPainter *painter, QVector< QCPData > *scatterData) const
 
virtual void drawLinePlot (QCPPainter *painter, QVector< QPointF > *lineData) const
 
virtual void drawImpulsePlot (QCPPainter *painter, QVector< QPointF > *lineData) const
 
void getPreparedData (QVector< QCPData > *lineData, QVector< QCPData > *scatterData) const
 
void getPlotData (QVector< QPointF > *lineData, QVector< QCPData > *scatterData) const
 
void getScatterPlotData (QVector< QCPData > *scatterData) const
 
void getLinePlotData (QVector< QPointF > *linePixelData, QVector< QCPData > *scatterData) const
 
void getStepLeftPlotData (QVector< QPointF > *linePixelData, QVector< QCPData > *scatterData) const
 
void getStepRightPlotData (QVector< QPointF > *linePixelData, QVector< QCPData > *scatterData) const
 
void getStepCenterPlotData (QVector< QPointF > *linePixelData, QVector< QCPData > *scatterData) const
 
void getImpulsePlotData (QVector< QPointF > *linePixelData, QVector< QCPData > *scatterData) const
 
void drawError (QCPPainter *painter, double x, double y, const QCPData &data) const
 
void getVisibleDataBounds (QCPDataMap::const_iterator &lower, QCPDataMap::const_iterator &upper) const
 
int countDataInBounds (const QCPDataMap::const_iterator &lower, const QCPDataMap::const_iterator &upper, int maxCount) const
 
void addFillBasePoints (QVector< QPointF > *lineData) const
 
void removeFillBasePoints (QVector< QPointF > *lineData) const
 
QPointF lowerFillBasePoint (double lowerKey) const
 
QPointF upperFillBasePoint (double upperKey) const
 
const QPolygonF getChannelFillPolygon (const QVector< QPointF > *lineData) const
 
int findIndexBelowX (const QVector< QPointF > *data, double x) const
 
int findIndexAboveX (const QVector< QPointF > *data, double x) const
 
int findIndexBelowY (const QVector< QPointF > *data, double y) const
 
int findIndexAboveY (const QVector< QPointF > *data, double y) const
 
double pointDistance (const QPointF &pixelPoint) const
 
- Protected Member Functions inherited from QCPAbstractPlottable
virtual QRect clipRect () const
 
virtual QCP::Interaction selectionCategory () const
 
void applyDefaultAntialiasingHint (QCPPainter *painter) const
 
virtual void selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
 
virtual void deselectEvent (bool *selectionStateChanged)
 
void coordsToPixels (double key, double value, double &x, double &y) const
 
const QPointF coordsToPixels (double key, double value) const
 
void pixelsToCoords (double x, double y, double &key, double &value) const
 
void pixelsToCoords (const QPointF &pixelPos, double &key, double &value) const
 
QPen mainPen () const
 
QBrush mainBrush () const
 
void applyFillAntialiasingHint (QCPPainter *painter) const
 
void applyScattersAntialiasingHint (QCPPainter *painter) const
 
void applyErrorBarsAntialiasingHint (QCPPainter *painter) const
 
double distSqrToLine (const QPointF &start, const QPointF &end, const QPointF &point) const
 
- Protected Member Functions inherited from QCPLayerable
virtual void parentPlotInitialized (QCustomPlot *parentPlot)
 
void initializeParentPlot (QCustomPlot *parentPlot)
 
void setParentLayerable (QCPLayerable *parentLayerable)
 
bool moveToLayer (QCPLayer *layer, bool prepend)
 
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
 

Protected Attributes

QCPDataMapmData
 
QPen mErrorPen
 
LineStyle mLineStyle
 
QCPScatterStyle mScatterStyle
 
ErrorType mErrorType
 
double mErrorBarSize
 
bool mErrorBarSkipSymbol
 
QPointer< QCPGraphmChannelFillGraph
 
bool mAdaptiveSampling
 
- Protected Attributes inherited from QCPAbstractPlottable
QString mName
 
bool mAntialiasedFill
 
bool mAntialiasedScatters
 
bool mAntialiasedErrorBars
 
QPen mPen
 
QPen mSelectedPen
 
QBrush mBrush
 
QBrush mSelectedBrush
 
QPointer< QCPAxismKeyAxis
 
QPointer< QCPAxismValueAxis
 
bool mSelectable
 
bool mSelected
 
- Protected Attributes inherited from QCPLayerable
bool mVisible
 
QCustomPlotmParentPlot
 
QPointer< QCPLayerablemParentLayerable
 
QCPLayermLayer
 
bool mAntialiased
 

Friends

class QCustomPlot
 
class QCPLegend
 

Additional Inherited Members

- Signals inherited from QCPAbstractPlottable
void selectionChanged (bool selected)
 
void selectableChanged (bool selectable)
 
- Signals inherited from QCPLayerable
void layerChanged (QCPLayer *newLayer)
 
- Protected Types inherited from QCPAbstractPlottable
enum  SignDomain { sdNegative, sdBoth, sdPositive }
 

Detailed Description

Definition at line 2490 of file qcustomplot.h.

Member Enumeration Documentation

Defines what kind of error bars are drawn for each data point

Enumerator
etNone 

No error bars are shown.

etKey 

Error bars for the key dimension of the data point are shown.

etValue 

Error bars for the value dimension of the data point are shown.

etBoth 

Error bars for both key and value dimensions of the data point are shown.

Definition at line 2521 of file qcustomplot.h.

Defines how the graph's line is represented visually in the plot. The line is drawn with the current pen of the graph (setPen).

See also
setLineStyle
Enumerator
lsNone 

data points are not connected with any lines (e.g.

data only represented with symbols according to the scatter style, see setScatterStyle)

lsLine 

data points are connected by a straight line

lsStepLeft 

line is drawn as steps where the step height is the value of the left data point

lsStepRight 

line is drawn as steps where the step height is the value of the right data point

lsStepCenter 

line is drawn as steps where the step is in between two data points

lsImpulse 

each data point is represented by a line parallel to the value axis, which reaches from the data point to the zero-value-line

Definition at line 2509 of file qcustomplot.h.


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