26 #ifndef QCUSTOMPLOT_HH 27 #define QCUSTOMPLOT_HH 29 #include <QtCore/qglobal.h> 32 #ifdef QCUSTOMPLOT_USE_OPENGL 33 # if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) 34 # define QCP_OPENGL_PBUFFER 36 # define QCP_OPENGL_FBO 38 # if QT_VERSION >= QT_VERSION_CHECK(5, 3, 0) 39 # define QCP_OPENGL_OFFSCREENSURFACE 43 #if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) 44 # define QCP_DEVICEPIXELRATIO_SUPPORTED 45 # if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) 46 # define QCP_DEVICEPIXELRATIO_FLOAT 50 #include <QtCore/QObject> 51 #include <QtCore/QPointer> 52 #include <QtCore/QSharedPointer> 53 #include <QtCore/QTimer> 54 #include <QtGui/QPainter> 55 #include <QtGui/QPaintEvent> 56 #include <QtGui/QMouseEvent> 57 #include <QtGui/QWheelEvent> 58 #include <QtGui/QPixmap> 59 #include <QtCore/QVector> 60 #include <QtCore/QString> 61 #include <QtCore/QDateTime> 62 #include <QtCore/QMultiMap> 63 #include <QtCore/QFlags> 64 #include <QtCore/QDebug> 65 #include <QtCore/QStack> 66 #include <QtCore/QCache> 67 #include <QtCore/QMargins> 72 # include <QtGui/QOpenGLContext> 73 # include <QtGui/QOpenGLFramebufferObject> 74 # ifdef QCP_OPENGL_OFFSCREENSURFACE 75 # include <QtGui/QOffscreenSurface> 77 # include <QtGui/QWindow> 80 #ifdef QCP_OPENGL_PBUFFER 81 # include <QtOpenGL/QGLPixelBuffer> 83 #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) 84 # include <qnumeric.h> 85 # include <QtGui/QWidget> 86 # include <QtGui/QPrinter> 87 # include <QtGui/QPrintEngine> 90 # include <QtWidgets/QWidget> 91 # include <QtPrintSupport/QtPrintSupport> 119 #if defined(QCUSTOMPLOT_COMPILE_LIBRARY) 120 # define QCP_LIB_DECL Q_DECL_EXPORT 121 #elif defined(QCUSTOMPLOT_USE_LIBRARY) 122 # define QCP_LIB_DECL Q_DECL_IMPORT 124 # define QCP_LIB_DECL 128 #ifndef Q_DECL_OVERRIDE 129 # define Q_DECL_OVERRIDE 149 Q_FLAGS(AntialiasedElements)
151 Q_FLAGS(PlottingHints)
153 Q_FLAGS(Interactions)
306 return qIsNaN(value) || qIsInf(value);
331 case QCP::msTop: margins.setTop(value);
break;
333 case QCP::msAll: margins = QMargins(value, value, value, value);
break;
362 Q_DECLARE_OPERATORS_FOR_FLAGS(QCP::AntialiasedElements)
363 Q_DECLARE_OPERATORS_FOR_FLAGS(QCP::PlottingHints)
364 Q_DECLARE_OPERATORS_FOR_FLAGS(QCP::MarginSides)
365 Q_DECLARE_OPERATORS_FOR_FLAGS(QCP::Interactions)
386 QCPVector2D(
double x,
double y);
387 QCPVector2D(
const QPoint &point);
388 QCPVector2D(
const QPointF &point);
391 double x()
const {
return mX; }
392 double y()
const {
return mY; }
393 double &
rx() {
return mX; }
394 double &
ry() {
return mY; }
397 void setX(
double x) { mX = x; }
398 void setY(
double y) { mY = y; }
401 double length()
const {
return qSqrt(mX*mX+mY*mY); }
403 QPoint
toPoint()
const {
return QPoint(mX, mY); }
404 QPointF
toPointF()
const {
return QPointF(mX, mY); }
406 bool isNull()
const {
return qIsNull(mX) && qIsNull(mY); }
408 QCPVector2D normalized()
const;
410 double dot(
const QCPVector2D &vec)
const {
return mX*vec.
mX+mY*vec.
mY; }
411 double distanceSquaredToLine(
const QCPVector2D &start,
const QCPVector2D &end)
const;
412 double distanceSquaredToLine(
const QLineF &line)
const;
413 double distanceToStraightLine(
const QCPVector2D &base,
const QCPVector2D &direction)
const;
415 QCPVector2D &operator*=(
double factor);
416 QCPVector2D &operator/=(
double divisor);
417 QCPVector2D &operator+=(
const QCPVector2D &vector);
418 QCPVector2D &operator-=(
const QCPVector2D &vector);
424 friend inline const QCPVector2D
operator*(
double factor,
const QCPVector2D &vec);
425 friend inline const QCPVector2D
operator*(
const QCPVector2D &vec,
double factor);
426 friend inline const QCPVector2D
operator/(
const QCPVector2D &vec,
double divisor);
427 friend inline const QCPVector2D
operator+(
const QCPVector2D &vec1,
const QCPVector2D &vec2);
428 friend inline const QCPVector2D
operator-(
const QCPVector2D &vec1,
const QCPVector2D &vec2);
429 friend inline const QCPVector2D
operator-(
const QCPVector2D &vec);
446 d.nospace() <<
"QCPVector2D(" << vec.
x() <<
", " << vec.
y() <<
")";
467 ,pmNonCosmetic = 0x04
470 Q_FLAGS(PainterModes)
474 explicit QCPPainter(QPaintDevice *device);
477 bool antialiasing()
const {
return testRenderHint(QPainter::Antialiasing); }
478 PainterModes
modes()
const {
return mModes; }
481 void setAntialiasing(
bool enabled);
483 void setModes(PainterModes modes);
486 bool begin(QPaintDevice *device);
487 void setPen(
const QPen &pen);
488 void setPen(
const QColor &color);
489 void setPen(Qt::PenStyle penStyle);
490 void drawLine(
const QLineF &line);
496 void makeNonCosmetic();
506 Q_DECLARE_OPERATORS_FOR_FLAGS(QCPPainter::PainterModes)
518 explicit QCPAbstractPaintBuffer(
const QSize &size,
double devicePixelRatio);
519 virtual ~QCPAbstractPaintBuffer();
522 QSize
size()
const {
return mSize; }
527 void setSize(
const QSize &size);
528 void setInvalidated(
bool invalidated=
true);
529 void setDevicePixelRatio(
double ratio);
534 virtual void draw(
QCPPainter *painter)
const = 0;
535 virtual void clear(
const QColor &color) = 0;
546 virtual void reallocateBuffer() = 0;
566 virtual void reallocateBuffer() Q_DECL_OVERRIDE;
570 #ifdef QCP_OPENGL_PBUFFER 574 explicit QCPPaintBufferGlPbuffer(
const QSize &size,
double devicePixelRatio,
int multisamples);
575 virtual ~QCPPaintBufferGlPbuffer();
584 QGLPixelBuffer *mGlPBuffer;
590 #endif // QCP_OPENGL_PBUFFER 593 #ifdef QCP_OPENGL_FBO 597 explicit QCPPaintBufferGlFbo(
const QSize &size,
double devicePixelRatio, QWeakPointer<QOpenGLContext> glContext, QWeakPointer<QOpenGLPaintDevice> glPaintDevice);
598 virtual ~QCPPaintBufferGlFbo();
608 QWeakPointer<QOpenGLContext> mGlContext;
609 QWeakPointer<QOpenGLPaintDevice> mGlPaintDevice;
610 QOpenGLFramebufferObject *mGlFrameBuffer;
615 #endif // QCP_OPENGL_FBO 627 Q_PROPERTY(
QCustomPlot* parentPlot READ parentPlot)
629 Q_PROPERTY(
int index READ index)
630 Q_PROPERTY(QList<QCPLayerable*> children READ children)
631 Q_PROPERTY(
bool visible READ visible WRITE setVisible)
632 Q_PROPERTY(
LayerMode mode READ mode WRITE setMode)
653 QString
name()
const {
return mName; }
654 int index()
const {
return mIndex; }
655 QList<QCPLayerable*>
children()
const {
return mChildren; }
660 void setVisible(
bool visible);
680 void drawToPaintBuffer();
696 Q_PROPERTY(
bool visible READ visible WRITE setVisible)
697 Q_PROPERTY(QCustomPlot* parentPlot READ parentPlot)
698 Q_PROPERTY(QCPLayerable* parentLayerable READ parentLayerable)
699 Q_PROPERTY(
QCPLayer* layer READ layer WRITE setLayer NOTIFY layerChanged)
700 Q_PROPERTY(
bool antialiased READ antialiased WRITE setAntialiased)
703 QCPLayerable(QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=0);
704 virtual ~QCPLayerable();
714 void setVisible(
bool on);
715 Q_SLOT
bool setLayer(
QCPLayer *layer);
716 bool setLayer(
const QString &layerName);
717 void setAntialiased(
bool enabled);
720 virtual double selectTest(
const QPointF &pos,
bool onlySelectable, QVariant *details=0)
const;
723 bool realVisibility()
const;
726 void layerChanged(
QCPLayer *newLayer);
737 virtual void parentPlotInitialized(QCustomPlot *parentPlot);
739 virtual QRect clipRect()
const;
740 virtual void applyDefaultAntialiasingHint(
QCPPainter *painter)
const = 0;
743 virtual void selectEvent(QMouseEvent *event,
bool additive,
const QVariant &details,
bool *selectionStateChanged);
744 virtual void deselectEvent(
bool *selectionStateChanged);
746 virtual void mousePressEvent(QMouseEvent *event,
const QVariant &details);
747 virtual void mouseMoveEvent(QMouseEvent *event,
const QPointF &startPos);
748 virtual void mouseReleaseEvent(QMouseEvent *event,
const QPointF &startPos);
749 virtual void mouseDoubleClickEvent(QMouseEvent *event,
const QVariant &details);
750 virtual void wheelEvent(QWheelEvent *event);
753 void initializeParentPlot(QCustomPlot *parentPlot);
754 void setParentLayerable(QCPLayerable* parentLayerable);
755 bool moveToLayer(
QCPLayer *layer,
bool prepend);
759 Q_DISABLE_COPY(QCPLayerable)
761 friend class QCustomPlot;
778 QCPRange(
double lower,
double upper);
781 bool operator!=(
const QCPRange& other)
const {
return !(*
this == other); }
783 QCPRange &
operator+=(
const double& value) { lower+=value; upper+=value;
return *
this; }
784 QCPRange &
operator-=(
const double& value) { lower-=value; upper-=value;
return *
this; }
785 QCPRange &
operator*=(
const double& value) { lower*=value; upper*=value;
return *
this; }
786 QCPRange &
operator/=(
const double& value) { lower/=value; upper/=value;
return *
this; }
787 friend inline const QCPRange
operator+(
const QCPRange&,
double);
788 friend inline const QCPRange
operator+(
double,
const QCPRange&);
789 friend inline const QCPRange
operator-(
const QCPRange& range,
double value);
790 friend inline const QCPRange
operator*(
const QCPRange& range,
double value);
791 friend inline const QCPRange
operator*(
double value,
const QCPRange& range);
792 friend inline const QCPRange
operator/(
const QCPRange& range,
double value);
794 double size()
const {
return upper-lower; }
795 double center()
const {
return (upper+lower)*0.5; }
796 void normalize() {
if (lower > upper) qSwap(lower, upper); }
797 void expand(
const QCPRange &otherRange);
798 void expand(
double includeCoord);
799 QCPRange expanded(
const QCPRange &otherRange)
const;
800 QCPRange expanded(
double includeCoord)
const;
801 QCPRange bounded(
double lowerBound,
double upperBound)
const;
802 QCPRange sanitizedForLogScale()
const;
803 QCPRange sanitizedForLinScale()
const;
804 bool contains(
double value)
const {
return value >= lower && value <= upper; }
806 static bool validRange(
double lower,
double upper);
807 static bool validRange(
const QCPRange &range);
818 inline QDebug operator<< (QDebug d,
const QCPRange &range)
820 d.nospace() <<
"QCPRange(" << range.
lower <<
", " << range.
upper <<
")";
900 int begin()
const {
return mBegin; }
901 int end()
const {
return mEnd; }
902 int size()
const {
return mEnd-mBegin; }
910 bool isValid()
const {
return (mEnd >= mBegin) && (mBegin >= 0); }
911 bool isEmpty()
const {
return length() == 0; }
950 int dataPointCount()
const;
952 QList<QCPDataRange>
dataRanges()
const {
return mDataRanges; }
956 void addDataRange(
const QCPDataRange &dataRange,
bool simplify=
true);
958 bool isEmpty()
const {
return mDataRanges.isEmpty(); }
1065 d.nospace() <<
"[" << dataRange.
begin() <<
".." << dataRange.
end()-1 <<
"]";
1075 d.nospace() <<
"QCPDataSelection(";
1102 QRect
rect()
const {
return mRect; }
1104 QPen
pen()
const {
return mPen; }
1109 void setPen(
const QPen &pen);
1110 void setBrush(
const QBrush &brush);
1113 Q_SLOT
void cancel();
1116 void started(QMouseEvent *event);
1117 void changed(
const QRect &rect, QMouseEvent *event);
1118 void canceled(
const QRect &rect, QInputEvent *event);
1119 void accepted(
const QRect &rect, QMouseEvent *event);
1130 virtual void startSelection(QMouseEvent *event);
1131 virtual void moveSelection(QMouseEvent *event);
1132 virtual void endSelection(QMouseEvent *event);
1133 virtual void keyPressEvent(QKeyEvent *event);
1157 bool isEmpty()
const;
1163 QHash<QCP::MarginSide, QList<QCPLayoutElement*> >
mChildren;
1183 Q_PROPERTY(
QCPLayout* layout READ layout)
1184 Q_PROPERTY(QRect rect READ rect)
1185 Q_PROPERTY(QRect outerRect READ outerRect WRITE setOuterRect)
1186 Q_PROPERTY(QMargins margins READ margins WRITE setMargins)
1187 Q_PROPERTY(QMargins minimumMargins READ minimumMargins WRITE setMinimumMargins)
1188 Q_PROPERTY(QSize minimumSize READ minimumSize WRITE setMinimumSize)
1189 Q_PROPERTY(QSize maximumSize READ maximumSize WRITE setMaximumSize)
1190 Q_PROPERTY(
SizeConstraintRect sizeConstraintRect READ sizeConstraintRect WRITE setSizeConstraintRect)
1216 explicit QCPLayoutElement(
QCustomPlot *parentPlot=0);
1217 virtual ~QCPLayoutElement();
1221 QRect
rect()
const {
return mRect; }
1230 QHash<QCP::MarginSide, QCPMarginGroup*>
marginGroups()
const {
return mMarginGroups; }
1233 void setOuterRect(
const QRect &rect);
1234 void setMargins(
const QMargins &margins);
1235 void setMinimumMargins(
const QMargins &margins);
1236 void setAutoMargins(QCP::MarginSides sides);
1237 void setMinimumSize(
const QSize &size);
1238 void setMinimumSize(
int width,
int height);
1239 void setMaximumSize(
const QSize &size);
1240 void setMaximumSize(
int width,
int height);
1242 void setMarginGroup(QCP::MarginSides sides,
QCPMarginGroup *group);
1246 virtual QSize minimumOuterSizeHint()
const;
1247 virtual QSize maximumOuterSizeHint()
const;
1248 virtual QList<QCPLayoutElement*> elements(
bool recursive)
const;
1251 virtual double selectTest(
const QPointF &pos,
bool onlySelectable, QVariant *details=0)
const Q_DECL_OVERRIDE;
1265 virtual void layoutChanged();
1273 Q_DISABLE_COPY(QCPLayoutElement)
1286 explicit QCPLayout();
1290 virtual QList<QCPLayoutElement*> elements(
bool recursive)
const Q_DECL_OVERRIDE;
1293 virtual int elementCount()
const = 0;
1294 virtual QCPLayoutElement* elementAt(
int index)
const = 0;
1295 virtual QCPLayoutElement* takeAt(
int index) = 0;
1296 virtual bool take(QCPLayoutElement* element) = 0;
1297 virtual void simplify();
1300 bool removeAt(
int index);
1301 bool remove(QCPLayoutElement* element);
1306 virtual void updateLayout();
1309 void sizeConstraintsChanged()
const;
1310 void adoptElement(QCPLayoutElement *el);
1311 void releaseElement(QCPLayoutElement *el);
1312 QVector<int> getSectionSizes(QVector<int> maxSizes, QVector<int> minSizes, QVector<double> stretchFactors,
int totalSize)
const;
1313 static QSize getFinalMinimumOuterSize(
const QCPLayoutElement *el);
1314 static QSize getFinalMaximumOuterSize(
const QCPLayoutElement *el);
1317 Q_DISABLE_COPY(QCPLayout)
1318 friend class QCPLayoutElement;
1326 Q_PROPERTY(
int rowCount READ rowCount)
1327 Q_PROPERTY(
int columnCount READ columnCount)
1328 Q_PROPERTY(QList<double> columnStretchFactors READ columnStretchFactors WRITE setColumnStretchFactors)
1329 Q_PROPERTY(QList<double> rowStretchFactors READ rowStretchFactors WRITE setRowStretchFactors)
1330 Q_PROPERTY(
int columnSpacing READ columnSpacing WRITE setColumnSpacing)
1331 Q_PROPERTY(
int rowSpacing READ rowSpacing WRITE setRowSpacing)
1332 Q_PROPERTY(
FillOrder fillOrder READ fillOrder WRITE setFillOrder)
1333 Q_PROPERTY(
int wrap READ wrap WRITE setWrap)
1350 virtual ~QCPLayoutGrid();
1353 int rowCount()
const {
return mElements.size(); }
1354 int columnCount()
const {
return mElements.size() > 0 ? mElements.first().size() : 0; }
1363 void setColumnStretchFactor(
int column,
double factor);
1364 void setColumnStretchFactors(
const QList<double> &factors);
1365 void setRowStretchFactor(
int row,
double factor);
1366 void setRowStretchFactors(
const QList<double> &factors);
1367 void setColumnSpacing(
int pixels);
1368 void setRowSpacing(
int pixels);
1369 void setWrap(
int count);
1370 void setFillOrder(
FillOrder order,
bool rearrange=
true);
1374 virtual int elementCount() const Q_DECL_OVERRIDE {
return rowCount()*columnCount(); }
1378 virtual QList<QCPLayoutElement*> elements(
bool recursive)
const Q_DECL_OVERRIDE;
1384 QCPLayoutElement *element(
int row,
int column)
const;
1385 bool addElement(
int row,
int column, QCPLayoutElement *element);
1386 bool addElement(QCPLayoutElement *element);
1387 bool hasElement(
int row,
int column);
1388 void expandTo(
int newRowCount,
int newColumnCount);
1389 void insertRow(
int newIndex);
1390 void insertColumn(
int newIndex);
1391 int rowColToIndex(
int row,
int column)
const;
1392 void indexToRowCol(
int index,
int &row,
int &column)
const;
1404 void getMinimumRowColSizes(QVector<int> *minColWidths, QVector<int> *minRowHeights)
const;
1405 void getMaximumRowColSizes(QVector<int> *maxColWidths, QVector<int> *maxRowHeights)
const;
1426 virtual ~QCPLayoutInset();
1430 Qt::Alignment insetAlignment(
int index) const;
1431 QRectF insetRect(
int index) const;
1435 void setInsetAlignment(
int index, Qt::Alignment alignment);
1436 void setInsetRect(
int index, const QRectF &rect);
1439 virtual
void updateLayout() Q_DECL_OVERRIDE;
1440 virtual
int elementCount() const Q_DECL_OVERRIDE;
1444 virtual
void simplify() Q_DECL_OVERRIDE {}
1445 virtual double selectTest(
const QPointF &pos,
bool onlySelectable, QVariant *details=0)
const Q_DECL_OVERRIDE;
1498 QCPLineEnding(
EndingStyle style,
double width=8,
double length=10,
bool inverted=false);
1508 void setWidth(
double width);
1509 void setLength(
double length);
1510 void setInverted(
bool inverted);
1513 double boundingDistance()
const;
1514 double realLength()
const;
1550 virtual ~QCPAxisTicker();
1559 void setTickCount(
int count);
1560 void setTickOrigin(
double origin);
1563 virtual void generate(
const QCPRange &range,
const QLocale &locale, QChar formatChar,
int precision, QVector<double> &ticks, QVector<double> *subTicks, QVector<QString> *tickLabels);
1572 virtual double getTickStep(
const QCPRange &range);
1573 virtual int getSubTickCount(
double tickStep);
1574 virtual QString getTickLabel(
double tick,
const QLocale &locale, QChar formatChar,
int precision);
1575 virtual QVector<double> createTickVector(
double tickStep,
const QCPRange &range);
1576 virtual QVector<double> createSubTickVector(
int subTickCount,
const QVector<double> &ticks);
1577 virtual QVector<QString> createLabelVector(
const QVector<double> &ticks,
const QLocale &locale, QChar formatChar,
int precision);
1580 void trimTicks(
const QCPRange &range, QVector<double> &ticks,
bool keepOneOutlier)
const;
1581 double pickClosest(
double target,
const QVector<double> &candidates)
const;
1582 double getMantissa(
double input,
double *magnitude=0)
const;
1583 double cleanMantissa(
double input)
const;
1604 void setDateTimeFormat(
const QString &format);
1605 void setDateTimeSpec(Qt::TimeSpec spec);
1606 void setTickOrigin(
double origin);
1607 void setTickOrigin(
const QDateTime &origin);
1610 static QDateTime keyToDateTime(
double key);
1611 static double dateTimeToKey(
const QDateTime dateTime);
1612 static double dateTimeToKey(
const QDate date);
1625 virtual QString getTickLabel(
double tick,
const QLocale &locale, QChar formatChar,
int precision)
Q_DECL_OVERRIDE;
1655 QString timeFormat()
const {
return mTimeFormat; }
1659 void setTimeFormat(
const QString &format);
1660 void setFieldWidth(
TimeUnit unit,
int width);
1674 virtual QString getTickLabel(
double tick,
const QLocale &locale, QChar formatChar,
int precision)
Q_DECL_OVERRIDE;
1677 void replaceUnit(QString &text,
TimeUnit unit,
int value)
const;
1706 double tickStep()
const {
return mTickStep; }
1710 void setTickStep(
double step);
1735 QMap<double, QString> &
ticks() {
return mTicks; }
1739 void setTicks(
const QMap<double, QString> &ticks);
1740 void setTicks(
const QVector<double> &positions,
const QVector<QString> labels);
1741 void setSubTickCount(
int subTicks);
1745 void addTick(
double position, QString label);
1746 void addTicks(
const QMap<double, QString> &ticks);
1747 void addTicks(
const QVector<double> &positions,
const QVector<QString> &labels);
1757 virtual QString getTickLabel(
double tick,
const QLocale &locale, QChar formatChar,
int precision)
Q_DECL_OVERRIDE;
1786 QString piSymbol()
const {
return mPiSymbol; }
1792 void setPiSymbol(QString symbol);
1793 void setPiValue(
double pi);
1794 void setPeriodicity(
int multiplesOfPi);
1810 virtual QString getTickLabel(
double tick,
const QLocale &locale, QChar formatChar,
int precision)
Q_DECL_OVERRIDE;
1813 void simplifyFraction(
int &numerator,
int &denominator)
const;
1814 QString fractionToString(
int numerator,
int denominator)
const;
1815 QString unicodeFraction(
int numerator,
int denominator)
const;
1816 QString unicodeSuperscript(
int number)
const;
1817 QString unicodeSubscript(
int number)
const;
1837 void setLogBase(
double base);
1838 void setSubTickCount(
int subTicks);
1864 Q_PROPERTY(
bool subGridVisible READ subGridVisible WRITE setSubGridVisible)
1865 Q_PROPERTY(
bool antialiasedSubGrid READ antialiasedSubGrid WRITE setAntialiasedSubGrid)
1866 Q_PROPERTY(
bool antialiasedZeroLine READ antialiasedZeroLine WRITE setAntialiasedZeroLine)
1867 Q_PROPERTY(QPen pen READ pen WRITE setPen)
1868 Q_PROPERTY(QPen subGridPen READ subGridPen WRITE setSubGridPen)
1869 Q_PROPERTY(QPen zeroLinePen READ zeroLinePen WRITE setZeroLinePen)
1878 QPen
pen()
const {
return mPen; }
1883 void setSubGridVisible(
bool visible);
1884 void setAntialiasedSubGrid(
bool enabled);
1885 void setAntialiasedZeroLine(
bool enabled);
1886 void setPen(
const QPen &pen);
1887 void setSubGridPen(
const QPen &pen);
1888 void setZeroLinePen(
const QPen &pen);
1904 void drawGridLines(
QCPPainter *painter)
const;
1905 void drawSubGridLines(
QCPPainter *painter)
const;
1915 Q_PROPERTY(
AxisType axisType READ axisType)
1917 Q_PROPERTY(
ScaleType scaleType READ scaleType WRITE setScaleType NOTIFY scaleTypeChanged)
1918 Q_PROPERTY(
QCPRange range READ range WRITE setRange NOTIFY rangeChanged)
1919 Q_PROPERTY(
bool rangeReversed READ rangeReversed WRITE setRangeReversed)
1920 Q_PROPERTY(QSharedPointer<QCPAxisTicker> ticker READ ticker WRITE setTicker)
1921 Q_PROPERTY(
bool ticks READ ticks WRITE setTicks)
1922 Q_PROPERTY(
bool tickLabels READ tickLabels WRITE setTickLabels)
1923 Q_PROPERTY(
int tickLabelPadding READ tickLabelPadding WRITE setTickLabelPadding)
1924 Q_PROPERTY(QFont tickLabelFont READ tickLabelFont WRITE setTickLabelFont)
1925 Q_PROPERTY(QColor tickLabelColor READ tickLabelColor WRITE setTickLabelColor)
1926 Q_PROPERTY(
double tickLabelRotation READ tickLabelRotation WRITE setTickLabelRotation)
1927 Q_PROPERTY(
LabelSide tickLabelSide READ tickLabelSide WRITE setTickLabelSide)
1928 Q_PROPERTY(QString numberFormat READ numberFormat WRITE setNumberFormat)
1929 Q_PROPERTY(
int numberPrecision READ numberPrecision WRITE setNumberPrecision)
1930 Q_PROPERTY(QVector<double> tickVector READ tickVector)
1931 Q_PROPERTY(QVector<QString> tickVectorLabels READ tickVectorLabels)
1932 Q_PROPERTY(
int tickLengthIn READ tickLengthIn WRITE setTickLengthIn)
1933 Q_PROPERTY(
int tickLengthOut READ tickLengthOut WRITE setTickLengthOut)
1934 Q_PROPERTY(
bool subTicks READ subTicks WRITE setSubTicks)
1935 Q_PROPERTY(
int subTickLengthIn READ subTickLengthIn WRITE setSubTickLengthIn)
1936 Q_PROPERTY(
int subTickLengthOut READ subTickLengthOut WRITE setSubTickLengthOut)
1937 Q_PROPERTY(QPen basePen READ basePen WRITE setBasePen)
1938 Q_PROPERTY(QPen tickPen READ tickPen WRITE setTickPen)
1939 Q_PROPERTY(QPen subTickPen READ subTickPen WRITE setSubTickPen)
1940 Q_PROPERTY(QFont labelFont READ labelFont WRITE setLabelFont)
1941 Q_PROPERTY(QColor labelColor READ labelColor WRITE setLabelColor)
1942 Q_PROPERTY(QString label READ label WRITE setLabel)
1943 Q_PROPERTY(
int labelPadding READ labelPadding WRITE setLabelPadding)
1944 Q_PROPERTY(
int padding READ padding WRITE setPadding)
1945 Q_PROPERTY(
int offset READ offset WRITE setOffset)
1946 Q_PROPERTY(SelectableParts selectedParts READ selectedParts WRITE setSelectedParts NOTIFY selectionChanged)
1947 Q_PROPERTY(SelectableParts selectableParts READ selectableParts WRITE setSelectableParts NOTIFY selectableChanged)
1948 Q_PROPERTY(QFont selectedTickLabelFont READ selectedTickLabelFont WRITE setSelectedTickLabelFont)
1949 Q_PROPERTY(QFont selectedLabelFont READ selectedLabelFont WRITE setSelectedLabelFont)
1950 Q_PROPERTY(QColor selectedTickLabelColor READ selectedTickLabelColor WRITE setSelectedTickLabelColor)
1951 Q_PROPERTY(QColor selectedLabelColor READ selectedLabelColor WRITE setSelectedLabelColor)
1952 Q_PROPERTY(QPen selectedBasePen READ selectedBasePen WRITE setSelectedBasePen)
1953 Q_PROPERTY(QPen selectedTickPen READ selectedTickPen WRITE setSelectedTickPen)
1954 Q_PROPERTY(QPen selectedSubTickPen READ selectedSubTickPen WRITE setSelectedSubTickPen)
1955 Q_PROPERTY(
QCPLineEnding lowerEnding READ lowerEnding WRITE setLowerEnding)
1956 Q_PROPERTY(
QCPLineEnding upperEnding READ upperEnding WRITE setUpperEnding)
1957 Q_PROPERTY(
QCPGrid* grid READ grid)
1971 Q_DECLARE_FLAGS(AxisTypes,
AxisType)
1995 ,spTickLabels = 0x002
1996 ,spAxisLabel = 0x004
1999 Q_FLAGS(SelectableParts)
2011 QSharedPointer<QCPAxisTicker>
ticker()
const {
return mTicker; }
2014 int tickLabelPadding()
const;
2017 double tickLabelRotation()
const;
2019 QString numberFormat()
const;
2023 int tickLengthIn()
const;
2024 int tickLengthOut()
const;
2026 int subTickLengthIn()
const;
2027 int subTickLengthOut()
const;
2033 QString
label()
const {
return mLabel; }
2034 int labelPadding()
const;
2052 Q_SLOT
void setRange(
const QCPRange &range);
2053 void setRange(
double lower,
double upper);
2054 void setRange(
double position,
double size, Qt::AlignmentFlag alignment);
2055 void setRangeLower(
double lower);
2056 void setRangeUpper(
double upper);
2057 void setRangeReversed(
bool reversed);
2058 void setTicker(QSharedPointer<QCPAxisTicker> ticker);
2059 void setTicks(
bool show);
2060 void setTickLabels(
bool show);
2061 void setTickLabelPadding(
int padding);
2062 void setTickLabelFont(
const QFont &font);
2063 void setTickLabelColor(
const QColor &color);
2064 void setTickLabelRotation(
double degrees);
2066 void setNumberFormat(
const QString &formatCode);
2067 void setNumberPrecision(
int precision);
2068 void setTickLength(
int inside,
int outside=0);
2069 void setTickLengthIn(
int inside);
2070 void setTickLengthOut(
int outside);
2071 void setSubTicks(
bool show);
2072 void setSubTickLength(
int inside,
int outside=0);
2073 void setSubTickLengthIn(
int inside);
2074 void setSubTickLengthOut(
int outside);
2075 void setBasePen(
const QPen &pen);
2076 void setTickPen(
const QPen &pen);
2077 void setSubTickPen(
const QPen &pen);
2078 void setLabelFont(
const QFont &font);
2079 void setLabelColor(
const QColor &color);
2080 void setLabel(
const QString &str);
2081 void setLabelPadding(
int padding);
2082 void setPadding(
int padding);
2083 void setOffset(
int offset);
2084 void setSelectedTickLabelFont(
const QFont &font);
2085 void setSelectedLabelFont(
const QFont &font);
2086 void setSelectedTickLabelColor(
const QColor &color);
2087 void setSelectedLabelColor(
const QColor &color);
2088 void setSelectedBasePen(
const QPen &pen);
2089 void setSelectedTickPen(
const QPen &pen);
2090 void setSelectedSubTickPen(
const QPen &pen);
2091 Q_SLOT
void setSelectableParts(
const QCPAxis::SelectableParts &selectableParts);
2092 Q_SLOT
void setSelectedParts(
const QCPAxis::SelectableParts &selectedParts);
2097 virtual double selectTest(
const QPointF &pos,
bool onlySelectable, QVariant *details=0)
const Q_DECL_OVERRIDE;
2101 int pixelOrientation()
const {
return rangeReversed() != (orientation()==Qt::Vertical) ? -1 : 1; }
2102 void moveRange(
double diff);
2103 void scaleRange(
double factor);
2104 void scaleRange(
double factor,
double center);
2105 void setScaleRatio(
const QCPAxis *otherAxis,
double ratio=1.0);
2106 void rescale(
bool onlyVisiblePlottables=
false);
2107 double pixelToCoord(
double value)
const;
2108 double coordToPixel(
double value)
const;
2110 QList<QCPAbstractPlottable*> plottables()
const;
2111 QList<QCPGraph*> graphs()
const;
2112 QList<QCPAbstractItem*> items()
const;
2115 static Qt::Orientation
orientation(
AxisType type) {
return type==atBottom||type==atTop ? Qt::Horizontal : Qt::Vertical; }
2119 void rangeChanged(
const QCPRange &newRange);
2122 void selectionChanged(
const QCPAxis::SelectableParts &parts);
2123 void selectableChanged(
const QCPAxis::SelectableParts &parts);
2176 virtual int calculateMargin();
2183 virtual
void selectEvent(QMouseEvent *event,
bool additive, const QVariant &details,
bool *selectionStateChanged) Q_DECL_OVERRIDE;
2184 virtual
void deselectEvent(
bool *selectionStateChanged) Q_DECL_OVERRIDE;
2186 virtual
void mousePressEvent(QMouseEvent *event, const QVariant &details);
2187 virtual
void mouseMoveEvent(QMouseEvent *event, const QPointF &startPos);
2188 virtual
void mouseReleaseEvent(QMouseEvent *event, const QPointF &startPos);
2189 virtual
void wheelEvent(QWheelEvent *event);
2192 void setupTickVectors();
2193 QPen getBasePen() const;
2194 QPen getTickPen() const;
2195 QPen getSubTickPen() const;
2196 QFont getTickLabelFont() const;
2197 QFont getLabelFont() const;
2198 QColor getTickLabelColor() const;
2199 QColor getLabelColor() const;
2208 Q_DECLARE_OPERATORS_FOR_FLAGS(
QCPAxis::SelectableParts)
2209 Q_DECLARE_OPERATORS_FOR_FLAGS(
QCPAxis::AxisTypes)
2219 explicit QCPAxisPainterPrivate(QCustomPlot *parentPlot);
2220 virtual ~QCPAxisPainterPrivate();
2223 virtual int size()
const;
2265 QRect baseBounds, expBounds, suffixBounds,
totalBounds, rotatedTotalBounds;
2273 virtual QByteArray generateLabelParameterHash()
const;
2275 virtual void placeTickLabel(
QCPPainter *painter,
double position,
int distanceToAxis,
const QString &text, QSize *tickLabelsSize);
2277 virtual TickLabelData getTickLabelData(
const QFont &font,
const QString &text)
const;
2278 virtual QPointF getTickLabelDrawOffset(
const TickLabelData &labelData)
const;
2279 virtual void getMaxTickLabelSize(
const QFont &font,
const QString &text, QSize *tickLabelsSize)
const;
2308 Q_FLAGS(ScatterProperties)
2341 QCPScatterStyle(
ScatterShape shape, const QColor &color,
double size);
2342 QCPScatterStyle(
ScatterShape shape, const QColor &color, const QColor &fill,
double size);
2343 QCPScatterStyle(
ScatterShape shape, const QPen &pen, const QBrush &brush,
double size);
2344 QCPScatterStyle(const QPixmap &pixmap);
2345 QCPScatterStyle(const QPainterPath &customPath, const QPen &pen, const QBrush &brush=Qt::NoBrush,
double size=6);
2348 double size()
const {
return mSize; }
2350 QPen
pen()
const {
return mPen; }
2356 void setFromOther(
const QCPScatterStyle &other, ScatterProperties properties);
2357 void setSize(
double size);
2359 void setPen(
const QPen &pen);
2360 void setBrush(
const QBrush &brush);
2361 void setPixmap(
const QPixmap &pixmap);
2362 void setCustomPath(
const QPainterPath &customPath);
2365 bool isNone()
const {
return mShape == ssNone; }
2368 void applyTo(
QCPPainter *painter,
const QPen &defaultPen)
const;
2369 void drawShape(
QCPPainter *painter,
const QPointF &pos)
const;
2370 void drawShape(
QCPPainter *painter,
double x,
double y)
const;
2385 Q_DECLARE_OPERATORS_FOR_FLAGS(QCPScatterStyle::ScatterProperties)
2400 template <class DataType>
2401 inline
bool qcpLessThanSortKey(const DataType &a, const DataType &b) {
return a.sortKey() < b.sortKey(); }
2403 template <
class DataType>
2413 int size()
const {
return mData.size()-mPreallocSize; }
2418 void setAutoSqueeze(
bool enabled);
2422 void set(
const QVector<DataType> &data,
bool alreadySorted=
false);
2424 void add(
const QVector<DataType> &data,
bool alreadySorted=
false);
2425 void add(
const DataType &data);
2426 void removeBefore(
double sortKey);
2427 void removeAfter(
double sortKey);
2428 void remove(
double sortKeyFrom,
double sortKeyTo);
2429 void remove(
double sortKey);
2432 void squeeze(
bool preAllocation=
true,
bool postAllocation=
true);
2434 const_iterator
constBegin()
const {
return mData.constBegin()+mPreallocSize; }
2435 const_iterator
constEnd()
const {
return mData.constEnd(); }
2436 iterator
begin() {
return mData.begin()+mPreallocSize; }
2437 iterator
end() {
return mData.end(); }
2438 const_iterator findBegin(
double sortKey,
bool expandedRange=
true)
const;
2439 const_iterator findEnd(
double sortKey,
bool expandedRange=
true)
const;
2440 const_iterator
at(
int index)
const {
return constBegin()+qBound(0, index, size()); }
2444 void limitIteratorsToDataRange(const_iterator &begin, const_iterator &end,
const QCPDataRange &dataRange)
const;
2456 void preallocateGrow(
int minimumPreallocSize);
2457 void performAutoSqueeze();
2598 template <
class DataType>
2602 mPreallocIteration(0)
2614 template <
class DataType>
2631 template <
class DataType>
2647 template <
class DataType>
2663 template <
class DataType>
2669 const int n = data.
size();
2670 const int oldSize =
size();
2672 if (oldSize > 0 && !qcpLessThanSortKey<DataType>(*
constBegin(), *(data.
constEnd()-1)))
2682 if (oldSize > 0 && !qcpLessThanSortKey<DataType>(*(
constEnd()-n-1), *(
constEnd()-n)))
2683 std::inplace_merge(
begin(),
end()-n,
end(), qcpLessThanSortKey<DataType>);
2695 template <
class DataType>
2702 set(data, alreadySorted);
2706 const int n = data.size();
2707 const int oldSize =
size();
2709 if (alreadySorted && oldSize > 0 && !qcpLessThanSortKey<DataType>(*
constBegin(), *(data.constEnd()-1)))
2714 std::copy(data.constBegin(), data.constEnd(),
begin());
2718 std::copy(data.constBegin(), data.constEnd(),
end()-n);
2720 std::sort(
end()-n,
end(), qcpLessThanSortKey<DataType>);
2721 if (oldSize > 0 && !qcpLessThanSortKey<DataType>(*(
constEnd()-n-1), *(
constEnd()-n)))
2722 std::inplace_merge(
begin(),
end()-n,
end(), qcpLessThanSortKey<DataType>);
2732 template <
class DataType>
2735 if (
isEmpty() || !qcpLessThanSortKey<DataType>(data, *(
constEnd()-1)))
2738 }
else if (qcpLessThanSortKey<DataType>(data, *
constBegin()))
2747 mData.insert(insertionPoint, data);
2756 template <
class DataType>
2771 template <
class DataType>
2776 mData.erase(it, itEnd);
2788 template <
class DataType>
2791 if (sortKeyFrom >= sortKeyTo ||
isEmpty())
2796 mData.erase(it, itEnd);
2810 template <
class DataType>
2814 if (it !=
end() && it->sortKey() == sortKey)
2830 template <
class DataType>
2849 template <
class DataType>
2852 std::sort(
begin(),
end(), qcpLessThanSortKey<DataType>);
2865 template <
class DataType>
2897 template <
class DataType>
2924 template <
class DataType>
2931 if (expandedRange && it !=
constEnd())
2951 template <
class DataType>
2960 bool haveLower =
false;
2961 bool haveUpper =
false;
2968 if (DataType::sortKeyIsMainKey())
2972 if (!qIsNaN(it->mainValue()))
2974 range.
lower = it->mainKey();
2984 if (!qIsNaN(it->mainValue()))
2986 range.
upper = it->mainKey();
2995 if (!qIsNaN(it->mainValue()))
2997 current = it->mainKey();
2998 if (current < range.
lower || !haveLower)
3000 range.
lower = current;
3003 if (current > range.
upper || !haveUpper)
3005 range.
upper = current;
3016 if (!qIsNaN(it->mainValue()))
3018 current = it->mainKey();
3019 if ((current < range.
lower || !haveLower) && current < 0)
3021 range.
lower = current;
3024 if ((current > range.
upper || !haveUpper) && current < 0)
3026 range.
upper = current;
3036 if (!qIsNaN(it->mainValue()))
3038 current = it->mainKey();
3039 if ((current < range.
lower || !haveLower) && current > 0)
3041 range.
lower = current;
3044 if ((current > range.
upper || !haveUpper) && current > 0)
3046 range.
upper = current;
3054 foundRange = haveLower && haveUpper;
3074 template <
class DataType>
3083 const bool restrictKeyRange = inKeyRange !=
QCPRange();
3084 bool haveLower =
false;
3085 bool haveUpper =
false;
3089 if (DataType::sortKeyIsMainKey() && restrictKeyRange)
3098 if (restrictKeyRange && (it->mainKey() < inKeyRange.
lower || it->mainKey() > inKeyRange.
upper))
3100 current = it->valueRange();
3101 if ((current.
lower < range.
lower || !haveLower) && !qIsNaN(current.
lower))
3106 if ((current.
upper > range.
upper || !haveUpper) && !qIsNaN(current.
upper))
3116 if (restrictKeyRange && (it->mainKey() < inKeyRange.
lower || it->mainKey() > inKeyRange.
upper))
3118 current = it->valueRange();
3119 if ((current.
lower < range.
lower || !haveLower) && current.
lower < 0 && !qIsNaN(current.
lower))
3124 if ((current.
upper > range.
upper || !haveUpper) && current.
upper < 0 && !qIsNaN(current.
upper))
3134 if (restrictKeyRange && (it->mainKey() < inKeyRange.
lower || it->mainKey() > inKeyRange.
upper))
3136 current = it->valueRange();
3137 if ((current.
lower < range.
lower || !haveLower) && current.
lower > 0 && !qIsNaN(current.
lower))
3142 if ((current.
upper > range.
upper || !haveUpper) && current.
upper > 0 && !qIsNaN(current.
upper))
3150 foundRange = haveLower && haveUpper;
3162 template <
class DataType>
3166 iteratorRange = iteratorRange.
bounded(dataRange.
bounded(this->dataRange()));
3180 template <
class DataType>
3186 int newPreallocSize = minimumPreallocSize;
3193 mPreallocSize = newPreallocSize;
3210 template <
class DataType>
3213 const int totalAlloc =
mData.capacity();
3214 const int postAllocSize = totalAlloc-
mData.size();
3215 const int usedSize =
size();
3216 bool shrinkPostAllocation =
false;
3217 bool shrinkPreAllocation =
false;
3218 if (totalAlloc > 650000)
3220 shrinkPostAllocation = postAllocSize > usedSize*1.5;
3222 }
else if (totalAlloc > 1000)
3224 shrinkPostAllocation = postAllocSize > usedSize*5;
3228 if (shrinkPreAllocation || shrinkPostAllocation)
3229 squeeze(shrinkPreAllocation, shrinkPostAllocation);
3248 QPen
pen()
const {
return mPen; }
3254 void setPen(
const QPen &pen);
3255 void setBrush(
const QBrush &brush);
3257 void setUsedScatterProperties(
const QCPScatterStyle::ScatterProperties &properties);
3291 Q_PROPERTY(QString name READ name WRITE setName)
3292 Q_PROPERTY(
bool antialiasedFill READ antialiasedFill WRITE setAntialiasedFill)
3293 Q_PROPERTY(
bool antialiasedScatters READ antialiasedScatters WRITE setAntialiasedScatters)
3294 Q_PROPERTY(QPen pen READ pen WRITE setPen)
3295 Q_PROPERTY(QBrush brush READ brush WRITE setBrush)
3296 Q_PROPERTY(
QCPAxis* keyAxis READ keyAxis WRITE setKeyAxis)
3297 Q_PROPERTY(
QCPAxis* valueAxis READ valueAxis WRITE setValueAxis)
3298 Q_PROPERTY(
QCP::SelectionType selectable READ selectable WRITE setSelectable NOTIFY selectableChanged)
3299 Q_PROPERTY(
QCPDataSelection selection READ selection WRITE setSelection NOTIFY selectionChanged)
3300 Q_PROPERTY(
QCPSelectionDecorator* selectionDecorator READ selectionDecorator WRITE setSelectionDecorator)
3304 virtual ~QCPAbstractPlottable();
3307 QString
name()
const {
return mName; }
3310 QPen
pen()
const {
return mPen; }
3315 bool selected()
const {
return !mSelection.isEmpty(); }
3320 void setName(
const QString &name);
3321 void setAntialiasedFill(
bool enabled);
3322 void setAntialiasedScatters(
bool enabled);
3323 void setPen(
const QPen &pen);
3324 void setBrush(
const QBrush &brush);
3325 void setKeyAxis(
QCPAxis *axis);
3326 void setValueAxis(
QCPAxis *axis);
3332 virtual double selectTest(
const QPointF &pos,
bool onlySelectable, QVariant *details=0)
const = 0;
3338 void coordsToPixels(
double key,
double value,
double &x,
double &y)
const;
3339 const QPointF coordsToPixels(
double key,
double value)
const;
3340 void pixelsToCoords(
double x,
double y,
double &key,
double &value)
const;
3341 void pixelsToCoords(
const QPointF &pixelPos,
double &key,
double &value)
const;
3342 void rescaleAxes(
bool onlyEnlarge=
false)
const;
3343 void rescaleKeyAxis(
bool onlyEnlarge=
false)
const;
3344 void rescaleValueAxis(
bool onlyEnlarge=
false,
bool inKeyRange=
false)
const;
3347 bool removeFromLegend(
QCPLegend *legend)
const;
3348 bool removeFromLegend()
const;
3351 void selectionChanged(
bool selected);
3367 virtual QRect clipRect() const Q_DECL_OVERRIDE;
3368 virtual
void draw(
QCPPainter *painter) Q_DECL_OVERRIDE = 0;
3369 virtual
QCP::
Interaction selectionCategory() const Q_DECL_OVERRIDE;
3370 void applyDefaultAntialiasingHint(
QCPPainter *painter) const Q_DECL_OVERRIDE;
3372 virtual
void selectEvent(QMouseEvent *event,
bool additive, const QVariant &details,
bool *selectionStateChanged) Q_DECL_OVERRIDE;
3373 virtual
void deselectEvent(
bool *selectionStateChanged) Q_DECL_OVERRIDE;
3376 virtual
void drawLegendIcon(
QCPPainter *painter, const QRectF &rect) const = 0;
3379 void applyFillAntialiasingHint(
QCPPainter *painter) const;
3380 void applyScattersAntialiasingHint(
QCPPainter *painter) const;
3383 Q_DISABLE_COPY(QCPAbstractPlottable)
3401 QCPItemAnchor(QCustomPlot *parentPlot,
QCPAbstractItem *parentItem,
const QString &name,
int anchorId=-1);
3402 virtual ~QCPItemAnchor();
3405 QString
name()
const {
return mName; }
3406 virtual QPointF pixelPosition()
const;
3428 Q_DISABLE_COPY(QCPItemAnchor)
3456 QCPItemPosition(QCustomPlot *parentPlot,
QCPAbstractItem *parentItem, const QString &name);
3457 virtual ~QCPItemPosition();
3466 double key()
const {
return mKey; }
3468 QPointF
coords()
const {
return QPointF(mKey, mValue); }
3469 QCPAxis *
keyAxis()
const {
return mKeyAxis.data(); }
3478 bool setParentAnchor(QCPItemAnchor *parentAnchor,
bool keepPixelPosition=
false);
3479 bool setParentAnchorX(QCPItemAnchor *parentAnchor,
bool keepPixelPosition=
false);
3480 bool setParentAnchorY(QCPItemAnchor *parentAnchor,
bool keepPixelPosition=
false);
3481 void setCoords(
double key,
double value);
3482 void setCoords(
const QPointF &coords);
3483 void setAxes(QCPAxis* keyAxis, QCPAxis* valueAxis);
3485 void setPixelPosition(
const QPointF &pixelPosition);
3499 Q_DISABLE_COPY(QCPItemPosition)
3509 Q_PROPERTY(
bool clipToAxisRect READ clipToAxisRect WRITE setClipToAxisRect)
3510 Q_PROPERTY(
QCPAxisRect* clipAxisRect READ clipAxisRect WRITE setClipAxisRect)
3511 Q_PROPERTY(
bool selectable READ selectable WRITE setSelectable NOTIFY selectableChanged)
3512 Q_PROPERTY(
bool selected READ selected WRITE setSelected NOTIFY selectionChanged)
3525 void setClipToAxisRect(
bool clip);
3527 Q_SLOT
void setSelectable(
bool selectable);
3528 Q_SLOT
void setSelected(
bool selected);
3531 virtual double selectTest(
const QPointF &pos,
bool onlySelectable, QVariant *details=0)
const Q_DECL_OVERRIDE = 0;
3534 QList<QCPItemPosition*>
positions()
const {
return mPositions; }
3535 QList<QCPItemAnchor*>
anchors()
const {
return mAnchors; }
3538 bool hasAnchor(
const QString &name)
const;
3541 void selectionChanged(
bool selected);
3542 void selectableChanged(
bool selectable);
3554 virtual QRect clipRect() const Q_DECL_OVERRIDE;
3555 virtual
void applyDefaultAntialiasingHint(
QCPPainter *painter) const Q_DECL_OVERRIDE;
3556 virtual
void draw(
QCPPainter *painter) Q_DECL_OVERRIDE = 0;
3558 virtual
void selectEvent(QMouseEvent *event,
bool additive, const QVariant &details,
bool *selectionStateChanged) Q_DECL_OVERRIDE;
3559 virtual
void deselectEvent(
bool *selectionStateChanged) Q_DECL_OVERRIDE;
3562 virtual QPointF anchorPixelPosition(
int anchorId) const;
3565 double rectDistance(const QRectF &rect, const QPointF &pos,
bool filledRect) const;
3567 QCPItemAnchor *createAnchor(const QString &name,
int anchorId);
3586 Q_PROPERTY(QRect viewport READ viewport WRITE setViewport)
3587 Q_PROPERTY(QPixmap background READ background WRITE setBackground)
3588 Q_PROPERTY(
bool backgroundScaled READ backgroundScaled WRITE setBackgroundScaled)
3589 Q_PROPERTY(Qt::AspectRatioMode backgroundScaledMode READ backgroundScaledMode WRITE setBackgroundScaledMode)
3591 Q_PROPERTY(
bool autoAddPlottableToLegend READ autoAddPlottableToLegend WRITE setAutoAddPlottableToLegend)
3592 Q_PROPERTY(
int selectionTolerance READ selectionTolerance WRITE setSelectionTolerance)
3593 Q_PROPERTY(
bool noAntialiasingOnDrag READ noAntialiasingOnDrag WRITE setNoAntialiasingOnDrag)
3594 Q_PROPERTY(Qt::KeyboardModifier multiSelectModifier READ multiSelectModifier WRITE setMultiSelectModifier)
3595 Q_PROPERTY(
bool openGl READ openGl WRITE setOpenGl)
3620 explicit QCustomPlot(QWidget *parent = 0);
3621 virtual ~QCustomPlot();
3624 QRect viewport()
const {
return mViewport; }
3643 void setViewport(
const QRect &rect);
3644 void setBufferDevicePixelRatio(
double ratio);
3645 void setBackground(
const QPixmap &pm);
3646 void setBackground(
const QPixmap &pm,
bool scaled, Qt::AspectRatioMode mode=Qt::KeepAspectRatioByExpanding);
3647 void setBackground(
const QBrush &brush);
3648 void setBackgroundScaled(
bool scaled);
3649 void setBackgroundScaledMode(Qt::AspectRatioMode mode);
3650 void setAntialiasedElements(
const QCP::AntialiasedElements &antialiasedElements);
3652 void setNotAntialiasedElements(
const QCP::AntialiasedElements ¬AntialiasedElements);
3654 void setAutoAddPlottableToLegend(
bool on);
3655 void setInteractions(
const QCP::Interactions &interactions);
3656 void setInteraction(
const QCP::Interaction &interaction,
bool enabled=
true);
3657 void setSelectionTolerance(
int pixels);
3658 void setNoAntialiasingOnDrag(
bool enabled);
3659 void setPlottingHints(
const QCP::PlottingHints &hints);
3661 void setMultiSelectModifier(Qt::KeyboardModifier modifier);
3664 void setOpenGl(
bool enabled,
int multisampling=16);
3668 QCPAbstractPlottable *plottable(
int index);
3669 QCPAbstractPlottable *plottable();
3670 bool removePlottable(QCPAbstractPlottable *plottable);
3671 bool removePlottable(
int index);
3672 int clearPlottables();
3673 int plottableCount()
const;
3674 QList<QCPAbstractPlottable*> selectedPlottables()
const;
3675 QCPAbstractPlottable *plottableAt(
const QPointF &pos,
bool onlySelectable=
false)
const;
3676 bool hasPlottable(QCPAbstractPlottable *plottable)
const;
3683 bool removeGraph(
int index);
3685 int graphCount()
const;
3686 QList<QCPGraph*> selectedGraphs()
const;
3692 bool removeItem(
int index);
3694 int itemCount()
const;
3695 QList<QCPAbstractItem*> selectedItems()
const;
3696 QCPAbstractItem *itemAt(
const QPointF &pos,
bool onlySelectable=
false)
const;
3700 QCPLayer *layer(
const QString &name)
const;
3703 bool setCurrentLayer(
const QString &name);
3704 bool setCurrentLayer(
QCPLayer *layer);
3705 int layerCount()
const;
3711 int axisRectCount()
const;
3713 QList<QCPAxisRect*> axisRects()
const;
3715 QCPAxisRect* axisRectAt(
const QPointF &pos)
const;
3716 Q_SLOT
void rescaleAxes(
bool onlyVisiblePlottables=
false);
3718 QList<QCPAxis*> selectedAxes()
const;
3719 QList<QCPLegend*> selectedLegends()
const;
3720 Q_SLOT
void deselectAll();
3722 bool savePdf(
const QString &fileName,
int width=0,
int height=0,
QCP::ExportPen exportPen=
QCP::epAllowCosmetic,
const QString &pdfCreator=QString(),
const QString &pdfTitle=QString());
3726 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);
3727 QPixmap toPixmap(
int width=0,
int height=0,
double scale=1.0);
3728 void toPainter(
QCPPainter *painter,
int width=0,
int height=0);
3735 void mouseDoubleClick(QMouseEvent *event);
3736 void mousePress(QMouseEvent *event);
3737 void mouseMove(QMouseEvent *event);
3738 void mouseRelease(QMouseEvent *event);
3739 void mouseWheel(QWheelEvent *event);
3741 void plottableClick(QCPAbstractPlottable *plottable,
int dataIndex, QMouseEvent *event);
3742 void plottableDoubleClick(QCPAbstractPlottable *plottable,
int dataIndex, QMouseEvent *event);
3750 void selectionChangedByUser();
3751 void beforeReplot();
3793 #ifdef QCP_OPENGL_FBO 3794 QSharedPointer<QOpenGLContext> mGlContext;
3795 QSharedPointer<QSurface> mGlSurface;
3796 QSharedPointer<QOpenGLPaintDevice> mGlPaintDevice;
3800 virtual QSize minimumSizeHint() const Q_DECL_OVERRIDE;
3801 virtual QSize sizeHint() const Q_DECL_OVERRIDE;
3802 virtual
void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
3803 virtual
void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
3804 virtual
void mouseDoubleClickEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
3805 virtual
void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
3806 virtual
void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
3807 virtual
void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
3808 virtual
void wheelEvent(QWheelEvent *event) Q_DECL_OVERRIDE;
3812 virtual
void updateLayout();
3813 virtual
void axisRemoved(
QCPAxis *axis);
3814 virtual
void legendRemoved(
QCPLegend *legend);
3815 Q_SLOT virtual
void processRectSelection(QRect rect, QMouseEvent *event);
3816 Q_SLOT virtual
void processRectZoom(QRect rect, QMouseEvent *event);
3817 Q_SLOT virtual
void processPointSelection(QMouseEvent *event);
3820 bool registerPlottable(QCPAbstractPlottable *plottable);
3821 bool registerGraph(
QCPGraph *graph);
3823 void updateLayerIndices() const;
3824 QCPLayerable *layerableAt(const QPointF &pos,
bool onlySelectable, QVariant *selectionDetails=0) const;
3825 QList<QCPLayerable*> layerableListAt(const QPointF &pos,
bool onlySelectable, QList<QVariant> *selectionDetails=0) const;
3827 void setupPaintBuffers();
3829 bool hasInvalidatedPaintBuffers();
3837 friend class QCPAbstractPlottable;
3855 virtual int dataCount()
const = 0;
3856 virtual double dataMainKey(
int index)
const = 0;
3857 virtual double dataSortKey(
int index)
const = 0;
3858 virtual double dataMainValue(
int index)
const = 0;
3859 virtual QCPRange dataValueRange(
int index)
const = 0;
3860 virtual QPointF dataPixelPosition(
int index)
const = 0;
3861 virtual bool sortKeyIsMainKey()
const = 0;
3862 virtual QCPDataSelection selectTestRect(
const QRectF &rect,
bool onlySelectable)
const = 0;
3863 virtual int findBegin(
double sortKey,
bool expandedRange=
true)
const = 0;
3864 virtual int findEnd(
double sortKey,
bool expandedRange=
true)
const = 0;
3867 template <
class DataType>
3889 virtual double selectTest(
const QPointF &pos,
bool onlySelectable, QVariant *details=0)
const Q_DECL_OVERRIDE;
3897 void getDataSegments(QList<QCPDataRange> &selectedSegments, QList<QCPDataRange> &unselectedSegments)
const;
3898 void drawPolyline(
QCPPainter *painter,
const QVector<QPointF> &lineData)
const;
4095 template <
class DataType>
4097 QCPAbstractPlottable(keyAxis, valueAxis),
4102 template <
class DataType>
4110 template <
class DataType>
4119 template <
class DataType>
4122 if (index >= 0 && index < mDataContainer->size())
4127 qDebug() << Q_FUNC_INFO <<
"Index out of bounds" << index;
4135 template <
class DataType>
4138 if (index >= 0 && index < mDataContainer->size())
4143 qDebug() << Q_FUNC_INFO <<
"Index out of bounds" << index;
4151 template <
class DataType>
4154 if (index >= 0 && index < mDataContainer->size())
4159 qDebug() << Q_FUNC_INFO <<
"Index out of bounds" << index;
4167 template <
class DataType>
4170 if (index >= 0 && index < mDataContainer->size())
4175 qDebug() << Q_FUNC_INFO <<
"Index out of bounds" << index;
4183 template <
class DataType>
4186 if (index >= 0 && index < mDataContainer->size())
4192 qDebug() << Q_FUNC_INFO <<
"Index out of bounds" << index;
4200 template <
class DataType>
4203 return DataType::sortKeyIsMainKey();
4213 template <
class DataType>
4219 if (!mKeyAxis || !mValueAxis)
4223 double key1, value1, key2, value2;
4227 QCPRange valueRange(value1, value2);
4230 if (DataType::sortKeyIsMainKey())
4238 int currentSegmentBegin = -1;
4241 if (currentSegmentBegin == -1)
4243 if (valueRange.
contains(it->mainValue()) && keyRange.contains(it->mainKey()))
4245 }
else if (!valueRange.
contains(it->mainValue()) || !keyRange.contains(it->mainKey()))
4248 currentSegmentBegin = -1;
4252 if (currentSegmentBegin != -1)
4262 template <
class DataType>
4271 template <
class DataType>
4284 template <
class DataType>
4289 if (!mKeyAxis || !mValueAxis)
4293 double minDistSqr = std::numeric_limits<double>::max();
4298 if (DataType::sortKeyIsMainKey())
4301 double posKeyMin, posKeyMax, dummy;
4304 if (posKeyMin > posKeyMax)
4305 qSwap(posKeyMin, posKeyMax);
4311 QCPRange keyRange(mKeyAxis->range());
4312 QCPRange valueRange(mValueAxis->range());
4315 const double mainKey = it->mainKey();
4316 const double mainValue = it->mainValue();
4317 if (keyRange.contains(mainKey) && valueRange.contains(mainValue))
4320 if (currentDistSqr < minDistSqr)
4322 minDistSqr = currentDistSqr;
4332 details->setValue(selectionResult);
4333 return qSqrt(minDistSqr);
4346 template <
class DataType>
4349 selectedSegments.clear();
4350 unselectedSegments.clear();
4356 unselectedSegments << QCPDataRange(0,
dataCount());
4376 template <
class DataType>
4381 painter->pen().style() == Qt::SolidLine &&
4386 bool lastIsNan =
false;
4387 const int lineDataSize = lineData.size();
4388 while (i < lineDataSize && (qIsNaN(lineData.at(i).y()) || qIsNaN(lineData.at(i).x())))
4391 while (i < lineDataSize)
4393 if (!qIsNaN(lineData.at(i).y()) && !qIsNaN(lineData.at(i).x()))
4396 painter->
drawLine(lineData.at(i-1), lineData.at(i));
4405 int segmentStart = 0;
4407 const int lineDataSize = lineData.size();
4408 while (i < lineDataSize)
4410 if (qIsNaN(lineData.at(i).y()) || qIsNaN(lineData.at(i).x()) || qIsInf(lineData.at(i).y()))
4412 painter->drawPolyline(lineData.constData()+segmentStart, i-segmentStart);
4418 painter->drawPolyline(lineData.constData()+segmentStart, lineDataSize-segmentStart);
4465 bool operator==(const QCPColorGradient &other) const;
4466 bool operator!=(const QCPColorGradient &other)
const {
return !(*
this == other); }
4475 void setLevelCount(
int n);
4476 void setColorStops(
const QMap<double, QColor> &colorStops);
4477 void setColorStopAt(
double position,
const QColor &color);
4479 void setPeriodic(
bool enabled);
4482 void colorize(
const double *data,
const QCPRange &range, QRgb *scanLine,
int n,
int dataIndexFactor=1,
bool logarithmic=
false);
4483 void colorize(
const double *data,
const unsigned char *alpha,
const QCPRange &range, QRgb *scanLine,
int n,
int dataIndexFactor=1,
bool logarithmic=
false);
4484 QRgb color(
double position,
const QCPRange &range,
bool logarithmic=
false);
4486 void clearColorStops();
4501 bool stopsUseAlpha()
const;
4502 void updateColorBuffer();
4533 virtual ~QCPSelectionDecoratorBracket();
4536 QPen bracketPen()
const {
return mBracketPen; }
4545 void setBracketPen(
const QPen &pen);
4546 void setBracketBrush(
const QBrush &brush);
4547 void setBracketWidth(
int width);
4548 void setBracketHeight(
int height);
4550 void setTangentToData(
bool enabled);
4551 void setTangentAverage(
int pointCount);
4554 virtual void drawBracket(
QCPPainter *painter,
int direction)
const;
4586 Q_PROPERTY(QPixmap background READ background WRITE setBackground)
4587 Q_PROPERTY(
bool backgroundScaled READ backgroundScaled WRITE setBackgroundScaled)
4588 Q_PROPERTY(Qt::AspectRatioMode backgroundScaledMode READ backgroundScaledMode WRITE setBackgroundScaledMode)
4589 Q_PROPERTY(Qt::Orientations rangeDrag READ rangeDrag WRITE setRangeDrag)
4590 Q_PROPERTY(Qt::Orientations rangeZoom READ rangeZoom WRITE setRangeZoom)
4593 explicit QCPAxisRect(QCustomPlot *parentPlot,
bool setupDefaultAxes=
true);
4603 QCPAxis *rangeDragAxis(Qt::Orientation orientation);
4604 QCPAxis *rangeZoomAxis(Qt::Orientation orientation);
4605 QList<QCPAxis*> rangeDragAxes(Qt::Orientation orientation);
4606 QList<QCPAxis*> rangeZoomAxes(Qt::Orientation orientation);
4607 double rangeZoomFactor(Qt::Orientation orientation);
4610 void setBackground(
const QPixmap &pm);
4611 void setBackground(
const QPixmap &pm,
bool scaled, Qt::AspectRatioMode mode=Qt::KeepAspectRatioByExpanding);
4612 void setBackground(
const QBrush &brush);
4613 void setBackgroundScaled(
bool scaled);
4614 void setBackgroundScaledMode(Qt::AspectRatioMode mode);
4615 void setRangeDrag(Qt::Orientations orientations);
4616 void setRangeZoom(Qt::Orientations orientations);
4618 void setRangeDragAxes(QList<QCPAxis*> axes);
4619 void setRangeDragAxes(QList<QCPAxis*> horizontal, QList<QCPAxis*> vertical);
4621 void setRangeZoomAxes(QList<QCPAxis*> axes);
4622 void setRangeZoomAxes(QList<QCPAxis*> horizontal, QList<QCPAxis*> vertical);
4623 void setRangeZoomFactor(
double horizontalFactor,
double verticalFactor);
4624 void setRangeZoomFactor(
double factor);
4629 QList<QCPAxis*> axes(QCPAxis::AxisTypes types)
const;
4630 QList<QCPAxis*> axes()
const;
4632 QList<QCPAxis*> addAxes(QCPAxis::AxisTypes types);
4633 bool removeAxis(
QCPAxis *axis);
4636 void zoom(
const QRectF &pixelRect);
4637 void zoom(
const QRectF &pixelRect,
const QList<QCPAxis*> &affectedAxes);
4638 void setupFullAxesBox(
bool connectRanges=
false);
4639 QList<QCPAbstractPlottable*> plottables()
const;
4640 QList<QCPGraph*> graphs()
const;
4641 QList<QCPAbstractItem*> items()
const;
4644 int left()
const {
return mRect.left(); }
4645 int right()
const {
return mRect.right(); }
4646 int top()
const {
return mRect.top(); }
4647 int bottom()
const {
return mRect.bottom(); }
4648 int width()
const {
return mRect.width(); }
4649 int height()
const {
return mRect.height(); }
4650 QSize
size()
const {
return mRect.size(); }
4651 QPoint
topLeft()
const {
return mRect.topLeft(); }
4655 QPoint
center()
const {
return mRect.center(); }
4659 virtual QList<QCPLayoutElement*> elements(
bool recursive)
const Q_DECL_OVERRIDE;
4678 QHash<QCPAxis::AxisType, QList<QCPAxis*> >
mAxes;
4684 virtual void layoutChanged() Q_DECL_OVERRIDE;
4686 virtual
void mousePressEvent(QMouseEvent *event, const QVariant &details) Q_DECL_OVERRIDE;
4687 virtual
void mouseMoveEvent(QMouseEvent *event, const QPointF &startPos) Q_DECL_OVERRIDE;
4688 virtual
void mouseReleaseEvent(QMouseEvent *event, const QPointF &startPos) Q_DECL_OVERRIDE;
4689 virtual
void wheelEvent(QWheelEvent *event) Q_DECL_OVERRIDE;
4693 void updateAxesOffset(
QCPAxis::AxisType type);
4698 friend class QCustomPlot;
4712 Q_PROPERTY(
QCPLegend* parentLegend READ parentLegend)
4713 Q_PROPERTY(QFont font READ font WRITE setFont)
4714 Q_PROPERTY(QColor textColor READ textColor WRITE setTextColor)
4715 Q_PROPERTY(QFont selectedFont READ selectedFont WRITE setSelectedFont)
4716 Q_PROPERTY(QColor selectedTextColor READ selectedTextColor WRITE setSelectedTextColor)
4717 Q_PROPERTY(
bool selectable READ selectable WRITE setSelectable NOTIFY selectionChanged)
4718 Q_PROPERTY(
bool selected READ selected WRITE setSelected NOTIFY selectableChanged)
4725 QFont
font()
const {
return mFont; }
4733 void setFont(
const QFont &font);
4734 void setTextColor(
const QColor &color);
4735 void setSelectedFont(
const QFont &font);
4736 void setSelectedTextColor(
const QColor &color);
4738 Q_SLOT
void setSelected(
bool selected);
4759 virtual QRect
clipRect() const Q_DECL_OVERRIDE;
4762 virtual
void selectEvent(QMouseEvent *event,
bool additive, const QVariant &details,
bool *selectionStateChanged) Q_DECL_OVERRIDE;
4763 virtual
void deselectEvent(
bool *selectionStateChanged) Q_DECL_OVERRIDE;
4787 virtual QSize minimumOuterSizeHint() const Q_DECL_OVERRIDE;
4790 QPen getIconBorderPen() const;
4791 QColor getTextColor() const;
4792 QFont getFont() const;
4800 Q_PROPERTY(QPen borderPen READ borderPen WRITE setBorderPen)
4801 Q_PROPERTY(QBrush brush READ brush WRITE setBrush)
4802 Q_PROPERTY(QFont font READ font WRITE setFont)
4803 Q_PROPERTY(QColor textColor READ textColor WRITE setTextColor)
4804 Q_PROPERTY(QSize iconSize READ iconSize WRITE setIconSize)
4805 Q_PROPERTY(
int iconTextPadding READ iconTextPadding WRITE setIconTextPadding)
4806 Q_PROPERTY(QPen iconBorderPen READ iconBorderPen WRITE setIconBorderPen)
4807 Q_PROPERTY(SelectableParts selectableParts READ selectableParts WRITE setSelectableParts NOTIFY selectionChanged)
4808 Q_PROPERTY(SelectableParts selectedParts READ selectedParts WRITE setSelectedParts NOTIFY selectableChanged)
4809 Q_PROPERTY(QPen selectedBorderPen READ selectedBorderPen WRITE setSelectedBorderPen)
4810 Q_PROPERTY(QPen selectedIconBorderPen READ selectedIconBorderPen WRITE setSelectedIconBorderPen)
4811 Q_PROPERTY(QBrush selectedBrush READ selectedBrush WRITE setSelectedBrush)
4812 Q_PROPERTY(QFont selectedFont READ selectedFont WRITE setSelectedFont)
4813 Q_PROPERTY(QColor selectedTextColor READ selectedTextColor WRITE setSelectedTextColor)
4822 ,spLegendBox = 0x001
4826 Q_FLAGS(SelectableParts)
4829 explicit QCPLegend();
4830 virtual ~QCPLegend();
4833 QPen borderPen()
const {
return mBorderPen; }
4835 QFont
font()
const {
return mFont; }
4841 SelectableParts selectedParts()
const;
4849 void setBorderPen(
const QPen &pen);
4850 void setBrush(
const QBrush &brush);
4851 void setFont(
const QFont &font);
4852 void setTextColor(
const QColor &color);
4853 void setIconSize(
const QSize &size);
4854 void setIconSize(
int width,
int height);
4855 void setIconTextPadding(
int padding);
4856 void setIconBorderPen(
const QPen &pen);
4857 Q_SLOT
void setSelectableParts(
const SelectableParts &selectableParts);
4858 Q_SLOT
void setSelectedParts(
const SelectableParts &selectedParts);
4859 void setSelectedBorderPen(
const QPen &pen);
4860 void setSelectedIconBorderPen(
const QPen &pen);
4861 void setSelectedBrush(
const QBrush &brush);
4862 void setSelectedFont(
const QFont &font);
4863 void setSelectedTextColor(
const QColor &color);
4869 QCPAbstractLegendItem *item(
int index)
const;
4871 int itemCount()
const;
4872 bool hasItem(QCPAbstractLegendItem *item)
const;
4873 bool hasItemWithPlottable(
const QCPAbstractPlottable *plottable)
const;
4874 bool addItem(QCPAbstractLegendItem *item);
4875 bool removeItem(
int index);
4876 bool removeItem(QCPAbstractLegendItem *item);
4878 QList<QCPAbstractLegendItem*> selectedItems()
const;
4904 virtual
void selectEvent(QMouseEvent *event,
bool additive, const QVariant &details,
bool *selectionStateChanged) Q_DECL_OVERRIDE;
4905 virtual
void deselectEvent(
bool *selectionStateChanged) Q_DECL_OVERRIDE;
4908 QPen getBorderPen() const;
4909 QBrush getBrush() const;
4912 Q_DISABLE_COPY(QCPLegend)
4914 friend class QCustomPlot;
4915 friend class QCPAbstractLegendItem;
4917 Q_DECLARE_OPERATORS_FOR_FLAGS(QCPLegend::SelectableParts)
4930 Q_PROPERTY(QString text READ text WRITE setText)
4931 Q_PROPERTY(QFont font READ font WRITE setFont)
4932 Q_PROPERTY(QColor textColor READ textColor WRITE setTextColor)
4933 Q_PROPERTY(QFont selectedFont READ selectedFont WRITE setSelectedFont)
4934 Q_PROPERTY(QColor selectedTextColor READ selectedTextColor WRITE setSelectedTextColor)
4935 Q_PROPERTY(
bool selectable READ selectable WRITE setSelectable NOTIFY selectableChanged)
4936 Q_PROPERTY(
bool selected READ selected WRITE setSelected NOTIFY selectionChanged)
4941 QCPTextElement(QCustomPlot *parentPlot,
const QString &text,
double pointSize);
4942 QCPTextElement(QCustomPlot *parentPlot,
const QString &text,
const QString &fontFamily,
double pointSize);
4943 QCPTextElement(QCustomPlot *parentPlot,
const QString &text,
const QFont &font);
4946 QString
text()
const {
return mText; }
4948 QFont
font()
const {
return mFont; }
4956 void setText(
const QString &text);
4957 void setTextFlags(
int flags);
4958 void setFont(
const QFont &font);
4959 void setTextColor(
const QColor &color);
4960 void setSelectedFont(
const QFont &font);
4961 void setSelectedTextColor(
const QColor &color);
4963 Q_SLOT
void setSelected(
bool selected);
4974 void clicked(QMouseEvent *event);
4975 void doubleClicked(QMouseEvent *event);
4991 virtual QSize minimumOuterSizeHint() const Q_DECL_OVERRIDE;
4992 virtual QSize maximumOuterSizeHint() const Q_DECL_OVERRIDE;
4994 virtual
void selectEvent(QMouseEvent *event,
bool additive, const QVariant &details,
bool *selectionStateChanged) Q_DECL_OVERRIDE;
4995 virtual
void deselectEvent(
bool *selectionStateChanged) Q_DECL_OVERRIDE;
4998 QFont mainFont() const;
4999 QColor mainTextColor() const;
5031 void updateGradientImage();
5032 Q_SLOT
void axisSelectionChanged(QCPAxis::SelectableParts selectedParts);
5033 Q_SLOT
void axisSelectableChanged(QCPAxis::SelectableParts selectableParts);
5043 Q_PROPERTY(
QCPRange dataRange READ dataRange WRITE setDataRange NOTIFY dataRangeChanged)
5044 Q_PROPERTY(
QCPAxis::ScaleType dataScaleType READ dataScaleType WRITE setDataScaleType NOTIFY dataScaleTypeChanged)
5045 Q_PROPERTY(
QCPColorGradient gradient READ gradient WRITE setGradient NOTIFY gradientChanged)
5046 Q_PROPERTY(QString label READ label WRITE setLabel)
5047 Q_PROPERTY(
int barWidth READ barWidth WRITE setBarWidth)
5048 Q_PROPERTY(
bool rangeDrag READ rangeDrag WRITE setRangeDrag)
5049 Q_PROPERTY(
bool rangeZoom READ rangeZoom WRITE setRangeZoom)
5061 QString label()
const;
5063 bool rangeDrag()
const;
5064 bool rangeZoom()
const;
5068 Q_SLOT
void setDataRange(
const QCPRange &dataRange);
5071 void setLabel(
const QString &str);
5072 void setBarWidth(
int width);
5073 void setRangeDrag(
bool enabled);
5074 void setRangeZoom(
bool enabled);
5077 QList<QCPColorMap*> colorMaps()
const;
5078 void rescaleDataRange(
bool onlyVisibleMaps);
5084 void dataRangeChanged(
const QCPRange &newRange);
5125 QCPGraphData(
double key,
double value);
5128 inline static QCPGraphData
fromSortKey(
double sortKey) {
return QCPGraphData(sortKey, 0); }
5156 Q_PROPERTY(
LineStyle lineStyle READ lineStyle WRITE setLineStyle)
5157 Q_PROPERTY(
QCPScatterStyle scatterStyle READ scatterStyle WRITE setScatterStyle)
5158 Q_PROPERTY(
int scatterSkip READ scatterSkip WRITE setScatterSkip)
5159 Q_PROPERTY(
QCPGraph* channelFillGraph READ channelFillGraph WRITE setChannelFillGraph)
5160 Q_PROPERTY(
bool adaptiveSampling READ adaptiveSampling WRITE setAdaptiveSampling)
5190 void setData(QSharedPointer<QCPGraphDataContainer> data);
5191 void setData(
const QVector<double> &keys,
const QVector<double> &values,
bool alreadySorted=
false);
5194 void setScatterSkip(
int skip);
5195 void setChannelFillGraph(
QCPGraph *targetGraph);
5196 void setAdaptiveSampling(
bool enabled);
5199 void addData(
const QVector<double> &keys,
const QVector<double> &values,
bool alreadySorted=
false);
5200 void addData(
double key,
double value);
5220 virtual void drawFill(
QCPPainter *painter, QVector<QPointF> *lines)
const;
5221 virtual void drawScatterPlot(
QCPPainter *painter,
const QVector<QPointF> &scatters,
const QCPScatterStyle &style)
const;
5222 virtual void drawLinePlot(
QCPPainter *painter,
const QVector<QPointF> &lines)
const;
5223 virtual void drawImpulsePlot(
QCPPainter *painter,
const QVector<QPointF> &lines)
const;
5230 void getLines(QVector<QPointF> *lines,
const QCPDataRange &dataRange)
const;
5231 void getScatters(QVector<QPointF> *scatters,
const QCPDataRange &dataRange)
const;
5232 QVector<QPointF> dataToLines(
const QVector<QCPGraphData> &data)
const;
5233 QVector<QPointF> dataToStepLeftLines(
const QVector<QCPGraphData> &data)
const;
5234 QVector<QPointF> dataToStepRightLines(
const QVector<QCPGraphData> &data)
const;
5235 QVector<QPointF> dataToStepCenterLines(
const QVector<QCPGraphData> &data)
const;
5236 QVector<QPointF> dataToImpulseLines(
const QVector<QCPGraphData> &data)
const;
5237 QVector<QCPDataRange> getNonNanSegments(
const QVector<QPointF> *lineData, Qt::Orientation keyOrientation)
const;
5238 QVector<QPair<QCPDataRange, QCPDataRange> > getOverlappingSegments(QVector<QCPDataRange> thisSegments,
const QVector<QPointF> *thisData, QVector<QCPDataRange> otherSegments,
const QVector<QPointF> *otherData)
const;
5239 bool segmentsIntersect(
double aLower,
double aUpper,
double bLower,
double bUpper,
int &bPrecedence)
const;
5240 QPointF getFillBasePoint(QPointF matchingDataPoint)
const;
5241 const QPolygonF getFillPolygon(
const QVector<QPointF> *lineData,
QCPDataRange segment)
const;
5242 const QPolygonF getChannelFillPolygon(
const QVector<QPointF> *lineData,
QCPDataRange thisSegment,
const QVector<QPointF> *otherData,
QCPDataRange otherSegment)
const;
5243 int findIndexBelowX(
const QVector<QPointF> *data,
double x)
const;
5244 int findIndexAboveX(
const QVector<QPointF> *data,
double x)
const;
5245 int findIndexBelowY(
const QVector<QPointF> *data,
double y)
const;
5246 int findIndexAboveY(
const QVector<QPointF> *data,
double y)
const;
5249 friend class QCustomPlot;
5250 friend class QCPLegend;
5264 QCPCurveData(
double t,
double key,
double value);
5267 inline static QCPCurveData
fromSortKey(
double sortKey) {
return QCPCurveData(sortKey, 0, 0); }
5296 Q_PROPERTY(
QCPScatterStyle scatterStyle READ scatterStyle WRITE setScatterStyle)
5297 Q_PROPERTY(
int scatterSkip READ scatterSkip WRITE setScatterSkip)
5298 Q_PROPERTY(
LineStyle lineStyle READ lineStyle WRITE setLineStyle)
5321 void setData(QSharedPointer<QCPCurveDataContainer> data);
5322 void setData(
const QVector<double> &t,
const QVector<double> &keys,
const QVector<double> &values,
bool alreadySorted=
false);
5323 void setData(
const QVector<double> &keys,
const QVector<double> &values);
5325 void setScatterSkip(
int skip);
5329 void addData(
const QVector<double> &t,
const QVector<double> &keys,
const QVector<double> &values,
bool alreadySorted=
false);
5330 void addData(
const QVector<double> &keys,
const QVector<double> &values);
5331 void addData(
double t,
double key,
double value);
5332 void addData(
double key,
double value);
5350 virtual void drawCurveLine(
QCPPainter *painter,
const QVector<QPointF> &lines)
const;
5354 void getCurveLines(QVector<QPointF> *lines,
const QCPDataRange &dataRange,
double penWidth)
const;
5355 void getScatters(QVector<QPointF> *scatters,
const QCPDataRange &dataRange,
double scatterWidth)
const;
5356 int getRegion(
double key,
double value,
double keyMin,
double valueMax,
double keyMax,
double valueMin)
const;
5357 QPointF getOptimizedPoint(
int prevRegion,
double prevKey,
double prevValue,
double key,
double value,
double keyMin,
double valueMax,
double keyMax,
double valueMin)
const;
5358 QVector<QPointF> getOptimizedCornerPoints(
int prevRegion,
int currentRegion,
double prevKey,
double prevValue,
double key,
double value,
double keyMin,
double valueMax,
double keyMax,
double valueMin)
const;
5359 bool mayTraverse(
int prevRegion,
int currentRegion)
const;
5360 bool getTraverse(
double prevKey,
double prevValue,
double key,
double value,
double keyMin,
double valueMax,
double keyMax,
double valueMin, QPointF &crossA, QPointF &crossB)
const;
5361 void getTraverseCornerPoints(
int prevRegion,
int currentRegion,
double keyMin,
double valueMax,
double keyMax,
double valueMin, QVector<QPointF> &beforeTraverse, QVector<QPointF> &afterTraverse)
const;
5364 friend class QCustomPlot;
5365 friend class QCPLegend;
5379 Q_PROPERTY(
SpacingType spacingType READ spacingType WRITE setSpacingType)
5380 Q_PROPERTY(
double spacing READ spacing WRITE setSpacing)
5404 void setSpacing(
double spacing);
5407 QList<QCPBars*>
bars()
const {
return mBars; }
5408 QCPBars* bars(
int index)
const;
5409 int size()
const {
return mBars.size(); }
5414 void insert(
int i,
QCPBars *bars);
5425 void registerBars(
QCPBars *bars);
5426 void unregisterBars(
QCPBars *bars);
5429 double keyPixelOffset(
const QCPBars *bars,
double keyCoord);
5430 double getPixelSpacing(
const QCPBars *bars,
double keyCoord);
5444 QCPBarsData(
double key,
double value);
5447 inline static QCPBarsData
fromSortKey(
double sortKey) {
return QCPBarsData(sortKey, 0); }
5475 Q_PROPERTY(
double width READ width WRITE setWidth)
5476 Q_PROPERTY(
WidthType widthType READ widthType WRITE setWidthType)
5477 Q_PROPERTY(
QCPBarsGroup* barsGroup READ barsGroup WRITE setBarsGroup)
5478 Q_PROPERTY(
double baseValue READ baseValue WRITE setBaseValue)
5479 Q_PROPERTY(
double stackingGap READ stackingGap WRITE setStackingGap)
5480 Q_PROPERTY(
QCPBars* barBelow READ barBelow)
5481 Q_PROPERTY(
QCPBars* barAbove READ barAbove)
5500 double width()
const {
return mWidth; }
5510 void setData(QSharedPointer<QCPBarsDataContainer> data);
5511 void setData(
const QVector<double> &keys,
const QVector<double> &values,
bool alreadySorted=
false);
5512 void setWidth(
double width);
5515 void setBaseValue(
double baseValue);
5516 void setStackingGap(
double pixels);
5519 void addData(
const QVector<double> &keys,
const QVector<double> &values,
bool alreadySorted=
false);
5520 void addData(
double key,
double value);
5521 void moveBelow(
QCPBars *bars);
5522 void moveAbove(
QCPBars *bars);
5546 QRectF getBarRect(
double key,
double value)
const;
5547 void getPixelWidth(
double key,
double &lower,
double &upper)
const;
5548 double getStackedBaseValue(
double key,
bool positive)
const;
5551 friend class QCustomPlot;
5552 friend class QCPLegend;
5566 QCPStatisticalBoxData();
5567 QCPStatisticalBoxData(
double key,
double minimum,
double lowerQuartile,
double median,
double upperQuartile,
double maximum,
const QVector<double>& outliers=QVector<double>());
5570 inline static QCPStatisticalBoxData
fromSortKey(
double sortKey) {
return QCPStatisticalBoxData(sortKey, 0, 0, 0, 0, 0); }
5579 for (QVector<double>::const_iterator it = outliers.constBegin(); it != outliers.constEnd(); ++it)
5606 Q_PROPERTY(
double width READ width WRITE setWidth)
5607 Q_PROPERTY(
double whiskerWidth READ whiskerWidth WRITE setWhiskerWidth)
5608 Q_PROPERTY(QPen whiskerPen READ whiskerPen WRITE setWhiskerPen)
5609 Q_PROPERTY(QPen whiskerBarPen READ whiskerBarPen WRITE setWhiskerBarPen)
5610 Q_PROPERTY(
bool whiskerAntialiased READ whiskerAntialiased WRITE setWhiskerAntialiased)
5611 Q_PROPERTY(QPen medianPen READ medianPen WRITE setMedianPen)
5612 Q_PROPERTY(
QCPScatterStyle outlierStyle READ outlierStyle WRITE setOutlierStyle)
5628 void setData(QSharedPointer<QCPStatisticalBoxDataContainer> data);
5629 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);
5630 void setWidth(
double width);
5631 void setWhiskerWidth(
double width);
5632 void setWhiskerPen(
const QPen &pen);
5633 void setWhiskerBarPen(
const QPen &pen);
5634 void setWhiskerAntialiased(
bool enabled);
5635 void setMedianPen(
const QPen &pen);
5639 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);
5640 void addData(
double key,
double minimum,
double lowerQuartile,
double median,
double upperQuartile,
double maximum,
const QVector<double> &outliers=QVector<double>());
5670 friend class QCustomPlot;
5671 friend class QCPLegend;
5694 double data(
double key,
double value);
5695 double cell(
int keyIndex,
int valueIndex);
5696 unsigned char alpha(
int keyIndex,
int valueIndex);
5699 void setSize(
int keySize,
int valueSize);
5700 void setKeySize(
int keySize);
5701 void setValueSize(
int valueSize);
5703 void setKeyRange(
const QCPRange &keyRange);
5704 void setValueRange(
const QCPRange &valueRange);
5705 void setData(
double key,
double value,
double z);
5706 void setCell(
int keyIndex,
int valueIndex,
double z);
5707 void setAlpha(
int keyIndex,
int valueIndex,
unsigned char alpha);
5710 void recalculateDataBounds();
5713 void fill(
double z);
5714 void fillAlpha(
unsigned char alpha);
5716 void coordToCell(
double key,
double value,
int *keyIndex,
int *valueIndex)
const;
5717 void cellToCoord(
int keyIndex,
int valueIndex,
double *key,
double *value)
const;
5731 bool createAlpha(
bool initializeOpaque=
true);
5741 Q_PROPERTY(
QCPRange dataRange READ dataRange WRITE setDataRange NOTIFY dataRangeChanged)
5742 Q_PROPERTY(
QCPAxis::ScaleType dataScaleType READ dataScaleType WRITE setDataScaleType NOTIFY dataScaleTypeChanged)
5743 Q_PROPERTY(
QCPColorGradient gradient READ gradient WRITE setGradient NOTIFY gradientChanged)
5744 Q_PROPERTY(
bool interpolate READ interpolate WRITE setInterpolate)
5745 Q_PROPERTY(
bool tightBoundary READ tightBoundary WRITE setTightBoundary)
5746 Q_PROPERTY(
QCPColorScale* colorScale READ colorScale WRITE setColorScale)
5763 Q_SLOT
void setDataRange(
const QCPRange &dataRange);
5766 void setInterpolate(
bool enabled);
5767 void setTightBoundary(
bool enabled);
5771 void rescaleDataRange(
bool recalculateDataBounds=
false);
5772 Q_SLOT
void updateLegendIcon(Qt::TransformationMode transformMode=Qt::SmoothTransformation,
const QSize &thumbSize=QSize(32, 18));
5780 void dataRangeChanged(
const QCPRange &newRange);
5800 virtual void updateMapImage();
5806 friend class QCustomPlot;
5807 friend class QCPLegend;
5820 QCPFinancialData(
double key,
double open,
double high,
double low,
double close);
5831 double key,
open, high, low, close;
5851 Q_PROPERTY(
ChartStyle chartStyle READ chartStyle WRITE setChartStyle)
5852 Q_PROPERTY(
double width READ width WRITE setWidth)
5853 Q_PROPERTY(
WidthType widthType READ widthType WRITE setWidthType)
5854 Q_PROPERTY(
bool twoColored READ twoColored WRITE setTwoColored)
5855 Q_PROPERTY(QBrush brushPositive READ brushPositive WRITE setBrushPositive)
5856 Q_PROPERTY(QBrush brushNegative READ brushNegative WRITE setBrushNegative)
5857 Q_PROPERTY(QPen penPositive READ penPositive WRITE setPenPositive)
5858 Q_PROPERTY(QPen penNegative READ penNegative WRITE setPenNegative)
5898 void setData(QSharedPointer<QCPFinancialDataContainer> data);
5899 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);
5901 void setWidth(
double width);
5903 void setTwoColored(
bool twoColored);
5904 void setBrushPositive(
const QBrush &brush);
5905 void setBrushNegative(
const QBrush &brush);
5906 void setPenPositive(
const QPen &pen);
5907 void setPenNegative(
const QPen &pen);
5910 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);
5911 void addData(
double key,
double open,
double high,
double low,
double close);
5920 static QCPFinancialDataContainer timeSeriesToOhlc(
const QVector<double> &time,
const QVector<double> &value,
double timeBinSize,
double timeBinOffset = 0);
5938 double getPixelWidth(
double key,
double keyPixel)
const;
5944 friend class QCustomPlot;
5945 friend class QCPLegend;
5959 explicit QCPErrorBarsData(
double error);
5960 QCPErrorBarsData(
double errorMinus,
double errorPlus);
5988 Q_PROPERTY(QSharedPointer<QCPErrorBarsDataContainer> data READ data WRITE setData)
5989 Q_PROPERTY(QCPAbstractPlottable* dataPlottable READ dataPlottable WRITE setDataPlottable)
5990 Q_PROPERTY(
ErrorType errorType READ errorType WRITE setErrorType)
5991 Q_PROPERTY(
double whiskerWidth READ whiskerWidth WRITE setWhiskerWidth)
5992 Q_PROPERTY(
double symbolGap READ symbolGap WRITE setSymbolGap)
6017 void setData(QSharedPointer<QCPErrorBarsDataContainer> data);
6018 void setData(
const QVector<double> &error);
6019 void setData(
const QVector<double> &errorMinus,
const QVector<double> &errorPlus);
6020 void setDataPlottable(QCPAbstractPlottable* plottable);
6022 void setWhiskerWidth(
double pixels);
6023 void setSymbolGap(
double pixels);
6026 void addData(
const QVector<double> &error);
6027 void addData(
const QVector<double> &errorMinus,
const QVector<double> &errorPlus);
6028 void addData(
double error);
6029 void addData(
double errorMinus,
double errorPlus);
6062 void getErrorBarLines(QCPErrorBarsDataContainer::const_iterator it, QVector<QLineF> &backbones, QVector<QLineF> &whiskers) const;
6063 void getVisibleDataBounds(QCPErrorBarsDataContainer::const_iterator &begin, QCPErrorBarsDataContainer::const_iterator &end, const
QCPDataRange &rangeRestriction) const;
6064 double pointDistance(const QPointF &pixelPoint, QCPErrorBarsDataContainer::const_iterator &closestData) const;
6067 bool errorBarVisible(
int index) const;
6068 bool rectIntersectsLine(const QRectF &pixelRect, const QLineF &line) const;
6070 friend class QCustomPlot;
6071 friend class QCPLegend;
6084 Q_PROPERTY(QPen pen READ pen WRITE setPen)
6085 Q_PROPERTY(QPen selectedPen READ selectedPen WRITE setSelectedPen)
6096 void setPen(
const QPen &pen);
6097 void setSelectedPen(
const QPen &pen);
6113 QLineF getRectClippedStraightLine(
const QCPVector2D &point1,
const QCPVector2D &vec,
const QRect &rect)
const;
6114 QPen mainPen()
const;
6127 Q_PROPERTY(QPen pen READ pen WRITE setPen)
6128 Q_PROPERTY(QPen selectedPen READ selectedPen WRITE setSelectedPen)
6143 void setPen(
const QPen &pen);
6144 void setSelectedPen(
const QPen &pen);
6164 QPen mainPen()
const;
6177 Q_PROPERTY(QPen pen READ pen WRITE setPen)
6178 Q_PROPERTY(QPen selectedPen READ selectedPen WRITE setSelectedPen)
6193 void setPen(
const QPen &pen);
6194 void setSelectedPen(
const QPen &pen);
6215 QPen mainPen()
const;
6228 Q_PROPERTY(QPen pen READ pen WRITE setPen)
6229 Q_PROPERTY(QPen selectedPen READ selectedPen WRITE setSelectedPen)
6230 Q_PROPERTY(QBrush brush READ brush WRITE setBrush)
6231 Q_PROPERTY(QBrush selectedBrush READ selectedBrush WRITE setSelectedBrush)
6244 void setPen(
const QPen &pen);
6245 void setSelectedPen(
const QPen &pen);
6246 void setBrush(
const QBrush &brush);
6247 void setSelectedBrush(
const QBrush &brush);
6262 enum AnchorIndex {aiTop, aiTopRight, aiRight, aiBottom, aiBottomLeft, aiLeft};
6270 virtual QPointF anchorPixelPosition(
int anchorId)
const Q_DECL_OVERRIDE;
6273 QPen mainPen()
const;
6274 QBrush mainBrush()
const;
6287 Q_PROPERTY(QColor color READ color WRITE setColor)
6288 Q_PROPERTY(QColor selectedColor READ selectedColor WRITE setSelectedColor)
6289 Q_PROPERTY(QPen pen READ pen WRITE setPen)
6290 Q_PROPERTY(QPen selectedPen READ selectedPen WRITE setSelectedPen)
6291 Q_PROPERTY(QBrush brush READ brush WRITE setBrush)
6292 Q_PROPERTY(QBrush selectedBrush READ selectedBrush WRITE setSelectedBrush)
6293 Q_PROPERTY(QFont font READ font WRITE setFont)
6294 Q_PROPERTY(QFont selectedFont READ selectedFont WRITE setSelectedFont)
6295 Q_PROPERTY(QString text READ text WRITE setText)
6296 Q_PROPERTY(Qt::Alignment positionAlignment READ positionAlignment WRITE setPositionAlignment)
6297 Q_PROPERTY(Qt::Alignment textAlignment READ textAlignment WRITE setTextAlignment)
6298 Q_PROPERTY(
double rotation READ rotation WRITE setRotation)
6299 Q_PROPERTY(QMargins padding READ padding WRITE setPadding)
6312 QFont
font()
const {
return mFont; }
6314 QString
text()
const {
return mText; }
6321 void setColor(
const QColor &color);
6322 void setSelectedColor(
const QColor &color);
6323 void setPen(
const QPen &pen);
6324 void setSelectedPen(
const QPen &pen);
6325 void setBrush(
const QBrush &brush);
6326 void setSelectedBrush(
const QBrush &brush);
6327 void setFont(
const QFont &font);
6328 void setSelectedFont(
const QFont &font);
6329 void setText(
const QString &text);
6330 void setPositionAlignment(Qt::Alignment alignment);
6331 void setTextAlignment(Qt::Alignment alignment);
6332 void setRotation(
double degrees);
6333 void setPadding(
const QMargins &padding);
6349 enum AnchorIndex {aiTopLeft, aiTop, aiTopRight, aiRight, aiBottomRight, aiBottom, aiBottomLeft, aiLeft};
6364 virtual QPointF anchorPixelPosition(
int anchorId)
const Q_DECL_OVERRIDE;
6367 QPointF getTextDrawPoint(
const QPointF &pos,
const QRectF &rect, Qt::Alignment positionAlignment)
const;
6368 QFont mainFont()
const;
6369 QColor mainColor()
const;
6370 QPen mainPen()
const;
6371 QBrush mainBrush()
const;
6384 Q_PROPERTY(QPen pen READ pen WRITE setPen)
6385 Q_PROPERTY(QPen selectedPen READ selectedPen WRITE setSelectedPen)
6386 Q_PROPERTY(QBrush brush READ brush WRITE setBrush)
6387 Q_PROPERTY(QBrush selectedBrush READ selectedBrush WRITE setSelectedBrush)
6400 void setPen(
const QPen &pen);
6401 void setSelectedPen(
const QPen &pen);
6402 void setBrush(
const QBrush &brush);
6403 void setSelectedBrush(
const QBrush &brush);
6421 enum AnchorIndex {aiTopLeftRim, aiTop, aiTopRightRim, aiRight, aiBottomRightRim, aiBottom, aiBottomLeftRim, aiLeft, aiCenter};
6429 virtual QPointF anchorPixelPosition(
int anchorId)
const Q_DECL_OVERRIDE;
6432 QPen mainPen()
const;
6433 QBrush mainBrush()
const;
6446 Q_PROPERTY(QPixmap pixmap READ pixmap WRITE setPixmap)
6447 Q_PROPERTY(
bool scaled READ scaled WRITE setScaled)
6448 Q_PROPERTY(Qt::AspectRatioMode aspectRatioMode READ aspectRatioMode)
6449 Q_PROPERTY(Qt::TransformationMode transformationMode READ transformationMode)
6450 Q_PROPERTY(QPen pen READ pen WRITE setPen)
6451 Q_PROPERTY(QPen selectedPen READ selectedPen WRITE setSelectedPen)
6466 void setPixmap(
const QPixmap &pixmap);
6467 void setScaled(
bool scaled, Qt::AspectRatioMode aspectRatioMode=Qt::KeepAspectRatio, Qt::TransformationMode transformationMode=Qt::SmoothTransformation);
6468 void setPen(
const QPen &pen);
6469 void setSelectedPen(
const QPen &pen);
6484 enum AnchorIndex {aiTop, aiTopRight, aiRight, aiBottom, aiBottomLeft, aiLeft};
6497 virtual QPointF anchorPixelPosition(
int anchorId)
const Q_DECL_OVERRIDE;
6500 void updateScaledPixmap(QRect finalRect=QRect(),
bool flipHorz=
false,
bool flipVert=
false);
6501 QRect getFinalRect(
bool *flippedHorz=0,
bool *flippedVert=0)
const;
6502 QPen mainPen()
const;
6515 Q_PROPERTY(QPen pen READ pen WRITE setPen)
6516 Q_PROPERTY(QPen selectedPen READ selectedPen WRITE setSelectedPen)
6517 Q_PROPERTY(QBrush brush READ brush WRITE setBrush)
6518 Q_PROPERTY(QBrush selectedBrush READ selectedBrush WRITE setSelectedBrush)
6519 Q_PROPERTY(
double size READ size WRITE setSize)
6520 Q_PROPERTY(
TracerStyle style READ style WRITE setStyle)
6521 Q_PROPERTY(
QCPGraph* graph READ graph WRITE setGraph)
6522 Q_PROPERTY(
double graphKey READ graphKey WRITE setGraphKey)
6523 Q_PROPERTY(
bool interpolating READ interpolating WRITE setInterpolating)
6547 double size()
const {
return mSize; }
6554 void setPen(
const QPen &pen);
6555 void setSelectedPen(
const QPen &pen);
6556 void setBrush(
const QBrush &brush);
6557 void setSelectedBrush(
const QBrush &brush);
6558 void setSize(
double size);
6561 void setGraphKey(
double key);
6562 void setInterpolating(
bool enabled);
6568 void updatePosition();
6586 QPen mainPen()
const;
6587 QBrush mainBrush()
const;
6601 Q_PROPERTY(QPen pen READ pen WRITE setPen)
6602 Q_PROPERTY(QPen selectedPen READ selectedPen WRITE setSelectedPen)
6603 Q_PROPERTY(
double length READ length WRITE setLength)
6604 Q_PROPERTY(
BracketStyle style READ style WRITE setStyle)
6630 void setPen(
const QPen &pen);
6631 void setSelectedPen(
const QPen &pen);
6632 void setLength(
double length);
6651 virtual QPointF anchorPixelPosition(
int anchorId)
const Q_DECL_OVERRIDE;
6654 QPen mainPen()
const;
6661 #endif // QCUSTOMPLOT_H bool openGl() const
Definition: qcustomplot.hh:3640
double devicePixelRatio() const
Definition: qcustomplot.hh:524
QCPDataContainer< QCPCurveData > QCPCurveDataContainer
Definition: qcustomplot.hh:5290
QList< QList< QCPLayoutElement * > > mElements
Definition: qcustomplot.hh:1396
QCP::AntialiasedElements mNotAADragBackup
Definition: qcustomplot.hh:4676
double size() const
Definition: qcustomplot.hh:794
AxisType
Definition: qcustomplot.hh:1964
QCPLayoutGrid * plotLayout() const
Definition: qcustomplot.hh:3629
int mTextFlags
Definition: qcustomplot.hh:4980
QPen basePen() const
Definition: qcustomplot.hh:2028
A bracket for referencing/highlighting certain parts in the plot.
Definition: qcustomplot.hh:6597
QPen mSelectedPen
Definition: qcustomplot.hh:6208
QPen mSelectedPen
Definition: qcustomplot.hh:6265
QList< QSharedPointer< QCPAbstractPaintBuffer > > mPaintBuffers
Definition: qcustomplot.hh:3781
QCustomPlot * mParentPlot
Definition: qcustomplot.hh:1162
virtual QPointF dataPixelPosition(int index) const Q_DECL_OVERRIDE
Definition: qcustomplot.hh:4184
SizeConstraintRect sizeConstraintRect() const
Definition: qcustomplot.hh:1228
A margin group allows synchronization of margin sides if working with multiple layout elements...
Definition: qcustomplot.hh:1148
One individual data point can be selected at a time.
Definition: qcustomplot.hh:293
QList< QCPGraph * > mGraphs
Definition: qcustomplot.hh:3761
Holds the data of one single error bar for QCPErrorBars.
Definition: qcustomplot.hh:5955
QMargins padding() const
Definition: qcustomplot.hh:6318
bool operator==(const QCPRange &other) const
Definition: qcustomplot.hh:780
ScaleStrategy
Definition: qcustomplot.hh:1697
An arbitrary pixmap.
Definition: qcustomplot.hh:6442
0xFFFF All elements
Definition: qcustomplot.hh:225
QList< QCPLayoutElement * > elements(QCP::MarginSide side) const
Definition: qcustomplot.hh:1156
QPen mSelectedPen
Definition: qcustomplot.hh:6574
int bracketWidth() const
Definition: qcustomplot.hh:4538
double bufferDevicePixelRatio() const
Definition: qcustomplot.hh:3625
WidthType mWidthType
Definition: qcustomplot.hh:5926
LayerInsertMode
Definition: qcustomplot.hh:3603
static const double maxRange
Definition: qcustomplot.hh:809
bool isInvalidData(double value)
Definition: qcustomplot.hh:304
ErrorType errorType() const
Definition: qcustomplot.hh:6012
void clear()
Definition: qcustomplot.cpp:3744
const_iterator findBegin(double sortKey, bool expandedRange=true) const
Definition: qcustomplot.hh:2898
QSharedPointer< QCPDataContainer< DataType > > mDataContainer
Definition: qcustomplot.hh:3894
virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE=0
QCPColorGradient gradient() const
Definition: qcustomplot.hh:5060
const_iterator findEnd(double sortKey, bool expandedRange=true) const
Definition: qcustomplot.hh:2925
0x08 bottom margin
Definition: qcustomplot.hh:199
bool clipToAxisRect() const
Definition: qcustomplot.hh:3519
QPen selectedPen() const
Definition: qcustomplot.hh:6239
QPen whiskerBarPen() const
Definition: qcustomplot.hh:5622
QBrush brushNegative() const
Definition: qcustomplot.hh:5893
QCPItemPosition *const end
Definition: qcustomplot.hh:6204
QPen basePen
Definition: qcustomplot.hh:2232
QCPColorMapData * mMapData
Definition: qcustomplot.hh:5788
QFont mSelectedFont
Definition: qcustomplot.hh:4895
bool subGridVisible() const
Definition: qcustomplot.hh:1875
double mLength
Definition: qcustomplot.hh:6646
QCPLayout * mParentLayout
Definition: qcustomplot.hh:1255
virtual int calculateAutoMargin(QCP::MarginSide side) Q_DECL_OVERRIDE
Definition: qcustomplot.cpp:17719
QCPAxis * mParentAxis
Definition: qcustomplot.hh:1897
QCPDataContainer< QCPFinancialData > QCPFinancialDataContainer
Definition: qcustomplot.hh:5845
void drawLine(const QPointF &p1, const QPointF &p2)
Definition: qcustomplot.hh:491
The base class tick generator used by QCPAxis to create tick positions and tick labels.
Definition: qcustomplot.hh:1533
PainterModes modes() const
Definition: qcustomplot.hh:478
QCPRange dataRange() const
Definition: qcustomplot.hh:5058
QPoint toPoint() const
Definition: qcustomplot.hh:403
static QCPStatisticalBoxData fromSortKey(double sortKey)
Definition: qcustomplot.hh:5570
The abstract base class for paint buffers, which define the rendering backend.
Definition: qcustomplot.hh:515
bool mInterpolating
Definition: qcustomplot.hh:6580
QCPGrid * mGrid
Definition: qcustomplot.hh:2163
int padding() const
Definition: qcustomplot.hh:2035
QCP::AntialiasedElements antialiasedElements() const
Definition: qcustomplot.hh:3630
QCPDataSelection selection() const
Definition: qcustomplot.hh:3316
QColor textColor() const
Definition: qcustomplot.hh:4836
void set(const QCPDataContainer< DataType > &data)
Definition: qcustomplot.hh:2632
bool mIsEmpty
Definition: qcustomplot.hh:5723
QString text() const
Definition: qcustomplot.hh:4946
double mainValue() const
Definition: qcustomplot.hh:5451
Holds the data of one single data point for QCPCurve.
Definition: qcustomplot.hh:5260
QCPRange keyRange() const
Definition: qcustomplot.hh:5691
QList< QCPDataRange > dataRanges() const
Definition: qcustomplot.hh:952
QCPLineEnding tail() const
Definition: qcustomplot.hh:6190
bool mNumberBeautifulPowers
Definition: qcustomplot.hh:2149
QCPItemAnchor *const center
Definition: qcustomplot.hh:6418
A selection decorator which draws brackets around each selected data segment.
Definition: qcustomplot.hh:4513
QCPRange valueRange() const
Definition: qcustomplot.hh:5134
A legend item representing a plottable with an icon and the plottable name.
Definition: qcustomplot.hh:4772
QHash< QCP::MarginSide, QCPMarginGroup * > mMarginGroups
Definition: qcustomplot.hh:1261
BracketStyle
Definition: qcustomplot.hh:4524
ScaleType
Definition: qcustomplot.hh:1985
QBrush selectedBrush() const
Definition: qcustomplot.hh:6311
bool substituteExponent
Definition: qcustomplot.hh:2241
ErrorType
Definition: qcustomplot.hh:6002
QCPItemPosition *const start
Definition: qcustomplot.hh:6201
int numberPrecision() const
Definition: qcustomplot.hh:2020
QPen mSelectedPen
Definition: qcustomplot.hh:6107
bool tangentToData() const
Definition: qcustomplot.hh:4541
QFont font() const
Definition: qcustomplot.hh:4835
QByteArray mLabelParameterHash
Definition: qcustomplot.hh:2269
0x01 Mode for vectorized painting (e.g. PDF export). For example, this prevents some antialiasing fix...
Definition: qcustomplot.hh:465
QBrush mSelectedBrush
Definition: qcustomplot.hh:6575
void setY(double y)
Definition: qcustomplot.hh:398
string name
Definition: hand_orientation/resize_script.py:6
QBrush mBackgroundBrush
Definition: qcustomplot.hh:4663
QCPAbstractPlottable * plottable()
Definition: qcustomplot.hh:4779
bool contains(double value) const
Definition: qcustomplot.hh:804
bool periodic() const
Definition: qcustomplot.hh:4472
double upperQuartile
Definition: qcustomplot.hh:5584
PainterMode
Definition: qcustomplot.hh:464
bool scaled() const
Definition: qcustomplot.hh:6459
PositionType typeX() const
Definition: qcustomplot.hh:3461
ChartStyle
Definition: qcustomplot.hh:5878
QBrush mBrush
Definition: qcustomplot.hh:2377
SelectionType
Definition: qcustomplot.hh:291
QRect viewportRect
Definition: qcustomplot.hh:2247
virtual void wheelEvent(QWheelEvent *event)
Definition: qcustomplot.cpp:1799
Controls how a plottable's data selection is drawn.
Definition: qcustomplot.hh:3240
QString text() const
Definition: qcustomplot.hh:6314
int end() const
Definition: qcustomplot.hh:901
int bottom() const
Definition: qcustomplot.hh:4647
bool isActive() const
Definition: qcustomplot.hh:1106
QColor textColor() const
Definition: qcustomplot.hh:4949
bool isEmpty() const
Definition: qcustomplot.hh:5410
QCPItemPosition *const topLeft
Definition: qcustomplot.hh:6252
SelectableParts mSelectedParts
Definition: qcustomplot.hh:2133
bool operator!=(const QCPDataRange &other) const
Definition: qcustomplot.hh:897
QPen selectedBorderPen() const
Definition: qcustomplot.hh:4842
The abstract base class for all entries in a QCPLegend.
Definition: qcustomplot.hh:4708
virtual int findEnd(double sortKey, bool expandedRange=true) const Q_DECL_OVERRIDE
Definition: qcustomplot.hh:4272
QCPItemAnchor *const topRight
Definition: qcustomplot.hh:6341
bool twoColored() const
Definition: qcustomplot.hh:5891
QCPDataContainer()
Definition: qcustomplot.hh:2599
bool mAntialiasedZeroLine
Definition: qcustomplot.hh:1893
double graphKey() const
Definition: qcustomplot.hh:6550
double mainKey() const
Definition: qcustomplot.hh:5450
void setAutoSqueeze(bool enabled)
Definition: qcustomplot.hh:2615
QColor mSelectedTextColor
Definition: qcustomplot.hh:4984
double dot(const QCPVector2D &vec) const
Definition: qcustomplot.hh:410
QCPAxisRect * mAxisRect
Definition: qcustomplot.hh:2129
0x0001 Axis base line and tick marks
Definition: qcustomplot.hh:214
int size() const
Definition: qcustomplot.hh:2413
QCPAxis::AxisType mType
Definition: qcustomplot.hh:5090
QPainterPath customPath() const
Definition: qcustomplot.hh:2353
void simplify()
Definition: qcustomplot.cpp:2568
bool mActive
Definition: qcustomplot.hh:1127
QCP::SelectionType selectable() const
Definition: qcustomplot.hh:3314
0x0008 Legend box
Definition: qcustomplot.hh:217
Responsible for drawing the grid of a QCPAxis.
Definition: qcustomplot.hh:1860
Qt::Alignment positionAlignment() const
Definition: qcustomplot.hh:6315
int mValueSize
Definition: qcustomplot.hh:5721
0x001 Axis ranges are draggable (see QCPAxisRect::setRangeDrag, QCPAxisRect::setRangeDragAxes) ...
Definition: qcustomplot.hh:251
QCPItemAnchor * parentAnchor() const
Definition: qcustomplot.hh:3463
EndingStyle
Definition: qcustomplot.hh:1484
0x00 no margin
Definition: qcustomplot.hh:201
bool mWhiskerAntialiased
Definition: qcustomplot.hh:5653
QVector< QString > tickLabels
Definition: qcustomplot.hh:2254
QPen tickPen
Definition: qcustomplot.hh:2244
Qt::AspectRatioMode backgroundScaledMode() const
Definition: qcustomplot.hh:3628
virtual QCP::Interaction selectionCategory() const Q_DECL_OVERRIDE
Definition: qcustomplot.cpp:11166
QSize maximumSize() const
Definition: qcustomplot.hh:1227
int mIconTextPadding
Definition: qcustomplot.hh:4891
QCPDataRange dataRange() const
Definition: qcustomplot.hh:2443
QCPLayer * mLayer
Definition: qcustomplot.hh:733
bool visible() const
Definition: qcustomplot.hh:707
const QCPRange range() const
Definition: qcustomplot.hh:2009
QFont mSelectedFont
Definition: qcustomplot.hh:4752
Specialized axis ticker which allows arbitrary labels at specified coordinates.
Definition: qcustomplot.hh:1729
QCPColorGradient mGradient
Definition: qcustomplot.hh:5093
0x04 top margin
Definition: qcustomplot.hh:198
Defines an abstract interface for one-dimensional plottables.
Definition: qcustomplot.hh:3850
bool mInvalidated
Definition: qcustomplot.hh:543
QFont font() const
Definition: qcustomplot.hh:4948
ErrorType mErrorType
Definition: qcustomplot.hh:6051
QSharedPointer< QCPStatisticalBoxDataContainer > data() const
Definition: qcustomplot.hh:5618
int mBarWidth
Definition: qcustomplot.hh:5094
The selection rect is disabled, and all mouse events are forwarded to the underlying objects...
Definition: qcustomplot.hh:267
QCPColorMapData * data() const
Definition: qcustomplot.hh:5753
bool noAntialiasingOnDrag() const
Definition: qcustomplot.hh:3635
QRect axisSelectionBox() const
Definition: qcustomplot.hh:2226
const_iterator constEnd() const
Definition: qcustomplot.hh:2435
Provides rect/rubber-band data selection and range zoom interaction.
Definition: qcustomplot.hh:1094
void setBegin(int begin)
Definition: qcustomplot.hh:906
QColor color() const
Definition: qcustomplot.hh:6306
QList< QCPItemPosition * > mPositions
Definition: qcustomplot.hh:3548
QList< QCPDataRange > mDataRanges
Definition: qcustomplot.hh:968
QCP::PlottingHints plottingHints() const
Definition: qcustomplot.hh:3636
QCustomPlot * mParentPlot
Definition: qcustomplot.hh:3413
QCPLayer * layer() const
Definition: qcustomplot.hh:710
QColor labelColor() const
Definition: qcustomplot.hh:2032
bool mClipToAxisRect
Definition: qcustomplot.hh:3546
An anchor of an item to which positions can be attached to.
Definition: qcustomplot.hh:3397
ScaleStrategy mScaleStrategy
Definition: qcustomplot.hh:1716
Qt::Orientations mRangeZoom
Definition: qcustomplot.hh:4669
QBrush mSelectedBrush
Definition: qcustomplot.hh:4894
int mBracketWidth
Definition: qcustomplot.hh:4563
void applyDefaultAntialiasingHint(QCPPainter *painter) const Q_DECL_OVERRIDE
Definition: qcustomplot.cpp:11186
QCPItemAnchor *const bottomLeftRim
Definition: qcustomplot.hh:6416
int mSelectionTolerance
Definition: qcustomplot.hh:3766
QBrush brush() const
Definition: qcustomplot.hh:1105
QHash< QCP::MarginSide, QCPMarginGroup * > marginGroups() const
Definition: qcustomplot.hh:1230
QCPScatterStyle mScatterStyle
Definition: qcustomplot.hh:3272
QBrush selectedBrush() const
Definition: qcustomplot.hh:6546
QCPAxis * keyAxis() const
Definition: qcustomplot.hh:3469
double & ry()
Definition: qcustomplot.hh:394
double width() const
Definition: qcustomplot.hh:5619
SelectionRectMode
Definition: qcustomplot.hh:267
0x0004 Sub grid lines
Definition: qcustomplot.hh:216
QCache< QString, CachedLabel > mLabelCache
Definition: qcustomplot.hh:2270
QString dateTimeFormat() const
Definition: qcustomplot.hh:1600
QCPItemPosition *const right
Definition: qcustomplot.hh:6639
QCP::MarginSides autoMargins() const
Definition: qcustomplot.hh:1225
QVector< double > subTickPositions
Definition: qcustomplot.hh:2252
QCPRange valueRange() const
Definition: qcustomplot.hh:5453
QCPLineEnding mTail
Definition: qcustomplot.hh:6209
int mRowSpacing
Definition: qcustomplot.hh:1399
0x0002 Grid lines
Definition: qcustomplot.hh:215
const_iterator constBegin() const
Definition: qcustomplot.hh:2434
QBrush mBrush
Definition: qcustomplot.hh:3271
QCPLineEnding head() const
Definition: qcustomplot.hh:6189
0x01 left margin
Definition: qcustomplot.hh:196
QCPRange & operator*=(const double &value)
Definition: qcustomplot.hh:785
QRect mRect
Definition: qcustomplot.hh:1258
virtual QCPItemPosition * toQCPItemPosition() Q_DECL_OVERRIDE
Definition: qcustomplot.hh:3496
int rowSpacing() const
Definition: qcustomplot.hh:1358
Base class for all drawable objects.
Definition: qcustomplot.hh:692
static bool sortKeyIsMainKey()
Definition: qcustomplot.hh:5824
TracerStyle
Definition: qcustomplot.hh:6531
QBrush mBrush
Definition: qcustomplot.hh:4887
QPixmap mBackgroundPixmap
Definition: qcustomplot.hh:3769
double logBase() const
Definition: qcustomplot.hh:1833
double sortKey() const
Definition: qcustomplot.hh:5446
QPen selectedBasePen() const
Definition: qcustomplot.hh:2043
QSharedPointer< QCPAxisTicker > ticker() const
Definition: qcustomplot.hh:2011
QCPRange valueRange() const
Definition: qcustomplot.hh:5576
bool mGradientImageInvalidated
Definition: qcustomplot.hh:5022
Specialized axis ticker suited for logarithmic axes.
Definition: qcustomplot.hh:1827
QCPAxis::ScaleType dataScaleType() const
Definition: qcustomplot.hh:5059
QBrush brushPositive() const
Definition: qcustomplot.hh:5892
double mX
Definition: qcustomplot.hh:422
A plottable representing a bar chart in a plot.
Definition: qcustomplot.hh:5471
const QCP::Interactions interactions() const
Definition: qcustomplot.hh:3633
virtual QCPPlottableInterface1D * interface1D()
Definition: qcustomplot.hh:3333
QFont mFont
Definition: qcustomplot.hh:4888
QPen subTickPen() const
Definition: qcustomplot.hh:2030
QFont font() const
Definition: qcustomplot.hh:6312
QCPRange & operator+=(const double &value)
Definition: qcustomplot.hh:783
QVector< double > mTickVector
Definition: qcustomplot.hh:2166
AnchorIndex
Definition: qcustomplot.hh:6349
0x080 All other objects are selectable (e.g. your own derived layerables, other layout elements...
Definition: qcustomplot.hh:258
double mStackingGap
Definition: qcustomplot.hh:5537
QPen mSelectedPen
Definition: qcustomplot.hh:6424
A curved line from one point to another.
Definition: qcustomplot.hh:6173
SpacingType mSpacingType
Definition: qcustomplot.hh:5420
0x0080 Scatter symbols of plottables (excluding scatter symbols of type ssPixmap) ...
Definition: qcustomplot.hh:221
double mSymbolGap
Definition: qcustomplot.hh:6053
bool operator!=(const QCPRange &other) const
Definition: qcustomplot.hh:781
QFont selectedTickLabelFont() const
Definition: qcustomplot.hh:2039
QSize mIconSize
Definition: qcustomplot.hh:4890
QPen mSubTickPen
Definition: qcustomplot.hh:2156
virtual void mouseMoveEvent(QMouseEvent *event, const QPointF &startPos)
Definition: qcustomplot.cpp:1726
int valueSize() const
Definition: qcustomplot.hh:5690
bool invalidated() const
Definition: qcustomplot.hh:523
QColor mSelectedTextColor
Definition: qcustomplot.hh:4753
QPen selectedPen() const
Definition: qcustomplot.hh:6544
bool mScaledPixmapInvalidated
Definition: qcustomplot.hh:6490
TickStepStrategy
Definition: qcustomplot.hh:1542
double mWidth
Definition: qcustomplot.hh:5925
double value
Definition: qcustomplot.hh:5275
virtual void deselectEvent(bool *selectionStateChanged) Q_DECL_OVERRIDE
Definition: qcustomplot.cpp:11255
QPen pen() const
Definition: qcustomplot.hh:6187
QPointer< QCPBars > mBarBelow
Definition: qcustomplot.hh:5538
QPixmap mScaledPixmap
Definition: qcustomplot.hh:6488
QCustomPlot * mParentPlot
Definition: qcustomplot.hh:5419
QList< QCPLayerable * > children() const
Definition: qcustomplot.hh:655
double spacing() const
Definition: qcustomplot.hh:5400
QRect mTextBoundingRect
Definition: qcustomplot.hh:4985
bool interpolate() const
Definition: qcustomplot.hh:5756
QCPScatterStyle mScatterStyle
Definition: qcustomplot.hh:5341
QPen mIconBorderPen
Definition: qcustomplot.hh:4886
virtual QCPRange dataValueRange(int index) const Q_DECL_OVERRIDE
Definition: qcustomplot.hh:4168
TracerStyle mStyle
Definition: qcustomplot.hh:6577
0x02 Mode for all sorts of exports (e.g. PNG, PDF,...). For example, this prevents using cached pixma...
Definition: qcustomplot.hh:466
QSize mMinimumSize
Definition: qcustomplot.hh:1256
A layout that arranges child elements in a grid.
Definition: qcustomplot.hh:1322
int tangentAverage() const
Definition: qcustomplot.hh:4542
QVector< DataType >::iterator iterator
Definition: qcustomplot.hh:2408
QPen mPen
Definition: qcustomplot.hh:1124
int pixelOrientation() const
Definition: qcustomplot.hh:2101
int levelCount() const
Definition: qcustomplot.hh:4469
QPen mWhiskerPen
Definition: qcustomplot.hh:5652
QCPRange valueRange() const
Definition: qcustomplot.hh:5829
QMargins margins() const
Definition: qcustomplot.hh:1223
QPointer< QCPAbstractPlottable > mDataPlottable
Definition: qcustomplot.hh:6050
double mainValue() const
Definition: qcustomplot.hh:5132
double mBufferDevicePixelRatio
Definition: qcustomplot.hh:3757
QPoint bottomLeft() const
Definition: qcustomplot.hh:4653
QCPScatterStyle mOutlierStyle
Definition: qcustomplot.hh:5655
double mSpacing
Definition: qcustomplot.hh:5421
Multiple contiguous data points (a data range) can be selected.
Definition: qcustomplot.hh:294
QList< QCPLayer * > mLayers
Definition: qcustomplot.hh:3763
QBrush brush() const
Definition: qcustomplot.hh:4834
bool numberMultiplyCross
Definition: qcustomplot.hh:2242
int mSubTickCount
Definition: qcustomplot.hh:1752
QCP::AntialiasedElements mNotAntialiasedElements
Definition: qcustomplot.hh:3764
TimeUnit mSmallestUnit
Definition: qcustomplot.hh:1668
double mTickOrigin
Definition: qcustomplot.hh:1569
QCPItemAnchor *const bottom
Definition: qcustomplot.hh:6344
virtual QCPPlottableInterface1D * interface1D() Q_DECL_OVERRIDE
Definition: qcustomplot.hh:3890
bool mDragging
Definition: qcustomplot.hh:2171
QRect rect() const
Definition: qcustomplot.hh:1102
double y() const
Definition: qcustomplot.hh:392
0x0040 Main lines of items
Definition: qcustomplot.hh:220
QImage mUndersampledMapImage
Definition: qcustomplot.hh:5795
Represents two doubles as a mathematical 2D vector.
Definition: qcustomplot.hh:382
QCPVector2D perpendicular() const
Definition: qcustomplot.hh:409
Holds the data of one single data point for QCPGraph.
Definition: qcustomplot.hh:5121
bool mMouseHasMoved
Definition: qcustomplot.hh:3783
double value() const
Definition: qcustomplot.hh:3467
QCP::MarginSides mAutoMargins
Definition: qcustomplot.hh:1260
The abstract base class for all data representing objects in a plot.
Definition: qcustomplot.hh:3287
ScatterShape
Definition: qcustomplot.hh:2318
QColor textColor() const
Definition: qcustomplot.hh:4726
FractionStyle mFractionStyle
Definition: qcustomplot.hh:1802
QFont mFont
Definition: qcustomplot.hh:4981
EndingStyle mStyle
Definition: qcustomplot.hh:1520
QCPScatterStyle outlierStyle() const
Definition: qcustomplot.hh:5625
QVector< QString > tickVectorLabels() const
Definition: qcustomplot.hh:2022
bool mPenDefined
Definition: qcustomplot.hh:2382
A plottable representing a single statistical box in a plot.
Definition: qcustomplot.hh:5602
LayerMode
Definition: qcustomplot.hh:643
QColor tickLabelColor() const
Definition: qcustomplot.hh:2016
int mSubTickCount
Definition: qcustomplot.hh:1843
Qt::Alignment textAlignment() const
Definition: qcustomplot.hh:6316
QPen medianPen() const
Definition: qcustomplot.hh:5624
QPointF coords() const
Definition: qcustomplot.hh:3468
bool autoAddPlottableToLegend() const
Definition: qcustomplot.hh:3632
BracketStyle bracketStyle() const
Definition: qcustomplot.hh:4540
ExportPen
Definition: qcustomplot.hh:175
QCPItemAnchor *const left
Definition: qcustomplot.hh:6417
QPointer< QCPAxis > mValueAxis
Definition: qcustomplot.hh:3361
double mGraphKey
Definition: qcustomplot.hh:6579
DateStrategy
Definition: qcustomplot.hh:1620
double mWhiskerWidth
Definition: qcustomplot.hh:6052
bool subTicks() const
Definition: qcustomplot.hh:2025
QList< QCPBars * > bars() const
Definition: qcustomplot.hh:5407
QList< QPointer< QCPAxis > > mRangeDragVertAxis
Definition: qcustomplot.hh:4670
QCPDataRange adjusted(int changeBegin, int changeEnd) const
Definition: qcustomplot.hh:915
QPen selectedTickPen() const
Definition: qcustomplot.hh:2044
QPointer< QCPAxis > mColorAxis
Definition: qcustomplot.hh:5098
0x008 Plottables are selectable (e.g. graphs, curves, bars,... see QCPAbstractPlottable) ...
Definition: qcustomplot.hh:254
QString label
Definition: qcustomplot.hh:2237
Q_SLOT void setSelectable(QCP::SelectionType selectable)
Definition: qcustomplot.cpp:10876
QCPItemAnchor * parentAnchorY() const
Definition: qcustomplot.hh:3465
virtual int dataCount() const Q_DECL_OVERRIDE
Definition: qcustomplot.hh:4111
double mainKey() const
Definition: qcustomplot.hh:5826
double mSize
Definition: qcustomplot.hh:2374
Definition: qcustomplot.hh:236
QColor selectedColor() const
Definition: qcustomplot.hh:6307
QCPItemPosition *const endDir
Definition: qcustomplot.hh:6203
Definition: qcustomplot.hh:2257
SpacingType
Definition: qcustomplot.hh:5389
Definition: qcustomplot.hh:5014
bool antialiasedSubGrid() const
Definition: qcustomplot.hh:1876
Definition: qcustomplot.hh:2262
double errorPlus
Definition: qcustomplot.hh:5962
virtual double dataMainValue(int index) const Q_DECL_OVERRIDE
Definition: qcustomplot.hh:4152
SignDomain
Definition: qcustomplot.hh:186
QCPItemPosition *const bottomRight
Definition: qcustomplot.hh:6409
QColor selectedTextColor() const
Definition: qcustomplot.hh:4846
double width() const
Definition: qcustomplot.hh:1502
bool mInterpolate
Definition: qcustomplot.hh:5790
QCPColorGradient mGradient
Definition: qcustomplot.hh:5789
bool antialiasedFill() const
Definition: qcustomplot.hh:3308
QList< QPointer< QCPAxis > > mRangeZoomVertAxis
Definition: qcustomplot.hh:4671
Qt::AspectRatioMode aspectRatioMode() const
Definition: qcustomplot.hh:6460
double sortKey() const
Definition: qcustomplot.hh:5822
QColor mTextColor
Definition: qcustomplot.hh:4982
QCustomPlot * mParentPlot
Definition: qcustomplot.hh:668
bool periodicity() const
Definition: qcustomplot.hh:1788
QString mTimeFormat
Definition: qcustomplot.hh:1664
int tickCount() const
Definition: qcustomplot.hh:1554
QCPColorScale * colorScale() const
Definition: qcustomplot.hh:5759
bool mVisible
Definition: qcustomplot.hh:730
A plottable representing a graph in a plot.
Definition: qcustomplot.hh:5152
QCPAbstractPlottable * mPlottable
Definition: qcustomplot.hh:3275
double mY
Definition: qcustomplot.hh:422
QCPItemPosition *const start
Definition: qcustomplot.hh:6151
const QCPVector2D operator+(const QCPVector2D &vec1, const QCPVector2D &vec2)
Definition: qcustomplot.hh:436
int iconTextPadding() const
Definition: qcustomplot.hh:4838
The abstract base class for all items in a plot.
Definition: qcustomplot.hh:3505
QList< QRectF > mInsetRect
Definition: qcustomplot.hh:1456
QString name() const
Definition: qcustomplot.hh:653
QCPLayoutInset * mInsetLayout
Definition: qcustomplot.hh:4668
double length() const
Definition: qcustomplot.hh:6626
0x004 axis (tick) labels will be cached as pixmaps, increasing replot performance.
Definition: qcustomplot.hh:240
QRect tickLabelsSelectionBox() const
Definition: qcustomplot.hh:2227
Item that sticks to QCPGraph data points.
Definition: qcustomplot.hh:6511
static QCPFinancialData fromSortKey(double sortKey)
Definition: qcustomplot.hh:5823
double whiskerWidth() const
Definition: qcustomplot.hh:6013
A layout element displaying a text.
Definition: qcustomplot.hh:4926
int mAnchorId
Definition: qcustomplot.hh:3415
QCPLegend * mParentLegend
Definition: qcustomplot.hh:4749
virtual QCPRange getValueRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange()) const =0
QBrush brush() const
Definition: qcustomplot.hh:6545
QRect mTickLabelsSelectionBox
Definition: qcustomplot.hh:2271
QFont mSelectedLabelFont
Definition: qcustomplot.hh:2139
QCPItemAnchor *const right
Definition: qcustomplot.hh:6256
bool mNoAntialiasingOnDrag
Definition: qcustomplot.hh:3767
The central class of the library. This is the QWidget which displays the plot and interacts with the ...
Definition: qcustomplot.hh:3582
int size() const
Definition: qcustomplot.hh:5409
LabelSide
Definition: qcustomplot.hh:1977
0x040 Items are selectable (Rectangles, Arrows, Textitems, etc. see QCPAbstractItem) ...
Definition: qcustomplot.hh:257
int mScatterSkip
Definition: qcustomplot.hh:5342
int columnSpacing() const
Definition: qcustomplot.hh:1357
bool backgroundScaled() const
Definition: qcustomplot.hh:4599
virtual int findBegin(double sortKey, bool expandedRange=true) const Q_DECL_OVERRIDE
Definition: qcustomplot.hh:4263
bool selectable() const
Definition: qcustomplot.hh:3521
int mPreallocSize
Definition: qcustomplot.hh:2452
TickStepStrategy mTickStepStrategy
Definition: qcustomplot.hh:1567
Manages a single axis inside a QCustomPlot.
Definition: qcustomplot.hh:1911
QCPLineEnding tail() const
Definition: qcustomplot.hh:6140
bool isEmpty() const
Definition: qcustomplot.hh:958
QList< QCPItemAnchor * > anchors() const
Definition: qcustomplot.hh:3535
QCPAxis::AxisType type() const
Definition: qcustomplot.hh:5057
bool mSubTicks
Definition: qcustomplot.hh:2153
QCPBarsGroup * barsGroup() const
Definition: qcustomplot.hh:5502
double * mData
Definition: qcustomplot.hh:5726
bool isPenDefined() const
Definition: qcustomplot.hh:2366
virtual QCPPlottableInterface1D * interface1D() Q_DECL_OVERRIDE
Definition: qcustomplot.hh:6045
void drawLine(const QLineF &line)
Definition: qcustomplot.cpp:360
QBrush brush() const
Definition: qcustomplot.hh:2351
QCPScatterStyle scatterStyle() const
Definition: qcustomplot.hh:5184
bool mIsAntialiasing
Definition: qcustomplot.hh:501
double tickOrigin() const
Definition: qcustomplot.hh:1555
static QCPBarsData fromSortKey(double sortKey)
Definition: qcustomplot.hh:5447
QHash< TimeUnit, QString > mFormatPattern
Definition: qcustomplot.hh:1669
QCPItemAnchor *const topRight
Definition: qcustomplot.hh:6477
QCPColorScale * mParentColorScale
Definition: qcustomplot.hh:5020
double rotation() const
Definition: qcustomplot.hh:6317
QCPItemAnchor *const topLeftRim
Definition: qcustomplot.hh:6410
QFont tickLabelFont
Definition: qcustomplot.hh:2245
QPen pen() const
Definition: qcustomplot.hh:6137
QCPDataContainer< QCPGraphData > QCPGraphDataContainer
Definition: qcustomplot.hh:5150
Represents the visual appearance of scatter points.
Definition: qcustomplot.hh:2288
int index() const
Definition: qcustomplot.hh:654
bool isEmpty() const
Definition: qcustomplot.hh:911
double mainKey() const
Definition: qcustomplot.hh:5131
Manages a legend inside a QCustomPlot.
Definition: qcustomplot.hh:4796
QList< QCPItemPosition * > positions() const
Definition: qcustomplot.hh:3534
QList< QCPLayerable * > mChildren
Definition: qcustomplot.hh:671
QSet< QCPItemPosition * > mChildrenY
Definition: qcustomplot.hh:3416
QSharedPointer< QCPGraphDataContainer > data() const
Definition: qcustomplot.hh:5182
QCPRange mDataRange
Definition: qcustomplot.hh:5786
LayerMode mMode
Definition: qcustomplot.hh:673
Q_DECLARE_TYPEINFO(QCPVector2D, Q_MOVABLE_TYPE)
PositionType mPositionTypeY
Definition: qcustomplot.hh:3489
QCPLayerable * parentLayerable() const
Definition: qcustomplot.hh:709
int mBracketHeight
Definition: qcustomplot.hh:4564
QPointer< QCPColorScaleAxisRectPrivate > mAxisRect
Definition: qcustomplot.hh:5097
QString suffixPart
Definition: qcustomplot.hh:2264
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE
Definition: qcustomplot.hh:4285
QCPSelectionRect * mSelectionRect
Definition: qcustomplot.hh:3777
Cosmetic pens are converted to pens with pixel width 1 when exporting.
Definition: qcustomplot.hh:175
AnchorIndex
Definition: qcustomplot.hh:6421
int columnCount() const
Definition: qcustomplot.hh:1354
QPen selectedPen() const
Definition: qcustomplot.hh:6625
#define Q_DECL_OVERRIDE
Definition: qcustomplot.hh:129
Qt::AspectRatioMode mBackgroundScaledMode
Definition: qcustomplot.hh:4667
When dragging the mouse, a selection rect becomes active. Upon releasing, the axes that are currently...
Definition: qcustomplot.hh:268
int tickLengthOut
Definition: qcustomplot.hh:2243
bool abbreviateDecimalPowers
Definition: qcustomplot.hh:2249
0x0100 Borders of fills (e.g. under or between graphs)
Definition: qcustomplot.hh:222
0x004 The user can select multiple objects by holding the modifier set by QCustomPlot::setMultiSelect...
Definition: qcustomplot.hh:253
QList< double > rowStretchFactors() const
Definition: qcustomplot.hh:1356
QCPItemAnchor *const bottomRight
Definition: qcustomplot.hh:6343
QCPItemAnchor *const bottomLeft
Definition: qcustomplot.hh:6480
virtual void update(UpdatePhase phase) Q_DECL_OVERRIDE
Definition: qcustomplot.cpp:17218
QPointer< QCPAxis > mValueAxis
Definition: qcustomplot.hh:3490
int begin() const
Definition: qcustomplot.hh:900
virtual QCPRange getKeyRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth) const =0
The plottable is not selectable.
Definition: qcustomplot.hh:291
QCPRange valueRange() const
Definition: qcustomplot.hh:5692
bool mOpenGl
Definition: qcustomplot.hh:3778
QPixmap mPixmap
Definition: qcustomplot.hh:2378
QVector< double > mSubTickVector
Definition: qcustomplot.hh:2168
QPen tickPen() const
Definition: qcustomplot.hh:2029
QList< QCPBars * > mBars
Definition: qcustomplot.hh:5422
bool isEmpty() const
Definition: qcustomplot.hh:5715
QCPDataRange dataRange(int index=0) const
Definition: qcustomplot.cpp:2512
QPen pen() const
Definition: qcustomplot.hh:6308
LayerMode mode() const
Definition: qcustomplot.hh:657
QPointer< QCPLayerable > mMouseEventLayerable
Definition: qcustomplot.hh:3784
int textFlags() const
Definition: qcustomplot.hh:4947
double width() const
Definition: qcustomplot.hh:5889
int height() const
Definition: qcustomplot.hh:4649
int dataRangeCount() const
Definition: qcustomplot.hh:949
ScatterProperty
Definition: qcustomplot.hh:2300
QCPItemAnchor *const topRightRim
Definition: qcustomplot.hh:6412
A layer that may contain objects, to control the rendering order.
Definition: qcustomplot.hh:623
bool mTickLabels
Definition: qcustomplot.hh:2143
Qt::Orientation orientation() const
Definition: qcustomplot.hh:2100
QString label() const
Definition: qcustomplot.hh:2033
A rectangle.
Definition: qcustomplot.hh:6224
void setEnd(int end)
Definition: qcustomplot.hh:907
QCPItemPosition *const position
Definition: qcustomplot.hh:6570
bool mPeriodic
Definition: qcustomplot.hh:4494
Selection behaves like stMultipleDataRanges, but if there are any data points selected, the entire plottable is drawn as selected.
Definition: qcustomplot.hh:292
bool interpolating() const
Definition: qcustomplot.hh:6551
QSize size() const
Definition: qcustomplot.hh:522
LineStyle mLineStyle
Definition: qcustomplot.hh:5343
double mainKey() const
Definition: qcustomplot.hh:5573
The abstract base class for all objects that form the layout system.
Definition: qcustomplot.hh:1179
QFont labelFont
Definition: qcustomplot.hh:2235
QFont mSelectedFont
Definition: qcustomplot.hh:4983
PlottingHint
Definition: qcustomplot.hh:235
QPen pen() const
Definition: qcustomplot.hh:1104
AnchorIndex
Definition: qcustomplot.hh:6644
QCPRange mValueRange
Definition: qcustomplot.hh:5722
bool isEmpty() const
Definition: qcustomplot.hh:2414
static bool lessThanDataRangeBegin(const QCPDataRange &a, const QCPDataRange &b)
Definition: qcustomplot.hh:970
QCP::AntialiasedElements mNotAADragBackup
Definition: qcustomplot.hh:2173
QVector< DataType > mData
Definition: qcustomplot.hh:2451
QCPAxis * keyAxis() const
Definition: qcustomplot.hh:3312
QString mName
Definition: qcustomplot.hh:669
QBrush brush() const
Definition: qcustomplot.hh:6310
bool selected() const
Definition: qcustomplot.hh:4953
QList< InsetPlacement > mInsetPlacement
Definition: qcustomplot.hh:1454
QPen selectedPen() const
Definition: qcustomplot.hh:6138
QCPColorGradient gradient() const
Definition: qcustomplot.hh:5758
int keySize() const
Definition: qcustomplot.hh:5689
void setPen(const QPen &pen)
Definition: qcustomplot.cpp:10759
QCPLineEnding upperEnding
Definition: qcustomplot.hh:2233
int mLevelCount
Definition: qcustomplot.hh:4491
QMap< double, QString > & ticks()
Definition: qcustomplot.hh:1735
QString mLabel
Definition: qcustomplot.hh:2138
FillOrder mFillOrder
Definition: qcustomplot.hh:1401
virtual void wheelEvent(QWheelEvent *event) Q_DECL_OVERRIDE
Definition: qcustomplot.cpp:17888
Qt::AspectRatioMode mAspectRatioMode
Definition: qcustomplot.hh:6491
Cosmetic pens are exported normally (e.g. in PDF exports, cosmetic pens always appear as 1 pixel on s...
Definition: qcustomplot.hh:176
bool selected() const
Definition: qcustomplot.hh:3315
static QCPCurveData fromSortKey(double sortKey)
Definition: qcustomplot.hh:5267
QBrush mSelectedBrush
Definition: qcustomplot.hh:6354
QPen selectedIconBorderPen() const
Definition: qcustomplot.hh:4843
bool operator!=(const QCPDataSelection &other) const
Definition: qcustomplot.hh:934
QPixmap pixmap
Definition: qcustomplot.hh:2260
Describes a data set by holding multiple QCPDataRange instances.
Definition: qcustomplot.hh:927
QCPItemAnchor * parentAnchorX() const
Definition: qcustomplot.hh:3464
double mRotation
Definition: qcustomplot.hh:6359
Definition: qcustomplot.hh:1620
QCPLayer * mCurrentLayer
Definition: qcustomplot.hh:3773
virtual void donePainting()
Definition: qcustomplot.hh:533
QPainterPath mCustomPath
Definition: qcustomplot.hh:2379
WidthType mWidthType
Definition: qcustomplot.hh:5534
A straight line that spans infinitely in both directions.
Definition: qcustomplot.hh:6080
QCPBarsGroup * mBarsGroup
Definition: qcustomplot.hh:5535
QCPItemAnchor *const left
Definition: qcustomplot.hh:6346
double center() const
Definition: qcustomplot.hh:795
bool mReplotting
Definition: qcustomplot.hh:3788
int mBegin
Definition: qcustomplot.hh:921
bool operator==(const QCPDataRange &other) const
Definition: qcustomplot.hh:896
QFont tickLabelFont() const
Definition: qcustomplot.hh:2015
void preallocateGrow(int minimumPreallocSize)
Definition: qcustomplot.hh:3181
SelectablePart
Definition: qcustomplot.hh:4821
Specialized axis ticker for calendar dates and times as axis ticks.
Definition: qcustomplot.hh:1594
QCPSelectionDecorator * selectionDecorator() const
Definition: qcustomplot.hh:3317
virtual void applyDefaultAntialiasingHint(QCPPainter *painter) const Q_DECL_OVERRIDE
Definition: qcustomplot.hh:1268
PainterModes mModes
Definition: qcustomplot.hh:500
const QMetaObject staticMetaObject
Definition: moc_qcustomplot.cpp:234
bool mSelected
Definition: qcustomplot.hh:4754
A layout that places child elements aligned to the border or arbitrarily positioned.
Definition: qcustomplot.hh:1413
0x020 Legends are selectable (or their child items, see QCPLegend::setSelectableParts) ...
Definition: qcustomplot.hh:256
void remove(double sortKeyFrom, double sortKeyTo)
Definition: qcustomplot.hh:2789
double mDevicePixelRatio
Definition: qcustomplot.hh:540
Handles the different ending decorations for line-like items.
Definition: qcustomplot.hh:1469
A color scale for use with color coding data such as QCPColorMap.
Definition: qcustomplot.hh:5038
double length() const
Definition: qcustomplot.hh:401
bool mScaled
Definition: qcustomplot.hh:6489
QPoint center() const
Definition: qcustomplot.hh:4655
QPen mBracketPen
Definition: qcustomplot.hh:4561
QPen pen() const
Definition: qcustomplot.hh:6394
QPen mTickPen
Definition: qcustomplot.hh:2155
QCP::PlottingHints mPlottingHints
Definition: qcustomplot.hh:3774
BracketStyle mStyle
Definition: qcustomplot.hh:6647
QCPAxis * valueAxis() const
Definition: qcustomplot.hh:3470
QSize mSize
Definition: qcustomplot.hh:539
QCPAbstractPlottable * dataPlottable() const
Definition: qcustomplot.hh:6011
int mCachedMargin
Definition: qcustomplot.hh:2170
bool selectable() const
Definition: qcustomplot.hh:4952
FractionStyle
Definition: qcustomplot.hh:1777
virtual void mousePressEvent(QMouseEvent *event, const QVariant &details) Q_DECL_OVERRIDE
Definition: qcustomplot.cpp:17770
virtual QCPItemPosition * toQCPItemPosition()
Definition: qcustomplot.hh:3419
QPointer< QCPAxisRect > mClipAxisRect
Definition: qcustomplot.hh:3547
QPointer< QCPLayerable > mMouseSignalLayerable
Definition: qcustomplot.hh:3785
bool mAntialiasedScatters
Definition: qcustomplot.hh:3358
QVector< QString > mTickVectorLabels
Definition: qcustomplot.hh:2167
int getMarginValue(const QMargins &margins, QCP::MarginSide side)
Definition: qcustomplot.hh:345
virtual void drawLegendIcon(QCPPainter *painter, const QRectF &rect) const =0
Both sign domains, including zero, i.e. all numbers.
Definition: qcustomplot.hh:187
QList< QCPAbstractPlottable * > mPlottables
Definition: qcustomplot.hh:3760
QColor labelColor
Definition: qcustomplot.hh:2236
virtual double dataSortKey(int index) const Q_DECL_OVERRIDE
Definition: qcustomplot.hh:4136
QPen pen() const
Definition: qcustomplot.hh:3310
QPainter subclass used internally.
Definition: qcustomplot.hh:456
Qt::TransformationMode transformationMode() const
Definition: qcustomplot.hh:6461
Qt::KeyboardModifier multiSelectModifier() const
Definition: qcustomplot.hh:3637
QPen pen() const
Definition: qcustomplot.hh:3248
int mScatterSkip
Definition: qcustomplot.hh:5211
iterator end()
Definition: qcustomplot.hh:2437
unsigned char * mAlpha
Definition: qcustomplot.hh:5727
AnchorIndex
Definition: qcustomplot.hh:6262
ScaleType mScaleType
Definition: qcustomplot.hh:2160
bool selectable() const
Definition: qcustomplot.hh:4729
QPixmap mLegendIcon
Definition: qcustomplot.hh:5796
QMap< double, QString > mTicks
Definition: qcustomplot.hh:1751
QCPScatterStyle scatterStyle() const
Definition: qcustomplot.hh:5316
WidthType widthType() const
Definition: qcustomplot.hh:5501
void clear()
Definition: qcustomplot.hh:2831
void coordsToPixels(double key, double value, double &x, double &y) const
Definition: qcustomplot.cpp:10902
QFont selectedLabelFont() const
Definition: qcustomplot.hh:2040
LineStyle
Definition: qcustomplot.hh:5168
LineStyle
Definition: qcustomplot.hh:5306
static bool sortKeyIsMainKey()
Definition: qcustomplot.hh:5268
QFont mFont
Definition: qcustomplot.hh:4750
Holds the data of one single data point (one bar) for QCPBars.
Definition: qcustomplot.hh:5440
int left() const
Definition: qcustomplot.hh:4644
bool mCachedMarginValid
Definition: qcustomplot.hh:2169
AnchorIndex
Definition: qcustomplot.hh:6484
virtual QCPDataSelection selectTestRect(const QRectF &rect, bool onlySelectable) const Q_DECL_OVERRIDE
Definition: qcustomplot.hh:4214
QCPItemAnchor *const bottom
Definition: qcustomplot.hh:6415
QPixmap mPixmap
Definition: qcustomplot.hh:6487
Definition: qcustomplot.hh:2216
QCPSelectionDecorator * mSelectionDecorator
Definition: qcustomplot.hh:3364
QString mText
Definition: qcustomplot.hh:4979
double mWhiskerWidth
Definition: qcustomplot.hh:5651
QCPScatterStyle::ScatterProperties usedScatterProperties() const
Definition: qcustomplot.hh:3251
QColor mSelectedColor
Definition: qcustomplot.hh:6352
QPen mSelectedBasePen
Definition: qcustomplot.hh:2134
QCPLineEnding head() const
Definition: qcustomplot.hh:6139
void normalize()
Definition: qcustomplot.hh:796
int mPadding
Definition: qcustomplot.hh:2131
SelectableParts mSelectedParts
Definition: qcustomplot.hh:4892
bool mTwoColored
Definition: qcustomplot.hh:5927
bool mTangentToData
Definition: qcustomplot.hh:4566
QCPAxis * yAxis2
Definition: qcustomplot.hh:3731
SizeConstraintRect mSizeConstraintRect
Definition: qcustomplot.hh:1257
QVector< QRgb > mColorBuffer
Definition: qcustomplot.hh:4497
QCPAxisRect * axisRect() const
Definition: qcustomplot.hh:2007
QCPAbstractItem * mParentItem
Definition: qcustomplot.hh:3414
double lengthSquared() const
Definition: qcustomplot.hh:402
QCP::SelectionRectMode mSelectionRectMode
Definition: qcustomplot.hh:3776
iterator begin()
Definition: qcustomplot.hh:2436
int selectionTolerance() const
Definition: qcustomplot.hh:3634
LineStyle lineStyle() const
Definition: qcustomplot.hh:5318
QMargins minimumMargins() const
Definition: qcustomplot.hh:1224
When dragging the mouse, a selection rect becomes active. It is the programmer's responsibility to co...
Definition: qcustomplot.hh:270
double mPiTickStep
Definition: qcustomplot.hh:1805
Qt::TimeSpec mDateTimeSpec
Definition: qcustomplot.hh:1617
QCPRange & operator/=(const double &value)
Definition: qcustomplot.hh:786
QBrush mSelectedBrush
Definition: qcustomplot.hh:6425
Qt::Orientation mOrientation
Definition: qcustomplot.hh:2132
0x01 The pen property, see setPen
Definition: qcustomplot.hh:2301
QRect labelSelectionBox() const
Definition: qcustomplot.hh:2228
static const double minRange
Definition: qcustomplot.hh:808
int bracketHeight() const
Definition: qcustomplot.hh:4539
bool backgroundScaled() const
Definition: qcustomplot.hh:3627
bool autoSqueeze() const
Definition: qcustomplot.hh:2415
QCPRange valueRange() const
Definition: qcustomplot.hh:5273
SizeConstraintRect
Definition: qcustomplot.hh:1211
QCPGraph * graph() const
Definition: qcustomplot.hh:6549
QCPAxis::AxisType type
Definition: qcustomplot.hh:2231
bool isNone() const
Definition: qcustomplot.hh:2365
BracketStyle
Definition: qcustomplot.hh:6613
QCPItemAnchor *const bottom
Definition: qcustomplot.hh:6479
0x0020 Main lines of plottables
Definition: qcustomplot.hh:219
double mainValue() const
Definition: qcustomplot.hh:5574
QBrush bracketBrush() const
Definition: qcustomplot.hh:4537
QBrush selectedBrush() const
Definition: qcustomplot.hh:6397
Qt::Orientations rangeZoom() const
Definition: qcustomplot.hh:4602
Interaction
Definition: qcustomplot.hh:251
virtual void selectEvent(QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged) Q_DECL_OVERRIDE
Definition: qcustomplot.cpp:11224
QFont selectedFont() const
Definition: qcustomplot.hh:6313
QVector< DataType >::const_iterator const_iterator
Definition: qcustomplot.hh:2407
QCPBars * barBelow() const
Definition: qcustomplot.hh:5505
bool rangeReversed() const
Definition: qcustomplot.hh:2010
QColor selectedTextColor() const
Definition: qcustomplot.hh:4951
QCPItemAnchor *const center
Definition: qcustomplot.hh:6640
int top() const
Definition: qcustomplot.hh:4646
QPen mSelectedPen
Definition: qcustomplot.hh:6156
QPen selectedPen() const
Definition: qcustomplot.hh:6093
double mValue
Definition: qcustomplot.hh:3492
0x000 No hints are set
Definition: qcustomplot.hh:235
QBrush mBrushPositive
Definition: qcustomplot.hh:5928
static QCPGraphData fromSortKey(double sortKey)
Definition: qcustomplot.hh:5128
double & rx()
Definition: qcustomplot.hh:393
int scatterSkip() const
Definition: qcustomplot.hh:5317
QFont labelFont() const
Definition: qcustomplot.hh:2031
bool mSelected
Definition: qcustomplot.hh:4986
int mTickCount
Definition: qcustomplot.hh:1568
bool inverted() const
Definition: qcustomplot.hh:1504
QBrush backgroundBrush() const
Definition: qcustomplot.hh:4598
A plottable representing a parametric curve in a plot.
Definition: qcustomplot.hh:5292
QCPItemPosition *const topLeft
Definition: qcustomplot.hh:6474
QCPItemAnchor *const bottom
Definition: qcustomplot.hh:6257
bool mAutoAddPlottableToLegend
Definition: qcustomplot.hh:3759
QRect totalBounds
Definition: qcustomplot.hh:2265
QList< Qt::Alignment > mInsetAlignment
Definition: qcustomplot.hh:1455
QSharedPointer< QCPBarsDataContainer > data() const
Definition: qcustomplot.hh:5507
QCustomPlot * parentPlot() const
Definition: qcustomplot.hh:708
Specialized axis ticker to display ticks in units of an arbitrary constant, for example pi...
Definition: qcustomplot.hh:1768
QVector< double > tickVector() const
Definition: qcustomplot.hh:2021
QPen pen() const
Definition: qcustomplot.hh:1878
const_iterator at(int index) const
Definition: qcustomplot.hh:2440
QPointF offset
Definition: qcustomplot.hh:2259
QPen mMedianPen
Definition: qcustomplot.hh:5654
double offset
Definition: qcustomplot.hh:2248
0x0000 No elements
Definition: qcustomplot.hh:226
#define QCP_LIB_DECL
Definition: qcustomplot.hh:124
QList< double > mColumnStretchFactors
Definition: qcustomplot.hh:1397
bool mMapImageInvalidated
Definition: qcustomplot.hh:5797
BracketStyle style() const
Definition: qcustomplot.hh:6627
QCPItemAnchor *const top
Definition: qcustomplot.hh:6340
0x02 right margin
Definition: qcustomplot.hh:197
QCPItemAnchor *const bottomRightRim
Definition: qcustomplot.hh:6414
SelectableParts selectedParts() const
Definition: qcustomplot.hh:2037
friend class QCPAxisRect
Definition: qcustomplot.hh:763
QCPRange keyRange(bool &foundRange, QCP::SignDomain signDomain=QCP::sdBoth)
Definition: qcustomplot.hh:2952
QPointer< QCPColorScale > mColorScale
Definition: qcustomplot.hh:5792
QCPScatterStyle scatterStyle() const
Definition: qcustomplot.hh:3250
bool selected() const
Definition: qcustomplot.hh:3522
virtual void mouseMoveEvent(QMouseEvent *event, const QPointF &startPos) Q_DECL_OVERRIDE
Definition: qcustomplot.cpp:17802
QColor mTextColor
Definition: qcustomplot.hh:4889
QCPLineEnding mTail
Definition: qcustomplot.hh:6157
QCPLayoutInset * insetLayout() const
Definition: qcustomplot.hh:4634
QCPRange mDataRange
Definition: qcustomplot.hh:5091
QCPAbstractPlottable1D(QCPAxis *keyAxis, QCPAxis *valueAxis)
Definition: qcustomplot.hh:4096
double mSize
Definition: qcustomplot.hh:6576
static bool sortKeyIsMainKey()
Definition: qcustomplot.hh:5129
UpdatePhase
Definition: qcustomplot.hh:1197
QCPLegend * parentLegend() const
Definition: qcustomplot.hh:4724
QString name() const
Definition: qcustomplot.hh:3307
An ellipse.
Definition: qcustomplot.hh:6380
int mNumberPrecision
Definition: qcustomplot.hh:2147
QFont expFont
Definition: qcustomplot.hh:2266
QColor selectedTickLabelColor() const
Definition: qcustomplot.hh:2041
QMap< double, QColor > mColorStops
Definition: qcustomplot.hh:4492
void sort()
Definition: qcustomplot.hh:2850
QStack< bool > mAntialiasingStack
Definition: qcustomplot.hh:504
FillOrder fillOrder() const
Definition: qcustomplot.hh:1360
QPoint topLeft() const
Definition: qcustomplot.hh:4651
QPixmap mBuffer
Definition: qcustomplot.hh:563
QCPDataContainer< QCPStatisticalBoxData > QCPStatisticalBoxDataContainer
Definition: qcustomplot.hh:5600
QSize iconSize() const
Definition: qcustomplot.hh:4837
QPen selectedPen() const
Definition: qcustomplot.hh:6188
int wrap() const
Definition: qcustomplot.hh:1359
QCPItemPosition *const point1
Definition: qcustomplot.hh:6102
int mIndex
Definition: qcustomplot.hh:670
QPen selectedPen() const
Definition: qcustomplot.hh:6463
bool mSubGridVisible
Definition: qcustomplot.hh:1892
QCPAxis::ScaleType mDataScaleType
Definition: qcustomplot.hh:5787
Describes a data range given by begin and end index.
Definition: qcustomplot.hh:890
QCP::SelectionType mSelectable
Definition: qcustomplot.hh:3362
QPixmap pixmap() const
Definition: qcustomplot.hh:2352
double mLogBaseLnInv
Definition: qcustomplot.hh:1846
QCPAxis::ScaleType mDataScaleType
Definition: qcustomplot.hh:5092
QCPItemAnchor *const bottomLeft
Definition: qcustomplot.hh:6345
virtual double dataMainKey(int index) const Q_DECL_OVERRIDE
Definition: qcustomplot.hh:4120
int subTickCount() const
Definition: qcustomplot.hh:1736
LineStyle lineStyle() const
Definition: qcustomplot.hh:5183
QWeakPointer< QCPAbstractPaintBuffer > mPaintBuffer
Definition: qcustomplot.hh:676
bool mDragging
Definition: qcustomplot.hh:4677
QBrush selectedBrush() const
Definition: qcustomplot.hh:6241
QSharedPointer< QCPErrorBarsDataContainer > mDataContainer
Definition: qcustomplot.hh:6049
QPen pen() const
Definition: qcustomplot.hh:6462
QString mPiSymbol
Definition: qcustomplot.hh:1799
bool mBackgroundScaled
Definition: qcustomplot.hh:3771
QRect rect() const
Definition: qcustomplot.hh:1221
QHash< QCPAxis::AxisType, QList< QCPAxis * > > mAxes
Definition: qcustomplot.hh:4678
QString name() const
Definition: qcustomplot.hh:3405
QCPItemAnchor *const right
Definition: qcustomplot.hh:6342
QPen selectedPen() const
Definition: qcustomplot.hh:6395
QBrush mSelectedBrush
Definition: qcustomplot.hh:6266
int tickLabelPadding
Definition: qcustomplot.hh:2238
QPen selectedSubTickPen() const
Definition: qcustomplot.hh:2045
ChartStyle chartStyle() const
Definition: qcustomplot.hh:5888
int fieldWidth(TimeUnit unit) const
Definition: qcustomplot.hh:1656
QCPDataSelection mSelection
Definition: qcustomplot.hh:3363
bool visible() const
Definition: qcustomplot.hh:656
QCPItemPosition *const startDir
Definition: qcustomplot.hh:6202
virtual QRect clipRect() const Q_DECL_OVERRIDE
Definition: qcustomplot.cpp:11157
QPen mPen
Definition: qcustomplot.hh:3270
QCPSelectionRect * selectionRect() const
Definition: qcustomplot.hh:3639
bool isValid() const
Definition: qcustomplot.hh:910
bool mAntialiased
Definition: qcustomplot.hh:734
GradientPreset
Definition: qcustomplot.hh:4448
QPen pen() const
Definition: qcustomplot.hh:2350
The generic data container for one-dimensional plottables.
Definition: qcustomplot.hh:2404
void add(const QCPDataContainer< DataType > &data)
Definition: qcustomplot.hh:2664
QCPRange valueRange(bool &foundRange, QCP::SignDomain signDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange())
Definition: qcustomplot.hh:3075
QColor selectedLabelColor() const
Definition: qcustomplot.hh:2042
int subTickCount() const
Definition: qcustomplot.hh:1834
SelectablePart
Definition: qcustomplot.hh:1993
QPen whiskerPen() const
Definition: qcustomplot.hh:5621
virtual void mouseReleaseEvent(QMouseEvent *event, const QPointF &startPos)
Definition: qcustomplot.cpp:1744
Holds the two-dimensional data of a QCPColorMap plottable.
Definition: qcustomplot.hh:5680
int mWrap
Definition: qcustomplot.hh:1400
int mTangentAverage
Definition: qcustomplot.hh:4567
QList< QCPAbstractItem * > mItems
Definition: qcustomplot.hh:3762
PositionType typeY() const
Definition: qcustomplot.hh:3462
0x002 Axis ranges are zoomable with the mouse wheel (see QCPAxisRect::setRangeZoom, QCPAxisRect::setRangeZoomAxes)
Definition: qcustomplot.hh:252
double mWidth
Definition: qcustomplot.hh:1521
QPen selectedPen() const
Definition: qcustomplot.hh:6309
QCPItemAnchor *const top
Definition: qcustomplot.hh:6411
void addDataRange(const QCPDataRange &dataRange, bool simplify=true)
Definition: qcustomplot.cpp:2542
double mRangeZoomFactorVert
Definition: qcustomplot.hh:4672
double size() const
Definition: qcustomplot.hh:6547
A plottable representing a financial stock chart.
Definition: qcustomplot.hh:5847
FractionStyle fractionStyle() const
Definition: qcustomplot.hh:1789
void squeeze(bool preAllocation=true, bool postAllocation=true)
Definition: qcustomplot.hh:2866
TracerStyle style() const
Definition: qcustomplot.hh:6548
0x0010 Legend items
Definition: qcustomplot.hh:218
QBrush selectedBrush() const
Definition: qcustomplot.hh:4844
QBrush brush() const
Definition: qcustomplot.hh:3249
int barWidth() const
Definition: qcustomplot.hh:5062
void setMarginValue(QMargins &margins, QCP::MarginSide side, int value)
Definition: qcustomplot.hh:325
virtual bool sortKeyIsMainKey() const Q_DECL_OVERRIDE
Definition: qcustomplot.hh:4201
bool mAutoSqueeze
Definition: qcustomplot.hh:2448
void drawPolyline(QCPPainter *painter, const QVector< QPointF > &lineData) const
Definition: qcustomplot.hh:4377
QCPAxisPainterPrivate * mAxisPainter
Definition: qcustomplot.hh:2164
The abstract base class for layouts.
Definition: qcustomplot.hh:1282
Holds the data of one single data point for QCPFinancial.
Definition: qcustomplot.hh:5816
A text label.
Definition: qcustomplot.hh:6283
QBrush mBackgroundBrush
Definition: qcustomplot.hh:3768
QCPAxis * axis() const
Definition: qcustomplot.hh:5056
QPen mSelectedIconBorderPen
Definition: qcustomplot.hh:4893
QCPItemPosition *const bottomRight
Definition: qcustomplot.hh:6475
Any combination of data points/ranges can be selected.
Definition: qcustomplot.hh:295
void setBrush(const QBrush &brush)
Definition: qcustomplot.cpp:10773
double sortKey() const
Definition: qcustomplot.hh:5266
QString mName
Definition: qcustomplot.hh:3410
Resolution is given in dots per centimeter (dpcm)
Definition: qcustomplot.hh:166
bool mOpenGlCacheLabelsBackup
Definition: qcustomplot.hh:3792
virtual int elementCount() const Q_DECL_OVERRIDE
Definition: qcustomplot.hh:1374
QCPItemAnchor *const left
Definition: qcustomplot.hh:6259
QCPAbstractPlottable * mPlottable
Definition: qcustomplot.hh:4783
QCPDataContainer< QCPBarsData > QCPBarsDataContainer
Definition: qcustomplot.hh:5469
virtual void mouseReleaseEvent(QMouseEvent *event, const QPointF &startPos) Q_DECL_OVERRIDE
Definition: qcustomplot.cpp:17862
ColorInterpolation mColorInterpolation
Definition: qcustomplot.hh:4493
QPen mSelectedPen
Definition: qcustomplot.hh:6645
FillOrder
Definition: qcustomplot.hh:1344
QImage mGradientImage
Definition: qcustomplot.hh:5021
void removeAfter(double sortKey)
Definition: qcustomplot.hh:2772
void performAutoSqueeze()
Definition: qcustomplot.hh:3211
QCPBars * barAbove() const
Definition: qcustomplot.hh:5506
QPen penNegative() const
Definition: qcustomplot.hh:5895
QSize size() const
Definition: qcustomplot.hh:4650
QCPItemAnchor *const bottomLeft
Definition: qcustomplot.hh:6258
double sortKey() const
Definition: qcustomplot.hh:5127
QPen subGridPen() const
Definition: qcustomplot.hh:1879
const QCPVector2D operator-(const QCPVector2D &vec1, const QCPVector2D &vec2)
Definition: qcustomplot.hh:437
QVariant mMouseSignalLayerableDetails
Definition: qcustomplot.hh:3787
double x() const
Definition: qcustomplot.hh:391
double value
Definition: qcustomplot.hh:5136
A plottable representing a two-dimensional color map in a plot.
Definition: qcustomplot.hh:5737
bool mAdaptiveSampling
Definition: qcustomplot.hh:5213
void removeBefore(double sortKey)
Definition: qcustomplot.hh:2757
QHash< QCP::MarginSide, QList< QCPLayoutElement * > > mChildren
Definition: qcustomplot.hh:1163
QCPAxis * valueAxis() const
Definition: qcustomplot.hh:3313
QColor mTickLabelColor
Definition: qcustomplot.hh:2146
QPen mPen
Definition: qcustomplot.hh:2376
bool mVisible
Definition: qcustomplot.hh:672
QCPItemPosition *const position
Definition: qcustomplot.hh:6338
double stackingGap() const
Definition: qcustomplot.hh:5504
virtual void mousePressEvent(QMouseEvent *event, const QVariant &details)
Definition: qcustomplot.cpp:1708
virtual ~QCPAbstractPlottable1D()
Definition: qcustomplot.hh:4103
QCPAxis::LabelSide tickLabelSide
Definition: qcustomplot.hh:2240
The positive sign domain, i.e. numbers greater than zero.
Definition: qcustomplot.hh:188
static bool sortKeyIsMainKey()
Definition: qcustomplot.hh:5571
QPointer< QCPLayerable > mParentLayerable
Definition: qcustomplot.hh:732
int scatterSkip() const
Definition: qcustomplot.hh:5185
QCPItemAnchor *const topLeft
Definition: qcustomplot.hh:6339
QPen mZeroLinePen
Definition: qcustomplot.hh:1894
QPoint mMousePressPos
Definition: qcustomplot.hh:3782
bool isNull() const
Definition: qcustomplot.hh:406
bool ticks() const
Definition: qcustomplot.hh:2012
QCPItemAnchor *const right
Definition: qcustomplot.hh:6413
WidthType widthType() const
Definition: qcustomplot.hh:5890
PositionType
Definition: qcustomplot.hh:3445
bool reversedEndings
Definition: qcustomplot.hh:2250
ChartStyle mChartStyle
Definition: qcustomplot.hh:5924
QList< double > mRowStretchFactors
Definition: qcustomplot.hh:1398
QRect mViewport
Definition: qcustomplot.hh:3756
QPixmap mScaledBackgroundPixmap
Definition: qcustomplot.hh:4665
When dragging the mouse, a selection rect becomes active. Upon releasing, plottable data points that ...
Definition: qcustomplot.hh:269
double key() const
Definition: qcustomplot.hh:3466
The negative sign domain, i.e. numbers smaller than zero.
Definition: qcustomplot.hh:186
QRect outerRect() const
Definition: qcustomplot.hh:1222
virtual void mouseDoubleClickEvent(QMouseEvent *event, const QVariant &details)
Definition: qcustomplot.cpp:1776
QPoint bottomRight() const
Definition: qcustomplot.hh:4654
double value
Definition: qcustomplot.hh:5455
QVector< QCPErrorBarsData > QCPErrorBarsDataContainer
Definition: qcustomplot.hh:5982
QPointer< QCPAxisRect > mAxisRect
Definition: qcustomplot.hh:3491
QList< QCPLayoutElement * > mElements
Definition: qcustomplot.hh:1453
Qt::TransformationMode mTransformationMode
Definition: qcustomplot.hh:6492
Qt::TimeSpec dateTimeSpec() const
Definition: qcustomplot.hh:1601
Definition: qcustomplot.hh:238
double baseValue() const
Definition: qcustomplot.hh:5503
QPen pen() const
Definition: qcustomplot.hh:6092
QFont mTickLabelFont
Definition: qcustomplot.hh:2145
QPoint topRight() const
Definition: qcustomplot.hh:4652
QVector< double > tickPositions
Definition: qcustomplot.hh:2253
static bool sortKeyIsMainKey()
Definition: qcustomplot.hh:5448
void selectionChanged(bool selected)
Definition: moc_qcustomplot.cpp:2774
QHash< TimeUnit, int > mFieldWidth
Definition: qcustomplot.hh:1665
QFont selectedFont() const
Definition: qcustomplot.hh:4845
QPen pen() const
Definition: qcustomplot.hh:6238
QCPDataSelection inverse(const QCPDataRange &outerRange) const
Definition: qcustomplot.cpp:2706
void expand(const QCPRange &otherRange)
Definition: qcustomplot.cpp:1927
QCPRange dataBounds() const
Definition: qcustomplot.hh:5693
int size() const
Definition: qcustomplot.hh:902
A line from one point to another.
Definition: qcustomplot.hh:6123
Holds the data of one single data point for QCPStatisticalBox.
Definition: qcustomplot.hh:5563
bool mReplotQueued
Definition: qcustomplot.hh:3789
double sortKey() const
Definition: qcustomplot.hh:5569
bool mSelected
Definition: qcustomplot.hh:3550
double mLogBase
Definition: qcustomplot.hh:1842
int length() const
Definition: qcustomplot.hh:903
A paint buffer based on QPixmap, using software raster rendering.
Definition: qcustomplot.hh:550
QColor mSelectedTextColor
Definition: qcustomplot.hh:4896
bool contains(QCPBars *bars) const
Definition: qcustomplot.hh:5412
bool whiskerAntialiased() const
Definition: qcustomplot.hh:5623
SelectableParts selectableParts() const
Definition: qcustomplot.hh:2038
QCPItemPosition *const point2
Definition: qcustomplot.hh:6103
QVariant mMouseEventLayerableDetails
Definition: qcustomplot.hh:3786
QMargins mPadding
Definition: qcustomplot.hh:6360
QCPRange mDataBounds
Definition: qcustomplot.hh:5728
double length() const
Definition: qcustomplot.hh:1503
Definition: qcustomplot.hh:139
QCPItemAnchor * mParentAnchorY
Definition: qcustomplot.hh:3493
double whiskerWidth() const
Definition: qcustomplot.hh:5620
0x0200 Zero-lines, see QCPGrid::setZeroLinePen
Definition: qcustomplot.hh:223
void limitIteratorsToDataRange(const_iterator &begin, const_iterator &end, const QCPDataRange &dataRange) const
Definition: qcustomplot.hh:3163
int mOpenGlMultisamples
Definition: qcustomplot.hh:3790
double mTickStep
Definition: qcustomplot.hh:1715
QString mText
Definition: qcustomplot.hh:6356
int mPreallocIteration
Definition: qcustomplot.hh:2453
bool antialiasedScatters() const
Definition: qcustomplot.hh:3309
Manages the position of an item.
Definition: qcustomplot.hh:3435
QList< QCPRange > mDragStartVertRange
Definition: qcustomplot.hh:4675
ResolutionUnit
Definition: qcustomplot.hh:165
bool antialiased() const
Definition: qcustomplot.hh:711
QPen iconBorderPen() const
Definition: qcustomplot.hh:4839
QCPItemPosition *const end
Definition: qcustomplot.hh:6152
BracketStyle mBracketStyle
Definition: qcustomplot.hh:4565
QCPAxis::ScaleType dataScaleType() const
Definition: qcustomplot.hh:5755
bool tightBoundary() const
Definition: qcustomplot.hh:5757
void getDataSegments(QList< QCPDataRange > &selectedSegments, QList< QCPDataRange > &unselectedSegments) const
Definition: qcustomplot.hh:4347
ColorInterpolation
Definition: qcustomplot.hh:4439
TimeUnit
Definition: qcustomplot.hh:1644
QPixmap mBackgroundPixmap
Definition: qcustomplot.hh:4664
double mainKey() const
Definition: qcustomplot.hh:5270
QColor mTextColor
Definition: qcustomplot.hh:4751
QFont mSelectedFont
Definition: qcustomplot.hh:6355
Defines a color gradient for use with e.g. QCPColorMap.
Definition: qcustomplot.hh:4430
QPixmap background() const
Definition: qcustomplot.hh:3626
QList< double > columnStretchFactors() const
Definition: qcustomplot.hh:1355
QCPGrid * grid() const
Definition: qcustomplot.hh:2048
double upper
Definition: qcustomplot.hh:775
Resolution is given in dots per inch (DPI/PPI)
Definition: qcustomplot.hh:167
QCPMarginGroup * marginGroup(QCP::MarginSide side) const
Definition: qcustomplot.hh:1229
static Qt::Orientation orientation(AxisType type)
Definition: qcustomplot.hh:2115
QPixmap mScaledBackgroundPixmap
Definition: qcustomplot.hh:3770
QMap< double, QColor > colorStops() const
Definition: qcustomplot.hh:4470
QMargins mMinimumMargins
Definition: qcustomplot.hh:1259
virtual void parentPlotInitialized(QCustomPlot *parentPlot)
Definition: qcustomplot.cpp:1592
Represents the range an axis is encompassing.
Definition: qcustomplot.hh:772
QCPRange mDragStartRange
Definition: qcustomplot.hh:2172
0x8000 Other elements that don't fit into any of the existing categories
Definition: qcustomplot.hh:224
double mainValue() const
Definition: qcustomplot.hh:5271
QBrush mBrush
Definition: qcustomplot.hh:1125
QCPRange dataRange() const
Definition: qcustomplot.hh:5754
bool tickLabels() const
Definition: qcustomplot.hh:2013
QCPLayoutGrid * mPlotLayout
Definition: qcustomplot.hh:3758
QList< QCPItemAnchor * > mAnchors
Definition: qcustomplot.hh:3549
QCPScatterStyle mScatterStyle
Definition: qcustomplot.hh:5210
double mWidth
Definition: qcustomplot.hh:5650
Groups multiple QCPBars together so they appear side by side.
Definition: qcustomplot.hh:5375
QPixmap background() const
Definition: qcustomplot.hh:4597
ColorInterpolation colorInterpolation() const
Definition: qcustomplot.hh:4471
0x010 Axes are selectable (or parts of them, see QCPAxis::setSelectableParts)
Definition: qcustomplot.hh:255
double lower
Definition: qcustomplot.hh:775
int mEnd
Definition: qcustomplot.hh:921
bool adaptiveSampling() const
Definition: qcustomplot.hh:5187
QSize minimumSize() const
Definition: qcustomplot.hh:1226
QFont font() const
Definition: qcustomplot.hh:4725
WidthType
Definition: qcustomplot.hh:5490
Qt::Orientations rangeDrag() const
Definition: qcustomplot.hh:4601
double tickLabelRotation
Definition: qcustomplot.hh:2239
QBrush mBracketBrush
Definition: qcustomplot.hh:4562
bool mDataModified
Definition: qcustomplot.hh:5729
A template base class for plottables with one-dimensional data.
Definition: qcustomplot.hh:3868
ScaleType scaleType() const
Definition: qcustomplot.hh:2008
ScatterShape mShape
Definition: qcustomplot.hh:2375
Resolution is given in dots per meter (dpm)
Definition: qcustomplot.hh:165
void pixelsToCoords(double x, double y, double &key, double &value) const
Definition: qcustomplot.cpp:10944
QCPItemPosition *const topLeft
Definition: qcustomplot.hh:6408
SelectableParts selectableParts() const
Definition: qcustomplot.hh:4840
bool mInverted
Definition: qcustomplot.hh:1522
0xFF all margins
Definition: qcustomplot.hh:200
QPixmap pixmap() const
Definition: qcustomplot.hh:6458
bool antialiasedZeroLine() const
Definition: qcustomplot.hh:1877
bool mTightBoundary
Definition: qcustomplot.hh:5791
friend class QCPPlottableLegendItem
Definition: qcustomplot.hh:3387
QCP::SelectionRectMode selectionRectMode() const
Definition: qcustomplot.hh:3638
double piValue() const
Definition: qcustomplot.hh:1787
bool mRangeReversed
Definition: qcustomplot.hh:2159
QCPItemAnchor *const top
Definition: qcustomplot.hh:6476
Qt::Alignment mPositionAlignment
Definition: qcustomplot.hh:6357
QPen zeroLinePen() const
Definition: qcustomplot.hh:1880
double symbolGap() const
Definition: qcustomplot.hh:6014
Holds multiple axes and arranges them in a rectangular shape.
Definition: qcustomplot.hh:4582
virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE
Definition: qcustomplot.hh:1269
virtual ~QCPPlottableInterface1D()
Definition: qcustomplot.hh:3853
Qt::AspectRatioMode backgroundScaledMode() const
Definition: qcustomplot.hh:4600
QColor tickLabelColor
Definition: qcustomplot.hh:2246
QCPDataRange bounded(const QCPDataRange &other) const
Definition: qcustomplot.cpp:2251
QCPItemAnchor *const left
Definition: qcustomplot.hh:6481
int mPeriodicity
Definition: qcustomplot.hh:1801
QBrush brush() const
Definition: qcustomplot.hh:6396
Whether to use immediate or queued refresh depends on whether the plotting hint QCP::phImmediateRefre...
Definition: qcustomplot.hh:3615
int width() const
Definition: qcustomplot.hh:4648
Specialized axis ticker with a fixed tick step.
Definition: qcustomplot.hh:1687
const QCPVector2D operator/(const QCPVector2D &vec, double divisor)
Definition: qcustomplot.hh:435
A plottable that adds a set of error bars to other plottables.
Definition: qcustomplot.hh:5984
Specialized axis ticker for time spans in units of milliseconds to days.
Definition: qcustomplot.hh:1635
QRect mRect
Definition: qcustomplot.hh:1123
QCPRange mRange
Definition: qcustomplot.hh:2158
QCPScatterStyle::ScatterProperties mUsedScatterProperties
Definition: qcustomplot.hh:3273
InsetPlacement
Definition: qcustomplot.hh:1420
double mBaseValue
Definition: qcustomplot.hh:5536
QBrush brush() const
Definition: qcustomplot.hh:6240
Qt::KeyboardModifier mMultiSelectModifier
Definition: qcustomplot.hh:3775
QFont selectedFont() const
Definition: qcustomplot.hh:4727
QCPLegend * legend
Definition: qcustomplot.hh:3732
QCP::AntialiasedElements notAntialiasedElements() const
Definition: qcustomplot.hh:3631
QCPItemAnchor *const top
Definition: qcustomplot.hh:6254
AxisType mAxisType
Definition: qcustomplot.hh:2128
QPen mSelectedPen
Definition: qcustomplot.hh:6493
void setX(double x)
Definition: qcustomplot.hh:397
QVector< double > outliers
Definition: qcustomplot.hh:5585
LineStyle mLineStyle
Definition: qcustomplot.hh:5209
QCPRange & operator-=(const double &value)
Definition: qcustomplot.hh:784
QCP::Interactions mInteractions
Definition: qcustomplot.hh:3765
QBrush mBrush
Definition: qcustomplot.hh:3360
QCPGraph * mGraph
Definition: qcustomplot.hh:6578
QCPItemAnchor *const topRight
Definition: qcustomplot.hh:6255
const QCPVector2D operator*(double factor, const QCPVector2D &vec)
Definition: qcustomplot.hh:433
MarginSide
Definition: qcustomplot.hh:196
Qt::Alignment mTextAlignment
Definition: qcustomplot.hh:6358
QString mDateTimeFormat
Definition: qcustomplot.hh:1616
QLatin1Char mNumberFormatChar
Definition: qcustomplot.hh:2148
double open
Definition: qcustomplot.hh:5831
bool mBackgroundScaled
Definition: qcustomplot.hh:4666
QCP::AntialiasedElements mOpenGlAntialiasedElementsBackup
Definition: qcustomplot.hh:3791
QBrush brush() const
Definition: qcustomplot.hh:3311
AntialiasedElement
Definition: qcustomplot.hh:214
QFont selectedFont() const
Definition: qcustomplot.hh:4950
QCPItemPosition *const left
Definition: qcustomplot.hh:6638
bool mColorBufferInvalidated
Definition: qcustomplot.hh:4498
QCustomPlot * mParentPlot
Definition: qcustomplot.hh:2268
QString mName
Definition: qcustomplot.hh:3357
QSharedPointer< QCPAxisTicker > mTicker
Definition: qcustomplot.hh:2165
QPointer< QCPGraph > mChannelFillGraph
Definition: qcustomplot.hh:5212
QPen mPenPositive
Definition: qcustomplot.hh:5929
void selectableChanged(QCP::SelectionType selectable)
Definition: moc_qcustomplot.cpp:2788
QPointF toPointF() const
Definition: qcustomplot.hh:404
double mWidth
Definition: qcustomplot.hh:5533
QPen mSelectedPen
Definition: qcustomplot.hh:6353
QCustomPlot * mParentPlot
Definition: qcustomplot.hh:731
ScatterShape shape() const
Definition: qcustomplot.hh:2349
QCPItemPosition *const bottomRight
Definition: qcustomplot.hh:6253
QCPItemAnchor *const right
Definition: qcustomplot.hh:6478
WidthType
Definition: qcustomplot.hh:5867
QPen penPositive() const
Definition: qcustomplot.hh:5894
RefreshPriority
Definition: qcustomplot.hh:3613
QCPGraph * channelFillGraph() const
Definition: qcustomplot.hh:5186
Qt::AspectRatioMode mBackgroundScaledMode
Definition: qcustomplot.hh:3772
ScaleStrategy scaleStrategy() const
Definition: qcustomplot.hh:1707
QColor selectedTextColor() const
Definition: qcustomplot.hh:4728
double mPiValue
Definition: qcustomplot.hh:1800
QPen mPen
Definition: qcustomplot.hh:3359
bool selected() const
Definition: qcustomplot.hh:4730
double mainValue() const
Definition: qcustomplot.hh:5827
int right() const
Definition: qcustomplot.hh:4645
int labelPadding
Definition: qcustomplot.hh:2234
QColor mSelectedLabelColor
Definition: qcustomplot.hh:2140
bool mTicks
Definition: qcustomplot.hh:2152