29 #include <QtCore/qglobal.h>
33 #ifdef QCUSTOMPLOT_USE_OPENGL
34 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
35 #define QCP_OPENGL_PBUFFER
37 #define QCP_OPENGL_FBO
39 #if QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)
40 #define QCP_OPENGL_OFFSCREENSURFACE
44 #if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
45 #define QCP_DEVICEPIXELRATIO_SUPPORTED
46 #if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
47 #define QCP_DEVICEPIXELRATIO_FLOAT
53 #include <QtCore/QCache>
54 #include <QtCore/QDateTime>
55 #include <QtCore/QDebug>
56 #include <QtCore/QFlags>
57 #include <QtCore/QMargins>
58 #include <QtCore/QMultiMap>
59 #include <QtCore/QObject>
60 #include <QtCore/QPointer>
61 #include <QtCore/QSharedPointer>
62 #include <QtCore/QStack>
63 #include <QtCore/QString>
64 #include <QtCore/QTimer>
65 #include <QtCore/QVector>
66 #include <QtGui/QMouseEvent>
67 #include <QtGui/QPaintEvent>
68 #include <QtGui/QPainter>
69 #include <QtGui/QPixmap>
70 #include <QtGui/QWheelEvent>
74 #include <QtGui/QOpenGLContext>
75 #include <QtGui/QOpenGLFramebufferObject>
76 #ifdef QCP_OPENGL_OFFSCREENSURFACE
77 #include <QtGui/QOffscreenSurface>
79 #include <QtGui/QWindow>
82 #ifdef QCP_OPENGL_PBUFFER
83 #include <QtOpenGL/QGLPixelBuffer>
85 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
88 #include <QtGui/QPrintEngine>
89 #include <QtGui/QPrinter>
90 #include <QtGui/QWidget>
93 #include <QtPrintSupport/QtPrintSupport>
94 #include <QtWidgets/QWidget>
121 #define QCUSTOMPLOT_VERSION_STR "2.0.1"
122 #define QCUSTOMPLOT_VERSION 0x020001
125 #if defined(QT_STATIC_BUILD)
127 #elif defined(QCUSTOMPLOT_COMPILE_LIBRARY)
128 #define QCP_LIB_DECL Q_DECL_EXPORT
129 #elif defined(QCUSTOMPLOT_USE_LIBRARY)
130 #define QCP_LIB_DECL Q_DECL_IMPORT
136 #ifndef Q_DECL_OVERRIDE
137 #define Q_DECL_OVERRIDE
159 Q_FLAGS(AntialiasedElements)
161 Q_FLAGS(PlottingHints)
163 Q_FLAGS(Interactions)
420 return qIsNaN(value) || qIsInf(value);
441 margins.setLeft(value);
444 margins.setRight(value);
447 margins.setTop(value);
450 margins.setBottom(value);
453 margins = QMargins(value, value, value, value);
470 return margins.left();
472 return margins.right();
474 return margins.top();
476 return margins.bottom();
483 extern const QMetaObject
489 Q_DECLARE_OPERATORS_FOR_FLAGS(QCP::AntialiasedElements)
490 Q_DECLARE_OPERATORS_FOR_FLAGS(QCP::PlottingHints)
491 Q_DECLARE_OPERATORS_FOR_FLAGS(QCP::MarginSides)
492 Q_DECLARE_OPERATORS_FOR_FLAGS(QCP::Interactions)
516 double x()
const {
return mX; }
517 double y()
const {
return mY; }
518 double &
rx() {
return mX; }
519 double &
ry() {
return mY; }
522 void setX(
double x) { mX = x; }
523 void setY(
double y) { mY = y; }
526 double length()
const {
return qSqrt(mX * mX + mY * mY); }
528 QPoint
toPoint()
const {
return QPoint(mX, mY); }
529 QPointF
toPointF()
const {
return QPointF(mX, mY); }
531 bool isNull()
const {
return qIsNull(mX) && qIsNull(mY); }
566 return QCPVector2D(vec.mX * factor, vec.mY * factor);
569 return QCPVector2D(vec.mX * factor, vec.mY * factor);
572 return QCPVector2D(vec.mX / divisor, vec.mY / divisor);
576 return QCPVector2D(vec1.mX + vec2.mX, vec1.mY + vec2.mY);
580 return QCPVector2D(vec1.mX - vec2.mX, vec1.mY - vec2.mY);
591 d.nospace() <<
"QCPVector2D(" << vec.
x() <<
", " << vec.
y() <<
")";
626 Q_FLAGS(PainterModes)
627 Q_DECLARE_FLAGS(PainterModes, PainterMode)
633 bool antialiasing()
const {
return testRenderHint(QPainter::Antialiasing); }
634 PainterModes
modes()
const {
return mModes; }
647 void drawLine(
const QPointF &p1,
const QPointF &p2) {
648 drawLine(QLineF(p1, p2));
659 bool mIsAntialiasing;
662 QStack<bool> mAntialiasingStack;
664 Q_DECLARE_OPERATORS_FOR_FLAGS(QCPPainter::PainterModes)
678 QSize
size()
const {
return mSize; }
691 virtual void clear(
const QColor &color) = 0;
723 #ifdef QCP_OPENGL_PBUFFER
726 explicit QCPPaintBufferGlPbuffer(
const QSize &size,
double devicePixelRatio,
728 virtual ~QCPPaintBufferGlPbuffer();
737 QGLPixelBuffer *mGlPBuffer;
745 #ifdef QCP_OPENGL_FBO
748 explicit QCPPaintBufferGlFbo(
const QSize &size,
double devicePixelRatio,
749 QWeakPointer<QOpenGLContext> glContext,
750 QWeakPointer<QOpenGLPaintDevice> glPaintDevice);
751 virtual ~QCPPaintBufferGlFbo();
761 QWeakPointer<QOpenGLContext> mGlContext;
762 QWeakPointer<QOpenGLPaintDevice> mGlPaintDevice;
763 QOpenGLFramebufferObject *mGlFrameBuffer;
778 Q_PROPERTY(
QCustomPlot *parentPlot READ parentPlot)
779 Q_PROPERTY(QString name READ name)
780 Q_PROPERTY(
int index READ index)
781 Q_PROPERTY(QList<QCPLayerable *> children READ children)
782 Q_PROPERTY(
bool visible READ visible WRITE setVisible)
783 Q_PROPERTY(LayerMode mode READ mode WRITE setMode)
807 QString
name()
const {
return mName; }
808 int index()
const {
return mIndex; }
809 QList<QCPLayerable *>
children()
const {
return mChildren; }
825 QList<QCPLayerable *> mChildren;
849 Q_PROPERTY(
bool visible READ visible WRITE setVisible)
850 Q_PROPERTY(
QCustomPlot *parentPlot READ parentPlot)
851 Q_PROPERTY(
QCPLayerable *parentLayerable READ parentLayerable)
852 Q_PROPERTY(
QCPLayer *layer READ layer WRITE setLayer NOTIFY layerChanged)
853 Q_PROPERTY(
bool antialiased READ antialiased WRITE setAntialiased)
874 virtual double selectTest(
const QPointF &pos,
bool onlySelectable,
875 QVariant *details = 0)
const;
887 QPointer<QCPLayerable> mParentLayerable;
899 const QVariant &details,
900 bool *selectionStateChanged);
907 const QVariant &details);
938 return lower == other.
lower && upper == other.
upper;
969 double size()
const {
return upper - lower; }
970 double center()
const {
return (upper + lower) * 0.5; }
972 if (lower > upper) qSwap(lower, upper);
981 bool contains(
double value)
const {
return value >= lower && value <= upper; }
985 static const double minRange;
986 static const double maxRange;
995 d.nospace() <<
"QCPRange(" << range.
lower <<
", " << range.
upper <<
")";
1064 return mBegin == other.mBegin && mEnd == other.mEnd;
1070 int end()
const {
return mEnd; }
1071 int size()
const {
return mEnd - mBegin; }
1079 bool isValid()
const {
return (mEnd >= mBegin) && (mBegin >= 0); }
1085 return QCPDataRange(mBegin + changeBegin, mEnd + changeEnd);
1103 return !(*
this == other);
1136 bool isEmpty()
const {
return mDataRanges.isEmpty(); }
1146 QList<QCPDataRange> mDataRanges;
1148 inline static bool lessThanDataRangeBegin(
const QCPDataRange &a,
1252 d.nospace() <<
"QCPDataRange(" << dataRange.
begin() <<
", " << dataRange.
end()
1262 d.nospace() <<
"QCPDataSelection(";
1264 if (i != 0) d <<
", ";
1283 QRect
rect()
const {
return mRect; }
1285 QPen
pen()
const {
return mPen; }
1298 void changed(
const QRect &rect, QMouseEvent *event);
1337 return mChildren.value(side);
1345 QHash<QCP::MarginSide, QList<QCPLayoutElement *> > mChildren;
1363 Q_PROPERTY(
QCPLayout *layout READ layout)
1364 Q_PROPERTY(QRect rect READ rect)
1365 Q_PROPERTY(QRect outerRect READ outerRect WRITE setOuterRect)
1366 Q_PROPERTY(QMargins margins READ margins WRITE setMargins)
1368 QMargins minimumMargins READ minimumMargins WRITE setMinimumMargins)
1369 Q_PROPERTY(QSize minimumSize READ minimumSize WRITE setMinimumSize)
1370 Q_PROPERTY(QSize maximumSize READ maximumSize WRITE setMaximumSize)
1371 Q_PROPERTY(SizeConstraintRect sizeConstraintRect READ sizeConstraintRect WRITE
1372 setSizeConstraintRect)
1388 Q_ENUMS(UpdatePhase)
1404 Q_ENUMS(SizeConstraintRect)
1411 QRect
rect()
const {
return mRect; }
1423 return mMarginGroups;
1442 virtual QList<QCPLayoutElement *>
elements(
bool recursive)
const;
1445 virtual double selectTest(
const QPointF &pos,
bool onlySelectable,
1451 QSize mMinimumSize, mMaximumSize;
1453 QRect mRect, mOuterRect;
1454 QMargins mMargins, mMinimumMargins;
1455 QCP::MarginSides mAutoMargins;
1460 virtual
void layoutChanged();
1463 virtual
void applyDefaultAntialiasingHint(
QCPPainter *painter) const
1486 virtual QList<QCPLayoutElement *>
elements(
bool recursive)
const
1510 QVector<double> stretchFactors,
1511 int totalSize)
const;
1523 Q_PROPERTY(
int rowCount READ rowCount)
1524 Q_PROPERTY(
int columnCount READ columnCount)
1525 Q_PROPERTY(QList<double> columnStretchFactors READ columnStretchFactors WRITE
1526 setColumnStretchFactors)
1527 Q_PROPERTY(QList<double> rowStretchFactors READ rowStretchFactors WRITE
1528 setRowStretchFactors)
1529 Q_PROPERTY(
int columnSpacing READ columnSpacing WRITE setColumnSpacing)
1530 Q_PROPERTY(
int rowSpacing READ rowSpacing WRITE setRowSpacing)
1531 Q_PROPERTY(FillOrder fillOrder READ fillOrder WRITE setFillOrder)
1532 Q_PROPERTY(
int wrap READ wrap WRITE setWrap)
1556 int rowCount()
const {
return mElements.size(); }
1558 return mElements.size() > 0 ? mElements.first().size() : 0;
1580 return rowCount() * columnCount();
1585 virtual QList<QCPLayoutElement *>
elements(
bool recursive)
const
1595 bool hasElement(
int row,
int column);
1596 void expandTo(
int newRowCount,
int newColumnCount);
1597 void insertRow(
int newIndex);
1598 void insertColumn(
int newIndex);
1599 int rowColToIndex(
int row,
int column) const;
1600 void indexToRowCol(
int index,
int &row,
int &column) const;
1605 QList<
double> mColumnStretchFactors;
1606 QList<
double> mRowStretchFactors;
1607 int mColumnSpacing, mRowSpacing;
1612 void getMinimumRowColSizes(QVector<
int> *minColWidths,
1613 QVector<
int> *minRowHeights) const;
1614 void getMaximumRowColSizes(QVector<
int> *maxColWidths,
1615 QVector<
int> *maxRowHeights) const;
1636 Q_ENUMS(InsetPlacement)
1643 Qt::Alignment insetAlignment(
int index) const;
1644 QRectF insetRect(
int index) const;
1648 void setInsetAlignment(
int index, Qt::Alignment alignment);
1649 void setInsetRect(
int index, const QRectF &rect);
1658 virtual double selectTest(
const QPointF &pos,
bool onlySelectable,
1669 QList<Qt::Alignment> mInsetAlignment;
1670 QList<QRectF> mInsetRect;
1721 Q_ENUMS(EndingStyle)
1725 bool inverted = false);
1749 double mWidth, mLength;
1778 Q_ENUMS(TickStepStrategy)
1795 QChar formatChar,
int precision, QVector<double> &ticks,
1796 QVector<double> *subTicks,
1797 QVector<QString> *tickLabels);
1809 QChar formatChar,
int precision);
1813 const QVector<double> &ticks);
1815 const QLocale &locale,
1816 QChar formatChar,
int precision);
1820 bool keepOneOutlier)
const;
1821 double pickClosest(
double target,
const QVector<double> &candidates)
const;
1829 Q_DECLARE_METATYPE(QSharedPointer<QCPAxisTicker>)
1908 QString timeFormat()
const {
return mTimeFormat; }
1960 Q_ENUMS(ScaleStrategy)
1965 double tickStep()
const {
return mTickStep; }
1992 QMap<double, QString> &
ticks() {
return mTicks; }
1998 const QVector<QString> &labels);
2003 void addTick(
double position,
const QString &label);
2006 const QVector<QString> &labels);
2045 Q_ENUMS(FractionStyle)
2050 QString piSymbol()
const {
return mPiSymbol; }
2126 Q_PROPERTY(
bool subGridVisible READ subGridVisible WRITE setSubGridVisible)
2127 Q_PROPERTY(
bool antialiasedSubGrid READ antialiasedSubGrid WRITE
2128 setAntialiasedSubGrid)
2129 Q_PROPERTY(
bool antialiasedZeroLine READ antialiasedZeroLine WRITE
2130 setAntialiasedZeroLine)
2131 Q_PROPERTY(QPen pen READ pen WRITE setPen)
2132 Q_PROPERTY(QPen subGridPen READ subGridPen WRITE setSubGridPen)
2133 Q_PROPERTY(QPen zeroLinePen READ zeroLinePen WRITE setZeroLinePen)
2142 QPen
pen()
const {
return mPen; }
2156 bool mSubGridVisible;
2157 bool mAntialiasedSubGrid, mAntialiasedZeroLine;
2158 QPen mPen, mSubGridPen, mZeroLinePen;
2178 Q_PROPERTY(AxisType axisType READ axisType)
2180 Q_PROPERTY(ScaleType scaleType READ scaleType WRITE setScaleType NOTIFY
2182 Q_PROPERTY(
QCPRange range READ range WRITE setRange NOTIFY rangeChanged)
2183 Q_PROPERTY(
bool rangeReversed READ rangeReversed WRITE setRangeReversed)
2184 Q_PROPERTY(QSharedPointer<QCPAxisTicker> ticker READ ticker WRITE setTicker)
2185 Q_PROPERTY(
bool ticks READ ticks WRITE setTicks)
2186 Q_PROPERTY(
bool tickLabels READ tickLabels WRITE setTickLabels)
2188 int tickLabelPadding READ tickLabelPadding WRITE setTickLabelPadding)
2189 Q_PROPERTY(QFont tickLabelFont READ tickLabelFont WRITE setTickLabelFont)
2190 Q_PROPERTY(QColor tickLabelColor READ tickLabelColor WRITE setTickLabelColor)
2191 Q_PROPERTY(
double tickLabelRotation READ tickLabelRotation WRITE
2192 setTickLabelRotation)
2193 Q_PROPERTY(LabelSide tickLabelSide READ tickLabelSide WRITE setTickLabelSide)
2194 Q_PROPERTY(QString numberFormat READ numberFormat WRITE setNumberFormat)
2195 Q_PROPERTY(
int numberPrecision READ numberPrecision WRITE setNumberPrecision)
2196 Q_PROPERTY(QVector<double> tickVector READ tickVector)
2197 Q_PROPERTY(QVector<QString> tickVectorLabels READ tickVectorLabels)
2198 Q_PROPERTY(
int tickLengthIn READ tickLengthIn WRITE setTickLengthIn)
2199 Q_PROPERTY(
int tickLengthOut READ tickLengthOut WRITE setTickLengthOut)
2200 Q_PROPERTY(
bool subTicks READ subTicks WRITE setSubTicks)
2201 Q_PROPERTY(
int subTickLengthIn READ subTickLengthIn WRITE setSubTickLengthIn)
2203 int subTickLengthOut READ subTickLengthOut WRITE setSubTickLengthOut)
2204 Q_PROPERTY(QPen basePen READ basePen WRITE setBasePen)
2205 Q_PROPERTY(QPen tickPen READ tickPen WRITE setTickPen)
2206 Q_PROPERTY(QPen subTickPen READ subTickPen WRITE setSubTickPen)
2207 Q_PROPERTY(QFont labelFont READ labelFont WRITE setLabelFont)
2208 Q_PROPERTY(QColor labelColor READ labelColor WRITE setLabelColor)
2209 Q_PROPERTY(QString label READ label WRITE setLabel)
2210 Q_PROPERTY(
int labelPadding READ labelPadding WRITE setLabelPadding)
2211 Q_PROPERTY(
int padding READ padding WRITE setPadding)
2212 Q_PROPERTY(
int offset READ offset WRITE setOffset)
2213 Q_PROPERTY(SelectableParts selectedParts READ selectedParts WRITE
2214 setSelectedParts NOTIFY selectionChanged)
2215 Q_PROPERTY(SelectableParts selectableParts READ selectableParts WRITE
2216 setSelectableParts NOTIFY selectableChanged)
2217 Q_PROPERTY(QFont selectedTickLabelFont READ selectedTickLabelFont WRITE
2218 setSelectedTickLabelFont)
2220 QFont selectedLabelFont READ selectedLabelFont WRITE setSelectedLabelFont)
2221 Q_PROPERTY(QColor selectedTickLabelColor READ selectedTickLabelColor WRITE
2222 setSelectedTickLabelColor)
2223 Q_PROPERTY(QColor selectedLabelColor READ selectedLabelColor WRITE
2224 setSelectedLabelColor)
2225 Q_PROPERTY(QPen selectedBasePen READ selectedBasePen WRITE setSelectedBasePen)
2226 Q_PROPERTY(QPen selectedTickPen READ selectedTickPen WRITE setSelectedTickPen)
2227 Q_PROPERTY(QPen selectedSubTickPen READ selectedSubTickPen WRITE
2228 setSelectedSubTickPen)
2229 Q_PROPERTY(
QCPLineEnding lowerEnding READ lowerEnding WRITE setLowerEnding)
2230 Q_PROPERTY(
QCPLineEnding upperEnding READ upperEnding WRITE setUpperEnding)
2231 Q_PROPERTY(
QCPGrid *grid READ grid)
2254 Q_DECLARE_FLAGS(AxisTypes, AxisType)
2288 spTickLabels = 0x002
2293 Q_ENUMS(SelectablePart)
2294 Q_FLAGS(SelectableParts)
2295 Q_DECLARE_FLAGS(SelectableParts, SelectablePart)
2306 QSharedPointer<QCPAxisTicker>
ticker()
const {
return mTicker; }
2328 QString
label()
const {
return mLabel; }
2349 void setRange(
double position,
double size, Qt::AlignmentFlag alignment);
2387 const QCPAxis::SelectableParts &selectableParts);
2393 virtual double selectTest(
const QPointF &pos,
bool onlySelectable,
2397 Qt::Orientation orientation()
const {
return mOrientation; }
2399 return rangeReversed() != (orientation() == Qt::Vertical) ? -1 : 1;
2415 return type == atBottom || type == atTop ? Qt::Horizontal : Qt::Vertical;
2433 Qt::Orientation mOrientation;
2434 SelectableParts mSelectableParts, mSelectedParts;
2435 QPen mBasePen, mSelectedBasePen;
2440 QFont mLabelFont, mSelectedLabelFont;
2441 QColor mLabelColor, mSelectedLabelColor;
2446 QFont mTickLabelFont, mSelectedTickLabelFont;
2447 QColor mTickLabelColor, mSelectedTickLabelColor;
2448 int mNumberPrecision;
2449 QLatin1Char mNumberFormatChar;
2450 bool mNumberBeautifulPowers;
2457 QPen mTickPen, mSelectedTickPen;
2458 QPen mSubTickPen, mSelectedSubTickPen;
2461 bool mRangeReversed;
2468 QVector<double> mTickVector;
2469 QVector<QString> mTickVectorLabels;
2470 QVector<double> mSubTickVector;
2471 bool mCachedMarginValid;
2486 virtual
void selectEvent(QMouseEvent *event,
bool additive,
2487 const QVariant &details,
2491 virtual
void mousePressEvent(QMouseEvent *event,
2493 virtual
void mouseMoveEvent(QMouseEvent *event,
2495 virtual
void mouseReleaseEvent(QMouseEvent *event,
2500 void setupTickVectors();
2501 QPen getBasePen() const;
2502 QPen getTickPen() const;
2503 QPen getSubTickPen() const;
2504 QFont getTickLabelFont() const;
2505 QFont getLabelFont() const;
2506 QColor getTickLabelColor() const;
2507 QColor getLabelColor() const;
2516 Q_DECLARE_OPERATORS_FOR_FLAGS(
QCPAxis::SelectableParts)
2517 Q_DECLARE_OPERATORS_FOR_FLAGS(
QCPAxis::AxisTypes)
2545 int tickLabelPadding;
2546 double tickLabelRotation;
2549 bool substituteExponent;
2550 bool numberMultiplyCross;
2551 int tickLengthIn, tickLengthOut, subTickLengthIn,
2553 QPen tickPen, subTickPen;
2554 QFont tickLabelFont;
2555 QColor tickLabelColor;
2556 QRect axisRect, viewportRect;
2558 bool abbreviateDecimalPowers;
2559 bool reversedEndings;
2561 QVector<double> subTickPositions;
2562 QVector<double> tickPositions;
2563 QVector<QString> tickLabels;
2566 struct CachedLabel {
2570 struct TickLabelData {
2572 QRect baseBounds, expBounds,
suffixBounds, totalBounds, rotatedTotalBounds;
2573 QFont baseFont, expFont;
2576 QByteArray mLabelParameterHash;
2578 QCache<QString, CachedLabel> mLabelCache;
2579 QRect mAxisSelectionBox, mTickLabelsSelectionBox, mLabelSelectionBox;
2584 int distanceToAxis,
const QString &text,
2585 QSize *tickLabelsSize);
2589 const QString &text)
const;
2592 QSize *tickLabelsSize)
const;
2625 Q_ENUMS(ScatterProperty)
2626 Q_FLAGS(ScatterProperties)
2627 Q_DECLARE_FLAGS(ScatterProperties, ScatterProperty)
2685 Q_ENUMS(ScatterShape)
2696 const QBrush &brush = Qt::NoBrush,
double size = 6);
2699 double size()
const {
return mSize; }
2701 QPen
pen()
const {
return mPen; }
2716 bool isNone()
const {
return mShape == ssNone; }
2730 QPainterPath mCustomPath;
2736 Q_DECLARE_OPERATORS_FOR_FLAGS(QCPScatterStyle::ScatterProperties)
2750 template <
class DataType>
2752 return a.sortKey() < b.sortKey();
2755 template <
class DataType>
2766 int size()
const {
return mData.size() - mPreallocSize; }
2771 void setAutoSqueeze(
bool enabled);
2775 void set(
const QVector<DataType> &data,
bool alreadySorted =
false);
2777 void add(
const QVector<DataType> &data,
bool alreadySorted =
false);
2778 void add(
const DataType &data);
2779 void removeBefore(
double sortKey);
2780 void removeAfter(
double sortKey);
2781 void remove(
double sortKeyFrom,
double sortKeyTo);
2782 void remove(
double sortKey);
2785 void squeeze(
bool preAllocation =
true,
bool postAllocation =
true);
2788 return mData.constBegin() + mPreallocSize;
2793 const_iterator findBegin(
double sortKey,
bool expandedRange =
true)
const;
2794 const_iterator findEnd(
double sortKey,
bool expandedRange =
true)
const;
2796 return constBegin() + qBound(0, index, size());
2799 QCPRange valueRange(
bool &foundRange,
2803 void limitIteratorsToDataRange(const_iterator &begin, const_iterator &end,
2816 void preallocateGrow(
int minimumPreallocSize);
2817 void performAutoSqueeze();
2977 template <
class DataType>
2979 : mAutoSqueeze(true), mPreallocSize(0), mPreallocIteration(0) {}
2989 template <
class DataType>
2991 if (mAutoSqueeze != enabled) {
2992 mAutoSqueeze = enabled;
2993 if (mAutoSqueeze) performAutoSqueeze();
3003 template <
class DataType>
3019 template <
class DataType>
3021 bool alreadySorted) {
3024 mPreallocIteration = 0;
3025 if (!alreadySorted) sort();
3034 template <
class DataType>
3038 const int n = data.
size();
3039 const int oldSize = size();
3042 !qcpLessThanSortKey<DataType>(
3047 if (mPreallocSize < n) preallocateGrow(n);
3052 mData.resize(mData.size() + n);
3055 !qcpLessThanSortKey<DataType>(
3056 *(constEnd() - n - 1),
3059 std::inplace_merge(begin(), end() - n, end(),
3060 qcpLessThanSortKey<DataType>);
3073 template <
class DataType>
3075 bool alreadySorted) {
3076 if (data.isEmpty())
return;
3078 set(data, alreadySorted);
3082 const int n = data.size();
3083 const int oldSize = size();
3085 if (alreadySorted && oldSize > 0 &&
3086 !qcpLessThanSortKey<DataType>(
3087 *constBegin(), *(data.constEnd() -
3091 if (mPreallocSize < n) preallocateGrow(n);
3093 std::copy(data.constBegin(), data.constEnd(), begin());
3097 mData.resize(mData.size() + n);
3098 std::copy(data.constBegin(), data.constEnd(), end() - n);
3100 std::sort(end() - n, end(), qcpLessThanSortKey<DataType>);
3102 !qcpLessThanSortKey<DataType>(
3103 *(constEnd() - n - 1),
3106 std::inplace_merge(begin(), end() - n, end(),
3107 qcpLessThanSortKey<DataType>);
3117 template <
class DataType>
3120 !qcpLessThanSortKey<DataType>(
3121 data, *(constEnd() - 1)))
3125 }
else if (qcpLessThanSortKey<DataType>(
3126 data, *constBegin()))
3129 if (mPreallocSize < 1) preallocateGrow(1);
3135 std::lower_bound(begin(), end(), data, qcpLessThanSortKey<DataType>);
3136 mData.insert(insertionPoint, data);
3145 template <
class DataType>
3149 std::lower_bound(begin(), end(), DataType::fromSortKey(sortKey),
3150 qcpLessThanSortKey<DataType>);
3154 if (mAutoSqueeze) performAutoSqueeze();
3162 template <
class DataType>
3165 std::upper_bound(begin(), end(), DataType::fromSortKey(sortKey),
3166 qcpLessThanSortKey<DataType>);
3168 mData.erase(it, itEnd);
3169 if (mAutoSqueeze) performAutoSqueeze();
3180 template <
class DataType>
3182 if (sortKeyFrom >= sortKeyTo || isEmpty())
return;
3185 std::lower_bound(begin(), end(), DataType::fromSortKey(sortKeyFrom),
3186 qcpLessThanSortKey<DataType>);
3188 std::upper_bound(it, end(), DataType::fromSortKey(sortKeyTo),
3189 qcpLessThanSortKey<DataType>);
3190 mData.erase(it, itEnd);
3191 if (mAutoSqueeze) performAutoSqueeze();
3203 template <
class DataType>
3206 std::lower_bound(begin(), end(), DataType::fromSortKey(sortKey),
3207 qcpLessThanSortKey<DataType>);
3208 if (it != end() && it->sortKey() == sortKey) {
3216 if (mAutoSqueeze) performAutoSqueeze();
3224 template <
class DataType>
3227 mPreallocIteration = 0;
3243 template <
class DataType>
3245 std::sort(begin(), end(), qcpLessThanSortKey<DataType>);
3259 template <
class DataType>
3261 bool postAllocation) {
3262 if (preAllocation) {
3263 if (mPreallocSize > 0) {
3264 std::copy(begin(), end(), mData.begin());
3265 mData.resize(size());
3268 mPreallocIteration = 0;
3270 if (postAllocation) mData.squeeze();
3289 template <
class DataType>
3292 bool expandedRange)
const {
3293 if (isEmpty())
return constEnd();
3296 std::lower_bound(constBegin(), constEnd(), DataType::fromSortKey(sortKey),
3297 qcpLessThanSortKey<DataType>);
3298 if (expandedRange &&
3322 template <
class DataType>
3325 if (isEmpty())
return constEnd();
3328 std::upper_bound(constBegin(), constEnd(), DataType::fromSortKey(sortKey),
3329 qcpLessThanSortKey<DataType>);
3330 if (expandedRange && it != constEnd()) ++it;
3350 template <
class DataType>
3358 bool haveLower =
false;
3359 bool haveUpper =
false;
3366 if (DataType::sortKeyIsMainKey())
3373 if (!qIsNaN(it->mainValue())) {
3374 range.
lower = it->mainKey();
3381 while (it != constBegin())
3384 if (!qIsNaN(it->mainValue())) {
3385 range.
upper = it->mainKey();
3393 while (it != itEnd) {
3394 if (!qIsNaN(it->mainValue())) {
3395 current = it->mainKey();
3396 if (current < range.
lower || !haveLower) {
3397 range.
lower = current;
3400 if (current > range.
upper || !haveUpper) {
3401 range.
upper = current;
3408 }
else if (signDomain ==
3411 while (it != itEnd) {
3412 if (!qIsNaN(it->mainValue())) {
3413 current = it->mainKey();
3414 if ((current < range.
lower || !haveLower) && current < 0) {
3415 range.
lower = current;
3418 if ((current > range.
upper || !haveUpper) && current < 0) {
3419 range.
upper = current;
3425 }
else if (signDomain ==
3428 while (it != itEnd) {
3429 if (!qIsNaN(it->mainValue())) {
3430 current = it->mainKey();
3431 if ((current < range.
lower || !haveLower) && current > 0) {
3432 range.
lower = current;
3435 if ((current > range.
upper || !haveUpper) && current > 0) {
3436 range.
upper = current;
3444 foundRange = haveLower && haveUpper;
3466 template <
class DataType>
3475 const bool restrictKeyRange = inKeyRange !=
QCPRange();
3476 bool haveLower =
false;
3477 bool haveUpper =
false;
3481 if (DataType::sortKeyIsMainKey() && restrictKeyRange) {
3482 itBegin = findBegin(inKeyRange.
lower);
3483 itEnd = findEnd(inKeyRange.
upper);
3489 if (restrictKeyRange && (it->mainKey() < inKeyRange.
lower ||
3490 it->mainKey() > inKeyRange.
upper))
3492 current = it->valueRange();
3493 if ((current.
lower < range.
lower || !haveLower) &&
3494 !qIsNaN(current.
lower)) {
3498 if ((current.
upper > range.
upper || !haveUpper) &&
3499 !qIsNaN(current.
upper)) {
3504 }
else if (signDomain ==
3509 if (restrictKeyRange && (it->mainKey() < inKeyRange.
lower ||
3510 it->mainKey() > inKeyRange.
upper))
3512 current = it->valueRange();
3513 if ((current.
lower < range.
lower || !haveLower) && current.
lower < 0 &&
3514 !qIsNaN(current.
lower)) {
3518 if ((current.
upper > range.
upper || !haveUpper) && current.
upper < 0 &&
3519 !qIsNaN(current.
upper)) {
3524 }
else if (signDomain ==
3529 if (restrictKeyRange && (it->mainKey() < inKeyRange.
lower ||
3530 it->mainKey() > inKeyRange.
upper))
3532 current = it->valueRange();
3533 if ((current.
lower < range.
lower || !haveLower) && current.
lower > 0 &&
3534 !qIsNaN(current.
lower)) {
3538 if ((current.
upper > range.
upper || !haveUpper) && current.
upper > 0 &&
3539 !qIsNaN(current.
upper)) {
3546 foundRange = haveLower && haveUpper;
3559 template <
class DataType>
3563 QCPDataRange iteratorRange(begin - constBegin(), end - constBegin());
3564 iteratorRange = iteratorRange.
bounded(dataRange.
bounded(this->dataRange()));
3565 begin = constBegin() + iteratorRange.
begin();
3566 end = constBegin() + iteratorRange.
end();
3579 template <
class DataType>
3581 if (minimumPreallocSize <= mPreallocSize)
return;
3583 int newPreallocSize = minimumPreallocSize;
3584 newPreallocSize += (1u << qBound(4, mPreallocIteration + 4, 15)) -
3587 ++mPreallocIteration;
3589 int sizeDifference = newPreallocSize - mPreallocSize;
3590 mData.resize(mData.size() + sizeDifference);
3591 std::copy_backward(mData.begin() + mPreallocSize,
3592 mData.end() - sizeDifference, mData.end());
3593 mPreallocSize = newPreallocSize;
3612 template <
class DataType>
3614 const int totalAlloc = mData.capacity();
3615 const int postAllocSize = totalAlloc - mData.size();
3616 const int usedSize = size();
3617 bool shrinkPostAllocation =
false;
3618 bool shrinkPreAllocation =
false;
3619 if (totalAlloc > 650000)
3622 shrinkPostAllocation =
3626 shrinkPreAllocation = mPreallocSize * 10 > usedSize;
3627 }
else if (totalAlloc >
3631 shrinkPostAllocation = postAllocSize > usedSize * 5;
3632 shrinkPreAllocation =
3633 mPreallocSize > usedSize * 1.5;
3637 if (shrinkPreAllocation || shrinkPostAllocation)
3638 squeeze(shrinkPreAllocation, shrinkPostAllocation);
3654 QPen
pen()
const {
return mPen; }
3658 return mUsedScatterProperties;
3665 QCPScatterStyle::ScatterProperties usedProperties =
3668 const QCPScatterStyle::ScatterProperties &properties);
3701 Q_PROPERTY(QString name READ name WRITE setName)
3702 Q_PROPERTY(
bool antialiasedFill READ antialiasedFill WRITE setAntialiasedFill)
3703 Q_PROPERTY(
bool antialiasedScatters READ antialiasedScatters WRITE
3704 setAntialiasedScatters)
3705 Q_PROPERTY(QPen pen READ pen WRITE setPen)
3706 Q_PROPERTY(QBrush brush READ brush WRITE setBrush)
3707 Q_PROPERTY(
QCPAxis *keyAxis READ keyAxis WRITE setKeyAxis)
3708 Q_PROPERTY(
QCPAxis *valueAxis READ valueAxis WRITE setValueAxis)
3710 NOTIFY selectableChanged)
3711 Q_PROPERTY(
QCPDataSelection selection READ selection WRITE setSelection NOTIFY
3714 WRITE setSelectionDecorator)
3721 QString
name()
const {
return mName; }
3724 QPen
pen()
const {
return mPen; }
3729 bool selected()
const {
return !mSelection.isEmpty(); }
3732 return mSelectionDecorator;
3748 virtual double selectTest(
const QPointF &pos,
bool onlySelectable,
3749 QVariant *details = 0) const
3765 double &value)
const;
3769 bool inKeyRange =
false)
const;
3783 bool mAntialiasedFill, mAntialiasedScatters;
3786 QPointer<QCPAxis> mKeyAxis, mValueAxis;
3797 virtual
void selectEvent(QMouseEvent *event,
bool additive,
3798 const QVariant &details,
3804 const QRectF &rect) const = 0;
3827 const QString &name,
int anchorId = -1);
3831 QString
name()
const {
return mName; }
3842 QSet<QCPItemPosition *> mChildrenX, mChildrenY;
3897 Q_ENUMS(PositionType)
3900 const QString &name);
3910 double key()
const {
return mKey; }
3912 QPointF
coords()
const {
return QPointF(mKey, mValue); }
3923 bool keepPixelPosition = false);
3925 bool keepPixelPosition = false);
3927 bool keepPixelPosition = false);
3928 void setCoords(
double key,
double value);
3929 void setCoords(const QPointF &coords);
3932 void setPixelPosition(const QPointF &pixelPosition);
3937 QPointer<
QCPAxis> mKeyAxis, mValueAxis;
3939 double mKey, mValue;
3953 Q_PROPERTY(
bool clipToAxisRect READ clipToAxisRect WRITE setClipToAxisRect)
3954 Q_PROPERTY(
QCPAxisRect *clipAxisRect READ clipAxisRect WRITE setClipAxisRect)
3955 Q_PROPERTY(
bool selectable READ selectable WRITE setSelectable NOTIFY
3958 bool selected READ selected WRITE setSelected NOTIFY selectionChanged)
3977 virtual double selectTest(
const QPointF &pos,
bool onlySelectable,
3982 QList<QCPItemAnchor *>
anchors()
const {
return mAnchors; }
3993 bool mClipToAxisRect;
3994 QPointer<QCPAxisRect> mClipAxisRect;
3995 QList<QCPItemPosition *> mPositions;
3996 QList<QCPItemAnchor *> mAnchors;
3997 bool mSelectable, mSelected;
4002 virtual
void applyDefaultAntialiasingHint(
QCPPainter *painter) const
4006 virtual
void selectEvent(QMouseEvent *event,
bool additive,
4007 const QVariant &details,
4012 virtual QPointF anchorPixelPosition(
int anchorId) const;
4015 double rectDistance(const QRectF &rect, const QPointF &pos,
4016 bool filledRect) const;
4035 Q_PROPERTY(QRect viewport READ viewport WRITE setViewport)
4036 Q_PROPERTY(QPixmap background READ background WRITE setBackground)
4038 bool backgroundScaled READ backgroundScaled WRITE setBackgroundScaled)
4039 Q_PROPERTY(Qt::AspectRatioMode backgroundScaledMode READ backgroundScaledMode
4040 WRITE setBackgroundScaledMode)
4042 Q_PROPERTY(
bool autoAddPlottableToLegend READ autoAddPlottableToLegend WRITE
4043 setAutoAddPlottableToLegend)
4044 Q_PROPERTY(
int selectionTolerance READ selectionTolerance WRITE
4045 setSelectionTolerance)
4046 Q_PROPERTY(
bool noAntialiasingOnDrag READ noAntialiasingOnDrag WRITE
4047 setNoAntialiasingOnDrag)
4048 Q_PROPERTY(Qt::KeyboardModifier multiSelectModifier READ multiSelectModifier
4049 WRITE setMultiSelectModifier)
4050 Q_PROPERTY(
bool openGl READ openGl WRITE setOpenGl)
4063 Q_ENUMS(LayerInsertMode)
4089 Q_ENUMS(RefreshPriority)
4095 QRect viewport()
const {
return mViewport; }
4100 return mBackgroundScaledMode;
4104 return mAntialiasedElements;
4107 return mNotAntialiasedElements;
4115 return mMultiSelectModifier;
4118 return mSelectionRectMode;
4128 Qt::AspectRatioMode mode = Qt::KeepAspectRatioByExpanding);
4133 const QCP::AntialiasedElements &antialiasedElements);
4135 bool enabled =
true);
4137 const QCP::AntialiasedElements ¬AntialiasedElements);
4139 bool enabled =
true);
4162 bool onlySelectable =
false)
const;
4184 bool onlySelectable =
false)
const;
4212 bool savePdf(
const QString &fileName,
int width = 0,
int height = 0,
4214 const QString &pdfCreator = QString(),
4215 const QString &pdfTitle = QString());
4216 bool savePng(
const QString &fileName,
int width = 0,
int height = 0,
4217 double scale = 1.0,
int quality = -1,
int resolution = 96,
4219 bool saveJpg(
const QString &fileName,
int width = 0,
int height = 0,
4220 double scale = 1.0,
int quality = -1,
int resolution = 96,
4222 bool saveBmp(
const QString &fileName,
int width = 0,
int height = 0,
4223 double scale = 1.0,
int resolution = 96,
4226 double scale,
const char *format,
int quality = -1,
4227 int resolution = 96,
4229 QPixmap
toPixmap(
int width = 0,
int height = 0,
double scale = 1.0);
4234 QCPAxis *xAxis, *yAxis, *xAxis2, *yAxis2;
4245 QMouseEvent *event);
4247 QMouseEvent *event);
4251 QMouseEvent *event);
4253 QMouseEvent *event);
4255 QMouseEvent *event);
4257 QMouseEvent *event);
4268 bool mAutoAddPlottableToLegend;
4269 QList<QCPAbstractPlottable *> mPlottables;
4270 QList<QCPGraph *> mGraphs;
4272 QList<QCPAbstractItem *> mItems;
4273 QList<QCPLayer *> mLayers;
4274 QCP::AntialiasedElements mAntialiasedElements, mNotAntialiasedElements;
4275 QCP::Interactions mInteractions;
4276 int mSelectionTolerance;
4277 bool mNoAntialiasingOnDrag;
4278 QBrush mBackgroundBrush;
4279 QPixmap mBackgroundPixmap;
4280 QPixmap mScaledBackgroundPixmap;
4281 bool mBackgroundScaled;
4282 Qt::AspectRatioMode mBackgroundScaledMode;
4284 QCP::PlottingHints mPlottingHints;
4285 Qt::KeyboardModifier mMultiSelectModifier;
4292 QPoint mMousePressPos;
4303 #ifdef QCP_OPENGL_FBO
4304 QSharedPointer<QOpenGLContext> mGlContext;
4305 QSharedPointer<QSurface> mGlSurface;
4306 QSharedPointer<QOpenGLPaintDevice> mGlPaintDevice;
4322 virtual
void updateLayout();
4325 Q_SLOT virtual
void processRectSelection(QRect rect, QMouseEvent *event);
4326 Q_SLOT virtual
void processRectZoom(QRect rect, QMouseEvent *event);
4327 Q_SLOT virtual
void processPointSelection(QMouseEvent *event);
4333 void updateLayerIndices() const;
4335 QVariant *selectionDetails = 0) const;
4337 const QPointF &pos,
bool onlySelectable,
4338 QList<QVariant> *selectionDetails = 0) const;
4340 void setupPaintBuffers();
4342 bool hasInvalidatedPaintBuffers();
4374 bool onlySelectable)
const = 0;
4375 virtual int findBegin(
double sortKey,
bool expandedRange =
true)
const = 0;
4376 virtual int findEnd(
double sortKey,
bool expandedRange =
true)
const = 0;
4379 template <
class DataType>
4401 virtual
int findBegin(
double sortKey,
4403 virtual
int findEnd(
double sortKey,
4407 virtual
double selectTest(const QPointF &pos,
bool onlySelectable,
4419 QList<QCPDataRange> &unselectedSegments)
const;
4421 const QVector<QPointF> &lineData)
const;
4640 template <
class DataType>
4646 template <
class DataType>
4652 template <
class DataType>
4654 return mDataContainer->size();
4660 template <
class DataType>
4662 if (index >= 0 && index < mDataContainer->size()) {
4663 return (mDataContainer->constBegin() + index)->mainKey();
4665 qDebug() << Q_FUNC_INFO <<
"Index out of bounds" << index;
4673 template <
class DataType>
4675 if (index >= 0 && index < mDataContainer->size()) {
4676 return (mDataContainer->constBegin() + index)->sortKey();
4678 qDebug() << Q_FUNC_INFO <<
"Index out of bounds" << index;
4686 template <
class DataType>
4688 if (index >= 0 && index < mDataContainer->size()) {
4689 return (mDataContainer->constBegin() + index)->mainValue();
4691 qDebug() << Q_FUNC_INFO <<
"Index out of bounds" << index;
4699 template <
class DataType>
4701 if (index >= 0 && index < mDataContainer->size()) {
4702 return (mDataContainer->constBegin() + index)->valueRange();
4704 qDebug() << Q_FUNC_INFO <<
"Index out of bounds" << index;
4712 template <
class DataType>
4714 if (index >= 0 && index < mDataContainer->size()) {
4716 mDataContainer->constBegin() + index;
4717 return coordsToPixels(it->mainKey(), it->mainValue());
4719 qDebug() << Q_FUNC_INFO <<
"Index out of bounds" << index;
4727 template <
class DataType>
4729 return DataType::sortKeyIsMainKey();
4740 template <
class DataType>
4742 const QRectF &rect,
bool onlySelectable)
const {
4744 if ((onlySelectable && mSelectable ==
QCP::stNone) ||
4745 mDataContainer->isEmpty())
4747 if (!mKeyAxis || !mValueAxis)
return result;
4750 double key1, value1, key2, value2;
4751 pixelsToCoords(rect.topLeft(), key1, value1);
4752 pixelsToCoords(rect.bottomRight(), key2, value2);
4755 QCPRange valueRange(value1, value2);
4757 mDataContainer->constBegin();
4759 mDataContainer->constEnd();
4760 if (DataType::sortKeyIsMainKey())
4767 if (begin == end)
return result;
4769 int currentSegmentBegin =
4773 if (currentSegmentBegin == -1) {
4774 if (valueRange.
contains(it->mainValue()) &&
4776 currentSegmentBegin = it - mDataContainer->constBegin();
4777 }
else if (!valueRange.
contains(it->mainValue()) ||
4781 QCPDataRange(currentSegmentBegin, it - mDataContainer->constBegin()),
4783 currentSegmentBegin = -1;
4787 if (currentSegmentBegin != -1)
4799 template <
class DataType>
4801 bool expandedRange)
const {
4802 return mDataContainer->findBegin(sortKey, expandedRange) -
4803 mDataContainer->constBegin();
4809 template <
class DataType>
4811 bool expandedRange)
const {
4812 return mDataContainer->findEnd(sortKey, expandedRange) -
4813 mDataContainer->constBegin();
4827 template <
class DataType>
4829 bool onlySelectable,
4830 QVariant *details)
const {
4831 if ((onlySelectable && mSelectable ==
QCP::stNone) ||
4832 mDataContainer->isEmpty())
4834 if (!mKeyAxis || !mValueAxis)
return -1;
4837 double minDistSqr = (std::numeric_limits<double>::max)();
4838 int minDistIndex = mDataContainer->size();
4841 mDataContainer->constBegin();
4843 mDataContainer->constEnd();
4844 if (DataType::sortKeyIsMainKey())
4850 double posKeyMin, posKeyMax, dummy;
4851 pixelsToCoords(pos - QPointF(mParentPlot->selectionTolerance(),
4852 mParentPlot->selectionTolerance()),
4854 pixelsToCoords(pos + QPointF(mParentPlot->selectionTolerance(),
4855 mParentPlot->selectionTolerance()),
4857 if (posKeyMin > posKeyMax) qSwap(posKeyMin, posKeyMax);
4858 begin = mDataContainer->
findBegin(posKeyMin,
true);
4859 end = mDataContainer->
findEnd(posKeyMax,
true);
4861 if (begin == end)
return -1;
4862 QCPRange keyRange(mKeyAxis->range());
4863 QCPRange valueRange(mValueAxis->range());
4866 const double mainKey = it->mainKey();
4867 const double mainValue = it->mainValue();
4874 const double currentDistSqr =
4876 if (currentDistSqr < minDistSqr) {
4877 minDistSqr = currentDistSqr;
4878 minDistIndex = it - mDataContainer->constBegin();
4882 if (minDistIndex != mDataContainer->size())
4887 if (details) details->setValue(selectionResult);
4888 return qSqrt(minDistSqr);
4901 template <
class DataType>
4903 QList<QCPDataRange> &selectedSegments,
4904 QList<QCPDataRange> &unselectedSegments)
const {
4905 selectedSegments.clear();
4906 unselectedSegments.clear();
4933 template <
class DataType>
4935 QCPPainter *painter,
const QVector<QPointF> &lineData)
const {
4939 painter->pen().style() == Qt::SolidLine &&
4943 bool lastIsNan =
false;
4944 const int lineDataSize = lineData.size();
4945 while (i < lineDataSize &&
4946 (qIsNaN(lineData.at(i).y()) ||
4947 qIsNaN(lineData.at(i).x())))
4950 while (i < lineDataSize) {
4951 if (!qIsNaN(lineData.at(i).y()) &&
4952 !qIsNaN(lineData.at(i).x()))
4955 painter->
drawLine(lineData.at(i - 1), lineData.at(i));
4963 int segmentStart = 0;
4965 const int lineDataSize = lineData.size();
4966 while (i < lineDataSize) {
4967 if (qIsNaN(lineData.at(i).y()) || qIsNaN(lineData.at(i).x()) ||
4969 lineData.at(i).y()))
4972 painter->drawPolyline(
4973 lineData.constData() + segmentStart,
4976 segmentStart = i + 1;
4981 painter->drawPolyline(lineData.constData() + segmentStart,
4982 lineDataSize - segmentStart);
5008 Q_ENUMS(ColorInterpolation)
5054 Q_ENUMS(GradientPreset)
5060 return !(*
this == other);
5078 int n,
int dataIndexFactor = 1,
bool logarithmic =
false);
5079 void colorize(
const double *data,
const unsigned char *alpha,
5080 const QCPRange &range, QRgb *scanLine,
int n,
5081 int dataIndexFactor = 1,
bool logarithmic =
false);
5090 QMap<double, QColor> mColorStops;
5098 bool mColorBufferInvalidated;
5135 Q_ENUMS(BracketStyle)
5141 QPen bracketPen()
const {
return mBracketPen; }
5177 int dataIndex,
int direction)
const;
5179 int dataIndex)
const;
5191 Q_PROPERTY(QPixmap background READ background WRITE setBackground)
5193 bool backgroundScaled READ backgroundScaled WRITE setBackgroundScaled)
5194 Q_PROPERTY(Qt::AspectRatioMode backgroundScaledMode READ backgroundScaledMode
5195 WRITE setBackgroundScaledMode)
5196 Q_PROPERTY(Qt::Orientations rangeDrag READ rangeDrag WRITE setRangeDrag)
5197 Q_PROPERTY(Qt::Orientations rangeZoom READ rangeZoom WRITE setRangeZoom)
5208 return mBackgroundScaledMode;
5221 Qt::AspectRatioMode mode = Qt::KeepAspectRatioByExpanding);
5239 QList<QCPAxis *>
axes(QCPAxis::AxisTypes types)
const;
5242 QList<QCPAxis *>
addAxes(QCPAxis::AxisTypes types);
5246 void zoom(
const QRectF &pixelRect);
5247 void zoom(
const QRectF &pixelRect,
const QList<QCPAxis *> &affectedAxes);
5254 int left()
const {
return mRect.left(); }
5255 int right()
const {
return mRect.right(); }
5256 int top()
const {
return mRect.top(); }
5257 int bottom()
const {
return mRect.bottom(); }
5258 int width()
const {
return mRect.width(); }
5259 int height()
const {
return mRect.height(); }
5260 QSize
size()
const {
return mRect.size(); }
5261 QPoint
topLeft()
const {
return mRect.topLeft(); }
5265 QPoint
center()
const {
return mRect.center(); }
5269 virtual QList<QCPLayoutElement *>
elements(
bool recursive)
const
5274 QBrush mBackgroundBrush;
5275 QPixmap mBackgroundPixmap;
5276 QPixmap mScaledBackgroundPixmap;
5277 bool mBackgroundScaled;
5278 Qt::AspectRatioMode mBackgroundScaledMode;
5280 Qt::Orientations mRangeDrag, mRangeZoom;
5283 double mRangeZoomFactorHorz, mRangeZoomFactorVert;
5287 QCP::AntialiasedElements mAADragBackup, mNotAADragBackup;
5289 QHash<QCPAxis::AxisType, QList<QCPAxis *> > mAxes;
5298 virtual
void mousePressEvent(QMouseEvent *event,
5300 virtual
void mouseMoveEvent(QMouseEvent *event,
5302 virtual
void mouseReleaseEvent(QMouseEvent *event,
5324 Q_PROPERTY(
QCPLegend *parentLegend READ parentLegend)
5325 Q_PROPERTY(QFont font READ font WRITE setFont)
5326 Q_PROPERTY(QColor textColor READ textColor WRITE setTextColor)
5327 Q_PROPERTY(QFont selectedFont READ selectedFont WRITE setSelectedFont)
5328 Q_PROPERTY(QColor selectedTextColor READ selectedTextColor WRITE
5329 setSelectedTextColor)
5330 Q_PROPERTY(
bool selectable READ selectable WRITE setSelectable NOTIFY
5333 bool selected READ selected WRITE setSelected NOTIFY selectableChanged)
5340 QFont
font()
const {
return mFont; }
5356 virtual double selectTest(
const QPointF &pos,
bool onlySelectable,
5360 void selectionChanged(
bool selected);
5361 void selectableChanged(
bool selectable);
5368 QFont mSelectedFont;
5369 QColor mSelectedTextColor;
5370 bool mSelectable, mSelected;
5374 virtual
void applyDefaultAntialiasingHint(
QCPPainter *painter) const
5379 virtual
void selectEvent(QMouseEvent *event,
bool additive,
5380 const QVariant &details,
5407 QPen getIconBorderPen() const;
5408 QColor getTextColor() const;
5409 QFont getFont() const;
5415 Q_PROPERTY(QPen borderPen READ borderPen WRITE setBorderPen)
5416 Q_PROPERTY(QBrush brush READ brush WRITE setBrush)
5417 Q_PROPERTY(QFont font READ font WRITE setFont)
5418 Q_PROPERTY(QColor textColor READ textColor WRITE setTextColor)
5419 Q_PROPERTY(QSize iconSize READ iconSize WRITE setIconSize)
5420 Q_PROPERTY(
int iconTextPadding READ iconTextPadding WRITE setIconTextPadding)
5421 Q_PROPERTY(QPen iconBorderPen READ iconBorderPen WRITE setIconBorderPen)
5422 Q_PROPERTY(SelectableParts selectableParts READ selectableParts WRITE
5423 setSelectableParts NOTIFY selectionChanged)
5424 Q_PROPERTY(SelectableParts selectedParts READ selectedParts WRITE
5425 setSelectedParts NOTIFY selectableChanged)
5427 QPen selectedBorderPen READ selectedBorderPen WRITE setSelectedBorderPen)
5428 Q_PROPERTY(QPen selectedIconBorderPen READ selectedIconBorderPen WRITE
5429 setSelectedIconBorderPen)
5430 Q_PROPERTY(QBrush selectedBrush READ selectedBrush WRITE setSelectedBrush)
5431 Q_PROPERTY(QFont selectedFont READ selectedFont WRITE setSelectedFont)
5432 Q_PROPERTY(QColor selectedTextColor READ selectedTextColor WRITE
5433 setSelectedTextColor)
5449 Q_ENUMS(SelectablePart)
5450 Q_FLAGS(SelectableParts)
5451 Q_DECLARE_FLAGS(SelectableParts, SelectablePart)
5457 QPen borderPen()
const {
return mBorderPen; }
5459 QFont
font()
const {
return mFont; }
5490 virtual double selectTest(
const QPointF &pos,
bool onlySelectable,
5497 int itemCount() const;
5501 bool removeItem(
int index);
5512 QPen mBorderPen, mIconBorderPen;
5517 int mIconTextPadding;
5518 SelectableParts mSelectedParts, mSelectableParts;
5519 QPen mSelectedBorderPen, mSelectedIconBorderPen;
5520 QBrush mSelectedBrush;
5521 QFont mSelectedFont;
5522 QColor mSelectedTextColor;
5527 virtual
void applyDefaultAntialiasingHint(
QCPPainter *painter) const
5531 virtual
void selectEvent(QMouseEvent *event,
bool additive,
5532 const QVariant &details,
5537 QPen getBorderPen() const;
5538 QBrush getBrush() const;
5546 Q_DECLARE_OPERATORS_FOR_FLAGS(
QCPLegend::SelectableParts)
5557 Q_PROPERTY(QString text READ text WRITE setText)
5558 Q_PROPERTY(QFont font READ font WRITE setFont)
5559 Q_PROPERTY(QColor textColor READ textColor WRITE setTextColor)
5560 Q_PROPERTY(QFont selectedFont READ selectedFont WRITE setSelectedFont)
5561 Q_PROPERTY(QColor selectedTextColor READ selectedTextColor WRITE
5562 setSelectedTextColor)
5563 Q_PROPERTY(
bool selectable READ selectable WRITE setSelectable NOTIFY
5566 bool selected READ selected WRITE setSelected NOTIFY selectionChanged)
5574 const QString &fontFamily,
double pointSize);
5579 QString
text()
const {
return mText; }
5581 QFont
font()
const {
return mFont; }
5599 virtual double selectTest(
const QPointF &pos,
bool onlySelectable,
5601 virtual
void mousePressEvent(QMouseEvent *event,
5603 virtual
void mouseReleaseEvent(QMouseEvent *event,
5605 virtual
void mouseDoubleClickEvent(QMouseEvent *event,
5609 void selectionChanged(
bool selected);
5610 void selectableChanged(
bool selectable);
5611 void clicked(QMouseEvent *event);
5612 void doubleClicked(QMouseEvent *event);
5620 QFont mSelectedFont;
5621 QColor mSelectedTextColor;
5622 QRect mTextBoundingRect;
5623 bool mSelectable, mSelected;
5626 virtual
void applyDefaultAntialiasingHint(
QCPPainter *painter) const
5632 virtual
void selectEvent(QMouseEvent *event,
bool additive,
5633 const QVariant &details,
5638 QFont mainFont() const;
5639 QColor mainTextColor() const;
5657 QImage mGradientImage;
5658 bool mGradientImageInvalidated;
5678 Q_PROPERTY(
QCPRange dataRange READ dataRange WRITE setDataRange NOTIFY
5681 setDataScaleType NOTIFY dataScaleTypeChanged)
5682 Q_PROPERTY(
QCPColorGradient gradient READ gradient WRITE setGradient NOTIFY
5684 Q_PROPERTY(QString label READ label WRITE setLabel)
5685 Q_PROPERTY(
int barWidth READ barWidth WRITE setBarWidth)
5686 Q_PROPERTY(
bool rangeDrag READ rangeDrag WRITE setRangeDrag)
5687 Q_PROPERTY(
bool rangeZoom READ rangeZoom WRITE setRangeZoom)
5735 QPointer<QCPColorScaleAxisRectPrivate> mAxisRect;
5736 QPointer<QCPAxis> mColorAxis;
5797 Q_PROPERTY(LineStyle lineStyle READ lineStyle WRITE setLineStyle)
5800 Q_PROPERTY(
int scatterSkip READ scatterSkip WRITE setScatterSkip)
5801 Q_PROPERTY(
QCPGraph *channelFillGraph READ channelFillGraph WRITE
5802 setChannelFillGraph)
5804 bool adaptiveSampling READ adaptiveSampling WRITE setAdaptiveSampling)
5845 void setData(QSharedPointer<QCPGraphDataContainer> data);
5846 void setData(
const QVector<double> &keys,
const QVector<double> &values,
5847 bool alreadySorted =
false);
5855 void addData(
const QVector<double> &keys,
const QVector<double> &values,
5856 bool alreadySorted =
false);
5860 virtual double selectTest(
const QPointF &pos,
bool onlySelectable,
5874 QPointer<
QCPGraph> mChannelFillGraph;
5875 bool mAdaptiveSampling;
5883 virtual
void drawFill(
QCPPainter *painter, QVector<QPointF> *lines) const;
5885 const QVector<QPointF> &scatters,
5888 const QVector<QPointF> &lines) const;
5890 const QVector<QPointF> &lines) const;
5892 virtual
void getOptimizedLineData(
5896 virtual
void getOptimizedScatterData(
5905 void getLines(QVector<QPointF> *lines, const
QCPDataRange &dataRange) const;
5906 void getScatters(QVector<QPointF> *scatters,
5909 QVector<QPointF> dataToStepLeftLines(const QVector<
QCPGraphData> &data) const;
5910 QVector<QPointF> dataToStepRightLines(
5912 QVector<QPointF> dataToStepCenterLines(
5914 QVector<QPointF> dataToImpulseLines(const QVector<
QCPGraphData> &data) const;
5916 Qt::Orientation keyOrientation) const;
5918 QVector<
QCPDataRange> thisSegments, const QVector<QPointF> *thisData,
5920 const QVector<QPointF> *otherData) const;
5921 bool segmentsIntersect(
double aLower,
double aUpper,
double bLower,
5922 double bUpper,
int &bPrecedence) const;
5923 QPointF getFillBasePoint(QPointF matchingDataPoint) const;
5924 const QPolygonF getFillPolygon(const QVector<QPointF> *lineData,
5926 const QPolygonF getChannelFillPolygon(const QVector<QPointF> *lineData,
5928 const QVector<QPointF> *otherData,
5930 int findIndexBelowX(const QVector<QPointF> *data,
double x) const;
5931 int findIndexAboveX(const QVector<QPointF> *data,
double x) const;
5932 int findIndexBelowY(const QVector<QPointF> *data,
double y) const;
5933 int findIndexAboveY(const QVector<QPointF> *data,
double y) const;
5934 double pointDistance(
5935 const QPointF &pixelPoint,
5964 double t, key, value;
5987 Q_PROPERTY(
int scatterSkip READ scatterSkip WRITE setScatterSkip)
5988 Q_PROPERTY(LineStyle lineStyle READ lineStyle WRITE setLineStyle)
6012 void setData(QSharedPointer<QCPCurveDataContainer> data);
6013 void setData(
const QVector<double> &t,
const QVector<double> &keys,
6014 const QVector<double> &values,
bool alreadySorted =
false);
6015 void setData(
const QVector<double> &keys,
const QVector<double> &values);
6021 void addData(
const QVector<double> &t,
const QVector<double> &keys,
6022 const QVector<double> &values,
bool alreadySorted =
false);
6023 void addData(
const QVector<double> &keys,
const QVector<double> &values);
6028 virtual double selectTest(
const QPointF &pos,
bool onlySelectable,
6050 const QVector<QPointF> &lines) const;
6052 const QVector<QPointF> &points,
6057 double penWidth) const;
6058 void getScatters(QVector<QPointF> *scatters, const
QCPDataRange &dataRange,
6059 double scatterWidth) const;
6060 int getRegion(
double key,
double value,
double keyMin,
double valueMax,
6061 double keyMax,
double valueMin) const;
6062 QPointF getOptimizedPoint(
int prevRegion,
double prevKey,
double prevValue,
6063 double key,
double value,
double keyMin,
6064 double valueMax,
double keyMax,
6065 double valueMin) const;
6066 QVector<QPointF> getOptimizedCornerPoints(
int prevRegion,
int currentRegion,
6067 double prevKey,
double prevValue,
6068 double key,
double value,
6069 double keyMin,
double valueMax,
6071 double valueMin) const;
6072 bool mayTraverse(
int prevRegion,
int currentRegion) const;
6073 bool getTraverse(
double prevKey,
double prevValue,
double key,
double value,
6074 double keyMin,
double valueMax,
double keyMax,
6075 double valueMin, QPointF &crossA, QPointF &crossB) const;
6076 void getTraverseCornerPoints(
int prevRegion,
int currentRegion,
double keyMin,
6077 double valueMax,
double keyMax,
double valueMin,
6078 QVector<QPointF> &beforeTraverse,
6079 QVector<QPointF> &afterTraverse) const;
6080 double pointDistance(
6081 const QPointF &pixelPoint,
6097 Q_PROPERTY(SpacingType spacingType READ spacingType WRITE setSpacingType)
6098 Q_PROPERTY(
double spacing READ spacing WRITE setSpacing)
6116 Q_ENUMS(SpacingType)
6130 QList<QCPBars *>
bars()
const {
return mBars; }
6132 int size()
const {
return mBars.size(); }
6145 QList<QCPBars *> mBars;
6201 Q_PROPERTY(
double width READ width WRITE setWidth)
6202 Q_PROPERTY(WidthType widthType READ widthType WRITE setWidthType)
6203 Q_PROPERTY(
QCPBarsGroup *barsGroup READ barsGroup WRITE setBarsGroup)
6204 Q_PROPERTY(
double baseValue READ baseValue WRITE setBaseValue)
6205 Q_PROPERTY(
double stackingGap READ stackingGap WRITE setStackingGap)
6206 Q_PROPERTY(
QCPBars *barBelow READ barBelow)
6207 Q_PROPERTY(
QCPBars *barAbove READ barAbove)
6230 double width()
const {
return mWidth; }
6237 QSharedPointer<QCPBarsDataContainer>
data()
const {
return mDataContainer; }
6240 void setData(QSharedPointer<QCPBarsDataContainer> data);
6241 void setData(
const QVector<double> &keys,
const QVector<double> &values,
6242 bool alreadySorted =
false);
6250 void addData(
const QVector<double> &keys,
const QVector<double> &values,
6251 bool alreadySorted =
false);
6259 virtual double selectTest(
const QPointF &pos,
bool onlySelectable,
6275 double mStackingGap;
6276 QPointer<
QCPBars> mBarBelow, mBarAbove;
6286 QRectF getBarRect(
double key,
double value) const;
6287 void getPixelWidth(
double key,
double &lower,
double &upper) const;
6288 double getStackedBaseValue(
double key,
bool positive) const;
6306 double median,
double upperQuartile,
double maximum,
6307 const QVector<double> &outliers = QVector<double>());
6320 for (QVector<double>::const_iterator it = outliers.constBegin();
6321 it != outliers.constEnd(); ++it)
6326 double key, minimum, lowerQuartile, median, upperQuartile, maximum;
6348 Q_PROPERTY(
double width READ width WRITE setWidth)
6349 Q_PROPERTY(
double whiskerWidth READ whiskerWidth WRITE setWhiskerWidth)
6350 Q_PROPERTY(QPen whiskerPen READ whiskerPen WRITE setWhiskerPen)
6351 Q_PROPERTY(QPen whiskerBarPen READ whiskerBarPen WRITE setWhiskerBarPen)
6352 Q_PROPERTY(
bool whiskerAntialiased READ whiskerAntialiased WRITE
6353 setWhiskerAntialiased)
6354 Q_PROPERTY(QPen medianPen READ medianPen WRITE setMedianPen)
6362 QSharedPointer<QCPStatisticalBoxDataContainer>
data()
const {
6363 return mDataContainer;
6374 void setData(QSharedPointer<QCPStatisticalBoxDataContainer> data);
6375 void setData(
const QVector<double> &keys,
const QVector<double> &minimum,
6376 const QVector<double> &lowerQuartile,
6377 const QVector<double> &median,
6378 const QVector<double> &upperQuartile,
6379 const QVector<double> &maximum,
bool alreadySorted =
false);
6389 void addData(
const QVector<double> &keys,
const QVector<double> &minimum,
6390 const QVector<double> &lowerQuartile,
6391 const QVector<double> &median,
6392 const QVector<double> &upperQuartile,
6393 const QVector<double> &maximum,
bool alreadySorted =
false);
6394 void addData(
double key,
double minimum,
double lowerQuartile,
double median,
6395 double upperQuartile,
double maximum,
6396 const QVector<double> &outliers = QVector<double>());
6401 virtual double selectTest(
const QPointF &pos,
bool onlySelectable,
6413 double mWhiskerWidth;
6414 QPen mWhiskerPen, mWhiskerBarPen;
6415 bool mWhiskerAntialiased;
6425 virtual
void drawStatisticalBox(
6430 void getVisibleDataBounds(
6433 QRectF getQuartileBox(
6435 QVector<QLineF> getWhiskerBackboneLines(
6437 QVector<QLineF> getWhiskerBarLines(
6463 double data(
double key,
double value);
6464 double cell(
int keyIndex,
int valueIndex);
6465 unsigned char alpha(
int keyIndex,
int valueIndex);
6475 void setCell(
int keyIndex,
int valueIndex,
double z);
6476 void setAlpha(
int keyIndex,
int valueIndex,
unsigned char alpha);
6486 int *valueIndex)
const;
6488 double *value)
const;
6492 int mKeySize, mValueSize;
6510 Q_PROPERTY(
QCPRange dataRange READ dataRange WRITE setDataRange NOTIFY
6513 setDataScaleType NOTIFY dataScaleTypeChanged)
6514 Q_PROPERTY(
QCPColorGradient gradient READ gradient WRITE setGradient NOTIFY
6516 Q_PROPERTY(
bool interpolate READ interpolate WRITE setInterpolate)
6517 Q_PROPERTY(
bool tightBoundary READ tightBoundary WRITE setTightBoundary)
6518 Q_PROPERTY(
QCPColorScale *colorScale READ colorScale WRITE setColorScale)
6545 Qt::TransformationMode transformMode = Qt::SmoothTransformation,
6546 const QSize &thumbSize = QSize(32, 18));
6549 virtual double selectTest(
const QPointF &pos,
bool onlySelectable,
6560 void dataScaleTypeChanged(
QCPAxis::ScaleType scaleType);
6566 QCPAxis::ScaleType mDataScaleType;
6570 bool mTightBoundary;
6574 QImage mMapImage, mUndersampledMapImage;
6575 QPixmap mLegendIcon;
6576 bool mMapImageInvalidated;
6579 virtual
void updateMapImage();
6615 double key, open, high, low, close;
6636 Q_PROPERTY(ChartStyle chartStyle READ chartStyle WRITE setChartStyle)
6637 Q_PROPERTY(
double width READ width WRITE setWidth)
6638 Q_PROPERTY(WidthType widthType READ widthType WRITE setWidthType)
6639 Q_PROPERTY(
bool twoColored READ twoColored WRITE setTwoColored)
6640 Q_PROPERTY(QBrush brushPositive READ brushPositive WRITE setBrushPositive)
6641 Q_PROPERTY(QBrush brushNegative READ brushNegative WRITE setBrushNegative)
6642 Q_PROPERTY(QPen penPositive READ penPositive WRITE setPenPositive)
6643 Q_PROPERTY(QPen penNegative READ penNegative WRITE setPenNegative)
6679 return mDataContainer;
6691 void setData(QSharedPointer<QCPFinancialDataContainer> data);
6692 void setData(
const QVector<double> &keys,
const QVector<double> &open,
6693 const QVector<double> &high,
const QVector<double> &low,
6694 const QVector<double> &close,
bool alreadySorted =
false);
6705 void addData(
const QVector<double> &keys,
const QVector<double> &open,
6706 const QVector<double> &high,
const QVector<double> &low,
6707 const QVector<double> &close,
bool alreadySorted =
false);
6708 void addData(
double key,
double open,
double high,
double low,
double close);
6713 virtual double selectTest(
const QPointF &pos,
bool onlySelectable,
6724 const QVector<
double> &time, const QVector<
double> &value,
6725 double timeBinSize,
double timeBinOffset = 0);
6733 QBrush mBrushPositive, mBrushNegative;
6734 QPen mPenPositive, mPenNegative;
6746 void drawCandlestickPlot(
6750 double getPixelWidth(
double key,
double keyPixel) const;
6751 double ohlcSelectTest(
6756 double candlestickSelectTest(
6761 void getVisibleDataBounds(
6809 QSharedPointer<QCPErrorBarsDataContainer> data READ data WRITE setData)
6812 Q_PROPERTY(
ErrorType errorType READ errorType WRITE setErrorType)
6813 Q_PROPERTY(
double whiskerWidth READ whiskerWidth WRITE setWhiskerWidth)
6814 Q_PROPERTY(
double symbolGap READ symbolGap WRITE setSymbolGap)
6837 return mDataContainer;
6845 void setData(QSharedPointer<QCPErrorBarsDataContainer> data);
6848 const QVector<double> &errorPlus);
6857 const QVector<double> &errorPlus);
6859 void addData(
double errorMinus,
double errorPlus);
6871 virtual
int findBegin(
double sortKey,
6873 virtual
int findEnd(
double sortKey,
6877 virtual
double selectTest(const QPointF &pos,
bool onlySelectable,
6904 QVector<QLineF> &backbones,
6905 QVector<QLineF> &whiskers) const;
6909 double pointDistance(
6910 const QPointF &pixelPoint,
6915 bool errorBarVisible(
int index) const;
6916 bool rectIntersectsLine(const QRectF &pixelRect, const QLineF &line) const;
6930 Q_PROPERTY(QPen pen READ pen WRITE setPen)
6931 Q_PROPERTY(QPen selectedPen READ selectedPen WRITE setSelectedPen)
6938 QPen
pen()
const {
return mPen; }
6946 virtual double selectTest(
const QPointF &pos,
bool onlySelectable,
6954 QPen mPen, mSelectedPen;
6962 const QRect &rect) const;
6963 QPen mainPen() const;
6974 Q_PROPERTY(QPen pen READ pen WRITE setPen)
6975 Q_PROPERTY(QPen selectedPen READ selectedPen WRITE setSelectedPen)
6984 QPen
pen()
const {
return mPen; }
6996 virtual double selectTest(
const QPointF &pos,
bool onlySelectable,
7004 QPen mPen, mSelectedPen;
7012 const QRect &rect) const;
7013 QPen mainPen() const;
7024 Q_PROPERTY(QPen pen READ pen WRITE setPen)
7025 Q_PROPERTY(QPen selectedPen READ selectedPen WRITE setSelectedPen)
7034 QPen
pen()
const {
return mPen; }
7046 virtual double selectTest(
const QPointF &pos,
bool onlySelectable,
7056 QPen mPen, mSelectedPen;
7063 QPen mainPen() const;
7074 Q_PROPERTY(QPen pen READ pen WRITE setPen)
7075 Q_PROPERTY(QPen selectedPen READ selectedPen WRITE setSelectedPen)
7076 Q_PROPERTY(QBrush brush READ brush WRITE setBrush)
7077 Q_PROPERTY(QBrush selectedBrush READ selectedBrush WRITE setSelectedBrush)
7084 QPen
pen()
const {
return mPen; }
7096 virtual double selectTest(
const QPointF &pos,
bool onlySelectable,
7119 QPen mPen, mSelectedPen;
7120 QBrush mBrush, mSelectedBrush;
7139 Q_PROPERTY(QColor color READ color WRITE setColor)
7140 Q_PROPERTY(QColor selectedColor READ selectedColor WRITE setSelectedColor)
7141 Q_PROPERTY(QPen pen READ pen WRITE setPen)
7142 Q_PROPERTY(QPen selectedPen READ selectedPen WRITE setSelectedPen)
7143 Q_PROPERTY(QBrush brush READ brush WRITE setBrush)
7144 Q_PROPERTY(QBrush selectedBrush READ selectedBrush WRITE setSelectedBrush)
7145 Q_PROPERTY(QFont font READ font WRITE setFont)
7146 Q_PROPERTY(QFont selectedFont READ selectedFont WRITE setSelectedFont)
7147 Q_PROPERTY(QString text READ text WRITE setText)
7148 Q_PROPERTY(Qt::Alignment positionAlignment READ positionAlignment WRITE
7149 setPositionAlignment)
7151 Qt::Alignment textAlignment READ textAlignment WRITE setTextAlignment)
7152 Q_PROPERTY(
double rotation READ rotation WRITE setRotation)
7153 Q_PROPERTY(QMargins padding READ padding WRITE setPadding)
7162 QPen
pen()
const {
return mPen; }
7166 QFont
font()
const {
return mFont; }
7168 QString
text()
const {
return mText; }
7190 virtual double selectTest(
const QPointF &pos,
bool onlySelectable,
7216 QColor mColor, mSelectedColor;
7217 QPen mPen, mSelectedPen;
7218 QBrush mBrush, mSelectedBrush;
7219 QFont mFont, mSelectedFont;
7221 Qt::Alignment mPositionAlignment;
7222 Qt::Alignment mTextAlignment;
7232 Qt::Alignment positionAlignment)
const;
7247 Q_PROPERTY(QPen pen READ pen WRITE setPen)
7248 Q_PROPERTY(QPen selectedPen READ selectedPen WRITE setSelectedPen)
7249 Q_PROPERTY(QBrush brush READ brush WRITE setBrush)
7250 Q_PROPERTY(QBrush selectedBrush READ selectedBrush WRITE setSelectedBrush)
7257 QPen
pen()
const {
return mPen; }
7269 virtual double selectTest(
const QPointF &pos,
bool onlySelectable,
7298 QPen mPen, mSelectedPen;
7299 QBrush mBrush, mSelectedBrush;
7318 Q_PROPERTY(QPixmap pixmap READ pixmap WRITE setPixmap)
7319 Q_PROPERTY(
bool scaled READ scaled WRITE setScaled)
7320 Q_PROPERTY(Qt::AspectRatioMode aspectRatioMode READ aspectRatioMode)
7321 Q_PROPERTY(Qt::TransformationMode transformationMode READ transformationMode)
7322 Q_PROPERTY(QPen pen READ pen WRITE setPen)
7323 Q_PROPERTY(QPen selectedPen READ selectedPen WRITE setSelectedPen)
7334 return mTransformationMode;
7336 QPen
pen()
const {
return mPen; }
7342 bool scaled, Qt::AspectRatioMode aspectRatioMode = Qt::KeepAspectRatio,
7343 Qt::TransformationMode transformationMode = Qt::SmoothTransformation);
7348 virtual double selectTest(
const QPointF &pos,
bool onlySelectable,
7372 QPixmap mScaledPixmap;
7374 bool mScaledPixmapInvalidated;
7375 Qt::AspectRatioMode mAspectRatioMode;
7376 Qt::TransformationMode mTransformationMode;
7377 QPen mPen, mSelectedPen;
7385 bool flipVert =
false);
7398 Q_PROPERTY(QPen pen READ pen WRITE setPen)
7399 Q_PROPERTY(QPen selectedPen READ selectedPen WRITE setSelectedPen)
7400 Q_PROPERTY(QBrush brush READ brush WRITE setBrush)
7401 Q_PROPERTY(QBrush selectedBrush READ selectedBrush WRITE setSelectedBrush)
7402 Q_PROPERTY(
double size READ size WRITE setSize)
7403 Q_PROPERTY(TracerStyle style READ style WRITE setStyle)
7404 Q_PROPERTY(
QCPGraph *graph READ graph WRITE setGraph)
7405 Q_PROPERTY(
double graphKey READ graphKey WRITE setGraphKey)
7406 Q_PROPERTY(
bool interpolating READ interpolating WRITE setInterpolating)
7426 Q_ENUMS(TracerStyle)
7432 QPen pen()
const {
return mPen; }
7436 double size()
const {
return mSize; }
7454 virtual double selectTest(
const QPointF &pos,
bool onlySelectable,
7458 void updatePosition();
7464 QPen mPen, mSelectedPen;
7465 QBrush mBrush, mSelectedBrush;
7470 bool mInterpolating;
7476 QPen mainPen() const;
7477 QBrush mainBrush() const;
7489 Q_PROPERTY(QPen pen READ pen WRITE setPen)
7490 Q_PROPERTY(QPen selectedPen READ selectedPen WRITE setSelectedPen)
7491 Q_PROPERTY(
double length READ length WRITE setLength)
7492 Q_PROPERTY(BracketStyle style READ style WRITE setStyle)
7511 Q_ENUMS(BracketStyle)
7517 QPen pen()
const {
return mPen; }
7529 virtual double selectTest(
const QPointF &pos,
bool onlySelectable,
7539 QPen mPen, mSelectedPen;
7541 BracketStyle mStyle;
Definition: qcustomplot.h:1847
QList< QCPItemAnchor * > anchors() const
Definition: qcustomplot.h:3982
void setClipToAxisRect(bool clip)
bool clipToAxisRect() const
Definition: qcustomplot.h:3965
void selectableChanged(bool selectable)
void setClipAxisRect(QCPAxisRect *rect)
QCPAxisRect * clipAxisRect() const
bool hasAnchor(const QString &name) const
QCPItemPosition * position(const QString &name) const
QCPAbstractItem(QCustomPlot *parentPlot)
bool selected() const
Definition: qcustomplot.h:3968
Q_SLOT void setSelected(bool selected)
void selectionChanged(bool selected)
Q_SLOT void setSelectable(bool selectable)
QCPItemAnchor * anchor(const QString &name) const
bool selectable() const
Definition: qcustomplot.h:3967
virtual ~QCPAbstractItem()
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE=0
virtual QCP::Interaction selectionCategory() const Q_DECL_OVERRIDE
Definition: qcustomplot.h:2410
QColor selectedTextColor() const
Definition: qcustomplot.h:5343
QCPLegend * parentLegend() const
Definition: qcustomplot.h:5339
QColor textColor() const
Definition: qcustomplot.h:5341
void setFont(const QFont &font)
void setSelectedTextColor(const QColor &color)
QFont font() const
Definition: qcustomplot.h:5340
void setTextColor(const QColor &color)
Q_SLOT void setSelectable(bool selectable)
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE
void setSelectedFont(const QFont &font)
QFont selectedFont() const
Definition: qcustomplot.h:5342
Q_SLOT void setSelected(bool selected)
bool selected() const
Definition: qcustomplot.h:5345
bool selectable() const
Definition: qcustomplot.h:5344
QCPAbstractLegendItem(QCPLegend *parent)
Definition: qcustomplot.h:672
virtual void draw(QCPPainter *painter) const =0
double mDevicePixelRatio
Definition: qcustomplot.h:696
bool mInvalidated
Definition: qcustomplot.h:699
QCPAbstractPaintBuffer(const QSize &size, double devicePixelRatio)
QSize size() const
Definition: qcustomplot.h:678
virtual QCPPainter * startPainting()=0
void setDevicePixelRatio(double ratio)
bool invalidated() const
Definition: qcustomplot.h:679
virtual void clear(const QColor &color)=0
void setSize(const QSize &size)
virtual void donePainting()
Definition: qcustomplot.h:689
virtual void reallocateBuffer()=0
double devicePixelRatio() const
Definition: qcustomplot.h:680
virtual ~QCPAbstractPaintBuffer()
QSize mSize
Definition: qcustomplot.h:695
void setInvalidated(bool invalidated=true)
A template base class for plottables with one-dimensional data.
Definition: qcustomplot.h:4384
virtual QCPDataSelection selectTestRect(const QRectF &rect, bool onlySelectable) const Q_DECL_OVERRIDE
Definition: qcustomplot.h:4741
QCPAbstractPlottable1D(QCPAxis *keyAxis, QCPAxis *valueAxis)
Definition: qcustomplot.h:4641
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE
Definition: qcustomplot.h:4828
virtual QCPRange dataValueRange(int index) const Q_DECL_OVERRIDE
Definition: qcustomplot.h:4700
virtual double dataMainValue(int index) const Q_DECL_OVERRIDE
Definition: qcustomplot.h:4687
virtual QPointF dataPixelPosition(int index) const Q_DECL_OVERRIDE
Definition: qcustomplot.h:4713
virtual int findEnd(double sortKey, bool expandedRange=true) const Q_DECL_OVERRIDE
Definition: qcustomplot.h:4810
void drawPolyline(QCPPainter *painter, const QVector< QPointF > &lineData) const
Definition: qcustomplot.h:4934
virtual double dataSortKey(int index) const Q_DECL_OVERRIDE
Definition: qcustomplot.h:4674
virtual int dataCount() const Q_DECL_OVERRIDE
Definition: qcustomplot.h:4653
QSharedPointer< QCPDataContainer< DataType > > mDataContainer
Definition: qcustomplot.h:4415
virtual int findBegin(double sortKey, bool expandedRange=true) const Q_DECL_OVERRIDE
Definition: qcustomplot.h:4800
void getDataSegments(QList< QCPDataRange > &selectedSegments, QList< QCPDataRange > &unselectedSegments) const
Definition: qcustomplot.h:4902
virtual double dataMainKey(int index) const Q_DECL_OVERRIDE
Definition: qcustomplot.h:4661
virtual ~QCPAbstractPlottable1D()
Definition: qcustomplot.h:4647
virtual bool sortKeyIsMainKey() const Q_DECL_OVERRIDE
Definition: qcustomplot.h:4728
Definition: qcustomplot.h:1595
QCP::SelectionType selectable() const
Definition: qcustomplot.h:3728
bool antialiasedFill() const
Definition: qcustomplot.h:3722
QCPDataSelection selection() const
Definition: qcustomplot.h:3730
Q_SLOT void setSelectable(QCP::SelectionType selectable)
void setAntialiasedFill(bool enabled)
bool selected() const
Definition: qcustomplot.h:3729
QCPSelectionDecorator * mSelectionDecorator
Definition: qcustomplot.h:3789
QCPSelectionDecorator * selectionDecorator() const
Definition: qcustomplot.h:3731
void rescaleAxes(bool onlyEnlarge=false) const
virtual ~QCPAbstractPlottable()
QCPDataSelection mSelection
Definition: qcustomplot.h:3788
void setSelectionDecorator(QCPSelectionDecorator *decorator)
void pixelsToCoords(const QPointF &pixelPos, double &key, double &value) const
QCPAxis * keyAxis() const
Definition: qcustomplot.h:3726
void setAntialiasedScatters(bool enabled)
void pixelsToCoords(double x, double y, double &key, double &value) const
QCP::SelectionType mSelectable
Definition: qcustomplot.h:3787
void selectionChanged(bool selected)
bool removeFromLegend(QCPLegend *legend) const
QString name() const
Definition: qcustomplot.h:3721
virtual QCPRange getKeyRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth) const =0
const QPointF coordsToPixels(double key, double value) const
SignDomain
Definition: qcustomplot.h:1667
void selectableChanged(QCP::SelectionType selectable)
void rescaleValueAxis(bool onlyEnlarge=false, bool inKeyRange=false) const
void setValueAxis(QCPAxis *axis)
void selectionChanged(const QCPDataSelection &selection)
bool antialiasedScatters() const
Definition: qcustomplot.h:3723
void setBrush(const QBrush &brush)
void coordsToPixels(double key, double value, double &x, double &y) const
void setKeyAxis(QCPAxis *axis)
QBrush brush() const
Definition: qcustomplot.h:3725
Q_SLOT void setSelection(QCPDataSelection selection)
bool addToLegend(QCPLegend *legend)
virtual QCPRange getValueRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange()) const =0
void setPen(const QPen &pen)
void setName(const QString &name)
virtual QRect clipRect() const Q_DECL_OVERRIDE
bool removeFromLegend() const
QPen pen() const
Definition: qcustomplot.h:3724
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE=0
void rescaleKeyAxis(bool onlyEnlarge=false) const
QCPAxis * valueAxis() const
Definition: qcustomplot.h:3727
QCPAbstractPlottable(QCPAxis *keyAxis, QCPAxis *valueAxis)
Definition: qcustomplot.h:1523
QCPAxisPainterPrivate(QCustomPlot *parentPlot)
virtual void drawTickLabel(QCPPainter *painter, double x, double y, const TickLabelData &labelData) const
virtual ~QCPAxisPainterPrivate()
virtual void getMaxTickLabelSize(const QFont &font, const QString &text, QSize *tickLabelsSize) const
virtual void draw(QCPPainter *painter)
virtual QByteArray generateLabelParameterHash() const
virtual void placeTickLabel(QCPPainter *painter, double position, int distanceToAxis, const QString &text, QSize *tickLabelsSize)
QRect axisSelectionBox() const
Definition: qcustomplot.h:2532
QRect tickLabelsSelectionBox() const
Definition: qcustomplot.h:2533
virtual TickLabelData getTickLabelData(const QFont &font, const QString &text) const
QRect labelSelectionBox() const
Definition: qcustomplot.h:2534
virtual QPointF getTickLabelDrawOffset(const TickLabelData &labelData) const
Definition: qcustomplot.h:2297
bool removeAxis(QCPAxis *axis)
bool backgroundScaled() const
Definition: qcustomplot.h:5206
Qt::AspectRatioMode backgroundScaledMode() const
Definition: qcustomplot.h:5207
QCPAxis * rangeDragAxis(Qt::Orientation orientation)
virtual void wheelEvent(QWheelEvent *event)
QList< QCPAbstractItem * > items() const
virtual int calculateAutoMargin(QCP::MarginSide side)
int width() const
Definition: qcustomplot.h:5258
virtual void layoutChanged() Q_DECL_OVERRIDE
void setBackground(const QBrush &brush)
QList< QCPRange > mDragStartHorzRange
Definition: qcustomplot.h:5286
QCPAxis * rangeZoomAxis(Qt::Orientation orientation)
QPoint bottomRight() const
Definition: qcustomplot.h:5264
virtual void applyDefaultAntialiasingHint(QCPPainter *painter) const Q_DECL_OVERRIDE
QList< QCPAxis * > axes(QCPAxis::AxisTypes types) const
int right() const
Definition: qcustomplot.h:5255
int top() const
Definition: qcustomplot.h:5256
QList< QCPAxis * > rangeZoomAxes(Qt::Orientation orientation)
QPixmap background() const
Definition: qcustomplot.h:5204
QPoint topLeft() const
Definition: qcustomplot.h:5261
void setBackgroundScaledMode(Qt::AspectRatioMode mode)
void setupFullAxesBox(bool connectRanges=false)
void zoom(const QRectF &pixelRect)
QCPAxisRect(QCustomPlot *parentPlot, bool setupDefaultAxes=true)
void setRangeDragAxes(QCPAxis *horizontal, QCPAxis *vertical)
virtual QList< QCPLayoutElement * > elements(bool recursive) const Q_DECL_OVERRIDE
void setRangeZoom(Qt::Orientations orientations)
QSize size() const
Definition: qcustomplot.h:5260
QPoint topRight() const
Definition: qcustomplot.h:5262
QBrush backgroundBrush() const
Definition: qcustomplot.h:5205
void setRangeDragAxes(QList< QCPAxis * > horizontal, QList< QCPAxis * > vertical)
int axisCount(QCPAxis::AxisType type) const
void setRangeZoomFactor(double horizontalFactor, double verticalFactor)
void setRangeZoomAxes(QList< QCPAxis * > axes)
virtual void update(UpdatePhase phase) Q_DECL_OVERRIDE
void setRangeZoomAxes(QCPAxis *horizontal, QCPAxis *vertical)
virtual int calculateAutoMargin(QCP::MarginSide side) Q_DECL_OVERRIDE
QCPAxis * axis(QCPAxis::AxisType type, int index=0) const
virtual void mousePressEvent(QMouseEvent *event)
QList< QCPGraph * > graphs() const
Qt::Orientations rangeZoom() const
Definition: qcustomplot.h:5211
QList< QCPAxis * > rangeDragAxes(Qt::Orientation orientation)
QList< QPointer< QCPAxis > > mRangeZoomHorzAxis
Definition: qcustomplot.h:5282
Qt::Orientations rangeDrag() const
Definition: qcustomplot.h:5210
virtual void update(UpdatePhase phase)
QPoint bottomLeft() const
Definition: qcustomplot.h:5263
virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE
QCPAxis * addAxis(QCPAxis::AxisType type, QCPAxis *axis=0)
QList< QPointer< QCPAxis > > mRangeDragHorzAxis
Definition: qcustomplot.h:5281
void setBackground(const QPixmap &pm, bool scaled, Qt::AspectRatioMode mode=Qt::KeepAspectRatioByExpanding)
QList< QCPAxis * > axes() const
int height() const
Definition: qcustomplot.h:5259
int bottom() const
Definition: qcustomplot.h:5257
QList< QCPAxis * > addAxes(QCPAxis::AxisTypes types)
QPoint center() const
Definition: qcustomplot.h:5265
void setRangeZoomAxes(QList< QCPAxis * > horizontal, QList< QCPAxis * > vertical)
void zoom(const QRectF &pixelRect, const QList< QCPAxis * > &affectedAxes)
double rangeZoomFactor(Qt::Orientation orientation)
virtual void mouseReleaseEvent(QMouseEvent *event)
void setRangeDrag(Qt::Orientations orientations)
void setBackgroundScaled(bool scaled)
QList< QCPAbstractPlottable * > plottables() const
void setRangeZoomFactor(double factor)
virtual void mouseMoveEvent(QMouseEvent *event)
void setRangeDragAxes(QList< QCPAxis * > axes)
QCPLayoutInset * insetLayout() const
Definition: qcustomplot.h:5244
void setBackground(const QPixmap &pm)
int left() const
Definition: qcustomplot.h:5254
Definition: qcustomplot.h:1836
virtual int getSubTickCount(double tickStep) Q_DECL_OVERRIDE
static double dateTimeToKey(const QDate date)
void setTickOrigin(const QDateTime &origin)
virtual QVector< double > createTickVector(double tickStep, const QCPRange &range) Q_DECL_OVERRIDE
static double dateTimeToKey(const QDateTime dateTime)
void setTickOrigin(double origin)
Qt::TimeSpec mDateTimeSpec
Definition: qcustomplot.h:1860
static QDateTime keyToDateTime(double key)
virtual QString getTickLabel(double tick, const QLocale &locale, QChar formatChar, int precision) Q_DECL_OVERRIDE
QString dateTimeFormat() const
Definition: qcustomplot.h:1841
virtual double getTickStep(const QCPRange &range) Q_DECL_OVERRIDE
void setDateTimeFormat(const QString &format)
QString mDateTimeFormat
Definition: qcustomplot.h:1859
Qt::TimeSpec dateTimeSpec() const
Definition: qcustomplot.h:1842
DateStrategy
Definition: qcustomplot.h:1863
@ dsNone
Definition: qcustomplot.h:1864
@ dsUniformTimeInDay
Definition: qcustomplot.h:1865
void setDateTimeSpec(Qt::TimeSpec spec)
Definition: qcustomplot.h:1940
ScaleStrategy
Definition: qcustomplot.h:1949
ScaleStrategy scaleStrategy() const
Definition: qcustomplot.h:1966
double mTickStep
Definition: qcustomplot.h:1974
void setTickStep(double step)
ScaleStrategy mScaleStrategy
Definition: qcustomplot.h:1975
void setScaleStrategy(ScaleStrategy strategy)
virtual double getTickStep(const QCPRange &range) Q_DECL_OVERRIDE
Definition: qcustomplot.h:2091
int mSubTickCount
Definition: qcustomplot.h:2106
double mLogBase
Definition: qcustomplot.h:2105
virtual QVector< double > createTickVector(double tickStep, const QCPRange &range) Q_DECL_OVERRIDE
double logBase() const
Definition: qcustomplot.h:2096
void setLogBase(double base)
virtual int getSubTickCount(double tickStep) Q_DECL_OVERRIDE
void setSubTickCount(int subTicks)
double mLogBaseLnInv
Definition: qcustomplot.h:2109
int subTickCount() const
Definition: qcustomplot.h:2097
virtual double getTickStep(const QCPRange &range) Q_DECL_OVERRIDE
Definition: qcustomplot.h:2027
QString mPiSymbol
Definition: qcustomplot.h:2063
void simplifyFraction(int &numerator, int &denominator) const
virtual double getTickStep(const QCPRange &range) Q_DECL_OVERRIDE
FractionStyle
Definition: qcustomplot.h:2035
QString unicodeSuperscript(int number) const
FractionStyle mFractionStyle
Definition: qcustomplot.h:2066
void setPiValue(double pi)
void setPeriodicity(int multiplesOfPi)
QString unicodeSubscript(int number) const
void setFractionStyle(FractionStyle style)
virtual QString getTickLabel(double tick, const QLocale &locale, QChar formatChar, int precision) Q_DECL_OVERRIDE
virtual int getSubTickCount(double tickStep) Q_DECL_OVERRIDE
double mPiTickStep
Definition: qcustomplot.h:2069
bool periodicity() const
Definition: qcustomplot.h:2052
double mPiValue
Definition: qcustomplot.h:2064
FractionStyle fractionStyle() const
Definition: qcustomplot.h:2053
double piValue() const
Definition: qcustomplot.h:2051
void setPiSymbol(QString symbol)
QString unicodeFraction(int numerator, int denominator) const
int mPeriodicity
Definition: qcustomplot.h:2065
QString fractionToString(int numerator, int denominator) const
Definition: qcustomplot.h:1987
int mSubTickCount
Definition: qcustomplot.h:2011
QMap< double, QString > mTicks
Definition: qcustomplot.h:2010
void addTick(double position, const QString &label)
int subTickCount() const
Definition: qcustomplot.h:1993
void setTicks(const QVector< double > &positions, const QVector< QString > &labels)
void addTicks(const QVector< double > &positions, const QVector< QString > &labels)
void setTicks(const QMap< double, QString > &ticks)
void setSubTickCount(int subTicks)
virtual double getTickStep(const QCPRange &range) Q_DECL_OVERRIDE
QMap< double, QString > & ticks()
Definition: qcustomplot.h:1992
void addTicks(const QMap< double, QString > &ticks)
virtual int getSubTickCount(double tickStep) Q_DECL_OVERRIDE
virtual QString getTickLabel(double tick, const QLocale &locale, QChar formatChar, int precision) Q_DECL_OVERRIDE
virtual QVector< double > createTickVector(double tickStep, const QCPRange &range) Q_DECL_OVERRIDE
Definition: qcustomplot.h:1883
void replaceUnit(QString &text, TimeUnit unit, int value) const
virtual int getSubTickCount(double tickStep) Q_DECL_OVERRIDE
void setTimeFormat(const QString &format)
TimeUnit mBiggestUnit
Definition: qcustomplot.h:1921
virtual double getTickStep(const QCPRange &range) Q_DECL_OVERRIDE
QHash< TimeUnit, int > mFieldWidth
Definition: qcustomplot.h:1918
TimeUnit
Definition: qcustomplot.h:1891
virtual QString getTickLabel(double tick, const QLocale &locale, QChar formatChar, int precision) Q_DECL_OVERRIDE
int fieldWidth(TimeUnit unit) const
Definition: qcustomplot.h:1909
QString mTimeFormat
Definition: qcustomplot.h:1917
void setFieldWidth(TimeUnit unit, int width)
QHash< TimeUnit, QString > mFormatPattern
Definition: qcustomplot.h:1922
Definition: qcustomplot.h:1760
virtual QVector< double > createSubTickVector(int subTickCount, const QVector< double > &ticks)
int mTickCount
Definition: qcustomplot.h:1802
double getMantissa(double input, double *magnitude=0) const
void setTickCount(int count)
double pickClosest(double target, const QVector< double > &candidates) const
virtual double getTickStep(const QCPRange &range)
double mTickOrigin
Definition: qcustomplot.h:1803
void setTickStepStrategy(TickStepStrategy strategy)
virtual QVector< double > createTickVector(double tickStep, const QCPRange &range)
virtual int getSubTickCount(double tickStep)
int tickCount() const
Definition: qcustomplot.h:1785
virtual QVector< QString > createLabelVector(const QVector< double > &ticks, const QLocale &locale, QChar formatChar, int precision)
void trimTicks(const QCPRange &range, QVector< double > &ticks, bool keepOneOutlier) const
void setTickOrigin(double origin)
TickStepStrategy
Definition: qcustomplot.h:1769
TickStepStrategy mTickStepStrategy
Definition: qcustomplot.h:1801
double tickOrigin() const
Definition: qcustomplot.h:1786
double cleanMantissa(double input) const
virtual QString getTickLabel(double tick, const QLocale &locale, QChar formatChar, int precision)
virtual void generate(const QCPRange &range, const QLocale &locale, QChar formatChar, int precision, QVector< double > &ticks, QVector< double > *subTicks, QVector< QString > *tickLabels)
Definition: qcustomplot.h:1137
void setSelectedLabelFont(const QFont &font)
void setOffset(int offset)
void setTickLabels(bool show)
QColor labelColor() const
Definition: qcustomplot.h:2327
int padding() const
Definition: qcustomplot.h:2330
void rangeChanged(const QCPRange &newRange)
void setLowerEnding(const QCPLineEnding &ending)
SelectablePart getPartAt(const QPointF &pos) const
QFont selectedTickLabelFont() const
Definition: qcustomplot.h:2334
QFont tickLabelFont() const
Definition: qcustomplot.h:2310
QCPLineEnding lowerEnding() const
QPen selectedBasePen() const
Definition: qcustomplot.h:2338
QFont selectedLabelFont() const
Definition: qcustomplot.h:2335
void setTickLabelSide(LabelSide side)
void moveRange(double diff)
Q_SLOT void setRange(const QCPRange &range)
QVector< QString > tickVectorLabels() const
Definition: qcustomplot.h:2317
void setTickLabelRotation(double degrees)
SelectableParts selectableParts() const
Definition: qcustomplot.h:2333
QString numberFormat() const
QPen basePen() const
Definition: qcustomplot.h:2323
void setRangeReversed(bool reversed)
void setNumberPrecision(int precision)
LabelSide
Definition: qcustomplot.h:1248
int numberPrecision() const
Definition: qcustomplot.h:2315
void setSelectedSubTickPen(const QPen &pen)
void setTickLabelFont(const QFont &font)
QSharedPointer< QCPAxisTicker > ticker() const
Definition: qcustomplot.h:2306
QList< QCPAbstractItem * > items() const
void scaleRange(double factor)
QString label() const
Definition: qcustomplot.h:2328
void setLabel(const QString &str)
void scaleTypeChanged(QCPAxis::ScaleType scaleType)
ScaleType
Definition: qcustomplot.h:1259
void setTickLabelColor(const QColor &color)
void setTickLengthOut(int outside)
void setLabelPadding(int padding)
int pixelOrientation() const
Definition: qcustomplot.h:2398
void rescale(bool onlyVisiblePlottables=false)
QCPRange mDragStartRange
Definition: qcustomplot.h:2474
void setSubTickLengthOut(int outside)
void setTicker(QSharedPointer< QCPAxisTicker > ticker)
double pixelToCoord(double value) const
virtual QCP::Interaction selectionCategory() const Q_DECL_OVERRIDE
void setPadding(int padding)
void setRange(double lower, double upper)
QVector< double > tickVector() const
Definition: qcustomplot.h:2316
bool ticks() const
Definition: qcustomplot.h:2307
double tickLabelRotation() const
void setSelectedLabelColor(const QColor &color)
void selectionChanged(const QCPAxis::SelectableParts &parts)
void setTickLength(int inside, int outside=0)
virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE
void setUpperEnding(const QCPLineEnding &ending)
virtual int calculateMargin()
void setLabelColor(const QColor &color)
void scaleRange(double factor, double center)
void setLabelFont(const QFont &font)
QPen selectedSubTickPen() const
Definition: qcustomplot.h:2340
QColor selectedTickLabelColor() const
Definition: qcustomplot.h:2336
QPen selectedTickPen() const
Definition: qcustomplot.h:2339
void setBasePen(const QPen &pen)
QPen subTickPen() const
Definition: qcustomplot.h:2325
QColor selectedLabelColor() const
Definition: qcustomplot.h:2337
QCPGrid * grid() const
Definition: qcustomplot.h:2343
Q_SLOT void setSelectedParts(const QCPAxis::SelectableParts &selectedParts)
void setSelectedTickPen(const QPen &pen)
void setSelectedTickLabelFont(const QFont &font)
SelectableParts selectedParts() const
Definition: qcustomplot.h:2332
static Qt::Orientation orientation(AxisType type)
Definition: qcustomplot.h:2414
void setSelectedTickLabelColor(const QColor &color)
QCP::AntialiasedElements mAADragBackup
Definition: qcustomplot.h:2475
virtual void applyDefaultAntialiasingHint(QCPPainter *painter) const Q_DECL_OVERRIDE
QColor tickLabelColor() const
Definition: qcustomplot.h:2311
QCPLineEnding upperEnding() const
static AxisType opposite(AxisType type)
void selectableChanged(const QCPAxis::SelectableParts &parts)
QFont labelFont() const
Definition: qcustomplot.h:2326
void rangeChanged(const QCPRange &newRange, const QCPRange &oldRange)
static AxisType marginSideToAxisType(QCP::MarginSide side)
Q_SLOT void setSelectableParts(const QCPAxis::SelectableParts &selectableParts)
void setSubTickLength(int inside, int outside=0)
bool rangeReversed() const
Definition: qcustomplot.h:2305
SelectablePart
Definition: qcustomplot.h:1271
const QCPRange range() const
Definition: qcustomplot.h:2304
void setSubTickLengthIn(int inside)
QList< QCPAbstractPlottable * > plottables() const
Q_SLOT void setScaleType(QCPAxis::ScaleType type)
int subTickLengthOut() const
LabelSide tickLabelSide() const
void setRangeUpper(double upper)
void setRange(double position, double size, Qt::AlignmentFlag alignment)
ScaleType scaleType() const
Definition: qcustomplot.h:2303
int tickLengthOut() const
bool mDragging
Definition: qcustomplot.h:2473
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE
bool subTicks() const
Definition: qcustomplot.h:2320
void setTickPen(const QPen &pen)
QSharedPointer< QCPAxisTicker > mTicker
Definition: qcustomplot.h:2467
AxisType
Definition: qcustomplot.h:1211
bool tickLabels() const
Definition: qcustomplot.h:2308
void setNumberFormat(const QString &formatCode)
void setSelectedBasePen(const QPen &pen)
void setSubTickPen(const QPen &pen)
double coordToPixel(double value) const
bool mSubTicks
Definition: qcustomplot.h:2454
void setTickLabelPadding(int padding)
void setScaleRatio(const QCPAxis *otherAxis, double ratio=1.0)
int subTickLengthIn() const
void setSubTicks(bool show)
int tickLabelPadding() const
void setTickLengthIn(int inside)
QCPAxisRect * axisRect() const
Definition: qcustomplot.h:2302
void setRangeLower(double lower)
QList< QCPGraph * > graphs() const
QPen tickPen() const
Definition: qcustomplot.h:2324
Definition: qcustomplot.h:6162
double key
Definition: qcustomplot.h:6181
double sortKey() const
Definition: qcustomplot.h:6167
static bool sortKeyIsMainKey()
Definition: qcustomplot.h:6171
double mainValue() const
Definition: qcustomplot.h:6174
QCPBarsData(double key, double value)
double mainKey() const
Definition: qcustomplot.h:6173
QCPRange valueRange() const
Definition: qcustomplot.h:6176
static QCPBarsData fromSortKey(double sortKey)
Definition: qcustomplot.h:6168
Definition: qcustomplot.h:3157
double getPixelSpacing(const QCPBars *bars, double keyCoord)
void remove(QCPBars *bars)
void setSpacingType(SpacingType spacingType)
void insert(int i, QCPBars *bars)
double spacing() const
Definition: qcustomplot.h:6123
int size() const
Definition: qcustomplot.h:6132
SpacingType
Definition: qcustomplot.h:3170
void registerBars(QCPBars *bars)
void append(QCPBars *bars)
double keyPixelOffset(const QCPBars *bars, double keyCoord)
QCPBars * bars(int index) const
QList< QCPBars * > bars() const
Definition: qcustomplot.h:6130
void setSpacing(double spacing)
bool isEmpty() const
Definition: qcustomplot.h:6133
void unregisterBars(QCPBars *bars)
bool contains(QCPBars *bars) const
Definition: qcustomplot.h:6135
Definition: qcustomplot.h:3241
QCPBars * barAbove() const
Definition: qcustomplot.h:6236
QCPBarDataMap * data() const
Definition: qcustomplot.h:3278
double baseValue() const
Definition: qcustomplot.h:6233
void setData(const QVector< double > &keys, const QVector< double > &values, bool alreadySorted=false)
double stackingGap() const
Definition: qcustomplot.h:6234
void addData(const QVector< double > &keys, const QVector< double > &values, bool alreadySorted=false)
virtual QCPDataSelection selectTestRect(const QRectF &rect, bool onlySelectable) const Q_DECL_OVERRIDE
WidthType widthType() const
Definition: qcustomplot.h:6231
void setBaseValue(double baseValue)
QCPBarsGroup * barsGroup() const
Definition: qcustomplot.h:6232
WidthType
Definition: qcustomplot.h:3258
void addData(double key, double value)
void moveBelow(QCPBars *bars)
void setData(QSharedPointer< QCPBarsDataContainer > data)
QCPBars * barBelow() const
Definition: qcustomplot.h:6235
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE
void moveAbove(QCPBars *bars)
QSharedPointer< QCPBarsDataContainer > data() const
Definition: qcustomplot.h:6237
void setWidthType(WidthType widthType)
void setStackingGap(double pixels)
void setBarsGroup(QCPBarsGroup *barsGroup)
void setWidth(double width)
Definition: qcustomplot.h:2192
QRgb color(double position, const QCPRange &range, bool logarithmic=false)
bool stopsUseAlpha() const
void setLevelCount(int n)
bool periodic() const
Definition: qcustomplot.h:5067
void setPeriodic(bool enabled)
void setColorStopAt(double position, const QColor &color)
void setColorStops(const QMap< double, QColor > &colorStops)
QCPColorGradient inverted() const
void loadPreset(GradientPreset preset)
void setColorInterpolation(ColorInterpolation interpolation)
QMap< double, QColor > colorStops() const
Definition: qcustomplot.h:5065
void colorize(const double *data, const QCPRange &range, QRgb *scanLine, int n, int dataIndexFactor=1, bool logarithmic=false)
ColorInterpolation colorInterpolation() const
Definition: qcustomplot.h:5066
int levelCount() const
Definition: qcustomplot.h:5064
ColorInterpolation
Definition: qcustomplot.h:2201
void colorize(const double *data, const unsigned char *alpha, const QCPRange &range, QRgb *scanLine, int n, int dataIndexFactor=1, bool logarithmic=false)
GradientPreset
Definition: qcustomplot.h:2214
Definition: qcustomplot.h:3423
void setKeyRange(const QCPRange &keyRange)
void setValueSize(int valueSize)
void setSize(int keySize, int valueSize)
QCPColorMapData & operator=(const QCPColorMapData &other)
QCPRange keyRange() const
Definition: qcustomplot.h:6460
unsigned char * mAlpha
Definition: qcustomplot.h:6498
double data(double key, double value)
bool createAlpha(bool initializeOpaque=true)
unsigned char alpha(int keyIndex, int valueIndex)
QCPColorMapData(const QCPColorMapData &other)
QCPRange valueRange() const
Definition: qcustomplot.h:6461
int valueSize() const
Definition: qcustomplot.h:6459
void setCell(int keyIndex, int valueIndex, double z)
void fillAlpha(unsigned char alpha)
QCPColorMapData(int keySize, int valueSize, const QCPRange &keyRange, const QCPRange &valueRange)
void setRange(const QCPRange &keyRange, const QCPRange &valueRange)
void setAlpha(int keyIndex, int valueIndex, unsigned char alpha)
void recalculateDataBounds()
QCPRange dataBounds() const
Definition: qcustomplot.h:6462
int keySize() const
Definition: qcustomplot.h:6458
void setKeySize(int keySize)
void coordToCell(double key, double value, int *keyIndex, int *valueIndex) const
void setValueRange(const QCPRange &valueRange)
bool isEmpty() const
Definition: qcustomplot.h:6484
void cellToCoord(int keyIndex, int valueIndex, double *key, double *value) const
double cell(int keyIndex, int valueIndex)
void setData(double key, double value, double z)
Definition: qcustomplot.h:3473
bool interpolate() const
Definition: qcustomplot.h:6528
Q_SLOT void setDataScaleType(QCPAxis::ScaleType scaleType)
void setInterpolate(bool enabled)
bool tightBoundary() const
Definition: qcustomplot.h:6529
Q_SLOT void updateLegendIcon(Qt::TransformationMode transformMode=Qt::SmoothTransformation, const QSize &thumbSize=QSize(32, 18))
void setData(QCPColorMapData *data, bool copy=false)
void rescaleDataRange(bool recalculateDataBounds=false)
QCPColorScale * colorScale() const
Definition: qcustomplot.h:6531
QCPColorMap(QCPAxis *keyAxis, QCPAxis *valueAxis)
void setColorScale(QCPColorScale *colorScale)
QCPAxis::ScaleType dataScaleType() const
Definition: qcustomplot.h:6527
QCPColorMapData * data() const
Definition: qcustomplot.h:6525
QCPColorGradient gradient() const
Definition: qcustomplot.h:6530
Q_SLOT void setGradient(const QCPColorGradient &gradient)
void setTightBoundary(bool enabled)
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE
Q_SLOT void setDataRange(const QCPRange &dataRange)
QCPRange dataRange() const
Definition: qcustomplot.h:6526
Definition: qcustomplot.h:2708
Q_SLOT void axisSelectionChanged(QCPAxis::SelectableParts selectedParts)
void updateGradientImage()
Q_SLOT void axisSelectableChanged(QCPAxis::SelectableParts selectableParts)
virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE
QCPColorScaleAxisRectPrivate(QCPColorScale *parentColorScale)
Definition: qcustomplot.h:2732
void setType(QCPAxis::AxisType type)
void setRangeDrag(bool enabled)
QCPColorGradient gradient() const
Definition: qcustomplot.h:5698
void rescaleDataRange(bool onlyVisibleMaps)
Q_SLOT void setGradient(const QCPColorGradient &gradient)
QCPRange dataRange() const
Definition: qcustomplot.h:5696
virtual void mouseMoveEvent(QMouseEvent *event, const QPointF &startPos) Q_DECL_OVERRIDE
virtual void update(UpdatePhase phase) Q_DECL_OVERRIDE
virtual void wheelEvent(QWheelEvent *event) Q_DECL_OVERRIDE
void gradientChanged(const QCPColorGradient &newGradient)
void dataScaleTypeChanged(QCPAxis::ScaleType scaleType)
void dataRangeChanged(const QCPRange &newRange)
QCPAxis::AxisType type() const
Definition: qcustomplot.h:5695
Q_SLOT void setDataScaleType(QCPAxis::ScaleType scaleType)
void setRangeZoom(bool enabled)
QList< QCPColorMap * > colorMaps() const
QCPColorScale(QCustomPlot *parentPlot)
virtual void mousePressEvent(QMouseEvent *event, const QVariant &details) Q_DECL_OVERRIDE
void setBarWidth(int width)
Q_SLOT void setDataRange(const QCPRange &dataRange)
QCPAxis::ScaleType dataScaleType() const
Definition: qcustomplot.h:5697
int barWidth() const
Definition: qcustomplot.h:5700
virtual void mouseReleaseEvent(QMouseEvent *event, const QPointF &startPos) Q_DECL_OVERRIDE
virtual void applyDefaultAntialiasingHint(QCPPainter *painter) const Q_DECL_OVERRIDE
QCPAxis * axis() const
Definition: qcustomplot.h:5694
void setLabel(const QString &str)
Definition: qcustomplot.h:3037
static bool sortKeyIsMainKey()
Definition: qcustomplot.h:5957
QCPCurveData(double t, double key, double value)
double mainValue() const
Definition: qcustomplot.h:5960
static QCPCurveData fromSortKey(double sortKey)
Definition: qcustomplot.h:5954
double sortKey() const
Definition: qcustomplot.h:5953
double mainKey() const
Definition: qcustomplot.h:5959
QCPRange valueRange() const
Definition: qcustomplot.h:5962
Definition: qcustomplot.h:3058
LineStyle lineStyle() const
Definition: qcustomplot.h:6009
void setData(const QVector< double > &t, const QVector< double > &keys, const QVector< double > &values, bool alreadySorted=false)
int scatterSkip() const
Definition: qcustomplot.h:6008
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE
void addData(double t, double key, double value)
LineStyle
Definition: qcustomplot.h:3070
void setData(QSharedPointer< QCPCurveDataContainer > data)
void setLineStyle(LineStyle style)
void setScatterStyle(const QCPScatterStyle &style)
void addData(const QVector< double > &keys, const QVector< double > &values)
void addData(const QVector< double > &t, const QVector< double > &keys, const QVector< double > &values, bool alreadySorted=false)
void setScatterSkip(int skip)
void setData(const QVector< double > &keys, const QVector< double > &values)
void addData(double key, double value)
QCPScatterStyle scatterStyle() const
Definition: qcustomplot.h:6007
The generic data container for one-dimensional plottables.
Definition: qcustomplot.h:2758
QVector< DataType >::iterator iterator
Definition: qcustomplot.h:2761
QVector< DataType >::const_iterator const_iterator
Definition: qcustomplot.h:2760
void setAutoSqueeze(bool enabled)
Definition: qcustomplot.h:2990
const_iterator findBegin(double sortKey, bool expandedRange=true) const
Definition: qcustomplot.h:3291
int mPreallocSize
Definition: qcustomplot.h:2812
QCPRange valueRange(bool &foundRange, QCP::SignDomain signDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange())
Definition: qcustomplot.h:3467
void add(const QCPDataContainer< DataType > &data)
Definition: qcustomplot.h:3035
bool autoSqueeze() const
Definition: qcustomplot.h:2768
QVector< DataType > mData
Definition: qcustomplot.h:2811
bool qcpLessThanSortKey(const DataType &a, const DataType &b)
Definition: qcustomplot.h:2751
void sort()
Definition: qcustomplot.h:3244
bool isEmpty() const
Definition: qcustomplot.h:2767
void clear()
Definition: qcustomplot.h:3225
iterator begin()
Definition: qcustomplot.h:2791
void squeeze(bool preAllocation=true, bool postAllocation=true)
Definition: qcustomplot.h:3260
void performAutoSqueeze()
Definition: qcustomplot.h:3613
int size() const
Definition: qcustomplot.h:2766
void limitIteratorsToDataRange(const_iterator &begin, const_iterator &end, const QCPDataRange &dataRange) const
Definition: qcustomplot.h:3560
void removeBefore(double sortKey)
Definition: qcustomplot.h:3146
const_iterator constEnd() const
Definition: qcustomplot.h:2790
bool mAutoSqueeze
Definition: qcustomplot.h:2808
void preallocateGrow(int minimumPreallocSize)
Definition: qcustomplot.h:3580
int mPreallocIteration
Definition: qcustomplot.h:2813
QCPRange keyRange(bool &foundRange, QCP::SignDomain signDomain=QCP::sdBoth)
Definition: qcustomplot.h:3351
void removeAfter(double sortKey)
Definition: qcustomplot.h:3163
iterator end()
Definition: qcustomplot.h:2792
void remove(double sortKeyFrom, double sortKeyTo)
Definition: qcustomplot.h:3181
void set(const QCPDataContainer< DataType > &data)
Definition: qcustomplot.h:3004
const_iterator at(int index) const
Definition: qcustomplot.h:2795
QCPDataRange dataRange() const
Definition: qcustomplot.h:2802
QCPDataContainer()
Definition: qcustomplot.h:2978
const_iterator findEnd(double sortKey, bool expandedRange=true) const
Definition: qcustomplot.h:3324
const_iterator constBegin() const
Definition: qcustomplot.h:2787
Definition: qcustomplot.h:1058
bool contains(const QCPDataRange &other) const
int length() const
Definition: qcustomplot.h:1072
void setEnd(int end)
Definition: qcustomplot.h:1076
QCPDataRange adjusted(int changeBegin, int changeEnd) const
Definition: qcustomplot.h:1084
QCPDataRange expanded(const QCPDataRange &other) const
QDebug operator<<(QDebug d, const QCPDataRange &dataRange)
Definition: qcustomplot.h:1251
void setBegin(int begin)
Definition: qcustomplot.h:1075
bool operator!=(const QCPDataRange &other) const
Definition: qcustomplot.h:1066
QCPDataRange(int begin, int end)
QCPDataRange intersection(const QCPDataRange &other) const
bool intersects(const QCPDataRange &other) const
bool operator==(const QCPDataRange &other) const
Definition: qcustomplot.h:1063
QCPDataRange bounded(const QCPDataRange &other) const
bool isValid() const
Definition: qcustomplot.h:1079
bool isEmpty() const
Definition: qcustomplot.h:1080
int size() const
Definition: qcustomplot.h:1071
int begin() const
Definition: qcustomplot.h:1069
int end() const
Definition: qcustomplot.h:1070
Definition: qcustomplot.h:1096
QCPDataSelection & operator+=(const QCPDataRange &other)
void enforceType(QCP::SelectionType type)
QCPDataSelection & operator-=(const QCPDataRange &other)
QCPDataSelection & operator+=(const QCPDataSelection &other)
void addDataRange(const QCPDataRange &dataRange, bool simplify=true)
QList< QCPDataRange > dataRanges() const
Definition: qcustomplot.h:1130
bool operator==(const QCPDataSelection &other) const
QCPDataRange dataRange(int index=0) const
QCPDataSelection(const QCPDataRange &range)
bool isEmpty() const
Definition: qcustomplot.h:1136
bool operator!=(const QCPDataSelection &other) const
Definition: qcustomplot.h:1102
QCPDataRange span() const
bool contains(const QCPDataSelection &other) const
int dataRangeCount() const
Definition: qcustomplot.h:1127
int dataPointCount() const
QCPDataSelection inverse(const QCPDataRange &outerRange) const
QDebug operator<<(QDebug d, const QCPDataSelection &selection)
Definition: qcustomplot.h:1261
QCPDataSelection intersection(const QCPDataSelection &other) const
QCPDataSelection intersection(const QCPDataRange &other) const
QCPDataSelection & operator-=(const QCPDataSelection &other)
Definition: qcustomplot.h:6776
QCPErrorBarsData(double error)
QCPErrorBarsData(double errorMinus, double errorPlus)
double errorMinus
Definition: qcustomplot.h:6782
Definition: qcustomplot.h:6805
QPointer< QCPAbstractPlottable > mDataPlottable
Definition: qcustomplot.h:6886
void addData(double errorMinus, double errorPlus)
void addData(const QVector< double > &errorMinus, const QVector< double > &errorPlus)
void setSymbolGap(double pixels)
double symbolGap() const
Definition: qcustomplot.h:6842
void setData(const QVector< double > &error)
double mWhiskerWidth
Definition: qcustomplot.h:6888
void addData(double error)
ErrorType errorType() const
Definition: qcustomplot.h:6840
double mSymbolGap
Definition: qcustomplot.h:6889
QSharedPointer< QCPErrorBarsDataContainer > mDataContainer
Definition: qcustomplot.h:6885
void setData(QSharedPointer< QCPErrorBarsDataContainer > data)
ErrorType
Definition: qcustomplot.h:6824
virtual QCPRange getValueRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange()) const Q_DECL_OVERRIDE
virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE
virtual QCPRange getKeyRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth) const Q_DECL_OVERRIDE
void setDataPlottable(QCPAbstractPlottable *plottable)
void setData(const QVector< double > &errorMinus, const QVector< double > &errorPlus)
void addData(const QVector< double > &error)
virtual int dataCount() const Q_DECL_OVERRIDE
void setWhiskerWidth(double pixels)
QCPAbstractPlottable * dataPlottable() const
Definition: qcustomplot.h:6839
double whiskerWidth() const
Definition: qcustomplot.h:6841
void setErrorType(ErrorType type)
virtual void drawLegendIcon(QCPPainter *painter, const QRectF &rect) const Q_DECL_OVERRIDE
ErrorType mErrorType
Definition: qcustomplot.h:6887
Definition: qcustomplot.h:3555
QCPFinancialData(double key, double open, double high, double low, double close)
QCPRange valueRange() const
Definition: qcustomplot.h:6610
static bool sortKeyIsMainKey()
Definition: qcustomplot.h:6605
static QCPFinancialData fromSortKey(double sortKey)
Definition: qcustomplot.h:6602
double mainValue() const
Definition: qcustomplot.h:6608
double sortKey() const
Definition: qcustomplot.h:6601
double mainKey() const
Definition: qcustomplot.h:6607
Definition: qcustomplot.h:3576
ChartStyle
Definition: qcustomplot.h:3593
double width() const
Definition: qcustomplot.h:6682
void setData(const QVector< double > &keys, const QVector< double > &open, const QVector< double > &high, const QVector< double > &low, const QVector< double > &close, bool alreadySorted=false)
void setTwoColored(bool twoColored)
void setWidthType(WidthType widthType)
QPen penNegative() const
Definition: qcustomplot.h:6688
virtual QCPDataSelection selectTestRect(const QRectF &rect, bool onlySelectable) const Q_DECL_OVERRIDE
void addData(const QVector< double > &keys, const QVector< double > &open, const QVector< double > &high, const QVector< double > &low, const QVector< double > &close, bool alreadySorted=false)
ChartStyle chartStyle() const
Definition: qcustomplot.h:6681
void setChartStyle(ChartStyle style)
void setBrushPositive(const QBrush &brush)
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE
void addData(double key, double open, double high, double low, double close)
void setData(QSharedPointer< QCPFinancialDataContainer > data)
WidthType widthType() const
Definition: qcustomplot.h:6683
void setBrushNegative(const QBrush &brush)
void setWidth(double width)
void setPenPositive(const QPen &pen)
QBrush brushNegative() const
Definition: qcustomplot.h:6686
QPen penPositive() const
Definition: qcustomplot.h:6687
QBrush brushPositive() const
Definition: qcustomplot.h:6685
WidthType
Definition: qcustomplot.h:6652
bool twoColored() const
Definition: qcustomplot.h:6684
void setPenNegative(const QPen &pen)
Definition: qcustomplot.h:5761
double mainValue() const
Definition: qcustomplot.h:5773
QCPGraphData(double key, double value)
QCPRange valueRange() const
Definition: qcustomplot.h:5775
double key
Definition: qcustomplot.h:5777
static QCPGraphData fromSortKey(double sortKey)
Definition: qcustomplot.h:5767
double sortKey() const
Definition: qcustomplot.h:5766
static bool sortKeyIsMainKey()
Definition: qcustomplot.h:5770
double mainKey() const
Definition: qcustomplot.h:5772
Definition: qcustomplot.h:2833
void addData(double key, double value)
void setScatterStyle(const QCPScatterStyle &style)
void setScatterSkip(int skip)
bool adaptiveSampling() const
Definition: qcustomplot.h:5842
void setData(QSharedPointer< QCPGraphDataContainer > data)
void setChannelFillGraph(QCPGraph *targetGraph)
QCPScatterStyle scatterStyle() const
Definition: qcustomplot.h:5839
int scatterSkip() const
Definition: qcustomplot.h:5840
void setLineStyle(LineStyle ls)
void setData(const QVector< double > &keys, const QVector< double > &values, bool alreadySorted=false)
QCPDataMap * data() const
Definition: qcustomplot.h:2894
QCPGraph * channelFillGraph() const
Definition: qcustomplot.h:5841
void setAdaptiveSampling(bool enabled)
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE
LineStyle lineStyle() const
Definition: qcustomplot.h:5838
LineStyle
Definition: qcustomplot.h:2854
void addData(const QVector< double > &keys, const QVector< double > &values, bool alreadySorted=false)
Definition: qcustomplot.h:1087
QPen pen() const
Definition: qcustomplot.h:2142
void setZeroLinePen(const QPen &pen)
void setAntialiasedZeroLine(bool enabled)
void setAntialiasedSubGrid(bool enabled)
bool antialiasedZeroLine() const
Definition: qcustomplot.h:2141
void drawSubGridLines(QCPPainter *painter) const
QPen zeroLinePen() const
Definition: qcustomplot.h:2144
virtual void applyDefaultAntialiasingHint(QCPPainter *painter) const Q_DECL_OVERRIDE
void setSubGridPen(const QPen &pen)
void setPen(const QPen &pen)
QCPGrid(QCPAxis *parentAxis)
virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE
void setSubGridVisible(bool visible)
QPen subGridPen() const
Definition: qcustomplot.h:2143
void drawGridLines(QCPPainter *painter) const
bool antialiasedSubGrid() const
Definition: qcustomplot.h:2140
bool subGridVisible() const
Definition: qcustomplot.h:2139
Definition: qcustomplot.h:1724
void removeChildX(QCPItemPosition *pos)
QCPItemAnchor(QCustomPlot *parentPlot, QCPAbstractItem *parentItem, const QString &name, int anchorId=-1)
virtual QCPItemPosition * toQCPItemPosition()
Definition: qcustomplot.h:3845
virtual QPointF pixelPosition() const
void removeChildY(QCPItemPosition *pos)
QString name() const
Definition: qcustomplot.h:3831
void addChildX(QCPItemPosition *pos)
void addChildY(QCPItemPosition *pos)
Definition: qcustomplot.h:4206
void setSelectedPen(const QPen &pen)
BracketStyle style() const
Definition: qcustomplot.h:7520
void setStyle(BracketStyle style)
BracketStyle
Definition: qcustomplot.h:4215
AnchorIndex
Definition: qcustomplot.h:4251
virtual QPointF anchorPixelPosition(int anchorId) const Q_DECL_OVERRIDE
virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE
void setPen(const QPen &pen)
void setLength(double length)
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE
double length() const
Definition: qcustomplot.h:7519
QPen selectedPen() const
Definition: qcustomplot.h:7518
Definition: qcustomplot.h:3772
void setPen(const QPen &pen)
void setHead(const QCPLineEnding &head)
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE
void setSelectedPen(const QPen &pen)
QPen selectedPen() const
Definition: qcustomplot.h:7035
QCPLineEnding head() const
Definition: qcustomplot.h:7036
QCPLineEnding tail() const
Definition: qcustomplot.h:7037
void setTail(const QCPLineEnding &tail)
QCPItemCurve(QCustomPlot *parentPlot)
QPen pen() const
Definition: qcustomplot.h:7034
Definition: qcustomplot.h:3980
virtual ~QCPItemEllipse()
AnchorIndex
Definition: qcustomplot.h:4021
void setBrush(const QBrush &brush)
virtual QPointF anchorPixelPosition(int anchorId) const Q_DECL_OVERRIDE
void setSelectedPen(const QPen &pen)
QCPItemEllipse(QCustomPlot *parentPlot)
QPen pen() const
Definition: qcustomplot.h:7257
void setSelectedBrush(const QBrush &brush)
QPen selectedPen() const
Definition: qcustomplot.h:7258
QBrush brush() const
Definition: qcustomplot.h:7259
virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE
void setPen(const QPen &pen)
QBrush selectedBrush() const
Definition: qcustomplot.h:7260
Definition: qcustomplot.h:3727
QCPItemLine(QCustomPlot *parentPlot)
void setSelectedPen(const QPen &pen)
void setPen(const QPen &pen)
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE
QCPLineEnding head() const
Definition: qcustomplot.h:6986
QPen pen() const
Definition: qcustomplot.h:6984
QCPLineEnding tail() const
Definition: qcustomplot.h:6987
void setTail(const QCPLineEnding &tail)
QPen selectedPen() const
Definition: qcustomplot.h:6985
void setHead(const QCPLineEnding &head)
Definition: qcustomplot.h:4046
AnchorIndex
Definition: qcustomplot.h:4092
QPen selectedPen() const
Definition: qcustomplot.h:7337
QRect getFinalRect(bool *flippedHorz=0, bool *flippedVert=0) const
virtual QPointF anchorPixelPosition(int anchorId) const Q_DECL_OVERRIDE
Qt::AspectRatioMode aspectRatioMode() const
Definition: qcustomplot.h:7332
QPen pen() const
Definition: qcustomplot.h:7336
virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE
void setPixmap(const QPixmap &pixmap)
QPixmap pixmap() const
Definition: qcustomplot.h:7330
bool scaled() const
Definition: qcustomplot.h:7331
void updateScaledPixmap(QRect finalRect=QRect(), bool flipHorz=false, bool flipVert=false)
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE
QCPItemPixmap(QCustomPlot *parentPlot)
void setScaled(bool scaled, Qt::AspectRatioMode aspectRatioMode=Qt::KeepAspectRatio, Qt::TransformationMode transformationMode=Qt::SmoothTransformation)
Qt::TransformationMode transformationMode() const
Definition: qcustomplot.h:7333
void setPen(const QPen &pen)
void setSelectedPen(const QPen &pen)
Definition: qcustomplot.h:1763
PositionType typeX() const
Definition: qcustomplot.h:3905
virtual QPointF pixelPosition() const Q_DECL_OVERRIDE
QCPAxis * valueAxis() const
Definition: qcustomplot.h:3914
QCPItemAnchor * parentAnchorX() const
Definition: qcustomplot.h:3908
double key() const
Definition: qcustomplot.h:3910
QCPAxis * keyAxis() const
Definition: qcustomplot.h:3913
QCPItemAnchor * parentAnchorY() const
Definition: qcustomplot.h:3909
QPointF coords() const
Definition: qcustomplot.h:3912
PositionType
Definition: qcustomplot.h:1771
double value() const
Definition: qcustomplot.h:3911
QCPItemAnchor * parentAnchor() const
Definition: qcustomplot.h:3907
PositionType typeY() const
Definition: qcustomplot.h:3906
QCPAxisRect * axisRect() const
Definition: qcustomplot.h:3817
QBrush selectedBrush() const
Definition: qcustomplot.h:7087
virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE
QPen pen() const
Definition: qcustomplot.h:7084
QCPItemRect(QCustomPlot *parentPlot)
void setPen(const QPen &pen)
QBrush brush() const
Definition: qcustomplot.h:7086
void setSelectedPen(const QPen &pen)
virtual QPointF anchorPixelPosition(int anchorId) const Q_DECL_OVERRIDE
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE
void setBrush(const QBrush &brush)
void setSelectedBrush(const QBrush &brush)
QPen selectedPen() const
Definition: qcustomplot.h:7085
AnchorIndex
Definition: qcustomplot.h:3855
Definition: qcustomplot.h:3686
QCPItemStraightLine(QCustomPlot *parentPlot)
void setSelectedPen(const QPen &pen)
void setPen(const QPen &pen)
QPen pen() const
Definition: qcustomplot.h:6938
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE
virtual ~QCPItemStraightLine()
QPen selectedPen() const
Definition: qcustomplot.h:6939
Definition: qcustomplot.h:3877
virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE
double rotation() const
Definition: qcustomplot.h:7171
QColor color() const
Definition: qcustomplot.h:7160
void setSelectedFont(const QFont &font)
Qt::Alignment positionAlignment() const
Definition: qcustomplot.h:7169
AnchorIndex
Definition: qcustomplot.h:3945
void setBrush(const QBrush &brush)
QBrush brush() const
Definition: qcustomplot.h:7164
void setSelectedPen(const QPen &pen)
QBrush selectedBrush() const
Definition: qcustomplot.h:7165
virtual QPointF anchorPixelPosition(int anchorId) const Q_DECL_OVERRIDE
void setText(const QString &text)
QFont font() const
Definition: qcustomplot.h:7166
void setRotation(double degrees)
QPointF getTextDrawPoint(const QPointF &pos, const QRectF &rect, Qt::Alignment positionAlignment) const
QMargins padding() const
Definition: qcustomplot.h:7172
void setSelectedBrush(const QBrush &brush)
QColor selectedColor() const
Definition: qcustomplot.h:7161
QPen pen() const
Definition: qcustomplot.h:7162
QFont selectedFont() const
Definition: qcustomplot.h:7167
QCPItemText(QCustomPlot *parentPlot)
void setPositionAlignment(Qt::Alignment alignment)
QPen selectedPen() const
Definition: qcustomplot.h:7163
void setFont(const QFont &font)
Qt::Alignment textAlignment() const
Definition: qcustomplot.h:7170
void setPen(const QPen &pen)
void setColor(const QColor &color)
void setTextAlignment(Qt::Alignment alignment)
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE
QString text() const
Definition: qcustomplot.h:7168
void setSelectedColor(const QColor &color)
void setPadding(const QMargins &padding)
Definition: qcustomplot.h:4121
void setSelectedBrush(const QBrush &brush)
void setBrush(const QBrush &brush)
TracerStyle
Definition: qcustomplot.h:4141
void setStyle(TracerStyle style)
double size() const
Definition: qcustomplot.h:7436
void setGraphKey(double key)
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE
void setInterpolating(bool enabled)
QBrush brush() const
Definition: qcustomplot.h:7434
double graphKey() const
Definition: qcustomplot.h:7439
QCPGraph * graph() const
Definition: qcustomplot.h:7438
QPen selectedPen() const
Definition: qcustomplot.h:7433
void setSelectedPen(const QPen &pen)
QBrush selectedBrush() const
Definition: qcustomplot.h:7435
void setSize(double size)
bool interpolating() const
Definition: qcustomplot.h:7440
void setGraph(QCPGraph *graph)
void setPen(const QPen &pen)
TracerStyle style() const
Definition: qcustomplot.h:7437
Definition: qcustomplot.h:480
LayerMode mMode
Definition: qcustomplot.h:827
QString name() const
Definition: qcustomplot.h:807
LayerMode mode() const
Definition: qcustomplot.h:811
void addChild(QCPLayerable *layerable, bool prepend)
QList< QCPLayerable * > children() const
Definition: qcustomplot.h:809
LayerMode
Definition: qcustomplot.h:793
void setMode(LayerMode mode)
QWeakPointer< QCPAbstractPaintBuffer > mPaintBuffer
Definition: qcustomplot.h:830
void draw(QCPPainter *painter)
void setVisible(bool visible)
void removeChild(QCPLayerable *layerable)
bool visible() const
Definition: qcustomplot.h:810
int index() const
Definition: qcustomplot.h:808
Definition: qcustomplot.h:522
virtual void mousePressEvent(QMouseEvent *event, const QVariant &details)
virtual void selectEvent(QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
virtual void applyDefaultAntialiasingHint(QCPPainter *painter) const =0
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const
virtual void mouseReleaseEvent(QMouseEvent *event, const QPointF &startPos)
QCustomPlot * parentPlot() const
Definition: qcustomplot.h:862
void setAntialiased(bool enabled)
QCPLayer * layer() const
Definition: qcustomplot.h:864
bool antialiased() const
Definition: qcustomplot.h:865
QCPLayerable(QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=0)
virtual void deselectEvent(bool *selectionStateChanged)
void initializeParentPlot(QCustomPlot *parentPlot)
void setParentLayerable(QCPLayerable *parentLayerable)
bool realVisibility() const
bool setLayer(const QString &layerName)
void layerChanged(QCPLayer *newLayer)
QCPLayerable * parentLayerable() const
Definition: qcustomplot.h:863
virtual void parentPlotInitialized(QCustomPlot *parentPlot)
void applyAntialiasingHint(QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
virtual void draw(QCPPainter *painter)=0
virtual QCP::Interaction selectionCategory() const
virtual void wheelEvent(QWheelEvent *event)
Q_SLOT bool setLayer(QCPLayer *layer)
bool visible() const
Definition: qcustomplot.h:861
bool moveToLayer(QCPLayer *layer, bool prepend)
virtual void mouseMoveEvent(QMouseEvent *event, const QPointF &startPos)
virtual QRect clipRect() const
virtual void mouseDoubleClickEvent(QMouseEvent *event, const QVariant &details)
Definition: qcustomplot.h:755
void setMaximumSize(int width, int height)
void setMinimumMargins(const QMargins &margins)
SizeConstraintRect
Definition: qcustomplot.h:1398
UpdatePhase
Definition: qcustomplot.h:772
QRect rect() const
Definition: qcustomplot.h:1411
QCP::MarginSides autoMargins() const
Definition: qcustomplot.h:1415
QRect outerRect() const
Definition: qcustomplot.h:1412
void setSizeConstraintRect(SizeConstraintRect constraintRect)
void setOuterRect(const QRect &rect)
void setMarginGroup(QCP::MarginSides sides, QCPMarginGroup *group)
void setMinimumSize(const QSize &size)
QMargins minimumMargins() const
Definition: qcustomplot.h:1414
QSize minimumSize() const
Definition: qcustomplot.h:1416
SizeConstraintRect sizeConstraintRect() const
Definition: qcustomplot.h:1418
virtual QList< QCPLayoutElement * > elements(bool recursive) const
void setMaximumSize(const QSize &size)
QHash< QCP::MarginSide, QCPMarginGroup * > marginGroups() const
Definition: qcustomplot.h:1422
QCPMarginGroup * marginGroup(QCP::MarginSide side) const
Definition: qcustomplot.h:1419
void setMinimumSize(int width, int height)
void setMargins(const QMargins &margins)
virtual QSize maximumOuterSizeHint() const
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE
virtual void parentPlotInitialized(QCustomPlot *parentPlot) Q_DECL_OVERRIDE
virtual QSize minimumOuterSizeHint() const
void setAutoMargins(QCP::MarginSides sides)
virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE
Definition: qcustomplot.h:1467
virtual void update(UpdatePhase phase)
QMargins margins() const
Definition: qcustomplot.h:1413
QSize maximumSize() const
Definition: qcustomplot.h:1417
Definition: qcustomplot.h:894
virtual void simplify() Q_DECL_OVERRIDE
int columnCount() const
Definition: qcustomplot.h:1557
void setRowStretchFactors(const QList< double > &factors)
virtual QList< QCPLayoutElement * > elements(bool recursive) const Q_DECL_OVERRIDE
void setColumnSpacing(int pixels)
int rowSpacing() const
Definition: qcustomplot.h:1563
void setColumnStretchFactors(const QList< double > &factors)
virtual QCPLayoutElement * takeAt(int index) Q_DECL_OVERRIDE
FillOrder fillOrder() const
Definition: qcustomplot.h:1565
void setRowStretchFactor(int row, double factor)
FillOrder
Definition: qcustomplot.h:1542
virtual QCPLayoutElement * elementAt(int index) const Q_DECL_OVERRIDE
int wrap() const
Definition: qcustomplot.h:1564
QList< double > columnStretchFactors() const
Definition: qcustomplot.h:1560
virtual bool take(QCPLayoutElement *element) Q_DECL_OVERRIDE
QList< double > rowStretchFactors() const
Definition: qcustomplot.h:1561
virtual void updateLayout() Q_DECL_OVERRIDE
void setRowSpacing(int pixels)
int columnSpacing() const
Definition: qcustomplot.h:1562
void setColumnStretchFactor(int column, double factor)
void setFillOrder(FillOrder order, bool rearrange=true)
Definition: qcustomplot.h:962
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE
InsetPlacement
Definition: qcustomplot.h:969
Definition: qcustomplot.h:856
virtual void update(UpdatePhase phase) Q_DECL_OVERRIDE
virtual QCPLayoutElement * takeAt(int index)=0
static QSize getFinalMaximumOuterSize(const QCPLayoutElement *el)
void releaseElement(QCPLayoutElement *el)
bool remove(QCPLayoutElement *element)
virtual QList< QCPLayoutElement * > elements(bool recursive) const Q_DECL_OVERRIDE
QVector< int > getSectionSizes(QVector< int > maxSizes, QVector< int > minSizes, QVector< double > stretchFactors, int totalSize) const
static QSize getFinalMinimumOuterSize(const QCPLayoutElement *el)
virtual QCPLayoutElement * elementAt(int index) const =0
virtual int elementCount() const =0
virtual bool take(QCPLayoutElement *element)=0
void sizeConstraintsChanged() const
void adoptElement(QCPLayoutElement *el)
virtual void updateLayout()
Definition: qcustomplot.h:2500
int iconTextPadding() const
Definition: qcustomplot.h:5462
SelectableParts selectedParts() const
void setSelectedBorderPen(const QPen &pen)
void setIconBorderPen(const QPen &pen)
Q_SLOT void setSelectableParts(const SelectableParts &selectableParts)
QFont selectedFont() const
Definition: qcustomplot.h:5469
void setBrush(const QBrush &brush)
SelectablePart
Definition: qcustomplot.h:2529
QPen iconBorderPen() const
Definition: qcustomplot.h:5463
void setIconTextPadding(int padding)
void setSelectedTextColor(const QColor &color)
QBrush selectedBrush() const
Definition: qcustomplot.h:5468
void setBorderPen(const QPen &pen)
void setSelectedBrush(const QBrush &brush)
void setIconSize(const QSize &size)
Q_SLOT void setSelectedParts(const SelectableParts &selectedParts)
void setIconSize(int width, int height)
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE
void setFont(const QFont &font)
QColor textColor() const
Definition: qcustomplot.h:5460
QBrush brush() const
Definition: qcustomplot.h:5458
void setSelectedFont(const QFont &font)
QColor selectedTextColor() const
Definition: qcustomplot.h:5470
SelectableParts selectableParts() const
Definition: qcustomplot.h:5464
QPen selectedIconBorderPen() const
Definition: qcustomplot.h:5467
QPen selectedBorderPen() const
Definition: qcustomplot.h:5466
void setSelectedIconBorderPen(const QPen &pen)
void setTextColor(const QColor &color)
QFont font() const
Definition: qcustomplot.h:5459
QSize iconSize() const
Definition: qcustomplot.h:5461
Definition: qcustomplot.h:1015
double boundingDistance() const
bool inverted() const
Definition: qcustomplot.h:1731
void setWidth(double width)
void draw(QCPPainter *painter, const QCPVector2D &pos, const QCPVector2D &dir) const
void setStyle(EndingStyle style)
void setInverted(bool inverted)
EndingStyle
Definition: qcustomplot.h:1032
double realLength() const
void setLength(double length)
double width() const
Definition: qcustomplot.h:1729
double length() const
Definition: qcustomplot.h:1730
void draw(QCPPainter *painter, const QCPVector2D &pos, double angle) const
Definition: qcustomplot.h:726
void removeChild(QCP::MarginSide side, QCPLayoutElement *element)
QList< QCPLayoutElement * > elements(QCP::MarginSide side) const
Definition: qcustomplot.h:1336
virtual ~QCPMarginGroup()
QCPMarginGroup(QCustomPlot *parentPlot)
void addChild(QCP::MarginSide side, QCPLayoutElement *element)
virtual int commonMargin(QCP::MarginSide side) const
Definition: qcustomplot.h:705
virtual QCPPainter * startPainting() Q_DECL_OVERRIDE
virtual ~QCPPaintBufferPixmap()
QCPPaintBufferPixmap(const QSize &size, double devicePixelRatio)
Definition: qcustomplot.h:414
bool begin(QPaintDevice *device)
void drawLine(const QLineF &line)
PainterMode
Definition: qcustomplot.h:422
@ pmNoCaching
Definition: qcustomplot.h:430
@ pmVectorized
Definition: qcustomplot.h:426
void setPen(Qt::PenStyle penStyle)
void setPen(const QColor &color)
void setModes(PainterModes modes)
void setAntialiasing(bool enabled)
void drawLine(const QPointF &p1, const QPointF &p2)
Definition: qcustomplot.h:647
PainterModes modes() const
Definition: qcustomplot.h:634
void setMode(PainterMode mode, bool enabled=true)
void setPen(const QPen &pen)
Defines an abstract interface for one-dimensional plottables.
Definition: qcustomplot.h:4362
virtual int dataCount() const =0
virtual bool sortKeyIsMainKey() const =0
virtual double dataMainKey(int index) const =0
virtual int findBegin(double sortKey, bool expandedRange=true) const =0
virtual int findEnd(double sortKey, bool expandedRange=true) const =0
virtual QCPDataSelection selectTestRect(const QRectF &rect, bool onlySelectable) const =0
virtual QPointF dataPixelPosition(int index) const =0
virtual ~QCPPlottableInterface1D()
Definition: qcustomplot.h:4364
virtual QCPRange dataValueRange(int index) const =0
virtual double dataMainValue(int index) const =0
virtual double dataSortKey(int index) const =0
Definition: qcustomplot.h:2478
virtual QSize minimumOuterSizeHint() const Q_DECL_OVERRIDE
virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE
QCPPlottableLegendItem(QCPLegend *parent, QCPAbstractPlottable *plottable)
QCPAbstractPlottable * plottable()
Definition: qcustomplot.h:5396
Definition: qcustomplot.h:593
void expand(const QCPRange &otherRange)
QCPRange(double lower, double upper)
QCPRange & operator*=(const double &value)
Definition: qcustomplot.h:952
QCPRange bounded(double lowerBound, double upperBound) const
QCPRange & operator-=(const double &value)
Definition: qcustomplot.h:947
static bool validRange(const QCPRange &range)
QCPRange sanitizedForLogScale() const
bool operator!=(const QCPRange &other) const
Definition: qcustomplot.h:940
static bool validRange(double lower, double upper)
void expand(double includeCoord)
double size() const
Definition: qcustomplot.h:969
QCPRange sanitizedForLinScale() const
QCPRange & operator/=(const double &value)
Definition: qcustomplot.h:957
QCPRange expanded(const QCPRange &otherRange) const
bool operator==(const QCPRange &other) const
Definition: qcustomplot.h:937
double lower
Definition: qcustomplot.h:595
QDebug operator<<(QDebug d, const QCPRange &range)
Definition: qcustomplot.h:994
QCPRange & operator+=(const double &value)
Definition: qcustomplot.h:942
double upper
Definition: qcustomplot.h:595
bool contains(double value) const
Definition: qcustomplot.h:981
double center() const
Definition: qcustomplot.h:970
QCPRange expanded(double includeCoord) const
void normalize()
Definition: qcustomplot.h:971
Definition: qcustomplot.h:305
bool isPenDefined() const
Definition: qcustomplot.h:2717
void setPixmap(const QPixmap &pixmap)
bool isNone() const
Definition: qcustomplot.h:2716
void setBrush(const QBrush &brush)
void setPen(const QPen &pen)
void setShape(ScatterShape shape)
void setFromOther(const QCPScatterStyle &other, ScatterProperties properties)
ScatterProperty
Definition: qcustomplot.h:2612
@ spPen
0x01 The pen property, see setPen
Definition: qcustomplot.h:2615
void drawShape(QCPPainter *painter, const QPointF &pos) const
void drawShape(QCPPainter *painter, double x, double y) const
void setCustomPath(const QPainterPath &customPath)
QPixmap pixmap() const
Definition: qcustomplot.h:2703
void setSize(double size)
QPen pen() const
Definition: qcustomplot.h:2701
ScatterShape
Definition: qcustomplot.h:317
QBrush brush() const
Definition: qcustomplot.h:2702
QPainterPath customPath() const
Definition: qcustomplot.h:2704
ScatterShape shape() const
Definition: qcustomplot.h:2700
void applyTo(QCPPainter *painter, const QPen &defaultPen) const
Definition: qcustomplot.h:5112
void setBracketStyle(BracketStyle style)
BracketStyle bracketStyle() const
Definition: qcustomplot.h:5145
bool tangentToData() const
Definition: qcustomplot.h:5146
void setBracketWidth(int width)
void setBracketBrush(const QBrush &brush)
int mBracketWidth
Definition: qcustomplot.h:5169
int mBracketHeight
Definition: qcustomplot.h:5170
int tangentAverage() const
Definition: qcustomplot.h:5147
int bracketHeight() const
Definition: qcustomplot.h:5144
BracketStyle mBracketStyle
Definition: qcustomplot.h:5171
int mTangentAverage
Definition: qcustomplot.h:5173
virtual void drawDecoration(QCPPainter *painter, QCPDataSelection selection) Q_DECL_OVERRIDE
void setTangentToData(bool enabled)
QPointF getPixelCoordinates(const QCPPlottableInterface1D *interface1d, int dataIndex) const
BracketStyle
Definition: qcustomplot.h:5121
double getTangentAngle(const QCPPlottableInterface1D *interface1d, int dataIndex, int direction) const
bool mTangentToData
Definition: qcustomplot.h:5172
void setBracketPen(const QPen &pen)
QBrush bracketBrush() const
Definition: qcustomplot.h:5142
QPen mBracketPen
Definition: qcustomplot.h:5167
virtual void drawBracket(QCPPainter *painter, int direction) const
void setTangentAverage(int pointCount)
int bracketWidth() const
Definition: qcustomplot.h:5143
QBrush mBracketBrush
Definition: qcustomplot.h:5168
void setBracketHeight(int height)
Definition: qcustomplot.h:3647
virtual void copyFrom(const QCPSelectionDecorator *other)
QCPScatterStyle getFinalScatterStyle(const QCPScatterStyle &unselectedStyle) const
virtual bool registerWithPlottable(QCPAbstractPlottable *plottable)
void applyBrush(QCPPainter *painter) const
QCPAbstractPlottable * mPlottable
Definition: qcustomplot.h:3687
QBrush mBrush
Definition: qcustomplot.h:3683
virtual void drawDecoration(QCPPainter *painter, QCPDataSelection selection)
virtual ~QCPSelectionDecorator()
QCPScatterStyle mScatterStyle
Definition: qcustomplot.h:3684
QPen mPen
Definition: qcustomplot.h:3682
void applyPen(QCPPainter *painter) const
QBrush brush() const
Definition: qcustomplot.h:3655
void setUsedScatterProperties(const QCPScatterStyle::ScatterProperties &properties)
QPen pen() const
Definition: qcustomplot.h:3654
QCPScatterStyle scatterStyle() const
Definition: qcustomplot.h:3656
void setBrush(const QBrush &brush)
QCPScatterStyle::ScatterProperties usedScatterProperties() const
Definition: qcustomplot.h:3657
void setScatterStyle(const QCPScatterStyle &scatterStyle, QCPScatterStyle::ScatterProperties usedProperties=QCPScatterStyle::spPen)
void setPen(const QPen &pen)
QCPScatterStyle::ScatterProperties mUsedScatterProperties
Definition: qcustomplot.h:3685
Definition: qcustomplot.h:1276
virtual void keyPressEvent(QKeyEvent *event)
void accepted(const QRect &rect, QMouseEvent *event)
void changed(const QRect &rect, QMouseEvent *event)
QBrush mBrush
Definition: qcustomplot.h:1306
bool mActive
Definition: qcustomplot.h:1308
QCPRange range(const QCPAxis *axis) const
virtual void endSelection(QMouseEvent *event)
QRect rect() const
Definition: qcustomplot.h:1283
virtual void startSelection(QMouseEvent *event)
QRect mRect
Definition: qcustomplot.h:1304
virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE
virtual void moveSelection(QMouseEvent *event)
void started(QMouseEvent *event)
virtual void applyDefaultAntialiasingHint(QCPPainter *painter) const Q_DECL_OVERRIDE
QBrush brush() const
Definition: qcustomplot.h:1286
void setBrush(const QBrush &brush)
QPen pen() const
Definition: qcustomplot.h:1285
bool isActive() const
Definition: qcustomplot.h:1287
void setPen(const QPen &pen)
QCPSelectionRect(QCustomPlot *parentPlot)
QPen mPen
Definition: qcustomplot.h:1305
void canceled(const QRect &rect, QInputEvent *event)
virtual ~QCPSelectionRect()
Definition: qcustomplot.h:6302
double mainValue() const
Definition: qcustomplot.h:6316
double sortKey() const
Definition: qcustomplot.h:6309
QCPRange valueRange() const
Definition: qcustomplot.h:6318
double key
Definition: qcustomplot.h:6326
double mainKey() const
Definition: qcustomplot.h:6315
QCPStatisticalBoxData(double key, double minimum, double lowerQuartile, double median, double upperQuartile, double maximum, const QVector< double > &outliers=QVector< double >())
static QCPStatisticalBoxData fromSortKey(double sortKey)
Definition: qcustomplot.h:6310
QVector< double > outliers
Definition: qcustomplot.h:6327
static bool sortKeyIsMainKey()
Definition: qcustomplot.h:6313
Definition: qcustomplot.h:3337
void addData(double key, double minimum, double lowerQuartile, double median, double upperQuartile, double maximum, const QVector< double > &outliers=QVector< double >())
void setData(QSharedPointer< QCPStatisticalBoxDataContainer > data)
void setWidth(double width)
bool whiskerAntialiased() const
Definition: qcustomplot.h:6369
QPen whiskerBarPen() const
Definition: qcustomplot.h:6368
void setWhiskerPen(const QPen &pen)
void setData(const QVector< double > &keys, const QVector< double > &minimum, const QVector< double > &lowerQuartile, const QVector< double > &median, const QVector< double > &upperQuartile, const QVector< double > &maximum, bool alreadySorted=false)
void setWhiskerAntialiased(bool enabled)
QPen whiskerPen() const
Definition: qcustomplot.h:6367
virtual QCPDataSelection selectTestRect(const QRectF &rect, bool onlySelectable) const Q_DECL_OVERRIDE
void setMedianPen(const QPen &pen)
QCPStatisticalBox(QCPAxis *keyAxis, QCPAxis *valueAxis)
void addData(const QVector< double > &keys, const QVector< double > &minimum, const QVector< double > &lowerQuartile, const QVector< double > &median, const QVector< double > &upperQuartile, const QVector< double > &maximum, bool alreadySorted=false)
void setWhiskerBarPen(const QPen &pen)
double whiskerWidth() const
Definition: qcustomplot.h:6366
void setOutlierStyle(const QCPScatterStyle &style)
QSharedPointer< QCPStatisticalBoxDataContainer > data() const
Definition: qcustomplot.h:6362
void setWhiskerWidth(double width)
double width() const
Definition: qcustomplot.h:6365
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE
QCPScatterStyle outlierStyle() const
Definition: qcustomplot.h:6371
QPen medianPen() const
Definition: qcustomplot.h:6370
Definition: qcustomplot.h:5554
QCPTextElement(QCustomPlot *parentPlot, const QString &text, const QFont &font)
QCPTextElement(QCustomPlot *parentPlot, const QString &text)
void setFont(const QFont &font)
void setSelectedFont(const QFont &font)
bool selected() const
Definition: qcustomplot.h:5586
int textFlags() const
Definition: qcustomplot.h:5580
Q_SLOT void setSelectable(bool selectable)
QCPTextElement(QCustomPlot *parentPlot, const QString &text, double pointSize)
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE
QString text() const
Definition: qcustomplot.h:5579
QColor textColor() const
Definition: qcustomplot.h:5582
void setTextColor(const QColor &color)
QFont selectedFont() const
Definition: qcustomplot.h:5583
QFont font() const
Definition: qcustomplot.h:5581
bool selectable() const
Definition: qcustomplot.h:5585
QColor selectedTextColor() const
Definition: qcustomplot.h:5584
Q_SLOT void setSelected(bool selected)
void setTextFlags(int flags)
void setSelectedTextColor(const QColor &color)
void setText(const QString &text)
QCPTextElement(QCustomPlot *parentPlot, const QString &text, const QString &fontFamily, double pointSize)
QCPTextElement(QCustomPlot *parentPlot)
Definition: qcustomplot.h:508
double distanceSquaredToLine(const QLineF &line) const
QCPVector2D perpendicular() const
Definition: qcustomplot.h:534
double length() const
Definition: qcustomplot.h:526
double distanceSquaredToLine(const QCPVector2D &start, const QCPVector2D &end) const
double & rx()
Definition: qcustomplot.h:518
QCPVector2D & operator/=(double divisor)
double dot(const QCPVector2D &vec) const
Definition: qcustomplot.h:535
QCPVector2D(const QPointF &point)
QCPVector2D & operator+=(const QCPVector2D &vector)
QCPVector2D & operator*=(double factor)
QCPVector2D(double x, double y)
double x() const
Definition: qcustomplot.h:516
double y() const
Definition: qcustomplot.h:517
QDebug operator<<(QDebug d, const QCPVector2D &vec)
Definition: qcustomplot.h:590
QCPVector2D normalized() const
double lengthSquared() const
Definition: qcustomplot.h:527
QCPVector2D & operator-=(const QCPVector2D &vector)
double & ry()
Definition: qcustomplot.h:519
void setX(double x)
Definition: qcustomplot.h:522
QPointF toPointF() const
Definition: qcustomplot.h:529
bool isNull() const
Definition: qcustomplot.h:531
QCPVector2D(const QPoint &point)
void setY(double y)
Definition: qcustomplot.h:523
QPoint toPoint() const
Definition: qcustomplot.h:528
double distanceToStraightLine(const QCPVector2D &base, const QCPVector2D &direction) const
Definition: qcustomplot.h:1925
void legendDoubleClick(QCPLegend *legend, QCPAbstractLegendItem *item, QMouseEvent *event)
bool mOpenGl
Definition: qcustomplot.h:4288
void setSelectionRect(QCPSelectionRect *selectionRect)
void setBackground(const QPixmap &pm)
void setBufferDevicePixelRatio(double ratio)
void toPainter(QCPPainter *painter, int width=0, int height=0)
bool setCurrentLayer(QCPLayer *layer)
QPointer< QCPLayerable > mMouseEventLayerable
Definition: qcustomplot.h:4294
Qt::KeyboardModifier multiSelectModifier() const
Definition: qcustomplot.h:4114
const QCP::Interactions interactions() const
Definition: qcustomplot.h:4110
QVariant mMouseSignalLayerableDetails
Definition: qcustomplot.h:4297
void setBackgroundScaled(bool scaled)
Q_SLOT void deselectAll()
void setPlottingHint(QCP::PlottingHint hint, bool enabled=true)
QList< QCPGraph * > selectedGraphs() const
void setViewport(const QRect &rect)
bool removeLayer(QCPLayer *layer)
void setInteraction(const QCP::Interaction &interaction, bool enabled=true)
RefreshPriority
Definition: qcustomplot.h:1963
@ rpRefreshHint
Definition: qcustomplot.h:4080
QCPSelectionRect * mSelectionRect
Definition: qcustomplot.h:4287
virtual QSize minimumSizeHint() const Q_DECL_OVERRIDE
void setBackgroundScaledMode(Qt::AspectRatioMode mode)
void setSelectionTolerance(int pixels)
QCPAbstractItem * item() const
void selectionChangedByUser()
double bufferDevicePixelRatio() const
Definition: qcustomplot.h:4096
int selectionTolerance() const
Definition: qcustomplot.h:4111
QList< QSharedPointer< QCPAbstractPaintBuffer > > mPaintBuffers
Definition: qcustomplot.h:4291
QPixmap background() const
Definition: qcustomplot.h:4097
QCPLayer * layer(const QString &name) const
void setInteractions(const QCP::Interactions &interactions)
int plottableCount() const
QCP::AntialiasedElements antialiasedElements() const
Definition: qcustomplot.h:4103
double mBufferDevicePixelRatio
Definition: qcustomplot.h:4266
QCPLayer * currentLayer() const
QCPAxisRect * axisRectAt(const QPointF &pos) const
void axisDoubleClick(QCPAxis *axis, QCPAxis::SelectablePart part, QMouseEvent *event)
QCP::SelectionRectMode selectionRectMode() const
Definition: qcustomplot.h:4117
QList< QCPAbstractPlottable * > selectedPlottables() const
bool hasPlottable(QCPAbstractPlottable *plottable) const
bool setCurrentLayer(const QString &name)
void mouseMove(QMouseEvent *event)
QCP::AntialiasedElements notAntialiasedElements() const
Definition: qcustomplot.h:4106
LayerInsertMode
Definition: qcustomplot.h:1950
bool saveJpg(const QString &fileName, int width=0, int height=0, double scale=1.0, int quality=-1, int resolution=96, QCP::ResolutionUnit resolutionUnit=QCP::ruDotsPerInch)
void setNoAntialiasingOnDrag(bool enabled)
void legendClick(QCPLegend *legend, QCPAbstractLegendItem *item, QMouseEvent *event)
void setOpenGl(bool enabled, int multisampling=16)
void setSelectionRectMode(QCP::SelectionRectMode mode)
QCPGraph * addGraph(QCPAxis *keyAxis=0, QCPAxis *valueAxis=0)
void setBackground(const QPixmap &pm, bool scaled, Qt::AspectRatioMode mode=Qt::KeepAspectRatioByExpanding)
void plottableDoubleClick(QCPAbstractPlottable *plottable, int dataIndex, QMouseEvent *event)
QCPLayoutGrid * plotLayout() const
Definition: qcustomplot.h:4102
Q_SLOT void rescaleAxes(bool onlyVisiblePlottables=false)
void setBackground(const QBrush &brush)
int axisRectCount() const
void setMultiSelectModifier(Qt::KeyboardModifier modifier)
bool removeGraph(QCPGraph *graph)
Q_SLOT void replot(QCustomPlot::RefreshPriority refreshPriority=QCustomPlot::rpRefreshHint)
void setPlottingHints(const QCP::PlottingHints &hints)
bool removeGraph(int index)
void mouseDoubleClick(QMouseEvent *event)
QList< QCPLegend * > selectedLegends() const
QPixmap toPixmap(int width=0, int height=0, double scale=1.0)
bool backgroundScaled() const
Definition: qcustomplot.h:4098
int mOpenGlMultisamples
Definition: qcustomplot.h:4300
bool mOpenGlCacheLabelsBackup
Definition: qcustomplot.h:4302
QCPLayoutElement * layoutElementAt(const QPointF &pos) const
QCPLayer * layer(int index) const
QList< QCPAxis * > selectedAxes() const
bool removeItem(int index)
QCP::SelectionRectMode mSelectionRectMode
Definition: qcustomplot.h:4286
bool openGl() const
Definition: qcustomplot.h:4121
QCPAbstractItem * item(int index) const
void axisClick(QCPAxis *axis, QCPAxis::SelectablePart part, QMouseEvent *event)
QCPAbstractPlottable * plottableAt(const QPointF &pos, bool onlySelectable=false) const
QCPAbstractPlottable * plottable()
bool autoAddPlottableToLegend() const
Definition: qcustomplot.h:4109
QCP::PlottingHints plottingHints() const
Definition: qcustomplot.h:4113
void mouseWheel(QWheelEvent *event)
void itemDoubleClick(QCPAbstractItem *item, QMouseEvent *event)
void mouseRelease(QMouseEvent *event)
bool savePng(const QString &fileName, int width=0, int height=0, double scale=1.0, int quality=-1, int resolution=96, QCP::ResolutionUnit resolutionUnit=QCP::ruDotsPerInch)
QCPAbstractItem * itemAt(const QPointF &pos, bool onlySelectable=false) const
bool noAntialiasingOnDrag() const
Definition: qcustomplot.h:4112
void mousePress(QMouseEvent *event)
bool mReplotQueued
Definition: qcustomplot.h:4299
bool mMouseHasMoved
Definition: qcustomplot.h:4293
QCPAbstractPlottable * plottable(int index)
bool addLayer(const QString &name, QCPLayer *otherLayer=0, LayerInsertMode insertMode=limAbove)
QList< QCPAbstractItem * > selectedItems() const
bool savePdf(const QString &fileName, int width=0, int height=0, QCP::ExportPen exportPen=QCP::epAllowCosmetic, const QString &pdfCreator=QString(), const QString &pdfTitle=QString())
QVariant mMouseEventLayerableDetails
Definition: qcustomplot.h:4296
bool saveRastered(const QString &fileName, int width, int height, double scale, const char *format, int quality=-1, int resolution=96, QCP::ResolutionUnit resolutionUnit=QCP::ruDotsPerInch)
void setAutoAddPlottableToLegend(bool on)
QCP::AntialiasedElements mOpenGlAntialiasedElementsBackup
Definition: qcustomplot.h:4301
QPointer< QCPLayerable > mMouseSignalLayerable
Definition: qcustomplot.h:4295
bool removeItem(QCPAbstractItem *item)
void setNotAntialiasedElements(const QCP::AntialiasedElements ¬AntialiasedElements)
void itemClick(QCPAbstractItem *item, QMouseEvent *event)
bool saveBmp(const QString &fileName, int width=0, int height=0, double scale=1.0, int resolution=96, QCP::ResolutionUnit resolutionUnit=QCP::ruDotsPerInch)
bool moveLayer(QCPLayer *layer, QCPLayer *otherLayer, LayerInsertMode insertMode=limAbove)
QCPGraph * graph(int index) const
void setAntialiasedElement(QCP::AntialiasedElement antialiasedElement, bool enabled=true)
bool hasItem(QCPAbstractItem *item) const
QCPAxisRect * axisRect(int index=0) const
bool removePlottable(QCPAbstractPlottable *plottable)
void plottableClick(QCPAbstractPlottable *plottable, int dataIndex, QMouseEvent *event)
void setAntialiasedElements(const QCP::AntialiasedElements &antialiasedElements)
QCPSelectionRect * selectionRect() const
Definition: qcustomplot.h:4120
QList< QCPAxisRect * > axisRects() const
Qt::AspectRatioMode backgroundScaledMode() const
Definition: qcustomplot.h:4099
bool removePlottable(int index)
void setNotAntialiasedElement(QCP::AntialiasedElement notAntialiasedElement, bool enabled=true)
Definition: qcustomplot.h:94
bool isInvalidData(double value)
Definition: qcustomplot.h:234
const QMetaObject staticMetaObject
ExportPen
Definition: qcustomplot.h:190
@ epAllowCosmetic
Definition: qcustomplot.h:194
@ epNoCosmetic
Definition: qcustomplot.h:191
int getMarginValue(const QMargins &margins, QCP::MarginSide side)
Definition: qcustomplot.h:282
Interaction
Definition: qcustomplot.h:195
@ iRangeDrag
Definition: qcustomplot.h:196
@ iSelectItems
Definition: qcustomplot.h:218
@ iSelectLegend
Definition: qcustomplot.h:215
@ iSelectOther
Definition: qcustomplot.h:221
@ iSelectAxes
Definition: qcustomplot.h:212
@ iSelectPlottables
Definition: qcustomplot.h:208
@ iMultiSelect
Definition: qcustomplot.h:204
@ iRangeZoom
Definition: qcustomplot.h:200
PlottingHint
Definition: qcustomplot.h:166
@ phFastPolylines
Definition: qcustomplot.h:169
@ phImmediateRefresh
Definition: qcustomplot.h:295
@ phCacheLabels
Definition: qcustomplot.h:183
@ phNone
0x000 No hints are set
Definition: qcustomplot.h:167
ResolutionUnit
Definition: qcustomplot.h:176
@ ruDotsPerCentimeter
Resolution is given in dots per centimeter (dpcm)
Definition: qcustomplot.h:179
@ ruDotsPerMeter
Resolution is given in dots per meter (dpm)
Definition: qcustomplot.h:177
@ ruDotsPerInch
Resolution is given in dots per inch (DPI/PPI)
Definition: qcustomplot.h:181
MarginSide
Definition: qcustomplot.h:100
@ msTop
0x04 top margin
Definition: qcustomplot.h:105
@ msNone
0x00 no margin
Definition: qcustomplot.h:111
@ msRight
0x02 right margin
Definition: qcustomplot.h:103
@ msAll
0xFF all margins
Definition: qcustomplot.h:109
@ msLeft
0x01 left margin
Definition: qcustomplot.h:101
@ msBottom
0x08 bottom margin
Definition: qcustomplot.h:107
SelectionType
Definition: qcustomplot.h:396
@ stMultipleDataRanges
Definition: qcustomplot.h:408
@ stDataRange
Definition: qcustomplot.h:405
@ stNone
The plottable is not selectable.
Definition: qcustomplot.h:397
@ stSingleData
One individual data point can be selected at a time.
Definition: qcustomplot.h:403
@ stWhole
Definition: qcustomplot.h:399
SelectionRectMode
Definition: qcustomplot.h:353
@ srmCustom
Definition: qcustomplot.h:369
@ srmSelect
Definition: qcustomplot.h:363
@ srmZoom
Definition: qcustomplot.h:358
@ srmNone
Definition: qcustomplot.h:354
AntialiasedElement
Definition: qcustomplot.h:126
@ aeAxes
0x0001 Axis base line and tick marks
Definition: qcustomplot.h:127
@ aeOther
Definition: qcustomplot.h:270
@ aeItems
0x0040 Main lines of items
Definition: qcustomplot.h:141
@ aeScatters
Definition: qcustomplot.h:143
@ aeLegendItems
0x0010 Legend items
Definition: qcustomplot.h:135
@ aePlottables
0x0020 Main lines of plottables
Definition: qcustomplot.h:137
@ aeNone
0x0000 No elements
Definition: qcustomplot.h:156
@ aeSubGrid
0x0004 Sub grid lines
Definition: qcustomplot.h:131
@ aeFills
Definition: qcustomplot.h:148
@ aeAll
0xFFFF All elements
Definition: qcustomplot.h:154
@ aeGrid
0x0002 Grid lines
Definition: qcustomplot.h:129
@ aeZeroLine
0x0400 Zero-lines, see QCPGrid::setZeroLinePen
Definition: qcustomplot.h:151
@ aeLegend
0x0008 Legend box
Definition: qcustomplot.h:133
void setMarginValue(QMargins &margins, QCP::MarginSide side, int value)
Definition: qcustomplot.h:253
SignDomain
Definition: qcustomplot.h:207
@ sdNegative
The negative sign domain, i.e. numbers smaller than zero.
Definition: qcustomplot.h:208
@ sdPositive
The positive sign domain, i.e. numbers greater than zero.
Definition: qcustomplot.h:212
@ sdBoth
Both sign domains, including zero, i.e. all numbers.
Definition: qcustomplot.h:210
const QCPRange operator/(const QCPRange &range, double value)
Definition: qcustomplot.h:720
const QCPRange operator*(const QCPRange &range, double value)
Definition: qcustomplot.h:702
const QCPRange operator-(const QCPRange &range, double value)
Definition: qcustomplot.h:693
Q_DECLARE_TYPEINFO(QCPScatterStyle, Q_MOVABLE_TYPE)
const QCPRange operator+(const QCPRange &range, double value)
Definition: qcustomplot.h:675
QCPDataContainer< QCPGraphData > QCPGraphDataContainer
Definition: qcustomplot.h:5792
#define Q_DECL_OVERRIDE
Definition: qcustomplot.h:137
QCPDataContainer< QCPBarsData > QCPBarsDataContainer
Definition: qcustomplot.h:6196
#define QCP_LIB_DECL
Definition: qcustomplot.h:132
QCPDataContainer< QCPStatisticalBoxData > QCPStatisticalBoxDataContainer
Definition: qcustomplot.h:6342
QVector< QCPErrorBarsData > QCPErrorBarsDataContainer
Definition: qcustomplot.h:6802
QCPDataContainer< QCPCurveData > QCPCurveDataContainer
Definition: qcustomplot.h:5980
QCPDataContainer< QCPFinancialData > QCPFinancialDataContainer
Definition: qcustomplot.h:6630
Definition: qcustomplot.h:1570
QString suffixPart
Definition: qcustomplot.h:2571
QRect suffixBounds
Definition: qcustomplot.h:2572