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> 118 #define QCUSTOMPLOT_VERSION_STR "2.0.1" 119 #define QCUSTOMPLOT_VERSION 0x020001 122 #if defined(QT_STATIC_BUILD) 123 # define QCP_LIB_DECL 124 #elif defined(QCUSTOMPLOT_COMPILE_LIBRARY) 125 # define QCP_LIB_DECL Q_DECL_EXPORT 126 #elif defined(QCUSTOMPLOT_USE_LIBRARY) 127 # define QCP_LIB_DECL Q_DECL_IMPORT 129 # define QCP_LIB_DECL 133 #ifndef Q_DECL_OVERRIDE 134 # define Q_DECL_OVERRIDE 154 Q_FLAGS(AntialiasedElements)
156 Q_FLAGS(PlottingHints)
158 Q_FLAGS(Interactions)
311 return qIsNaN(value) || qIsInf(value);
336 case QCP::msTop: margins.setTop(value);
break;
338 case QCP::msAll: margins = QMargins(value, value, value, value);
break;
367 Q_DECLARE_OPERATORS_FOR_FLAGS(QCP::AntialiasedElements)
368 Q_DECLARE_OPERATORS_FOR_FLAGS(QCP::PlottingHints)
369 Q_DECLARE_OPERATORS_FOR_FLAGS(QCP::MarginSides)
370 Q_DECLARE_OPERATORS_FOR_FLAGS(QCP::Interactions)
396 double x()
const {
return mX; }
397 double y()
const {
return mY; }
398 double &
rx() {
return mX; }
399 double &
ry() {
return mY; }
402 void setX(
double x) { mX = x; }
403 void setY(
double y) { mY = y; }
406 double length()
const {
return qSqrt(mX*mX+mY*mY); }
408 QPoint
toPoint()
const {
return QPoint(mX, mY); }
409 QPointF
toPointF()
const {
return QPointF(mX, mY); }
411 bool isNull()
const {
return qIsNull(mX) && qIsNull(mY); }
417 double distanceSquaredToLine(
const QLineF &line)
const;
451 d.nospace() <<
"QCPVector2D(" << vec.
x() <<
", " << vec.
y() <<
")";
472 ,pmNonCosmetic = 0x04
475 Q_FLAGS(PainterModes)
482 bool antialiasing()
const {
return testRenderHint(QPainter::Antialiasing); }
483 PainterModes
modes()
const {
return mModes; }
486 void setAntialiasing(
bool enabled);
488 void setModes(PainterModes modes);
491 bool begin(QPaintDevice *device);
492 void setPen(
const QPen &pen);
493 void setPen(
const QColor &color);
494 void setPen(Qt::PenStyle penStyle);
495 void drawLine(
const QLineF &line);
501 void makeNonCosmetic();
506 bool mIsAntialiasing;
509 QStack<bool> mAntialiasingStack;
511 Q_DECLARE_OPERATORS_FOR_FLAGS(QCPPainter::PainterModes)
527 QSize
size()
const {
return mSize; }
532 void setSize(
const QSize &size);
533 void setInvalidated(
bool invalidated=
true);
534 void setDevicePixelRatio(
double ratio);
539 virtual void draw(
QCPPainter *painter)
const = 0;
540 virtual void clear(
const QColor &color) = 0;
551 virtual void reallocateBuffer() = 0;
571 virtual void reallocateBuffer() Q_DECL_OVERRIDE;
575 #ifdef QCP_OPENGL_PBUFFER 579 explicit QCPPaintBufferGlPbuffer(
const QSize &size,
double devicePixelRatio,
int multisamples);
580 virtual ~QCPPaintBufferGlPbuffer();
589 QGLPixelBuffer *mGlPBuffer;
595 #endif // QCP_OPENGL_PBUFFER 598 #ifdef QCP_OPENGL_FBO 602 explicit QCPPaintBufferGlFbo(
const QSize &size,
double devicePixelRatio, QWeakPointer<QOpenGLContext> glContext, QWeakPointer<QOpenGLPaintDevice> glPaintDevice);
603 virtual ~QCPPaintBufferGlFbo();
613 QWeakPointer<QOpenGLContext> mGlContext;
614 QWeakPointer<QOpenGLPaintDevice> mGlPaintDevice;
615 QOpenGLFramebufferObject *mGlFrameBuffer;
620 #endif // QCP_OPENGL_FBO 632 Q_PROPERTY(
QCustomPlot* parentPlot READ parentPlot)
633 Q_PROPERTY(QString name READ name)
634 Q_PROPERTY(
int index READ index)
635 Q_PROPERTY(QList<QCPLayerable*> children READ children)
636 Q_PROPERTY(
bool visible READ visible WRITE setVisible)
637 Q_PROPERTY(LayerMode mode READ mode WRITE setMode)
653 QCPLayer(
QCustomPlot* parentPlot,
const QString &layerName);
658 QString
name()
const {
return mName; }
659 int index()
const {
return mIndex; }
660 QList<QCPLayerable*>
children()
const {
return mChildren; }
665 void setVisible(
bool visible);
676 QList<QCPLayerable*> mChildren;
685 void drawToPaintBuffer();
690 Q_DISABLE_COPY(QCPLayer)
701 Q_PROPERTY(
bool visible READ visible WRITE setVisible)
702 Q_PROPERTY(
QCustomPlot* parentPlot READ parentPlot)
703 Q_PROPERTY(
QCPLayerable* parentLayerable READ parentLayerable)
704 Q_PROPERTY(QCPLayer* layer READ layer WRITE setLayer NOTIFY layerChanged)
705 Q_PROPERTY(
bool antialiased READ antialiased WRITE setAntialiased)
715 QCPLayer *
layer()
const {
return mLayer; }
719 void setVisible(
bool on);
720 Q_SLOT
bool setLayer(QCPLayer *layer);
721 bool setLayer(
const QString &layerName);
722 void setAntialiased(
bool enabled);
725 virtual double selectTest(
const QPointF &pos,
bool onlySelectable, QVariant *details=0)
const;
728 bool realVisibility()
const;
731 void layerChanged(QCPLayer *newLayer);
737 QPointer<QCPLayerable> mParentLayerable;
742 virtual void parentPlotInitialized(
QCustomPlot *parentPlot);
744 virtual QRect clipRect()
const;
745 virtual void applyDefaultAntialiasingHint(
QCPPainter *painter)
const = 0;
748 virtual void selectEvent(QMouseEvent *event,
bool additive,
const QVariant &details,
bool *selectionStateChanged);
749 virtual void deselectEvent(
bool *selectionStateChanged);
751 virtual void mousePressEvent(QMouseEvent *event,
const QVariant &details);
752 virtual void mouseMoveEvent(QMouseEvent *event,
const QPointF &startPos);
753 virtual void mouseReleaseEvent(QMouseEvent *event,
const QPointF &startPos);
754 virtual void mouseDoubleClickEvent(QMouseEvent *event,
const QVariant &details);
755 virtual void wheelEvent(QWheelEvent *event);
758 void initializeParentPlot(
QCustomPlot *parentPlot);
760 bool moveToLayer(QCPLayer *layer,
bool prepend);
767 friend class QCPLayer;
783 QCPRange(
double lower,
double upper);
799 double size()
const {
return upper-lower; }
800 double center()
const {
return (upper+lower)*0.5; }
801 void normalize() {
if (lower > upper) qSwap(lower, upper); }
802 void expand(
const QCPRange &otherRange);
803 void expand(
double includeCoord);
805 QCPRange expanded(
double includeCoord)
const;
806 QCPRange bounded(
double lowerBound,
double upperBound)
const;
807 QCPRange sanitizedForLogScale()
const;
808 QCPRange sanitizedForLinScale()
const;
809 bool contains(
double value)
const {
return value >= lower && value <= upper; }
811 static bool validRange(
double lower,
double upper);
812 static bool validRange(
const QCPRange &range);
813 static const double minRange;
814 static const double maxRange;
823 inline QDebug operator<< (QDebug d,
const QCPRange &range)
825 d.nospace() <<
"QCPRange(" << range.
lower <<
", " << range.
upper <<
")";
905 int begin()
const {
return mBegin; }
906 int end()
const {
return mEnd; }
907 int size()
const {
return mEnd-mBegin; }
915 bool isValid()
const {
return (mEnd >= mBegin) && (mBegin >= 0); }
916 bool isEmpty()
const {
return length() == 0; }
955 int dataPointCount()
const;
957 QList<QCPDataRange>
dataRanges()
const {
return mDataRanges; }
961 void addDataRange(
const QCPDataRange &dataRange,
bool simplify=
true);
963 bool isEmpty()
const {
return mDataRanges.isEmpty(); }
973 QList<QCPDataRange> mDataRanges;
1070 d.nospace() <<
"QCPDataRange(" << dataRange.
begin() <<
", " << dataRange.
end() <<
")";
1080 d.nospace() <<
"QCPDataSelection(";
1107 QRect
rect()
const {
return mRect; }
1109 QPen
pen()
const {
return mPen; }
1114 void setPen(
const QPen &pen);
1115 void setBrush(
const QBrush &brush);
1118 Q_SLOT
void cancel();
1121 void started(QMouseEvent *event);
1122 void changed(
const QRect &rect, QMouseEvent *event);
1123 void canceled(
const QRect &rect, QInputEvent *event);
1124 void accepted(
const QRect &rect, QMouseEvent *event);
1135 virtual void startSelection(QMouseEvent *event);
1136 virtual void moveSelection(QMouseEvent *event);
1137 virtual void endSelection(QMouseEvent *event);
1138 virtual void keyPressEvent(QKeyEvent *event);
1162 bool isEmpty()
const;
1168 QHash<QCP::MarginSide, QList<QCPLayoutElement*> > mChildren;
1188 Q_PROPERTY(
QCPLayout* layout READ layout)
1189 Q_PROPERTY(QRect rect READ rect)
1190 Q_PROPERTY(QRect outerRect READ outerRect WRITE setOuterRect)
1191 Q_PROPERTY(QMargins margins READ margins WRITE setMargins)
1192 Q_PROPERTY(QMargins minimumMargins READ minimumMargins WRITE setMinimumMargins)
1193 Q_PROPERTY(QSize minimumSize READ minimumSize WRITE setMinimumSize)
1194 Q_PROPERTY(QSize maximumSize READ maximumSize WRITE setMaximumSize)
1195 Q_PROPERTY(SizeConstraintRect sizeConstraintRect READ sizeConstraintRect WRITE setSizeConstraintRect)
1221 explicit QCPLayoutElement(
QCustomPlot *parentPlot=0);
1222 virtual ~QCPLayoutElement();
1226 QRect
rect()
const {
return mRect; }
1235 QHash<QCP::MarginSide, QCPMarginGroup*>
marginGroups()
const {
return mMarginGroups; }
1238 void setOuterRect(
const QRect &rect);
1239 void setMargins(
const QMargins &margins);
1240 void setMinimumMargins(
const QMargins &margins);
1241 void setAutoMargins(QCP::MarginSides sides);
1242 void setMinimumSize(
const QSize &size);
1243 void setMinimumSize(
int width,
int height);
1244 void setMaximumSize(
const QSize &size);
1245 void setMaximumSize(
int width,
int height);
1247 void setMarginGroup(QCP::MarginSides sides,
QCPMarginGroup *group);
1251 virtual QSize minimumOuterSizeHint()
const;
1252 virtual QSize maximumOuterSizeHint()
const;
1253 virtual QList<QCPLayoutElement*> elements(
bool recursive)
const;
1256 virtual double selectTest(
const QPointF &pos,
bool onlySelectable, QVariant *details=0)
const Q_DECL_OVERRIDE;
1261 QSize mMinimumSize, mMaximumSize;
1263 QRect mRect, mOuterRect;
1264 QMargins mMargins, mMinimumMargins;
1265 QCP::MarginSides mAutoMargins;
1266 QHash<QCP::MarginSide, QCPMarginGroup*> mMarginGroups;
1270 virtual void layoutChanged();
1278 Q_DISABLE_COPY(QCPLayoutElement)
1291 explicit QCPLayout();
1295 virtual QList<QCPLayoutElement*> elements(
bool recursive)
const Q_DECL_OVERRIDE;
1298 virtual int elementCount()
const = 0;
1302 virtual void simplify();
1305 bool removeAt(
int index);
1311 virtual void updateLayout();
1314 void sizeConstraintsChanged()
const;
1317 QVector<int> getSectionSizes(QVector<int> maxSizes, QVector<int> minSizes, QVector<double> stretchFactors,
int totalSize)
const;
1322 Q_DISABLE_COPY(QCPLayout)
1331 Q_PROPERTY(
int rowCount READ rowCount)
1332 Q_PROPERTY(
int columnCount READ columnCount)
1333 Q_PROPERTY(QList<double> columnStretchFactors READ columnStretchFactors WRITE setColumnStretchFactors)
1334 Q_PROPERTY(QList<double> rowStretchFactors READ rowStretchFactors WRITE setRowStretchFactors)
1335 Q_PROPERTY(
int columnSpacing READ columnSpacing WRITE setColumnSpacing)
1336 Q_PROPERTY(
int rowSpacing READ rowSpacing WRITE setRowSpacing)
1337 Q_PROPERTY(FillOrder fillOrder READ fillOrder WRITE setFillOrder)
1338 Q_PROPERTY(
int wrap READ wrap WRITE setWrap)
1354 explicit QCPLayoutGrid();
1355 virtual ~QCPLayoutGrid();
1359 int columnCount()
const {
return mElements.size() > 0 ? mElements.first().size() : 0; }
1368 void setColumnStretchFactor(
int column,
double factor);
1369 void setColumnStretchFactors(
const QList<double> &factors);
1370 void setRowStretchFactor(
int row,
double factor);
1371 void setRowStretchFactors(
const QList<double> &factors);
1372 void setColumnSpacing(
int pixels);
1373 void setRowSpacing(
int pixels);
1374 void setWrap(
int count);
1375 void setFillOrder(
FillOrder order,
bool rearrange=
true);
1379 virtual int elementCount() const Q_DECL_OVERRIDE {
return rowCount()*columnCount(); }
1383 virtual QList<QCPLayoutElement*> elements(
bool recursive)
const Q_DECL_OVERRIDE;
1392 bool hasElement(
int row,
int column);
1393 void expandTo(
int newRowCount,
int newColumnCount);
1394 void insertRow(
int newIndex);
1395 void insertColumn(
int newIndex);
1396 int rowColToIndex(
int row,
int column)
const;
1397 void indexToRowCol(
int index,
int &row,
int &column)
const;
1401 QList<QList<QCPLayoutElement*> > mElements;
1402 QList<double> mColumnStretchFactors;
1403 QList<double> mRowStretchFactors;
1404 int mColumnSpacing, mRowSpacing;
1409 void getMinimumRowColSizes(QVector<int> *minColWidths, QVector<int> *minRowHeights)
const;
1410 void getMaximumRowColSizes(QVector<int> *maxColWidths, QVector<int> *maxRowHeights)
const;
1413 Q_DISABLE_COPY(QCPLayoutGrid)
1435 Qt::Alignment insetAlignment(
int index)
const;
1436 QRectF insetRect(
int index)
const;
1440 void setInsetAlignment(
int index, Qt::Alignment alignment);
1441 void setInsetRect(
int index,
const QRectF &rect);
1450 virtual double selectTest(
const QPointF &pos,
bool onlySelectable, QVariant *details=0)
const Q_DECL_OVERRIDE;
1458 QList<QCPLayoutElement*> mElements;
1459 QList<InsetPlacement> mInsetPlacement;
1460 QList<Qt::Alignment> mInsetAlignment;
1461 QList<QRectF> mInsetRect;
1503 QCPLineEnding(
EndingStyle style,
double width=8,
double length=10,
bool inverted=
false);
1513 void setWidth(
double width);
1514 void setLength(
double length);
1515 void setInverted(
bool inverted);
1518 double boundingDistance()
const;
1519 double realLength()
const;
1526 double mWidth, mLength;
1555 virtual ~QCPAxisTicker();
1564 void setTickCount(
int count);
1565 void setTickOrigin(
double origin);
1568 virtual void generate(
const QCPRange &range,
const QLocale &locale, QChar formatChar,
int precision, QVector<double> &ticks, QVector<double> *subTicks, QVector<QString> *tickLabels);
1577 virtual double getTickStep(
const QCPRange &range);
1578 virtual int getSubTickCount(
double tickStep);
1579 virtual QString getTickLabel(
double tick,
const QLocale &locale, QChar formatChar,
int precision);
1580 virtual QVector<double> createTickVector(
double tickStep,
const QCPRange &range);
1581 virtual QVector<double> createSubTickVector(
int subTickCount,
const QVector<double> &ticks);
1582 virtual QVector<QString> createLabelVector(
const QVector<double> &ticks,
const QLocale &locale, QChar formatChar,
int precision);
1585 void trimTicks(
const QCPRange &range, QVector<double> &ticks,
bool keepOneOutlier)
const;
1586 double pickClosest(
double target,
const QVector<double> &candidates)
const;
1587 double getMantissa(
double input,
double *magnitude=0)
const;
1588 double cleanMantissa(
double input)
const;
1591 Q_DISABLE_COPY(QCPAxisTicker)
1595 Q_DECLARE_METATYPE(QSharedPointer<QCPAxisTicker>)
1613 void setDateTimeFormat(
const QString &format);
1614 void setDateTimeSpec(Qt::TimeSpec spec);
1615 void setTickOrigin(
double origin);
1616 void setTickOrigin(
const QDateTime &origin);
1619 static QDateTime keyToDateTime(
double key);
1620 static double dateTimeToKey(
const QDateTime dateTime);
1621 static double dateTimeToKey(
const QDate date);
1634 virtual QString getTickLabel(
double tick,
const QLocale &locale, QChar formatChar,
int precision)
Q_DECL_OVERRIDE;
1668 void setTimeFormat(
const QString &format);
1669 void setFieldWidth(
TimeUnit unit,
int width);
1683 virtual QString getTickLabel(
double tick,
const QLocale &locale, QChar formatChar,
int precision)
Q_DECL_OVERRIDE;
1686 void replaceUnit(QString &text,
TimeUnit unit,
int value)
const;
1719 void setTickStep(
double step);
1744 QMap<double, QString> &
ticks() {
return mTicks; }
1748 void setTicks(
const QMap<double, QString> &ticks);
1749 void setTicks(
const QVector<double> &positions,
const QVector<QString> &labels);
1750 void setSubTickCount(
int subTicks);
1754 void addTick(
double position,
const QString &label);
1755 void addTicks(
const QMap<double, QString> &ticks);
1756 void addTicks(
const QVector<double> &positions,
const QVector<QString> &labels);
1766 virtual QString getTickLabel(
double tick,
const QLocale &locale, QChar formatChar,
int precision)
Q_DECL_OVERRIDE;
1800 void setPiSymbol(QString symbol);
1801 void setPiValue(
double pi);
1802 void setPeriodicity(
int multiplesOfPi);
1818 virtual QString getTickLabel(
double tick,
const QLocale &locale, QChar formatChar,
int precision)
Q_DECL_OVERRIDE;
1821 void simplifyFraction(
int &numerator,
int &denominator)
const;
1822 QString fractionToString(
int numerator,
int denominator)
const;
1823 QString unicodeFraction(
int numerator,
int denominator)
const;
1824 QString unicodeSuperscript(
int number)
const;
1825 QString unicodeSubscript(
int number)
const;
1845 void setLogBase(
double base);
1846 void setSubTickCount(
int subTicks);
1872 Q_PROPERTY(
bool subGridVisible READ subGridVisible WRITE setSubGridVisible)
1873 Q_PROPERTY(
bool antialiasedSubGrid READ antialiasedSubGrid WRITE setAntialiasedSubGrid)
1874 Q_PROPERTY(
bool antialiasedZeroLine READ antialiasedZeroLine WRITE setAntialiasedZeroLine)
1875 Q_PROPERTY(QPen pen READ pen WRITE setPen)
1876 Q_PROPERTY(QPen subGridPen READ subGridPen WRITE setSubGridPen)
1877 Q_PROPERTY(QPen zeroLinePen READ zeroLinePen WRITE setZeroLinePen)
1886 QPen
pen()
const {
return mPen; }
1891 void setSubGridVisible(
bool visible);
1892 void setAntialiasedSubGrid(
bool enabled);
1893 void setAntialiasedZeroLine(
bool enabled);
1894 void setPen(
const QPen &pen);
1895 void setSubGridPen(
const QPen &pen);
1896 void setZeroLinePen(
const QPen &pen);
1900 bool mSubGridVisible;
1901 bool mAntialiasedSubGrid, mAntialiasedZeroLine;
1902 QPen mPen, mSubGridPen, mZeroLinePen;
1912 void drawGridLines(
QCPPainter *painter)
const;
1913 void drawSubGridLines(
QCPPainter *painter)
const;
1923 Q_PROPERTY(AxisType axisType READ axisType)
1925 Q_PROPERTY(ScaleType scaleType READ scaleType WRITE setScaleType NOTIFY scaleTypeChanged)
1926 Q_PROPERTY(
QCPRange range READ range WRITE setRange NOTIFY rangeChanged)
1927 Q_PROPERTY(
bool rangeReversed READ rangeReversed WRITE setRangeReversed)
1928 Q_PROPERTY(QSharedPointer<QCPAxisTicker> ticker READ ticker WRITE setTicker)
1929 Q_PROPERTY(
bool ticks READ ticks WRITE setTicks)
1930 Q_PROPERTY(
bool tickLabels READ tickLabels WRITE setTickLabels)
1931 Q_PROPERTY(
int tickLabelPadding READ tickLabelPadding WRITE setTickLabelPadding)
1932 Q_PROPERTY(QFont tickLabelFont READ tickLabelFont WRITE setTickLabelFont)
1933 Q_PROPERTY(QColor tickLabelColor READ tickLabelColor WRITE setTickLabelColor)
1934 Q_PROPERTY(
double tickLabelRotation READ tickLabelRotation WRITE setTickLabelRotation)
1935 Q_PROPERTY(LabelSide tickLabelSide READ tickLabelSide WRITE setTickLabelSide)
1936 Q_PROPERTY(QString numberFormat READ numberFormat WRITE setNumberFormat)
1937 Q_PROPERTY(
int numberPrecision READ numberPrecision WRITE setNumberPrecision)
1938 Q_PROPERTY(QVector<double> tickVector READ tickVector)
1939 Q_PROPERTY(QVector<QString> tickVectorLabels READ tickVectorLabels)
1940 Q_PROPERTY(
int tickLengthIn READ tickLengthIn WRITE setTickLengthIn)
1941 Q_PROPERTY(
int tickLengthOut READ tickLengthOut WRITE setTickLengthOut)
1942 Q_PROPERTY(
bool subTicks READ subTicks WRITE setSubTicks)
1943 Q_PROPERTY(
int subTickLengthIn READ subTickLengthIn WRITE setSubTickLengthIn)
1944 Q_PROPERTY(
int subTickLengthOut READ subTickLengthOut WRITE setSubTickLengthOut)
1945 Q_PROPERTY(QPen basePen READ basePen WRITE setBasePen)
1946 Q_PROPERTY(QPen tickPen READ tickPen WRITE setTickPen)
1947 Q_PROPERTY(QPen subTickPen READ subTickPen WRITE setSubTickPen)
1948 Q_PROPERTY(QFont labelFont READ labelFont WRITE setLabelFont)
1949 Q_PROPERTY(QColor labelColor READ labelColor WRITE setLabelColor)
1950 Q_PROPERTY(QString label READ label WRITE setLabel)
1951 Q_PROPERTY(
int labelPadding READ labelPadding WRITE setLabelPadding)
1952 Q_PROPERTY(
int padding READ padding WRITE setPadding)
1953 Q_PROPERTY(
int offset READ offset WRITE setOffset)
1954 Q_PROPERTY(SelectableParts selectedParts READ selectedParts WRITE setSelectedParts NOTIFY selectionChanged)
1955 Q_PROPERTY(SelectableParts selectableParts READ selectableParts WRITE setSelectableParts NOTIFY selectableChanged)
1956 Q_PROPERTY(QFont selectedTickLabelFont READ selectedTickLabelFont WRITE setSelectedTickLabelFont)
1957 Q_PROPERTY(QFont selectedLabelFont READ selectedLabelFont WRITE setSelectedLabelFont)
1958 Q_PROPERTY(QColor selectedTickLabelColor READ selectedTickLabelColor WRITE setSelectedTickLabelColor)
1959 Q_PROPERTY(QColor selectedLabelColor READ selectedLabelColor WRITE setSelectedLabelColor)
1960 Q_PROPERTY(QPen selectedBasePen READ selectedBasePen WRITE setSelectedBasePen)
1961 Q_PROPERTY(QPen selectedTickPen READ selectedTickPen WRITE setSelectedTickPen)
1962 Q_PROPERTY(QPen selectedSubTickPen READ selectedSubTickPen WRITE setSelectedSubTickPen)
1963 Q_PROPERTY(
QCPLineEnding lowerEnding READ lowerEnding WRITE setLowerEnding)
1964 Q_PROPERTY(
QCPLineEnding upperEnding READ upperEnding WRITE setUpperEnding)
1965 Q_PROPERTY(
QCPGrid* grid READ grid)
1979 Q_DECLARE_FLAGS(AxisTypes,
AxisType)
2003 ,spTickLabels = 0x002
2004 ,spAxisLabel = 0x004
2007 Q_FLAGS(SelectableParts)
2019 QSharedPointer<QCPAxisTicker>
ticker()
const {
return mTicker; }
2022 int tickLabelPadding()
const;
2025 double tickLabelRotation()
const;
2027 QString numberFormat()
const;
2031 int tickLengthIn()
const;
2032 int tickLengthOut()
const;
2034 int subTickLengthIn()
const;
2035 int subTickLengthOut()
const;
2041 QString
label()
const {
return mLabel; }
2042 int labelPadding()
const;
2060 Q_SLOT
void setRange(
const QCPRange &range);
2061 void setRange(
double lower,
double upper);
2062 void setRange(
double position,
double size, Qt::AlignmentFlag alignment);
2063 void setRangeLower(
double lower);
2064 void setRangeUpper(
double upper);
2065 void setRangeReversed(
bool reversed);
2066 void setTicker(QSharedPointer<QCPAxisTicker> ticker);
2067 void setTicks(
bool show);
2068 void setTickLabels(
bool show);
2069 void setTickLabelPadding(
int padding);
2070 void setTickLabelFont(
const QFont &font);
2071 void setTickLabelColor(
const QColor &color);
2072 void setTickLabelRotation(
double degrees);
2074 void setNumberFormat(
const QString &formatCode);
2075 void setNumberPrecision(
int precision);
2076 void setTickLength(
int inside,
int outside=0);
2077 void setTickLengthIn(
int inside);
2078 void setTickLengthOut(
int outside);
2079 void setSubTicks(
bool show);
2080 void setSubTickLength(
int inside,
int outside=0);
2081 void setSubTickLengthIn(
int inside);
2082 void setSubTickLengthOut(
int outside);
2083 void setBasePen(
const QPen &pen);
2084 void setTickPen(
const QPen &pen);
2085 void setSubTickPen(
const QPen &pen);
2086 void setLabelFont(
const QFont &font);
2087 void setLabelColor(
const QColor &color);
2088 void setLabel(
const QString &str);
2089 void setLabelPadding(
int padding);
2090 void setPadding(
int padding);
2091 void setOffset(
int offset);
2092 void setSelectedTickLabelFont(
const QFont &font);
2093 void setSelectedLabelFont(
const QFont &font);
2094 void setSelectedTickLabelColor(
const QColor &color);
2095 void setSelectedLabelColor(
const QColor &color);
2096 void setSelectedBasePen(
const QPen &pen);
2097 void setSelectedTickPen(
const QPen &pen);
2098 void setSelectedSubTickPen(
const QPen &pen);
2099 Q_SLOT
void setSelectableParts(
const QCPAxis::SelectableParts &selectableParts);
2100 Q_SLOT
void setSelectedParts(
const QCPAxis::SelectableParts &selectedParts);
2105 virtual double selectTest(
const QPointF &pos,
bool onlySelectable, QVariant *details=0)
const Q_DECL_OVERRIDE;
2109 int pixelOrientation()
const {
return rangeReversed() != (orientation()==Qt::Vertical) ? -1 : 1; }
2110 void moveRange(
double diff);
2111 void scaleRange(
double factor);
2112 void scaleRange(
double factor,
double center);
2113 void setScaleRatio(
const QCPAxis *otherAxis,
double ratio=1.0);
2114 void rescale(
bool onlyVisiblePlottables=
false);
2115 double pixelToCoord(
double value)
const;
2116 double coordToPixel(
double value)
const;
2118 QList<QCPAbstractPlottable*> plottables()
const;
2119 QList<QCPGraph*> graphs()
const;
2120 QList<QCPAbstractItem*> items()
const;
2123 static Qt::Orientation
orientation(
AxisType type) {
return type==atBottom||type==atTop ? Qt::Horizontal : Qt::Vertical; }
2127 void rangeChanged(
const QCPRange &newRange);
2130 void selectionChanged(
const QCPAxis::SelectableParts &parts);
2131 void selectableChanged(
const QCPAxis::SelectableParts &parts);
2140 Qt::Orientation mOrientation;
2141 SelectableParts mSelectableParts, mSelectedParts;
2142 QPen mBasePen, mSelectedBasePen;
2147 QFont mLabelFont, mSelectedLabelFont;
2148 QColor mLabelColor, mSelectedLabelColor;
2153 QFont mTickLabelFont, mSelectedTickLabelFont;
2154 QColor mTickLabelColor, mSelectedTickLabelColor;
2155 int mNumberPrecision;
2156 QLatin1Char mNumberFormatChar;
2157 bool mNumberBeautifulPowers;
2163 QPen mTickPen, mSelectedTickPen;
2164 QPen mSubTickPen, mSelectedSubTickPen;
2167 bool mRangeReversed;
2174 QVector<double> mTickVector;
2175 QVector<QString> mTickVectorLabels;
2176 QVector<double> mSubTickVector;
2177 bool mCachedMarginValid;
2184 virtual int calculateMargin();
2191 virtual
void selectEvent(QMouseEvent *event,
bool additive, const QVariant &details,
bool *selectionStateChanged)
Q_DECL_OVERRIDE;
2192 virtual
void deselectEvent(
bool *selectionStateChanged) Q_DECL_OVERRIDE;
2194 virtual
void mousePressEvent(QMouseEvent *event, const QVariant &details) Q_DECL_OVERRIDE;
2195 virtual
void mouseMoveEvent(QMouseEvent *event, const QPointF &startPos) Q_DECL_OVERRIDE;
2196 virtual
void mouseReleaseEvent(QMouseEvent *event, const QPointF &startPos) Q_DECL_OVERRIDE;
2197 virtual
void wheelEvent(QWheelEvent *event) Q_DECL_OVERRIDE;
2200 void setupTickVectors();
2201 QPen getBasePen() const;
2202 QPen getTickPen() const;
2203 QPen getSubTickPen() const;
2204 QFont getTickLabelFont() const;
2205 QFont getLabelFont() const;
2206 QColor getTickLabelColor() const;
2207 QColor getLabelColor() const;
2210 Q_DISABLE_COPY(QCPAxis)
2216 Q_DECLARE_OPERATORS_FOR_FLAGS(QCPAxis::SelectableParts)
2217 Q_DECLARE_OPERATORS_FOR_FLAGS(QCPAxis::AxisTypes)
2218 Q_DECLARE_METATYPE(QCPAxis::
AxisType)
2227 explicit QCPAxisPainterPrivate(QCustomPlot *parentPlot);
2228 virtual ~QCPAxisPainterPrivate();
2231 virtual int size()
const;
2246 int tickLabelPadding;
2247 double tickLabelRotation;
2249 bool substituteExponent;
2250 bool numberMultiplyCross;
2251 int tickLengthIn, tickLengthOut, subTickLengthIn, subTickLengthOut;
2252 QPen tickPen, subTickPen;
2253 QFont tickLabelFont;
2254 QColor tickLabelColor;
2255 QRect axisRect, viewportRect;
2257 bool abbreviateDecimalPowers;
2258 bool reversedEndings;
2260 QVector<double> subTickPositions;
2261 QVector<double> tickPositions;
2262 QVector<QString> tickLabels;
2273 QRect baseBounds, expBounds,
suffixBounds, totalBounds, rotatedTotalBounds;
2274 QFont baseFont, expFont;
2276 QCustomPlot *mParentPlot;
2277 QByteArray mLabelParameterHash;
2278 QCache<QString, CachedLabel> mLabelCache;
2279 QRect mAxisSelectionBox, mTickLabelsSelectionBox, mLabelSelectionBox;
2281 virtual QByteArray generateLabelParameterHash()
const;
2283 virtual void placeTickLabel(
QCPPainter *painter,
double position,
int distanceToAxis,
const QString &text, QSize *tickLabelsSize);
2285 virtual TickLabelData getTickLabelData(
const QFont &font,
const QString &text)
const;
2286 virtual QPointF getTickLabelDrawOffset(
const TickLabelData &labelData)
const;
2287 virtual void getMaxTickLabelSize(
const QFont &font,
const QString &text, QSize *tickLabelsSize)
const;
2316 Q_FLAGS(ScatterProperties)
2353 QCPScatterStyle(
const QPainterPath &customPath,
const QPen &pen,
const QBrush &brush=Qt::NoBrush,
double size=6);
2356 double size()
const {
return mSize; }
2358 QPen
pen()
const {
return mPen; }
2364 void setFromOther(
const QCPScatterStyle &other, ScatterProperties properties);
2365 void setSize(
double size);
2367 void setPen(
const QPen &pen);
2368 void setBrush(
const QBrush &brush);
2369 void setPixmap(
const QPixmap &pixmap);
2370 void setCustomPath(
const QPainterPath &customPath);
2373 bool isNone()
const {
return mShape == ssNone; }
2376 void applyTo(
QCPPainter *painter,
const QPen &defaultPen)
const;
2377 void drawShape(
QCPPainter *painter,
const QPointF &pos)
const;
2378 void drawShape(
QCPPainter *painter,
double x,
double y)
const;
2387 QPainterPath mCustomPath;
2393 Q_DECLARE_OPERATORS_FOR_FLAGS(QCPScatterStyle::ScatterProperties)
2408 template <
class DataType>
2409 inline bool qcpLessThanSortKey(
const DataType &a,
const DataType &b) {
return a.sortKey() < b.sortKey(); }
2411 template <
class DataType>
2421 int size()
const {
return mData.size()-mPreallocSize; }
2426 void setAutoSqueeze(
bool enabled);
2430 void set(
const QVector<DataType> &data,
bool alreadySorted=
false);
2432 void add(
const QVector<DataType> &data,
bool alreadySorted=
false);
2433 void add(
const DataType &data);
2434 void removeBefore(
double sortKey);
2435 void removeAfter(
double sortKey);
2436 void remove(
double sortKeyFrom,
double sortKeyTo);
2437 void remove(
double sortKey);
2440 void squeeze(
bool preAllocation=
true,
bool postAllocation=
true);
2442 const_iterator
constBegin()
const {
return mData.constBegin()+mPreallocSize; }
2443 const_iterator
constEnd()
const {
return mData.constEnd(); }
2444 iterator
begin() {
return mData.begin()+mPreallocSize; }
2445 iterator
end() {
return mData.end(); }
2446 const_iterator findBegin(
double sortKey,
bool expandedRange=
true)
const;
2447 const_iterator findEnd(
double sortKey,
bool expandedRange=
true)
const;
2448 const_iterator
at(
int index)
const {
return constBegin()+qBound(0, index, size()); }
2452 void limitIteratorsToDataRange(const_iterator &begin, const_iterator &end,
const QCPDataRange &dataRange)
const;
2464 void preallocateGrow(
int minimumPreallocSize);
2465 void performAutoSqueeze();
2606 template <
class DataType>
2610 mPreallocIteration(0)
2622 template <
class DataType>
2639 template <
class DataType>
2655 template <
class DataType>
2671 template <
class DataType>
2677 const int n = data.
size();
2678 const int oldSize =
size();
2680 if (oldSize > 0 && !qcpLessThanSortKey<DataType>(*
constBegin(), *(data.
constEnd()-1)))
2690 if (oldSize > 0 && !qcpLessThanSortKey<DataType>(*(
constEnd()-n-1), *(
constEnd()-n)))
2691 std::inplace_merge(
begin(),
end()-n,
end(), qcpLessThanSortKey<DataType>);
2703 template <
class DataType>
2710 set(data, alreadySorted);
2714 const int n = data.size();
2715 const int oldSize =
size();
2717 if (alreadySorted && oldSize > 0 && !qcpLessThanSortKey<DataType>(*
constBegin(), *(data.constEnd()-1)))
2722 std::copy(data.constBegin(), data.constEnd(),
begin());
2726 std::copy(data.constBegin(), data.constEnd(),
end()-n);
2728 std::sort(
end()-n,
end(), qcpLessThanSortKey<DataType>);
2729 if (oldSize > 0 && !qcpLessThanSortKey<DataType>(*(
constEnd()-n-1), *(
constEnd()-n)))
2730 std::inplace_merge(
begin(),
end()-n,
end(), qcpLessThanSortKey<DataType>);
2740 template <
class DataType>
2743 if (
isEmpty() || !qcpLessThanSortKey<DataType>(data, *(
constEnd()-1)))
2746 }
else if (qcpLessThanSortKey<DataType>(data, *
constBegin()))
2755 mData.insert(insertionPoint, data);
2764 template <
class DataType>
2779 template <
class DataType>
2784 mData.erase(it, itEnd);
2796 template <
class DataType>
2799 if (sortKeyFrom >= sortKeyTo ||
isEmpty())
2804 mData.erase(it, itEnd);
2818 template <
class DataType>
2822 if (it !=
end() && it->sortKey() == sortKey)
2838 template <
class DataType>
2857 template <
class DataType>
2860 std::sort(
begin(),
end(), qcpLessThanSortKey<DataType>);
2873 template <
class DataType>
2905 template <
class DataType>
2932 template <
class DataType>
2939 if (expandedRange && it !=
constEnd())
2959 template <
class DataType>
2968 bool haveLower =
false;
2969 bool haveUpper =
false;
2976 if (DataType::sortKeyIsMainKey())
2980 if (!qIsNaN(it->mainValue()))
2982 range.
lower = it->mainKey();
2992 if (!qIsNaN(it->mainValue()))
2994 range.
upper = it->mainKey();
3003 if (!qIsNaN(it->mainValue()))
3005 current = it->mainKey();
3006 if (current < range.
lower || !haveLower)
3008 range.
lower = current;
3011 if (current > range.
upper || !haveUpper)
3013 range.
upper = current;
3024 if (!qIsNaN(it->mainValue()))
3026 current = it->mainKey();
3027 if ((current < range.
lower || !haveLower) && current < 0)
3029 range.
lower = current;
3032 if ((current > range.
upper || !haveUpper) && current < 0)
3034 range.
upper = current;
3044 if (!qIsNaN(it->mainValue()))
3046 current = it->mainKey();
3047 if ((current < range.
lower || !haveLower) && current > 0)
3049 range.
lower = current;
3052 if ((current > range.
upper || !haveUpper) && current > 0)
3054 range.
upper = current;
3062 foundRange = haveLower && haveUpper;
3082 template <
class DataType>
3091 const bool restrictKeyRange = inKeyRange !=
QCPRange();
3092 bool haveLower =
false;
3093 bool haveUpper =
false;
3097 if (DataType::sortKeyIsMainKey() && restrictKeyRange)
3106 if (restrictKeyRange && (it->mainKey() < inKeyRange.
lower || it->mainKey() > inKeyRange.
upper))
3108 current = it->valueRange();
3109 if ((current.
lower < range.
lower || !haveLower) && !qIsNaN(current.
lower))
3114 if ((current.
upper > range.
upper || !haveUpper) && !qIsNaN(current.
upper))
3124 if (restrictKeyRange && (it->mainKey() < inKeyRange.
lower || it->mainKey() > inKeyRange.
upper))
3126 current = it->valueRange();
3127 if ((current.
lower < range.
lower || !haveLower) && current.
lower < 0 && !qIsNaN(current.
lower))
3132 if ((current.
upper > range.
upper || !haveUpper) && current.
upper < 0 && !qIsNaN(current.
upper))
3142 if (restrictKeyRange && (it->mainKey() < inKeyRange.
lower || it->mainKey() > inKeyRange.
upper))
3144 current = it->valueRange();
3145 if ((current.
lower < range.
lower || !haveLower) && current.
lower > 0 && !qIsNaN(current.
lower))
3150 if ((current.
upper > range.
upper || !haveUpper) && current.
upper > 0 && !qIsNaN(current.
upper))
3158 foundRange = haveLower && haveUpper;
3170 template <
class DataType>
3174 iteratorRange = iteratorRange.
bounded(dataRange.
bounded(this->dataRange()));
3188 template <
class DataType>
3194 int newPreallocSize = minimumPreallocSize;
3201 mPreallocSize = newPreallocSize;
3218 template <
class DataType>
3221 const int totalAlloc =
mData.capacity();
3222 const int postAllocSize = totalAlloc-
mData.size();
3223 const int usedSize =
size();
3224 bool shrinkPostAllocation =
false;
3225 bool shrinkPreAllocation =
false;
3226 if (totalAlloc > 650000)
3228 shrinkPostAllocation = postAllocSize > usedSize*1.5;
3230 }
else if (totalAlloc > 1000)
3232 shrinkPostAllocation = postAllocSize > usedSize*5;
3236 if (shrinkPreAllocation || shrinkPostAllocation)
3237 squeeze(shrinkPreAllocation, shrinkPostAllocation);
3256 QPen
pen()
const {
return mPen; }
3262 void setPen(
const QPen &pen);
3263 void setBrush(
const QBrush &brush);
3265 void setUsedScatterProperties(
const QCPScatterStyle::ScatterProperties &properties);
3299 Q_PROPERTY(QString name READ name WRITE setName)
3300 Q_PROPERTY(
bool antialiasedFill READ antialiasedFill WRITE setAntialiasedFill)
3301 Q_PROPERTY(
bool antialiasedScatters READ antialiasedScatters WRITE setAntialiasedScatters)
3302 Q_PROPERTY(QPen pen READ pen WRITE setPen)
3303 Q_PROPERTY(QBrush brush READ brush WRITE setBrush)
3304 Q_PROPERTY(QCPAxis* keyAxis READ keyAxis WRITE setKeyAxis)
3305 Q_PROPERTY(QCPAxis* valueAxis READ valueAxis WRITE setValueAxis)
3306 Q_PROPERTY(
QCP::SelectionType selectable READ selectable WRITE setSelectable NOTIFY selectableChanged)
3307 Q_PROPERTY(
QCPDataSelection selection READ selection WRITE setSelection NOTIFY selectionChanged)
3308 Q_PROPERTY(
QCPSelectionDecorator* selectionDecorator READ selectionDecorator WRITE setSelectionDecorator)
3311 QCPAbstractPlottable(QCPAxis *keyAxis, QCPAxis *valueAxis);
3312 virtual ~QCPAbstractPlottable();
3315 QString
name()
const {
return mName; }
3318 QPen
pen()
const {
return mPen; }
3320 QCPAxis *
keyAxis()
const {
return mKeyAxis.data(); }
3323 bool selected()
const {
return !mSelection.isEmpty(); }
3328 void setName(
const QString &name);
3329 void setAntialiasedFill(
bool enabled);
3330 void setAntialiasedScatters(
bool enabled);
3331 void setPen(
const QPen &pen);
3332 void setBrush(
const QBrush &brush);
3333 void setKeyAxis(QCPAxis *axis);
3334 void setValueAxis(QCPAxis *axis);
3340 virtual double selectTest(
const QPointF &pos,
bool onlySelectable, QVariant *details=0)
const Q_DECL_OVERRIDE = 0;
3346 void coordsToPixels(
double key,
double value,
double &x,
double &y)
const;
3347 const QPointF coordsToPixels(
double key,
double value)
const;
3348 void pixelsToCoords(
double x,
double y,
double &key,
double &value)
const;
3349 void pixelsToCoords(
const QPointF &pixelPos,
double &key,
double &value)
const;
3350 void rescaleAxes(
bool onlyEnlarge=
false)
const;
3351 void rescaleKeyAxis(
bool onlyEnlarge=
false)
const;
3352 void rescaleValueAxis(
bool onlyEnlarge=
false,
bool inKeyRange=
false)
const;
3355 bool removeFromLegend(
QCPLegend *legend)
const;
3356 bool removeFromLegend()
const;
3359 void selectionChanged(
bool selected);
3366 bool mAntialiasedFill, mAntialiasedScatters;
3369 QPointer<QCPAxis> mKeyAxis, mValueAxis;
3375 virtual QRect clipRect() const Q_DECL_OVERRIDE;
3376 virtual
void draw(
QCPPainter *painter) Q_DECL_OVERRIDE = 0;
3377 virtual
QCP::
Interaction selectionCategory() const Q_DECL_OVERRIDE;
3378 void applyDefaultAntialiasingHint(
QCPPainter *painter) const Q_DECL_OVERRIDE;
3380 virtual
void selectEvent(QMouseEvent *event,
bool additive, const QVariant &details,
bool *selectionStateChanged) Q_DECL_OVERRIDE;
3381 virtual
void deselectEvent(
bool *selectionStateChanged) Q_DECL_OVERRIDE;
3384 virtual
void drawLegendIcon(
QCPPainter *painter, const QRectF &rect) const = 0;
3387 void applyFillAntialiasingHint(
QCPPainter *painter) const;
3388 void applyScattersAntialiasingHint(
QCPPainter *painter) const;
3391 Q_DISABLE_COPY(QCPAbstractPlottable)
3394 friend class QCPAxis;
3409 QCPItemAnchor(QCustomPlot *parentPlot,
QCPAbstractItem *parentItem,
const QString &name,
int anchorId=-1);
3410 virtual ~QCPItemAnchor();
3413 QString
name()
const {
return mName; }
3414 virtual QPointF pixelPosition()
const;
3421 QCustomPlot *mParentPlot;
3424 QSet<QCPItemPosition*> mChildrenX, mChildrenY;
3436 Q_DISABLE_COPY(QCPItemAnchor)
3465 virtual ~QCPItemPosition();
3474 double key()
const {
return mKey; }
3476 QPointF
coords()
const {
return QPointF(mKey, mValue); }
3477 QCPAxis *
keyAxis()
const {
return mKeyAxis.data(); }
3486 bool setParentAnchor(
QCPItemAnchor *parentAnchor,
bool keepPixelPosition=
false);
3487 bool setParentAnchorX(
QCPItemAnchor *parentAnchor,
bool keepPixelPosition=
false);
3488 bool setParentAnchorY(
QCPItemAnchor *parentAnchor,
bool keepPixelPosition=
false);
3489 void setCoords(
double key,
double value);
3490 void setCoords(
const QPointF &coords);
3491 void setAxes(QCPAxis* keyAxis, QCPAxis* valueAxis);
3493 void setPixelPosition(
const QPointF &pixelPosition);
3498 QPointer<QCPAxis> mKeyAxis, mValueAxis;
3499 QPointer<QCPAxisRect> mAxisRect;
3500 double mKey, mValue;
3507 Q_DISABLE_COPY(QCPItemPosition)
3513 class QCP_LIB_DECL QCPAbstractItem :
public QCPLayerable
3517 Q_PROPERTY(
bool clipToAxisRect READ clipToAxisRect WRITE setClipToAxisRect)
3518 Q_PROPERTY(
QCPAxisRect* clipAxisRect READ clipAxisRect WRITE setClipAxisRect)
3519 Q_PROPERTY(
bool selectable READ selectable WRITE setSelectable NOTIFY selectableChanged)
3520 Q_PROPERTY(
bool selected READ selected WRITE setSelected NOTIFY selectionChanged)
3523 explicit QCPAbstractItem(
QCustomPlot *parentPlot);
3524 virtual ~QCPAbstractItem();
3533 void setClipToAxisRect(
bool clip);
3535 Q_SLOT
void setSelectable(
bool selectable);
3536 Q_SLOT
void setSelected(
bool selected);
3539 virtual double selectTest(
const QPointF &pos,
bool onlySelectable, QVariant *details=0)
const Q_DECL_OVERRIDE = 0;
3542 QList<QCPItemPosition*>
positions()
const {
return mPositions; }
3543 QList<QCPItemAnchor*>
anchors()
const {
return mAnchors; }
3544 QCPItemPosition *position(
const QString &name)
const;
3546 bool hasAnchor(
const QString &name)
const;
3549 void selectionChanged(
bool selected);
3550 void selectableChanged(
bool selectable);
3554 bool mClipToAxisRect;
3555 QPointer<QCPAxisRect> mClipAxisRect;
3556 QList<QCPItemPosition*> mPositions;
3557 QList<QCPItemAnchor*> mAnchors;
3558 bool mSelectable, mSelected;
3564 virtual void draw(
QCPPainter *painter) Q_DECL_OVERRIDE = 0;
3566 virtual void selectEvent(QMouseEvent *event,
bool additive,
const QVariant &details,
bool *selectionStateChanged)
Q_DECL_OVERRIDE;
3567 virtual void deselectEvent(
bool *selectionStateChanged)
Q_DECL_OVERRIDE;
3570 virtual QPointF anchorPixelPosition(
int anchorId)
const;
3573 double rectDistance(
const QRectF &rect,
const QPointF &pos,
bool filledRect)
const;
3574 QCPItemPosition *createPosition(
const QString &name);
3575 QCPItemAnchor *createAnchor(
const QString &name,
int anchorId);
3578 Q_DISABLE_COPY(QCPAbstractItem)
3594 Q_PROPERTY(QRect viewport READ viewport WRITE setViewport)
3595 Q_PROPERTY(QPixmap background READ background WRITE setBackground)
3596 Q_PROPERTY(
bool backgroundScaled READ backgroundScaled WRITE setBackgroundScaled)
3597 Q_PROPERTY(Qt::AspectRatioMode backgroundScaledMode READ backgroundScaledMode WRITE setBackgroundScaledMode)
3599 Q_PROPERTY(
bool autoAddPlottableToLegend READ autoAddPlottableToLegend WRITE setAutoAddPlottableToLegend)
3600 Q_PROPERTY(
int selectionTolerance READ selectionTolerance WRITE setSelectionTolerance)
3601 Q_PROPERTY(
bool noAntialiasingOnDrag READ noAntialiasingOnDrag WRITE setNoAntialiasingOnDrag)
3602 Q_PROPERTY(Qt::KeyboardModifier multiSelectModifier READ multiSelectModifier WRITE setMultiSelectModifier)
3603 Q_PROPERTY(
bool openGl READ openGl WRITE setOpenGl)
3628 explicit QCustomPlot(QWidget *parent = 0);
3629 virtual ~QCustomPlot();
3651 void setViewport(
const QRect &rect);
3652 void setBufferDevicePixelRatio(
double ratio);
3653 void setBackground(
const QPixmap &pm);
3654 void setBackground(
const QPixmap &pm,
bool scaled, Qt::AspectRatioMode mode=Qt::KeepAspectRatioByExpanding);
3655 void setBackground(
const QBrush &brush);
3656 void setBackgroundScaled(
bool scaled);
3657 void setBackgroundScaledMode(Qt::AspectRatioMode mode);
3658 void setAntialiasedElements(
const QCP::AntialiasedElements &antialiasedElements);
3660 void setNotAntialiasedElements(
const QCP::AntialiasedElements ¬AntialiasedElements);
3662 void setAutoAddPlottableToLegend(
bool on);
3663 void setInteractions(
const QCP::Interactions &interactions);
3664 void setInteraction(
const QCP::Interaction &interaction,
bool enabled=
true);
3665 void setSelectionTolerance(
int pixels);
3666 void setNoAntialiasingOnDrag(
bool enabled);
3667 void setPlottingHints(
const QCP::PlottingHints &hints);
3669 void setMultiSelectModifier(Qt::KeyboardModifier modifier);
3672 void setOpenGl(
bool enabled,
int multisampling=16);
3676 QCPAbstractPlottable *plottable(
int index);
3677 QCPAbstractPlottable *plottable();
3678 bool removePlottable(QCPAbstractPlottable *plottable);
3679 bool removePlottable(
int index);
3680 int clearPlottables();
3681 int plottableCount()
const;
3682 QList<QCPAbstractPlottable*> selectedPlottables()
const;
3683 QCPAbstractPlottable *plottableAt(
const QPointF &pos,
bool onlySelectable=
false)
const;
3684 bool hasPlottable(QCPAbstractPlottable *plottable)
const;
3689 QCPGraph *addGraph(QCPAxis *keyAxis=0, QCPAxis *valueAxis=0);
3691 bool removeGraph(
int index);
3693 int graphCount()
const;
3694 QList<QCPGraph*> selectedGraphs()
const;
3697 QCPAbstractItem *item(
int index)
const;
3698 QCPAbstractItem *item()
const;
3699 bool removeItem(QCPAbstractItem *item);
3700 bool removeItem(
int index);
3702 int itemCount()
const;
3703 QList<QCPAbstractItem*> selectedItems()
const;
3704 QCPAbstractItem *itemAt(
const QPointF &pos,
bool onlySelectable=
false)
const;
3705 bool hasItem(QCPAbstractItem *item)
const;
3708 QCPLayer *layer(
const QString &name)
const;
3711 bool setCurrentLayer(
const QString &name);
3712 bool setCurrentLayer(
QCPLayer *layer);
3713 int layerCount()
const;
3719 int axisRectCount()
const;
3721 QList<QCPAxisRect*> axisRects()
const;
3723 QCPAxisRect* axisRectAt(
const QPointF &pos)
const;
3724 Q_SLOT
void rescaleAxes(
bool onlyVisiblePlottables=
false);
3726 QList<QCPAxis*> selectedAxes()
const;
3727 QList<QCPLegend*> selectedLegends()
const;
3728 Q_SLOT
void deselectAll();
3730 bool savePdf(
const QString &fileName,
int width=0,
int height=0,
QCP::ExportPen exportPen=
QCP::epAllowCosmetic,
const QString &pdfCreator=QString(),
const QString &pdfTitle=QString());
3734 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);
3735 QPixmap toPixmap(
int width=0,
int height=0,
double scale=1.0);
3736 void toPainter(
QCPPainter *painter,
int width=0,
int height=0);
3739 QCPAxis *xAxis, *yAxis, *xAxis2, *yAxis2;
3743 void mouseDoubleClick(QMouseEvent *event);
3744 void mousePress(QMouseEvent *event);
3745 void mouseMove(QMouseEvent *event);
3746 void mouseRelease(QMouseEvent *event);
3747 void mouseWheel(QWheelEvent *event);
3749 void plottableClick(QCPAbstractPlottable *plottable,
int dataIndex, QMouseEvent *event);
3750 void plottableDoubleClick(QCPAbstractPlottable *plottable,
int dataIndex, QMouseEvent *event);
3751 void itemClick(QCPAbstractItem *item, QMouseEvent *event);
3752 void itemDoubleClick(QCPAbstractItem *item, QMouseEvent *event);
3758 void selectionChangedByUser();
3759 void beforeReplot();
3767 bool mAutoAddPlottableToLegend;
3768 QList<QCPAbstractPlottable*> mPlottables;
3769 QList<QCPGraph*> mGraphs;
3770 QList<QCPAbstractItem*> mItems;
3771 QList<QCPLayer*> mLayers;
3772 QCP::AntialiasedElements mAntialiasedElements, mNotAntialiasedElements;
3773 QCP::Interactions mInteractions;
3774 int mSelectionTolerance;
3775 bool mNoAntialiasingOnDrag;
3776 QBrush mBackgroundBrush;
3777 QPixmap mBackgroundPixmap;
3778 QPixmap mScaledBackgroundPixmap;
3779 bool mBackgroundScaled;
3780 Qt::AspectRatioMode mBackgroundScaledMode;
3782 QCP::PlottingHints mPlottingHints;
3783 Qt::KeyboardModifier mMultiSelectModifier;
3790 QPoint mMousePressPos;
3801 #ifdef QCP_OPENGL_FBO 3802 QSharedPointer<QOpenGLContext> mGlContext;
3803 QSharedPointer<QSurface> mGlSurface;
3804 QSharedPointer<QOpenGLPaintDevice> mGlPaintDevice;
3808 virtual QSize minimumSizeHint() const Q_DECL_OVERRIDE;
3809 virtual QSize sizeHint() const Q_DECL_OVERRIDE;
3810 virtual
void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
3811 virtual
void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
3812 virtual
void mouseDoubleClickEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
3813 virtual
void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
3814 virtual
void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
3815 virtual
void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
3816 virtual
void wheelEvent(QWheelEvent *event) Q_DECL_OVERRIDE;
3820 virtual
void updateLayout();
3821 virtual
void axisRemoved(QCPAxis *axis);
3822 virtual
void legendRemoved(
QCPLegend *legend);
3823 Q_SLOT virtual
void processRectSelection(QRect rect, QMouseEvent *event);
3824 Q_SLOT virtual
void processRectZoom(QRect rect, QMouseEvent *event);
3825 Q_SLOT virtual
void processPointSelection(QMouseEvent *event);
3828 bool registerPlottable(QCPAbstractPlottable *plottable);
3829 bool registerGraph(
QCPGraph *graph);
3830 bool registerItem(QCPAbstractItem* item);
3831 void updateLayerIndices() const;
3832 QCPLayerable *layerableAt(const QPointF &pos,
bool onlySelectable, QVariant *selectionDetails=0) const;
3833 QList<QCPLayerable*> layerableListAt(const QPointF &pos,
bool onlySelectable, QList<QVariant> *selectionDetails=0) const;
3835 void setupPaintBuffers();
3837 bool hasInvalidatedPaintBuffers();
3842 friend class QCPAxis;
3845 friend class QCPAbstractPlottable;
3847 friend class QCPAbstractItem;
3863 virtual int dataCount()
const = 0;
3864 virtual double dataMainKey(
int index)
const = 0;
3865 virtual double dataSortKey(
int index)
const = 0;
3866 virtual double dataMainValue(
int index)
const = 0;
3867 virtual QCPRange dataValueRange(
int index)
const = 0;
3868 virtual QPointF dataPixelPosition(
int index)
const = 0;
3869 virtual bool sortKeyIsMainKey()
const = 0;
3870 virtual QCPDataSelection selectTestRect(
const QRectF &rect,
bool onlySelectable)
const = 0;
3871 virtual int findBegin(
double sortKey,
bool expandedRange=
true)
const = 0;
3872 virtual int findEnd(
double sortKey,
bool expandedRange=
true)
const = 0;
3875 template <
class DataType>
3897 virtual double selectTest(
const QPointF &pos,
bool onlySelectable, QVariant *details=0)
const Q_DECL_OVERRIDE;
3905 void getDataSegments(QList<QCPDataRange> &selectedSegments, QList<QCPDataRange> &unselectedSegments)
const;
3906 void drawPolyline(
QCPPainter *painter,
const QVector<QPointF> &lineData)
const;
4103 template <
class DataType>
4105 QCPAbstractPlottable(keyAxis, valueAxis),
4110 template <
class DataType>
4118 template <
class DataType>
4127 template <
class DataType>
4130 if (index >= 0 && index < mDataContainer->size())
4135 qDebug() << Q_FUNC_INFO <<
"Index out of bounds" << index;
4143 template <
class DataType>
4146 if (index >= 0 && index < mDataContainer->size())
4151 qDebug() << Q_FUNC_INFO <<
"Index out of bounds" << index;
4159 template <
class DataType>
4162 if (index >= 0 && index < mDataContainer->size())
4167 qDebug() << Q_FUNC_INFO <<
"Index out of bounds" << index;
4175 template <
class DataType>
4178 if (index >= 0 && index < mDataContainer->size())
4183 qDebug() << Q_FUNC_INFO <<
"Index out of bounds" << index;
4191 template <
class DataType>
4194 if (index >= 0 && index < mDataContainer->size())
4200 qDebug() << Q_FUNC_INFO <<
"Index out of bounds" << index;
4208 template <
class DataType>
4211 return DataType::sortKeyIsMainKey();
4221 template <
class DataType>
4227 if (!mKeyAxis || !mValueAxis)
4231 double key1, value1, key2, value2;
4235 QCPRange valueRange(value1, value2);
4238 if (DataType::sortKeyIsMainKey())
4246 int currentSegmentBegin = -1;
4249 if (currentSegmentBegin == -1)
4251 if (valueRange.
contains(it->mainValue()) && keyRange.contains(it->mainKey()))
4253 }
else if (!valueRange.
contains(it->mainValue()) || !keyRange.contains(it->mainKey()))
4256 currentSegmentBegin = -1;
4260 if (currentSegmentBegin != -1)
4270 template <
class DataType>
4279 template <
class DataType>
4295 template <
class DataType>
4300 if (!mKeyAxis || !mValueAxis)
4304 double minDistSqr = (std::numeric_limits<double>::max)();
4309 if (DataType::sortKeyIsMainKey())
4312 double posKeyMin, posKeyMax, dummy;
4315 if (posKeyMin > posKeyMax)
4316 qSwap(posKeyMin, posKeyMax);
4322 QCPRange keyRange(mKeyAxis->range());
4323 QCPRange valueRange(mValueAxis->range());
4326 const double mainKey = it->mainKey();
4327 const double mainValue = it->mainValue();
4328 if (keyRange.contains(mainKey) && valueRange.contains(mainValue))
4331 if (currentDistSqr < minDistSqr)
4333 minDistSqr = currentDistSqr;
4343 details->setValue(selectionResult);
4344 return qSqrt(minDistSqr);
4357 template <
class DataType>
4360 selectedSegments.clear();
4361 unselectedSegments.clear();
4367 unselectedSegments << QCPDataRange(0,
dataCount());
4387 template <
class DataType>
4392 painter->pen().style() == Qt::SolidLine &&
4397 bool lastIsNan =
false;
4398 const int lineDataSize = lineData.size();
4399 while (i < lineDataSize && (qIsNaN(lineData.at(i).y()) || qIsNaN(lineData.at(i).x())))
4402 while (i < lineDataSize)
4404 if (!qIsNaN(lineData.at(i).y()) && !qIsNaN(lineData.at(i).x()))
4407 painter->
drawLine(lineData.at(i-1), lineData.at(i));
4416 int segmentStart = 0;
4418 const int lineDataSize = lineData.size();
4419 while (i < lineDataSize)
4421 if (qIsNaN(lineData.at(i).y()) || qIsNaN(lineData.at(i).x()) || qIsInf(lineData.at(i).y()))
4423 painter->drawPolyline(lineData.constData()+segmentStart, i-segmentStart);
4429 painter->drawPolyline(lineData.constData()+segmentStart, lineDataSize-segmentStart);
4476 bool operator==(
const QCPColorGradient &other)
const;
4477 bool operator!=(
const QCPColorGradient &other)
const {
return !(*
this == other); }
4486 void setLevelCount(
int n);
4487 void setColorStops(
const QMap<double, QColor> &colorStops);
4488 void setColorStopAt(
double position,
const QColor &color);
4490 void setPeriodic(
bool enabled);
4493 void colorize(
const double *data,
const QCPRange &range, QRgb *scanLine,
int n,
int dataIndexFactor=1,
bool logarithmic=
false);
4494 void colorize(
const double *data,
const unsigned char *alpha,
const QCPRange &range, QRgb *scanLine,
int n,
int dataIndexFactor=1,
bool logarithmic=
false);
4495 QRgb color(
double position,
const QCPRange &range,
bool logarithmic=
false);
4497 void clearColorStops();
4498 QCPColorGradient inverted()
const;
4503 QMap<double, QColor> mColorStops;
4508 QVector<QRgb> mColorBuffer;
4509 bool mColorBufferInvalidated;
4512 bool stopsUseAlpha()
const;
4513 void updateColorBuffer();
4556 void setBracketPen(
const QPen &pen);
4557 void setBracketBrush(
const QBrush &brush);
4558 void setBracketWidth(
int width);
4559 void setBracketHeight(
int height);
4561 void setTangentToData(
bool enabled);
4562 void setTangentAverage(
int pointCount);
4565 virtual void drawBracket(
QCPPainter *painter,
int direction)
const;
4597 Q_PROPERTY(QPixmap background READ background WRITE setBackground)
4598 Q_PROPERTY(
bool backgroundScaled READ backgroundScaled WRITE setBackgroundScaled)
4599 Q_PROPERTY(Qt::AspectRatioMode backgroundScaledMode READ backgroundScaledMode WRITE setBackgroundScaledMode)
4600 Q_PROPERTY(Qt::Orientations rangeDrag READ rangeDrag WRITE setRangeDrag)
4601 Q_PROPERTY(Qt::Orientations rangeZoom READ rangeZoom WRITE setRangeZoom)
4614 QCPAxis *rangeDragAxis(Qt::Orientation orientation);
4615 QCPAxis *rangeZoomAxis(Qt::Orientation orientation);
4616 QList<QCPAxis*> rangeDragAxes(Qt::Orientation orientation);
4617 QList<QCPAxis*> rangeZoomAxes(Qt::Orientation orientation);
4618 double rangeZoomFactor(Qt::Orientation orientation);
4621 void setBackground(
const QPixmap &pm);
4622 void setBackground(
const QPixmap &pm,
bool scaled, Qt::AspectRatioMode mode=Qt::KeepAspectRatioByExpanding);
4623 void setBackground(
const QBrush &
brush);
4624 void setBackgroundScaled(
bool scaled);
4625 void setBackgroundScaledMode(Qt::AspectRatioMode mode);
4626 void setRangeDrag(Qt::Orientations orientations);
4627 void setRangeZoom(Qt::Orientations orientations);
4628 void setRangeDragAxes(QCPAxis *horizontal, QCPAxis *vertical);
4629 void setRangeDragAxes(QList<QCPAxis*> axes);
4630 void setRangeDragAxes(QList<QCPAxis*> horizontal, QList<QCPAxis*> vertical);
4631 void setRangeZoomAxes(QCPAxis *horizontal, QCPAxis *vertical);
4632 void setRangeZoomAxes(QList<QCPAxis*> axes);
4633 void setRangeZoomAxes(QList<QCPAxis*> horizontal, QList<QCPAxis*> vertical);
4634 void setRangeZoomFactor(
double horizontalFactor,
double verticalFactor);
4635 void setRangeZoomFactor(
double factor);
4640 QList<QCPAxis*> axes(QCPAxis::AxisTypes types)
const;
4641 QList<QCPAxis*> axes()
const;
4643 QList<QCPAxis*> addAxes(QCPAxis::AxisTypes types);
4644 bool removeAxis(QCPAxis *axis);
4647 void zoom(
const QRectF &pixelRect);
4648 void zoom(
const QRectF &pixelRect,
const QList<QCPAxis*> &affectedAxes);
4649 void setupFullAxesBox(
bool connectRanges=
false);
4650 QList<QCPAbstractPlottable*> plottables()
const;
4651 QList<QCPGraph*> graphs()
const;
4652 QList<QCPAbstractItem*> items()
const;
4655 int left()
const {
return mRect.left(); }
4656 int right()
const {
return mRect.right(); }
4657 int top()
const {
return mRect.top(); }
4658 int bottom()
const {
return mRect.bottom(); }
4659 int width()
const {
return mRect.width(); }
4660 int height()
const {
return mRect.height(); }
4661 QSize
size()
const {
return mRect.size(); }
4662 QPoint
topLeft()
const {
return mRect.topLeft(); }
4666 QPoint
center()
const {
return mRect.center(); }
4670 virtual QList<QCPLayoutElement*> elements(
bool recursive)
const Q_DECL_OVERRIDE;
4674 QBrush mBackgroundBrush;
4675 QPixmap mBackgroundPixmap;
4676 QPixmap mScaledBackgroundPixmap;
4677 bool mBackgroundScaled;
4678 Qt::AspectRatioMode mBackgroundScaledMode;
4680 Qt::Orientations mRangeDrag, mRangeZoom;
4683 double mRangeZoomFactorHorz, mRangeZoomFactorVert;
4687 QCP::AntialiasedElements mAADragBackup, mNotAADragBackup;
4689 QHash<QCPAxis::AxisType, QList<QCPAxis*> > mAxes;
4695 virtual void layoutChanged() Q_DECL_OVERRIDE;
4697 virtual
void mousePressEvent(QMouseEvent *event, const QVariant &details) Q_DECL_OVERRIDE;
4698 virtual
void mouseMoveEvent(QMouseEvent *event, const QPointF &startPos) Q_DECL_OVERRIDE;
4699 virtual
void mouseReleaseEvent(QMouseEvent *event, const QPointF &startPos) Q_DECL_OVERRIDE;
4700 virtual
void wheelEvent(QWheelEvent *event) Q_DECL_OVERRIDE;
4704 void updateAxesOffset(QCPAxis::AxisType type);
4723 Q_PROPERTY(
QCPLegend* parentLegend READ parentLegend)
4724 Q_PROPERTY(QFont font READ font WRITE setFont)
4725 Q_PROPERTY(QColor textColor READ textColor WRITE setTextColor)
4726 Q_PROPERTY(QFont selectedFont READ selectedFont WRITE setSelectedFont)
4727 Q_PROPERTY(QColor selectedTextColor READ selectedTextColor WRITE setSelectedTextColor)
4736 QFont
font()
const {
return mFont; }
4744 void setFont(
const QFont &font);
4745 void setTextColor(
const QColor &color);
4746 void setSelectedFont(
const QFont &font);
4747 void setSelectedTextColor(
const QColor &color);
4763 QFont mSelectedFont;
4764 QColor mSelectedTextColor;
4773 virtual void selectEvent(QMouseEvent *event,
bool additive,
const QVariant &details,
bool *selectionStateChanged)
Q_DECL_OVERRIDE;
4801 QPen getIconBorderPen()
const;
4802 QColor getTextColor()
const;
4803 QFont getFont()
const;
4811 Q_PROPERTY(QPen borderPen READ borderPen WRITE setBorderPen)
4812 Q_PROPERTY(QBrush brush READ brush WRITE
setBrush)
4813 Q_PROPERTY(QFont font READ font WRITE setFont)
4814 Q_PROPERTY(QColor textColor READ textColor WRITE setTextColor)
4815 Q_PROPERTY(QSize iconSize READ iconSize WRITE setIconSize)
4816 Q_PROPERTY(
int iconTextPadding READ iconTextPadding WRITE setIconTextPadding)
4817 Q_PROPERTY(QPen iconBorderPen READ iconBorderPen WRITE setIconBorderPen)
4818 Q_PROPERTY(SelectableParts selectableParts READ selectableParts WRITE setSelectableParts NOTIFY
selectionChanged)
4819 Q_PROPERTY(SelectableParts selectedParts READ selectedParts WRITE setSelectedParts NOTIFY
selectableChanged)
4820 Q_PROPERTY(QPen selectedBorderPen READ selectedBorderPen WRITE setSelectedBorderPen)
4821 Q_PROPERTY(QPen selectedIconBorderPen READ selectedIconBorderPen WRITE setSelectedIconBorderPen)
4823 Q_PROPERTY(QFont selectedFont READ selectedFont WRITE setSelectedFont)
4824 Q_PROPERTY(QColor selectedTextColor READ selectedTextColor WRITE setSelectedTextColor)
4833 ,spLegendBox = 0x001
4837 Q_FLAGS(SelectableParts)
4840 explicit QCPLegend();
4841 virtual ~QCPLegend();
4846 QFont
font()
const {
return mFont; }
4852 SelectableParts selectedParts()
const;
4860 void setBorderPen(
const QPen &
pen);
4861 void setBrush(
const QBrush &brush);
4862 void setFont(
const QFont &font);
4863 void setTextColor(
const QColor &color);
4864 void setIconSize(
const QSize &size);
4865 void setIconSize(
int width,
int height);
4866 void setIconTextPadding(
int padding);
4867 void setIconBorderPen(
const QPen &pen);
4868 Q_SLOT
void setSelectableParts(
const SelectableParts &selectableParts);
4869 Q_SLOT
void setSelectedParts(
const SelectableParts &selectedParts);
4870 void setSelectedBorderPen(
const QPen &pen);
4871 void setSelectedIconBorderPen(
const QPen &pen);
4873 void setSelectedFont(
const QFont &font);
4874 void setSelectedTextColor(
const QColor &color);
4882 int itemCount()
const;
4886 bool removeItem(
int index);
4889 QList<QCPAbstractLegendItem*> selectedItems()
const;
4897 QPen mBorderPen, mIconBorderPen;
4902 int mIconTextPadding;
4903 SelectableParts mSelectedParts, mSelectableParts;
4904 QPen mSelectedBorderPen, mSelectedIconBorderPen;
4906 QFont mSelectedFont;
4907 QColor mSelectedTextColor;
4915 virtual void selectEvent(QMouseEvent *event,
bool additive,
const QVariant &details,
bool *selectionStateChanged)
Q_DECL_OVERRIDE;
4919 QPen getBorderPen()
const;
4920 QBrush getBrush()
const;
4923 Q_DISABLE_COPY(QCPLegend)
4928 Q_DECLARE_OPERATORS_FOR_FLAGS(QCPLegend::SelectableParts)
4941 Q_PROPERTY(QString text READ text WRITE setText)
4957 QString
text()
const {
return mText; }
4967 void setText(
const QString &text);
4968 void setTextFlags(
int flags);
4969 void setFont(
const QFont &font);
4985 void clicked(QMouseEvent *event);
4986 void doubleClicked(QMouseEvent *event);
5005 virtual
void selectEvent(QMouseEvent *event,
bool additive, const QVariant &details,
bool *selectionStateChanged) Q_DECL_OVERRIDE;
5006 virtual
void deselectEvent(
bool *selectionStateChanged) Q_DECL_OVERRIDE;
5009 QFont mainFont() const;
5010 QColor mainTextColor() const;
5032 QImage mGradientImage;
5033 bool mGradientImageInvalidated;
5042 void updateGradientImage();
5043 Q_SLOT
void axisSelectionChanged(QCPAxis::SelectableParts selectedParts);
5044 Q_SLOT
void axisSelectableChanged(QCPAxis::SelectableParts selectableParts);
5049 class QCP_LIB_DECL QCPColorScale :
public QCPLayoutElement
5054 Q_PROPERTY(
QCPRange dataRange READ dataRange WRITE setDataRange NOTIFY dataRangeChanged)
5055 Q_PROPERTY(
QCPAxis::ScaleType dataScaleType READ dataScaleType WRITE setDataScaleType NOTIFY dataScaleTypeChanged)
5056 Q_PROPERTY(
QCPColorGradient gradient READ gradient WRITE setGradient NOTIFY gradientChanged)
5057 Q_PROPERTY(QString label READ label WRITE setLabel)
5058 Q_PROPERTY(
int barWidth READ barWidth WRITE setBarWidth)
5059 Q_PROPERTY(
bool rangeDrag READ rangeDrag WRITE setRangeDrag)
5060 Q_PROPERTY(
bool rangeZoom READ rangeZoom WRITE setRangeZoom)
5064 virtual ~QCPColorScale();
5067 QCPAxis *
axis()
const {
return mColorAxis.data(); }
5072 QString label()
const;
5074 bool rangeDrag()
const;
5075 bool rangeZoom()
const;
5079 Q_SLOT
void setDataRange(
const QCPRange &dataRange);
5082 void setLabel(
const QString &str);
5083 void setBarWidth(
int width);
5084 void setRangeDrag(
bool enabled);
5085 void setRangeZoom(
bool enabled);
5088 QList<QCPColorMap*> colorMaps()
const;
5089 void rescaleDataRange(
bool onlyVisibleMaps);
5095 void dataRangeChanged(
const QCPRange &newRange);
5108 QPointer<QCPColorScaleAxisRectPrivate> mAxisRect;
5109 QPointer<QCPAxis> mColorAxis;
5120 Q_DISABLE_COPY(QCPColorScale)
5167 Q_PROPERTY(LineStyle lineStyle READ lineStyle WRITE setLineStyle)
5168 Q_PROPERTY(
QCPScatterStyle scatterStyle READ scatterStyle WRITE setScatterStyle)
5169 Q_PROPERTY(
int scatterSkip READ scatterSkip WRITE setScatterSkip)
5170 Q_PROPERTY(
QCPGraph* channelFillGraph READ channelFillGraph WRITE setChannelFillGraph)
5171 Q_PROPERTY(
bool adaptiveSampling READ adaptiveSampling WRITE setAdaptiveSampling)
5201 void setData(QSharedPointer<QCPGraphDataContainer> data);
5202 void setData(
const QVector<double> &keys,
const QVector<double> &values,
bool alreadySorted=
false);
5205 void setScatterSkip(
int skip);
5206 void setChannelFillGraph(
QCPGraph *targetGraph);
5207 void setAdaptiveSampling(
bool enabled);
5210 void addData(
const QVector<double> &keys,
const QVector<double> &values,
bool alreadySorted=
false);
5211 void addData(
double key,
double value);
5223 QPointer<QCPGraph> mChannelFillGraph;
5224 bool mAdaptiveSampling;
5231 virtual void drawFill(
QCPPainter *painter, QVector<QPointF> *lines)
const;
5232 virtual void drawScatterPlot(
QCPPainter *painter,
const QVector<QPointF> &scatters,
const QCPScatterStyle &style)
const;
5233 virtual void drawLinePlot(
QCPPainter *painter,
const QVector<QPointF> &lines)
const;
5234 virtual void drawImpulsePlot(
QCPPainter *painter,
const QVector<QPointF> &lines)
const;
5241 void getLines(QVector<QPointF> *lines,
const QCPDataRange &dataRange)
const;
5242 void getScatters(QVector<QPointF> *scatters,
const QCPDataRange &dataRange)
const;
5243 QVector<QPointF> dataToLines(
const QVector<QCPGraphData> &data)
const;
5244 QVector<QPointF> dataToStepLeftLines(
const QVector<QCPGraphData> &data)
const;
5245 QVector<QPointF> dataToStepRightLines(
const QVector<QCPGraphData> &data)
const;
5246 QVector<QPointF> dataToStepCenterLines(
const QVector<QCPGraphData> &data)
const;
5247 QVector<QPointF> dataToImpulseLines(
const QVector<QCPGraphData> &data)
const;
5248 QVector<QCPDataRange> getNonNanSegments(
const QVector<QPointF> *lineData, Qt::Orientation keyOrientation)
const;
5249 QVector<QPair<QCPDataRange, QCPDataRange> > getOverlappingSegments(QVector<QCPDataRange> thisSegments,
const QVector<QPointF> *thisData, QVector<QCPDataRange> otherSegments,
const QVector<QPointF> *otherData)
const;
5250 bool segmentsIntersect(
double aLower,
double aUpper,
double bLower,
double bUpper,
int &bPrecedence)
const;
5251 QPointF getFillBasePoint(QPointF matchingDataPoint)
const;
5252 const QPolygonF getFillPolygon(
const QVector<QPointF> *lineData,
QCPDataRange segment)
const;
5253 const QPolygonF getChannelFillPolygon(
const QVector<QPointF> *lineData,
QCPDataRange thisSegment,
const QVector<QPointF> *otherData,
QCPDataRange otherSegment)
const;
5254 int findIndexBelowX(
const QVector<QPointF> *data,
double x)
const;
5255 int findIndexAboveX(
const QVector<QPointF> *data,
double x)
const;
5256 int findIndexBelowY(
const QVector<QPointF> *data,
double y)
const;
5257 int findIndexAboveY(
const QVector<QPointF> *data,
double y)
const;
5261 friend class QCPLegend;
5286 double t, key, value;
5307 Q_PROPERTY(
QCPScatterStyle scatterStyle READ scatterStyle WRITE setScatterStyle)
5308 Q_PROPERTY(
int scatterSkip READ scatterSkip WRITE setScatterSkip)
5309 Q_PROPERTY(LineStyle lineStyle READ lineStyle WRITE setLineStyle)
5332 void setData(QSharedPointer<QCPCurveDataContainer> data);
5333 void setData(
const QVector<double> &t,
const QVector<double> &keys,
const QVector<double> &values,
bool alreadySorted=
false);
5334 void setData(
const QVector<double> &keys,
const QVector<double> &values);
5336 void setScatterSkip(
int skip);
5340 void addData(
const QVector<double> &t,
const QVector<double> &keys,
const QVector<double> &values,
bool alreadySorted=
false);
5341 void addData(
const QVector<double> &keys,
const QVector<double> &values);
5342 void addData(
double t,
double key,
double value);
5343 void addData(
double key,
double value);
5361 virtual void drawCurveLine(
QCPPainter *painter,
const QVector<QPointF> &lines)
const;
5365 void getCurveLines(QVector<QPointF> *lines,
const QCPDataRange &dataRange,
double penWidth)
const;
5366 void getScatters(QVector<QPointF> *scatters,
const QCPDataRange &dataRange,
double scatterWidth)
const;
5367 int getRegion(
double key,
double value,
double keyMin,
double valueMax,
double keyMax,
double valueMin)
const;
5368 QPointF getOptimizedPoint(
int prevRegion,
double prevKey,
double prevValue,
double key,
double value,
double keyMin,
double valueMax,
double keyMax,
double valueMin)
const;
5369 QVector<QPointF> getOptimizedCornerPoints(
int prevRegion,
int currentRegion,
double prevKey,
double prevValue,
double key,
double value,
double keyMin,
double valueMax,
double keyMax,
double valueMin)
const;
5370 bool mayTraverse(
int prevRegion,
int currentRegion)
const;
5371 bool getTraverse(
double prevKey,
double prevValue,
double key,
double value,
double keyMin,
double valueMax,
double keyMax,
double valueMin, QPointF &crossA, QPointF &crossB)
const;
5372 void getTraverseCornerPoints(
int prevRegion,
int currentRegion,
double keyMin,
double valueMax,
double keyMax,
double valueMin, QVector<QPointF> &beforeTraverse, QVector<QPointF> &afterTraverse)
const;
5376 friend class QCPLegend;
5390 Q_PROPERTY(SpacingType spacingType READ spacingType WRITE setSpacingType)
5391 Q_PROPERTY(
double spacing READ spacing WRITE setSpacing)
5415 void setSpacing(
double spacing);
5418 QList<QCPBars*>
bars()
const {
return mBars; }
5419 QCPBars* bars(
int index)
const;
5420 int size()
const {
return mBars.size(); }
5425 void insert(
int i,
QCPBars *bars);
5433 QList<QCPBars*> mBars;
5436 void registerBars(
QCPBars *bars);
5437 void unregisterBars(
QCPBars *bars);
5440 double keyPixelOffset(
const QCPBars *bars,
double keyCoord);
5441 double getPixelSpacing(
const QCPBars *bars,
double keyCoord);
5455 QCPBarsData(
double key,
double value);
5458 inline static QCPBarsData
fromSortKey(
double sortKey) {
return QCPBarsData(sortKey, 0); }
5486 Q_PROPERTY(
double width READ width WRITE setWidth)
5487 Q_PROPERTY(WidthType widthType READ widthType WRITE setWidthType)
5488 Q_PROPERTY(
QCPBarsGroup* barsGroup READ barsGroup WRITE setBarsGroup)
5489 Q_PROPERTY(
double baseValue READ baseValue WRITE setBaseValue)
5490 Q_PROPERTY(
double stackingGap READ stackingGap WRITE setStackingGap)
5491 Q_PROPERTY(
QCPBars* barBelow READ barBelow)
5492 Q_PROPERTY(
QCPBars* barAbove READ barAbove)
5521 void setData(QSharedPointer<QCPBarsDataContainer> data);
5522 void setData(
const QVector<double> &keys,
const QVector<double> &values,
bool alreadySorted=
false);
5523 void setWidth(
double width);
5526 void setBaseValue(
double baseValue);
5527 void setStackingGap(
double pixels);
5530 void addData(
const QVector<double> &keys,
const QVector<double> &values,
bool alreadySorted=
false);
5531 void addData(
double key,
double value);
5532 void moveBelow(
QCPBars *bars);
5533 void moveAbove(
QCPBars *bars);
5549 QPointer<QCPBars> mBarBelow, mBarAbove;
5557 QRectF getBarRect(
double key,
double value)
const;
5558 void getPixelWidth(
double key,
double &lower,
double &upper)
const;
5559 double getStackedBaseValue(
double key,
bool positive)
const;
5577 QCPStatisticalBoxData();
5578 QCPStatisticalBoxData(
double key,
double minimum,
double lowerQuartile,
double median,
double upperQuartile,
double maximum,
const QVector<double>& outliers=QVector<double>());
5581 inline static QCPStatisticalBoxData
fromSortKey(
double sortKey) {
return QCPStatisticalBoxData(sortKey, 0, 0, 0, 0, 0); }
5590 for (QVector<double>::const_iterator it = outliers.constBegin(); it != outliers.constEnd(); ++it)
5617 Q_PROPERTY(
double width READ width WRITE setWidth)
5618 Q_PROPERTY(
double whiskerWidth READ whiskerWidth WRITE setWhiskerWidth)
5619 Q_PROPERTY(QPen whiskerPen READ whiskerPen WRITE setWhiskerPen)
5620 Q_PROPERTY(QPen whiskerBarPen READ whiskerBarPen WRITE setWhiskerBarPen)
5621 Q_PROPERTY(
bool whiskerAntialiased READ whiskerAntialiased WRITE setWhiskerAntialiased)
5622 Q_PROPERTY(QPen medianPen READ medianPen WRITE setMedianPen)
5623 Q_PROPERTY(
QCPScatterStyle outlierStyle READ outlierStyle WRITE setOutlierStyle)
5639 void setData(QSharedPointer<QCPStatisticalBoxDataContainer> data);
5640 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);
5641 void setWidth(
double width);
5642 void setWhiskerWidth(
double width);
5643 void setWhiskerPen(
const QPen &
pen);
5644 void setWhiskerBarPen(
const QPen &pen);
5645 void setWhiskerAntialiased(
bool enabled);
5646 void setMedianPen(
const QPen &pen);
5650 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);
5651 void addData(
double key,
double minimum,
double lowerQuartile,
double median,
double upperQuartile,
double maximum,
const QVector<double> &outliers=QVector<double>());
5662 double mWhiskerWidth;
5663 QPen mWhiskerPen, mWhiskerBarPen;
5705 double data(
double key,
double value);
5706 double cell(
int keyIndex,
int valueIndex);
5707 unsigned char alpha(
int keyIndex,
int valueIndex);
5710 void setSize(
int keySize,
int valueSize);
5711 void setKeySize(
int keySize);
5712 void setValueSize(
int valueSize);
5714 void setKeyRange(
const QCPRange &keyRange);
5715 void setValueRange(
const QCPRange &valueRange);
5716 void setData(
double key,
double value,
double z);
5717 void setCell(
int keyIndex,
int valueIndex,
double z);
5718 void setAlpha(
int keyIndex,
int valueIndex,
unsigned char alpha);
5721 void recalculateDataBounds();
5724 void fill(
double z);
5725 void fillAlpha(
unsigned char alpha);
5727 void coordToCell(
double key,
double value,
int *keyIndex,
int *valueIndex)
const;
5728 void cellToCoord(
int keyIndex,
int valueIndex,
double *key,
double *value)
const;
5732 int mKeySize, mValueSize;
5742 bool createAlpha(
bool initializeOpaque=
true);
5752 Q_PROPERTY(
QCPRange dataRange READ dataRange WRITE setDataRange NOTIFY dataRangeChanged)
5753 Q_PROPERTY(
QCPAxis::ScaleType dataScaleType READ dataScaleType WRITE setDataScaleType NOTIFY dataScaleTypeChanged)
5754 Q_PROPERTY(
QCPColorGradient gradient READ gradient WRITE setGradient NOTIFY gradientChanged)
5755 Q_PROPERTY(
bool interpolate READ interpolate WRITE setInterpolate)
5756 Q_PROPERTY(
bool tightBoundary READ tightBoundary WRITE setTightBoundary)
5757 Q_PROPERTY(
QCPColorScale* colorScale READ colorScale WRITE setColorScale)
5774 Q_SLOT
void setDataRange(
const QCPRange &dataRange);
5777 void setInterpolate(
bool enabled);
5778 void setTightBoundary(
bool enabled);
5782 void rescaleDataRange(
bool recalculateDataBounds=
false);
5783 Q_SLOT
void updateLegendIcon(Qt::TransformationMode transformMode=Qt::SmoothTransformation,
const QSize &thumbSize=QSize(32, 18));
5791 void dataRangeChanged(
const QCPRange &newRange);
5802 bool mTightBoundary;
5803 QPointer<QCPColorScale> mColorScale;
5806 QImage mMapImage, mUndersampledMapImage;
5807 QPixmap mLegendIcon;
5808 bool mMapImageInvalidated;
5811 virtual void updateMapImage();
5831 QCPFinancialData(
double key,
double open,
double high,
double low,
double close);
5834 inline static QCPFinancialData
fromSortKey(
double sortKey) {
return QCPFinancialData(sortKey, 0, 0, 0, 0); }
5842 double key, open, high, low, close;
5862 Q_PROPERTY(ChartStyle chartStyle READ chartStyle WRITE setChartStyle)
5863 Q_PROPERTY(
double width READ width WRITE setWidth)
5864 Q_PROPERTY(WidthType widthType READ widthType WRITE setWidthType)
5865 Q_PROPERTY(
bool twoColored READ twoColored WRITE setTwoColored)
5866 Q_PROPERTY(QBrush brushPositive READ brushPositive WRITE setBrushPositive)
5867 Q_PROPERTY(QBrush brushNegative READ brushNegative WRITE setBrushNegative)
5868 Q_PROPERTY(QPen penPositive READ penPositive WRITE setPenPositive)
5869 Q_PROPERTY(QPen penNegative READ penNegative WRITE setPenNegative)
5909 void setData(QSharedPointer<QCPFinancialDataContainer> data);
5910 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);
5912 void setWidth(
double width);
5914 void setTwoColored(
bool twoColored);
5915 void setBrushPositive(
const QBrush &
brush);
5916 void setBrushNegative(
const QBrush &brush);
5917 void setPenPositive(
const QPen &
pen);
5918 void setPenNegative(
const QPen &pen);
5921 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);
5922 void addData(
double key,
double open,
double high,
double low,
double close);
5931 static QCPFinancialDataContainer timeSeriesToOhlc(
const QVector<double> &time,
const QVector<double> &value,
double timeBinSize,
double timeBinOffset = 0);
5939 QBrush mBrushPositive, mBrushNegative;
5940 QPen mPenPositive, mPenNegative;
5949 double getPixelWidth(
double key,
double keyPixel)
const;
5970 explicit QCPErrorBarsData(
double error);
5971 QCPErrorBarsData(
double errorMinus,
double errorPlus);
5999 Q_PROPERTY(QSharedPointer<QCPErrorBarsDataContainer> data READ data WRITE setData)
6001 Q_PROPERTY(
ErrorType errorType READ errorType WRITE setErrorType)
6002 Q_PROPERTY(
double whiskerWidth READ whiskerWidth WRITE setWhiskerWidth)
6003 Q_PROPERTY(
double symbolGap READ symbolGap WRITE setSymbolGap)
6028 void setData(QSharedPointer<QCPErrorBarsDataContainer> data);
6029 void setData(
const QVector<double> &error);
6030 void setData(
const QVector<double> &errorMinus,
const QVector<double> &errorPlus);
6033 void setWhiskerWidth(
double pixels);
6034 void setSymbolGap(
double pixels);
6037 void addData(
const QVector<double> &error);
6038 void addData(
const QVector<double> &errorMinus,
const QVector<double> &errorPlus);
6039 void addData(
double error);
6040 void addData(
double errorMinus,
double errorPlus);
6073 void getErrorBarLines(
QCPErrorBarsDataContainer::const_iterator it, QVector<QLineF> &backbones, QVector<QLineF> &whiskers) const;
6078 bool errorBarVisible(
int index) const;
6079 bool rectIntersectsLine(const QRectF &pixelRect, const QLineF &line) const;
6124 QLineF getRectClippedStraightLine(
const QCPVector2D &point1,
const QCPVector2D &vec,
const QRect &rect)
const;
6145 virtual ~QCPItemLine();
6195 virtual ~QCPItemCurve();
6246 virtual ~QCPItemRect();
6273 enum AnchorIndex {aiTop, aiTopRight, aiRight, aiBottom, aiBottomLeft, aiLeft};
6281 virtual QPointF anchorPixelPosition(
int anchorId)
const Q_DECL_OVERRIDE;
6298 Q_PROPERTY(QColor color READ color WRITE setColor)
6299 Q_PROPERTY(QColor selectedColor READ selectedColor WRITE setSelectedColor)
6304 Q_PROPERTY(QFont font READ font WRITE setFont)
6305 Q_PROPERTY(QFont selectedFont READ selectedFont WRITE setSelectedFont)
6306 Q_PROPERTY(QString text READ text WRITE setText)
6307 Q_PROPERTY(Qt::Alignment positionAlignment READ positionAlignment WRITE setPositionAlignment)
6308 Q_PROPERTY(Qt::Alignment textAlignment READ textAlignment WRITE setTextAlignment)
6309 Q_PROPERTY(
double rotation READ rotation WRITE setRotation)
6310 Q_PROPERTY(QMargins padding READ padding WRITE setPadding)
6314 virtual ~QCPItemText();
6323 QFont
font()
const {
return mFont; }
6325 QString
text()
const {
return mText; }
6332 void setColor(
const QColor &color);
6333 void setSelectedColor(
const QColor &color);
6338 void setFont(
const QFont &font);
6339 void setSelectedFont(
const QFont &font);
6340 void setText(
const QString &text);
6341 void setPositionAlignment(Qt::Alignment alignment);
6342 void setTextAlignment(Qt::Alignment alignment);
6343 void setRotation(
double degrees);
6344 void setPadding(
const QMargins &padding);
6360 enum AnchorIndex {aiTopLeft, aiTop, aiTopRight, aiRight, aiBottomRight, aiBottom, aiBottomLeft, aiLeft};
6363 QColor mColor, mSelectedColor;
6366 QFont mFont, mSelectedFont;
6368 Qt::Alignment mPositionAlignment;
6369 Qt::Alignment mTextAlignment;
6375 virtual QPointF anchorPixelPosition(
int anchorId)
const Q_DECL_OVERRIDE;
6378 QPointF getTextDrawPoint(
const QPointF &pos,
const QRectF &rect, Qt::Alignment positionAlignment)
const;
6379 QFont mainFont()
const;
6380 QColor mainColor()
const;
6402 virtual ~QCPItemEllipse();
6432 enum AnchorIndex {aiTopLeftRim, aiTop, aiTopRightRim, aiRight, aiBottomRightRim, aiBottom, aiBottomLeftRim, aiLeft, aiCenter};
6440 virtual QPointF anchorPixelPosition(
int anchorId)
const Q_DECL_OVERRIDE;
6457 Q_PROPERTY(QPixmap pixmap READ pixmap WRITE setPixmap)
6458 Q_PROPERTY(
bool scaled READ scaled WRITE setScaled)
6459 Q_PROPERTY(Qt::AspectRatioMode aspectRatioMode READ aspectRatioMode)
6460 Q_PROPERTY(Qt::TransformationMode transformationMode READ transformationMode)
6466 virtual ~QCPItemPixmap();
6477 void setPixmap(
const QPixmap &pixmap);
6478 void setScaled(
bool scaled, Qt::AspectRatioMode aspectRatioMode=Qt::KeepAspectRatio, Qt::TransformationMode transformationMode=Qt::SmoothTransformation);
6495 enum AnchorIndex {aiTop, aiTopRight, aiRight, aiBottom, aiBottomLeft, aiLeft};
6499 QPixmap mScaledPixmap;
6501 bool mScaledPixmapInvalidated;
6502 Qt::AspectRatioMode mAspectRatioMode;
6503 Qt::TransformationMode mTransformationMode;
6508 virtual QPointF anchorPixelPosition(
int anchorId)
const Q_DECL_OVERRIDE;
6511 void updateScaledPixmap(QRect finalRect=QRect(),
bool flipHorz=
false,
bool flipVert=
false);
6512 QRect getFinalRect(
bool *flippedHorz=0,
bool *flippedVert=0)
const;
6530 Q_PROPERTY(
double size READ size WRITE setSize)
6531 Q_PROPERTY(TracerStyle style READ style WRITE setStyle)
6532 Q_PROPERTY(
QCPGraph* graph READ graph WRITE setGraph)
6533 Q_PROPERTY(
double graphKey READ graphKey WRITE setGraphKey)
6534 Q_PROPERTY(
bool interpolating READ interpolating WRITE setInterpolating)
6551 virtual ~QCPItemTracer();
6558 double size()
const {
return mSize; }
6569 void setSize(
double size);
6572 void setGraphKey(
double key);
6573 void setInterpolating(
bool enabled);
6579 void updatePosition();
6591 bool mInterpolating;
6614 Q_PROPERTY(
double length READ length WRITE setLength)
6615 Q_PROPERTY(BracketStyle style READ style WRITE setStyle)
6632 virtual ~QCPItemBracket();
6643 void setLength(
double length);
6662 virtual QPointF anchorPixelPosition(
int anchorId)
const Q_DECL_OVERRIDE;
6672 #endif // QCUSTOMPLOT_H virtual void donePainting()
Definition: qcustomplot.h:538
double whiskerWidth() const
Definition: qcustomplot.h:5631
ColorInterpolation
Definition: qcustomplot.h:1909
BracketStyle mBracketStyle
Definition: qcustomplot.h:4576
int iconTextPadding() const
Definition: qcustomplot.h:4849
QSharedPointer< QCPStatisticalBoxDataContainer > data() const
Definition: qcustomplot.h:5629
void setBrush(const QBrush &brush)
bool isEmpty() const
Definition: qcustomplot.h:5726
QCPLineEnding tail() const
Definition: qcustomplot.h:6201
BracketStyle
Definition: qcustomplot.h:3724
Qt::TransformationMode transformationMode() const
Definition: qcustomplot.h:6472
const_iterator constBegin() const
Definition: qcustomplot.h:2442
int columnSpacing() const
Definition: qcustomplot.h:1362
virtual QCPItemPosition * toQCPItemPosition() Q_DECL_OVERRIDE
Definition: qcustomplot.h:3504
QColor selectedTickLabelColor() const
Definition: qcustomplot.h:2049
0x0001 Axis base line and tick marks
Definition: qcustomplot.h:118
bool visible() const
Definition: qcustomplot.h:712
Definition: qcustomplot.h:1538
QCustomPlot * parentPlot() const
Definition: qcustomplot.h:713
int mOpenGlMultisamples
Definition: qcustomplot.h:3798
double mainValue() const
Definition: qcustomplot.h:5282
QPen mPen
Definition: qcustomplot.h:3278
friend class QCPPlottableLegendItem
Definition: qcustomplot.h:1499
QCPRange valueRange() const
Definition: qcustomplot.h:5145
Definition: qcustomplot.h:1540
EndingStyle
Definition: qcustomplot.h:888
QCP::AntialiasedElements antialiasedElements() const
Definition: qcustomplot.h:3638
QPen pen() const
Definition: qcustomplot.h:1109
QCPAbstractPlottable * dataPlottable() const
Definition: qcustomplot.h:6022
void performAutoSqueeze()
Definition: qcustomplot.h:3219
virtual int findBegin(double sortKey, bool expandedRange=true) const Q_DECL_OVERRIDE
Definition: qcustomplot.h:4271
0x00 no margin
Definition: qcustomplot.h:105
QVector< double > tickVector() const
Definition: qcustomplot.h:2029
int size() const
Definition: qcustomplot.h:2421
Definition: qcustomplot.h:1367
QCPDataRange dataRange() const
Definition: qcustomplot.h:2451
QPen selectedPen() const
Definition: qcustomplot.h:6636
double mainValue() const
Definition: qcustomplot.h:5143
QCPDataContainer< QCPFinancialData > QCPFinancialDataContainer
Definition: qcustomplot.h:5856
virtual void parentPlotInitialized(QCustomPlot *parentPlot)
QColor mSelectedTextColor
Definition: qcustomplot.h:4995
QList< double > rowStretchFactors() const
Definition: qcustomplot.h:1361
Qt::AspectRatioMode backgroundScaledMode() const
Definition: qcustomplot.h:4611
double mLogBase
Definition: qcustomplot.h:1850
QList< QSharedPointer< QCPAbstractPaintBuffer > > mPaintBuffers
Definition: qcustomplot.h:3789
int top() const
Definition: qcustomplot.h:4657
0x020 Legends are selectable (or their child items, see QCPLegend::setSelectableParts) ...
Definition: qcustomplot.h:160
void setX(double x)
Definition: qcustomplot.h:402
QCPBars * barAbove() const
Definition: qcustomplot.h:5517
int dataRangeCount() const
Definition: qcustomplot.h:954
QSize maximumSize() const
Definition: qcustomplot.h:1232
virtual QCP::Interaction selectionCategory() const
virtual int calculateAutoMargin(QCP::MarginSide side)
bool isEmpty() const
Definition: qcustomplot.h:963
Any combination of data points/ranges can be selected.
Definition: qcustomplot.h:300
QBrush mSelectedBrush
Definition: qcustomplot.h:1464
QFont labelFont() const
Definition: qcustomplot.h:2039
Definition: qcustomplot.h:719
bool tangentToData() const
Definition: qcustomplot.h:4552
Resolution is given in dots per inch (DPI/PPI)
Definition: qcustomplot.h:172
void selectionChanged(bool selected)
QCPGraph * channelFillGraph() const
Definition: qcustomplot.h:5197
double graphKey() const
Definition: qcustomplot.h:6561
QSharedPointer< QCPCurveDataContainer > data() const
Definition: qcustomplot.h:5326
QCPColorGradient gradient() const
Definition: qcustomplot.h:5769
Definition: qcustomplot.h:1776
bool inverted() const
Definition: qcustomplot.h:1509
QPixmap pixmap() const
Definition: qcustomplot.h:6469
void setBegin(int begin)
Definition: qcustomplot.h:911
ErrorType errorType() const
Definition: qcustomplot.h:6023
Cosmetic pens are converted to pens with pixel width 1 when exporting.
Definition: qcustomplot.h:180
PainterModes modes() const
Definition: qcustomplot.h:483
SizeConstraintRect sizeConstraintRect() const
Definition: qcustomplot.h:1233
Qt::Alignment positionAlignment() const
Definition: qcustomplot.h:6326
QBrush selectedBrush() const
Definition: qcustomplot.h:6322
QPen selectedTickPen() const
Definition: qcustomplot.h:2052
bool antialiasedFill() const
Definition: qcustomplot.h:3316
bool clipToAxisRect() const
Definition: qcustomplot.h:3527
0xFF all margins
Definition: qcustomplot.h:104
ScaleType scaleType() const
Definition: qcustomplot.h:2016
int length() const
Definition: qcustomplot.h:908
virtual QCPRange getKeyRange(bool &foundRange, SignDomain inSignDomain=sdBoth) const =0
QCP::MarginSides autoMargins() const
Definition: qcustomplot.h:1230
TickStepStrategy tickStepStrategy() const
Definition: qcustomplot.h:1558
QPen selectedPen() const
Definition: qcustomplot.h:6149
0x0200 Borders of fills (e.g. under or between graphs)
Definition: qcustomplot.h:127
QCP::SelectionRectMode selectionRectMode() const
Definition: qcustomplot.h:3646
Definition: qcustomplot.h:3248
QBrush mBracketBrush
Definition: qcustomplot.h:4573
void remove(double sortKeyFrom, double sortKeyTo)
Definition: qcustomplot.h:2797
bool openGl() const
Definition: qcustomplot.h:3648
Definition: qcustomplot.h:476
QString text() const
Definition: qcustomplot.h:6325
QRect axisSelectionBox() const
Definition: qcustomplot.h:2234
bool subGridVisible() const
Definition: qcustomplot.h:1883
bool backgroundScaled() const
Definition: qcustomplot.h:4610
bool antialiasing() const
Definition: qcustomplot.h:482
QPen selectedPen() const
Definition: qcustomplot.h:6555
int mScatterSkip
Definition: qcustomplot.h:5222
LineStyle
Definition: qcustomplot.h:2509
AnchorIndex
Definition: qcustomplot.h:3612
LayerMode
Definition: qcustomplot.h:648
QFont selectedTickLabelFont() const
Definition: qcustomplot.h:2047
QFont font() const
Definition: qcustomplot.h:6323
double rotation() const
Definition: qcustomplot.h:6328
0x08 bottom margin
Definition: qcustomplot.h:103
double width() const
Definition: qcustomplot.h:5511
Definition: qcustomplot.h:3237
QCPAxis * valueAxis() const
Definition: qcustomplot.h:3321
Definition: qcustomplot.h:1629
bool antialiasedSubGrid() const
Definition: qcustomplot.h:1884
const_iterator at(int index) const
Definition: qcustomplot.h:2448
QPen basePen() const
Definition: qcustomplot.h:2036
bool isActive() const
Definition: qcustomplot.h:1111
bool mInvalidated
Definition: qcustomplot.h:548
int tickCount() const
Definition: qcustomplot.h:1559
virtual QCPPlottableInterface1D * interface1D() Q_DECL_OVERRIDE
Definition: qcustomplot.h:6056
Definition: qcustomplot.h:93
QWeakPointer< QCPAbstractPaintBuffer > mPaintBuffer
Definition: qcustomplot.h:681
QPen pen() const
Definition: qcustomplot.h:3318
double & rx()
Definition: qcustomplot.h:398
int bracketWidth() const
Definition: qcustomplot.h:4549
Definition: qcustomplot.h:2638
Qt::Alignment textAlignment() const
Definition: qcustomplot.h:6327
QColor selectedTextColor() const
Definition: qcustomplot.h:4739
QList< QCPItemAnchor * > anchors() const
Definition: qcustomplot.h:3543
QList< QCPDataRange > dataRanges() const
Definition: qcustomplot.h:957
double mPiValue
Definition: qcustomplot.h:1808
virtual void selectEvent(QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
int index() const
Definition: qcustomplot.h:659
QPen pen() const
Definition: qcustomplot.h:3256
QCPScatterStyle outlierStyle() const
Definition: qcustomplot.h:5636
double tickOrigin() const
Definition: qcustomplot.h:1560
virtual QCPPlottableInterface1D * interface1D()
Definition: qcustomplot.h:3341
bool contains(QCPBars *bars) const
Definition: qcustomplot.h:5423
ScatterShape shape() const
Definition: qcustomplot.h:2357
QSharedPointer< QCPGraphDataContainer > data() const
Definition: qcustomplot.h:5193
0x04 top margin
Definition: qcustomplot.h:102
const QCPRange operator+(const QCPRange &range, double value)
Definition: qcustomplot.h:542
QVector< DataType >::const_iterator const_iterator
Definition: qcustomplot.h:2415
QColor selectedTextColor() const
Definition: qcustomplot.h:4962
QRect mRect
Definition: qcustomplot.h:1128
virtual QSize minimumOuterSizeHint() const
QCPBarsGroup * barsGroup() const
Definition: qcustomplot.h:5513
Definition: qcustomplot.h:5451
InsetPlacement
Definition: qcustomplot.h:830
Qt::TimeSpec dateTimeSpec() const
Definition: qcustomplot.h:1610
QCPRange valueRange(bool &foundRange, QCP::SignDomain signDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange())
Definition: qcustomplot.h:3083
QCPLayerable * parentLayerable() const
Definition: qcustomplot.h:714
QPen selectedPen() const
Definition: qcustomplot.h:1414
Definition: qcustomplot.h:1099
ErrorType
Definition: qcustomplot.h:6013
QCPScatterStyle scatterStyle() const
Definition: qcustomplot.h:5195
QSharedPointer< QCPBarsDataContainer > data() const
Definition: qcustomplot.h:5518
int size() const
Definition: qcustomplot.h:907
QColor selectedColor() const
Definition: qcustomplot.h:6318
SpacingType spacingType() const
Definition: qcustomplot.h:5410
QColor labelColor() const
Definition: qcustomplot.h:2040
QSize mSize
Definition: qcustomplot.h:544
bool tightBoundary() const
Definition: qcustomplot.h:5768
ScaleStrategy mScaleStrategy
Definition: qcustomplot.h:1725
QSharedPointer< QCPFinancialDataContainer > data() const
Definition: qcustomplot.h:5898
Definition: qcustomplot.h:2362
QPen pen() const
Definition: qcustomplot.h:6249
QPen whiskerBarPen() const
Definition: qcustomplot.h:5633
void setSelectedTextColor(const QColor &color)
QCPScatterStyle::ScatterProperties mUsedScatterProperties
Definition: qcustomplot.h:3281
QPixmap mBuffer
Definition: qcustomplot.h:568
bool selected() const
Definition: qcustomplot.h:4741
0x0000 No elements
Definition: qcustomplot.h:130
QPen subGridPen() const
Definition: qcustomplot.h:1887
Definition: qcustomplot.h:234
DateStrategy
Definition: qcustomplot.h:1629
QPainterPath customPath() const
Definition: qcustomplot.h:2361
QList< QCPRange > mDragStartVertRange
Definition: qcustomplot.h:4686
static QCPStatisticalBoxData fromSortKey(double sortKey)
Definition: qcustomplot.h:5581
virtual void mouseReleaseEvent(QMouseEvent *event, const QPointF &startPos)
void removeBefore(double sortKey)
Definition: qcustomplot.h:2765
double sortKey() const
Definition: qcustomplot.h:5580
int subTickCount() const
Definition: qcustomplot.h:1745
ColorInterpolation colorInterpolation() const
Definition: qcustomplot.h:4482
QVariant mMouseSignalLayerableDetails
Definition: qcustomplot.h:3795
QRect outerRect() const
Definition: qcustomplot.h:1227
QCustomPlot * mParentPlot
Definition: qcustomplot.h:447
void set(const QCPDataContainer< DataType > &data)
Definition: qcustomplot.h:2640
QCPMarginGroup * marginGroup(QCP::MarginSide side) const
Definition: qcustomplot.h:1234
Definition: qcustomplot.h:1603
QCPSelectionDecorator * mSelectionDecorator
Definition: qcustomplot.h:3372
double mTickStep
Definition: qcustomplot.h:1724
Defines an abstract interface for one-dimensional plottables.
Definition: qcustomplot.h:3858
ResolutionUnit
Definition: qcustomplot.h:170
QCPAxis::ScaleType dataScaleType() const
Definition: qcustomplot.h:5070
QPen selectedBorderPen() const
Definition: qcustomplot.h:4853
#define Q_DECL_OVERRIDE
Definition: qcustomplot.h:134
bool selected() const
Definition: qcustomplot.h:4964
double tickStep() const
Definition: qcustomplot.h:1715
QVector< QString > tickVectorLabels() const
Definition: qcustomplot.h:2030
virtual void drawLegendIcon(QCPPainter *painter, const QRectF &rect) const =0
QBrush bracketBrush() const
Definition: qcustomplot.h:4548
QString name() const
Definition: qcustomplot.h:3315
QBrush selectedBrush() const
Definition: qcustomplot.h:6408
Definition: qcustomplot.h:1835
Definition: qcustomplot.h:2915
SignDomain
Definition: qcustomplot.h:191
virtual void applyDefaultAntialiasingHint(QCPPainter *painter) const Q_DECL_OVERRIDE
Definition: qcustomplot.h:1273
bool backgroundScaled() const
Definition: qcustomplot.h:3635
double mLogBaseLnInv
Definition: qcustomplot.h:1854
QCPRange keyRange() const
Definition: qcustomplot.h:5702
bool ticks() const
Definition: qcustomplot.h:2020
bool mTangentToData
Definition: qcustomplot.h:4577
double whiskerWidth() const
Definition: qcustomplot.h:6024
QList< QPointer< QCPAxis > > mRangeZoomVertAxis
Definition: qcustomplot.h:4682
bool isEmpty() const
Definition: qcustomplot.h:916
virtual QCPRange dataValueRange(int index) const Q_DECL_OVERRIDE
Definition: qcustomplot.h:4176
QPointer< QCPAbstractPlottable > mDataPlottable
Definition: qcustomplot.h:6061
double upper
Definition: qcustomplot.h:479
void drawPolyline(QCPPainter *painter, const QVector< QPointF > &lineData) const
Definition: qcustomplot.h:4388
QVector< QCPErrorBarsData > QCPErrorBarsDataContainer
Definition: qcustomplot.h:5993
When dragging the mouse, a selection rect becomes active. Upon releasing, the axes that are currently...
Definition: qcustomplot.h:273
QHash< QCP::MarginSide, QCPMarginGroup * > marginGroups() const
Definition: qcustomplot.h:1235
int mSubTickCount
Definition: qcustomplot.h:1851
RefreshPriority
Definition: qcustomplot.h:1710
Definition: qcustomplot.h:4937
QCPGraph * graph() const
Definition: qcustomplot.h:6560
double mTickOrigin
Definition: qcustomplot.h:1574
int mBracketHeight
Definition: qcustomplot.h:4575
QCPDataContainer< QCPGraphData > QCPGraphDataContainer
Definition: qcustomplot.h:5161
QCPItemAnchor * parentAnchorX() const
Definition: qcustomplot.h:3472
QBrush selectedBrush() const
Definition: qcustomplot.h:6557
int scatterSkip() const
Definition: qcustomplot.h:5328
bool visible() const
Definition: qcustomplot.h:661
AxisType axisType() const
Definition: qcustomplot.h:2014
const_iterator constEnd() const
Definition: qcustomplot.h:2443
QCPLayer * layer() const
Definition: qcustomplot.h:715
QCPItemAnchor * parentAnchorY() const
Definition: qcustomplot.h:3473
static bool sortKeyIsMainKey()
Definition: qcustomplot.h:5279
double lower
Definition: qcustomplot.h:479
void setY(double y)
Definition: qcustomplot.h:403
Definition: qcustomplot.h:365
QPoint bottomRight() const
Definition: qcustomplot.h:4665
0x000 No hints are set
Definition: qcustomplot.h:139
QPen whiskerPen() const
Definition: qcustomplot.h:5632
QVariant mMouseEventLayerableDetails
Definition: qcustomplot.h:3794
0x004 The user can select multiple objects by holding the modifier set by QCustomPlot::setMultiSelect...
Definition: qcustomplot.h:157
double lengthSquared() const
Definition: qcustomplot.h:407
QPen selectedPen() const
Definition: qcustomplot.h:6320
double mainKey() const
Definition: qcustomplot.h:5584
int scatterSkip() const
Definition: qcustomplot.h:5196
QPen pen() const
Definition: qcustomplot.h:6103
0x080 All other objects are selectable (e.g. your own derived layerables, the plot title...
Definition: qcustomplot.h:162
QBrush backgroundBrush() const
Definition: qcustomplot.h:4609
Definition: qcustomplot.h:872
QRect viewport() const
Definition: qcustomplot.h:3632
QFont selectedFont() const
Definition: qcustomplot.h:4856
virtual ~QCPPlottableInterface1D()
Definition: qcustomplot.h:3861
The positive sign domain, i.e. numbers greater than zero.
Definition: qcustomplot.h:193
QString timeFormat() const
Definition: qcustomplot.h:1664
QMap< double, QString > & ticks()
Definition: qcustomplot.h:1744
void drawLine(const QPointF &p1, const QPointF &p2)
Definition: qcustomplot.h:496
Definition: qcustomplot.h:930
double mainKey() const
Definition: qcustomplot.h:5281
TickStepStrategy
Definition: qcustomplot.h:1547
const_iterator findEnd(double sortKey, bool expandedRange=true) const
Definition: qcustomplot.h:2933
bool operator==(const QCPDataRange &other) const
Definition: qcustomplot.h:901
virtual QCPItemPosition * toQCPItemPosition()
Definition: qcustomplot.h:3427
void setSelectedPen(const QPen &pen)
Definition: qcustomplot.h:932
QCP::SelectionType mSelectable
Definition: qcustomplot.h:3370
void sort()
Definition: qcustomplot.h:2858
int mPeriodicity
Definition: qcustomplot.h:1809
0x0020 Main lines of plottables (excluding error bars, see element aeErrorBars)
Definition: qcustomplot.h:123
double value() const
Definition: qcustomplot.h:3475
void expand(const QCPRange &otherRange)
FillOrder fillOrder() const
Definition: qcustomplot.h:1365
double length() const
Definition: qcustomplot.h:406
QCPRange valueRange() const
Definition: qcustomplot.h:5840
TracerStyle style() const
Definition: qcustomplot.h:6559
int rowCount() const
Definition: qcustomplot.h:1358
ExportPen
Definition: qcustomplot.h:180
QBrush brushPositive() const
Definition: qcustomplot.h:5903
QString label() const
Definition: qcustomplot.h:2041
QCPDataRange adjusted(int changeBegin, int changeEnd) const
Definition: qcustomplot.h:920
double length() const
Definition: qcustomplot.h:6637
QPoint bottomLeft() const
Definition: qcustomplot.h:4664
virtual int dataCount() const Q_DECL_OVERRIDE
Definition: qcustomplot.h:4119
QRect suffixBounds
Definition: qcustomplot.h:2273
Definition: qcustomplot.h:1321
QBrush brush() const
Definition: qcustomplot.h:3257
QPen penPositive() const
Definition: qcustomplot.h:5905
double mStackingGap
Definition: qcustomplot.h:5548
Definition: qcustomplot.h:1900
ScatterShape
Definition: qcustomplot.h:246
bool selectable() const
Definition: qcustomplot.h:1419
AntialiasedElement
Definition: qcustomplot.h:118
ErrorType mErrorType
Definition: qcustomplot.h:6062
0x004 axis (tick) labels will be cached as pixmaps, increasing replot performance.
Definition: qcustomplot.h:144
0x01 left margin
Definition: qcustomplot.h:100
bool qcpLessThanSortKey(const DataType &a, const DataType &b)
Definition: qcustomplot.h:2409
virtual void mouseMoveEvent(QMouseEvent *event, const QPointF &startPos)
int numberPrecision() const
Definition: qcustomplot.h:2028
QCPRange dataRange() const
Definition: qcustomplot.h:5765
QCPRange & operator-=(const double &value)
Definition: qcustomplot.h:789
QPen pen() const
Definition: qcustomplot.h:6635
Definition: qcustomplot.h:5574
QBrush brush() const
Definition: qcustomplot.h:2359
int left() const
Definition: qcustomplot.h:4655
AnchorIndex
Definition: qcustomplot.h:3405
double mainValue() const
Definition: qcustomplot.h:5462
QPen pen() const
Definition: qcustomplot.h:6148
LayerMode mMode
Definition: qcustomplot.h:678
bool mSelected
Definition: qcustomplot.h:4997
QPen pen() const
Definition: qcustomplot.h:6473
const QCPRange operator*(const QCPRange &range, double value)
Definition: qcustomplot.h:572
QCP::AntialiasedElements notAntialiasedElements() const
Definition: qcustomplot.h:3639
QSize size() const
Definition: qcustomplot.h:4661
Definition: qcustomplot.h:1680
QCPDataContainer< QCPStatisticalBoxData > QCPStatisticalBoxDataContainer
Definition: qcustomplot.h:5611
QCPAxis::AxisType type() const
Definition: qcustomplot.h:5068
One individual data point can be selected at a time.
Definition: qcustomplot.h:298
LabelSide
Definition: qcustomplot.h:1064
virtual double dataSortKey(int index) const Q_DECL_OVERRIDE
Definition: qcustomplot.h:4144
QCPScatterStyle scatterStyle() const
Definition: qcustomplot.h:3258
bool mActive
Definition: qcustomplot.h:1132
QCPDataMap * data() const
Definition: qcustomplot.h:2532
QSize iconSize() const
Definition: qcustomplot.h:4848
QRect mTextBoundingRect
Definition: qcustomplot.h:4996
void removeAfter(double sortKey)
Definition: qcustomplot.h:2780
QBrush brush() const
Definition: qcustomplot.h:6407
QCPVector2D perpendicular() const
Definition: qcustomplot.h:414
Qt::AspectRatioMode aspectRatioMode() const
Definition: qcustomplot.h:6471
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE
Definition: qcustomplot.h:4296
QCPGrid * grid() const
Definition: qcustomplot.h:2056
virtual void update(UpdatePhase phase)
double width() const
Definition: qcustomplot.h:1507
QString name() const
Definition: qcustomplot.h:658
void squeeze(bool preAllocation=true, bool postAllocation=true)
Definition: qcustomplot.h:2874
Definition: qcustomplot.h:387
virtual QCPPlottableInterface1D * interface1D() Q_DECL_OVERRIDE
Definition: qcustomplot.h:3898
QCPDataSelection inverse(const QCPDataRange &outerRange) const
QCPRange dataRange() const
Definition: qcustomplot.h:5069
void preallocateGrow(int minimumPreallocSize)
Definition: qcustomplot.h:3189
bool selectable() const
Definition: qcustomplot.h:3529
double value
Definition: qcustomplot.h:5147
QRect rect() const
Definition: qcustomplot.h:1226
#define QCP_LIB_DECL
Definition: qcustomplot.h:129
QPen selectedSubTickPen() const
Definition: qcustomplot.h:2053
Qt::Orientations rangeDrag() const
Definition: qcustomplot.h:4612
QMargins minimumMargins() const
Definition: qcustomplot.h:1229
int getMarginValue(const QMargins &margins, QCP::MarginSide side)
Definition: qcustomplot.h:213
SelectablePart
Definition: qcustomplot.h:1080
virtual void draw(QCPPainter *painter)=0
ScatterProperty
Definition: qcustomplot.h:2308
The generic data container for one-dimensional plottables.
Definition: qcustomplot.h:2412
BracketStyle
Definition: qcustomplot.h:4535
Definition: qcustomplot.h:2169
double mBufferDevicePixelRatio
Definition: qcustomplot.h:3765
QFont mSelectedFont
Definition: qcustomplot.h:4994
bool mSelectable
Definition: qcustomplot.h:1466
QPointF toPointF() const
Definition: qcustomplot.h:409
QFont mFont
Definition: qcustomplot.h:2123
QCPColorScale * colorScale() const
Definition: qcustomplot.h:5770
void setMarginValue(QMargins &margins, QCP::MarginSide side, int value)
Definition: qcustomplot.h:193
Qt::Orientations rangeZoom() const
Definition: qcustomplot.h:4613
double mainKey() const
Definition: qcustomplot.h:5837
SelectableParts selectableParts() const
Definition: qcustomplot.h:2046
QCPDataRange bounded(const QCPDataRange &other) const
QCPLayoutGrid * plotLayout() const
Definition: qcustomplot.h:3637
The selection rect is disabled, and all mouse events are forwarded to the underlying objects...
Definition: qcustomplot.h:272
QCPAbstractPlottable * plottable()
Definition: qcustomplot.h:4790
double center() const
Definition: qcustomplot.h:800
FractionStyle fractionStyle() const
Definition: qcustomplot.h:1797
void setSelectedFont(const QFont &font)
Definition: qcustomplot.h:757
double sortKey() const
Definition: qcustomplot.h:5833
QCPAbstractPlottable * mPlottable
Definition: qcustomplot.h:3283
void setSelectedBrush(const QBrush &brush)
Qt::Orientation orientation() const
Definition: qcustomplot.h:2108
static QCPGraphData fromSortKey(double sortKey)
Definition: qcustomplot.h:5139
Definition: qcustomplot.h:312
Definition: qcustomplot.h:629
double width() const
Definition: qcustomplot.h:5630
bool isNone() const
Definition: qcustomplot.h:2373
QBrush mBrush
Definition: qcustomplot.h:3279
bool autoAddPlottableToLegend() const
Definition: qcustomplot.h:3640
Definition: qcustomplot.h:5132
PositionType typeY() const
Definition: qcustomplot.h:3470
void selectableChanged(bool selectable)
QBrush mBrush
Definition: qcustomplot.h:1464
const_iterator findBegin(double sortKey, bool expandedRange=true) const
Definition: qcustomplot.h:2906
EndingStyle style() const
Definition: qcustomplot.h:1506
QCPAxis * keyAxis() const
Definition: qcustomplot.h:3477
ChartStyle chartStyle() const
Definition: qcustomplot.h:5899
virtual void simplify() Q_DECL_OVERRIDE
Definition: qcustomplot.h:1449
bool mDragging
Definition: qcustomplot.h:2179
Multiple contiguous data points (a data range) can be selected.
Definition: qcustomplot.h:299
Definition: qcustomplot.h:1972
AnchorIndex
Definition: qcustomplot.h:3754
QSharedPointer< QCPErrorBarsDataContainer > data() const
Definition: qcustomplot.h:6021
QPen pen() const
Definition: qcustomplot.h:6198
void setPen(const QPen &pen)
virtual QCPDataSelection selectTestRect(const QRectF &rect, bool onlySelectable) const Q_DECL_OVERRIDE
Definition: qcustomplot.h:4222
QList< QCPLayoutElement * > elements(QCP::MarginSide side) const
Definition: qcustomplot.h:1161
QString mPiSymbol
Definition: qcustomplot.h:1807
bool adaptiveSampling() const
Definition: qcustomplot.h:5198
virtual void mouseDoubleClickEvent(QMouseEvent *event, const QVariant &details)
virtual double dataMainValue(int index) const Q_DECL_OVERRIDE
Definition: qcustomplot.h:4160
double mainValue() const
Definition: qcustomplot.h:5838
When dragging the mouse, a selection rect becomes active. It is the programmer's responsibility to co...
Definition: qcustomplot.h:275
Both sign domains, including zero, i.e. all numbers.
Definition: qcustomplot.h:192
QVector< DataType >::iterator iterator
Definition: qcustomplot.h:2416
int subTickCount() const
Definition: qcustomplot.h:1842
QPointer< QCPLayerable > mMouseSignalLayerable
Definition: qcustomplot.h:3793
Definition: qcustomplot.h:2386
int keySize() const
Definition: qcustomplot.h:5700
int mWrap
Definition: qcustomplot.h:1405
QCPLineEnding head() const
Definition: qcustomplot.h:6150
bool selectable() const
Definition: qcustomplot.h:4963
virtual int findEnd(double sortKey, bool expandedRange=true) const Q_DECL_OVERRIDE
Definition: qcustomplot.h:4280
bool operator!=(const QCPRange &other) const
Definition: qcustomplot.h:786
void pixelsToCoords(double x, double y, double &key, double &value) const
int mTangentAverage
Definition: qcustomplot.h:4578
Definition: qcustomplot.h:2740
bool operator==(const QCPRange &other) const
Definition: qcustomplot.h:785
QCPLineEnding head() const
Definition: qcustomplot.h:6200
int mPreallocSize
Definition: qcustomplot.h:2460
double sortKey() const
Definition: qcustomplot.h:5457
QPen pen() const
Definition: qcustomplot.h:6405
TimeUnit mSmallestUnit
Definition: qcustomplot.h:1677
void clear()
Definition: qcustomplot.h:2839
int columnCount() const
Definition: qcustomplot.h:1359
int mScatterSkip
Definition: qcustomplot.h:5353
int pixelOrientation() const
Definition: qcustomplot.h:2109
QFont selectedFont() const
Definition: qcustomplot.h:4961
QList< double > columnStretchFactors() const
Definition: qcustomplot.h:1360
Qt::KeyboardModifier multiSelectModifier() const
Definition: qcustomplot.h:3645
LayerInsertMode
Definition: qcustomplot.h:1700
QList< QPointer< QCPAxis > > mRangeDragVertAxis
Definition: qcustomplot.h:4681
QPen selectedPen() const
Definition: qcustomplot.h:6104
Definition: qcustomplot.h:2081
SelectableParts selectableParts() const
Definition: qcustomplot.h:4851
SelectionRectMode
Definition: qcustomplot.h:272
virtual void mouseMoveEvent(QMouseEvent *event)
QCPBars * barBelow() const
Definition: qcustomplot.h:5516
double mDevicePixelRatio
Definition: qcustomplot.h:545
QCP::AntialiasedElements mOpenGlAntialiasedElementsBackup
Definition: qcustomplot.h:3799
WidthType
Definition: qcustomplot.h:5878
int bottom() const
Definition: qcustomplot.h:4658
unsigned char * mAlpha
Definition: qcustomplot.h:5738
QBrush selectedBrush() const
Definition: qcustomplot.h:6252
Definition: qcustomplot.h:895
QCPRange & operator*=(const double &value)
Definition: qcustomplot.h:790
0x0010 Legend items
Definition: qcustomplot.h:122
QPen selectedPen() const
Definition: qcustomplot.h:6250
void normalize()
Definition: qcustomplot.h:801
virtual double dataMainKey(int index) const Q_DECL_OVERRIDE
Definition: qcustomplot.h:4128
UpdatePhase
Definition: qcustomplot.h:646
static QCPCurveData fromSortKey(double sortKey)
Definition: qcustomplot.h:5278
QCPRange & operator/=(const double &value)
Definition: qcustomplot.h:791
QList< QCPLayerable * > children() const
Definition: qcustomplot.h:660
QCPDataContainer< QCPCurveData > QCPCurveDataContainer
Definition: qcustomplot.h:5301
bool mReplotQueued
Definition: qcustomplot.h:3797
QCPScatterStyle::ScatterProperties usedScatterProperties() const
Definition: qcustomplot.h:3259
bool mAutoSqueeze
Definition: qcustomplot.h:2456
PositionType
Definition: qcustomplot.h:1549
Definition: qcustomplot.h:520
double width() const
Definition: qcustomplot.h:5900
void setTextColor(const QColor &color)
static QCPFinancialData fromSortKey(double sortKey)
Definition: qcustomplot.h:5834
QCPRange & operator+=(const double &value)
Definition: qcustomplot.h:788
Definition: qcustomplot.h:2660
QColor mSelectedTextColor
Definition: qcustomplot.h:2126
int rowSpacing() const
Definition: qcustomplot.h:1363
void addDataRange(const QCPDataRange &dataRange, bool simplify=true)
QColor mTextColor
Definition: qcustomplot.h:4993
0xFFFF All elements
Definition: qcustomplot.h:129
QRect rect() const
Definition: qcustomplot.h:1107
Definition: qcustomplot.h:2145
bool operator!=(const QCPDataSelection &other) const
Definition: qcustomplot.h:939
double y() const
Definition: qcustomplot.h:397
bool isPenDefined() const
Definition: qcustomplot.h:2374
bool mWhiskerAntialiased
Definition: qcustomplot.h:5664
QList< QCPItemPosition * > positions() const
Definition: qcustomplot.h:3542
QCustomPlot * parentPlot() const
Definition: qcustomplot.h:657
AnchorIndex
Definition: qcustomplot.h:3487
bool selected() const
Definition: qcustomplot.h:3323
const QCP::Interactions interactions() const
Definition: qcustomplot.h:3641
QPen selectedPen() const
Definition: qcustomplot.h:6474
QBrush brush() const
Definition: qcustomplot.h:1110
QCPRange valueRange() const
Definition: qcustomplot.h:5464
WidthType widthType() const
Definition: qcustomplot.h:5512
QCP::SelectionRectMode mSelectionRectMode
Definition: qcustomplot.h:3784
QMap< double, QString > mTicks
Definition: qcustomplot.h:1760
bool contains(double value) const
Definition: qcustomplot.h:809
QPen mBracketPen
Definition: qcustomplot.h:4572
QHash< TimeUnit, int > mFieldWidth
Definition: qcustomplot.h:1674
Q_SLOT void setSelectable(bool selectable)
0x008 Plottables are selectable (e.g. graphs, curves, bars,... see QCPAbstractPlottable) ...
Definition: qcustomplot.h:158
bool isInvalidData(double value)
Definition: qcustomplot.h:172
QCPRange valueRange() const
Definition: qcustomplot.h:5587
QPen medianPen() const
Definition: qcustomplot.h:5635
bool isEmpty() const
Definition: qcustomplot.h:2422
Definition: qcustomplot.h:980
Definition: qcustomplot.h:243
virtual ~QCPAbstractPlottable1D()
Definition: qcustomplot.h:4111
FractionStyle
Definition: qcustomplot.h:1785
QPen borderPen() const
Definition: qcustomplot.h:4844
TracerStyle
Definition: qcustomplot.h:3654
QPen mPen
Definition: qcustomplot.h:1129
int tangentAverage() const
Definition: qcustomplot.h:4553
QMargins margins() const
Definition: qcustomplot.h:1228
ScaleStrategy scaleStrategy() const
Definition: qcustomplot.h:1716
A template base class for plottables with one-dimensional data.
Definition: qcustomplot.h:3876
0x0040 Main lines of items
Definition: qcustomplot.h:124
0x01 The pen property, see setPen
Definition: qcustomplot.h:2309
PositionType type() const
Definition: qcustomplot.h:3468
bool whiskerAntialiased() const
Definition: qcustomplot.h:5634
QRect tickLabelsSelectionBox() const
Definition: qcustomplot.h:2235
QPixmap background() const
Definition: qcustomplot.h:4608
SelectableParts selectedParts() const
Definition: qcustomplot.h:2045
bool subTicks() const
Definition: qcustomplot.h:2033
QCPLegend * parentLegend() const
Definition: qcustomplot.h:4735
PositionType typeX() const
Definition: qcustomplot.h:3469
bool invalidated() const
Definition: qcustomplot.h:528
GradientPreset
Definition: qcustomplot.h:1918
QCPAxis * keyAxis() const
Definition: qcustomplot.h:3320
double length() const
Definition: qcustomplot.h:1508
QPen pen() const
Definition: qcustomplot.h:6554
int size() const
Definition: qcustomplot.h:5420
QPen pen() const
Definition: qcustomplot.h:2358
int mTickCount
Definition: qcustomplot.h:1573
0x0400 Zero-lines, see QCPGrid::setZeroLinePen
Definition: qcustomplot.h:128
bool interpolating() const
Definition: qcustomplot.h:6562
0x010 Axes are selectable (or parts of them, see QCPAxis::setSelectableParts)
Definition: qcustomplot.h:159
0x001 Axis ranges are draggable (see QCPAxisRect::setRangeDrag, QCPAxisRect::setRangeDragAxes) ...
Definition: qcustomplot.h:155
LayerMode mode() const
Definition: qcustomplot.h:662
virtual void mouseReleaseEvent(QMouseEvent *event)
Definition: qcustomplot.h:600
QFont selectedFont() const
Definition: qcustomplot.h:4738
QCPDataSelection mSelection
Definition: qcustomplot.h:3371
Q_SLOT void setSelected(bool selected)
0x0008 Legend box
Definition: qcustomplot.h:121
QFont mFont
Definition: qcustomplot.h:4992
QSharedPointer< QCPAxisTicker > mTicker
Definition: qcustomplot.h:2173
double & ry()
Definition: qcustomplot.h:399
static bool sortKeyIsMainKey()
Definition: qcustomplot.h:5582
QList< QCPBars * > bars() const
Definition: qcustomplot.h:5418
QString piSymbol() const
Definition: qcustomplot.h:1794
QCPRange keyRange(bool &foundRange, QCP::SignDomain signDomain=QCP::sdBoth)
Definition: qcustomplot.h:2960
Q_DECLARE_TYPEINFO(QCPScatterStyle, Q_MOVABLE_TYPE)
QRect labelSelectionBox() const
Definition: qcustomplot.h:2236
int bracketHeight() const
Definition: qcustomplot.h:4550
int mTextFlags
Definition: qcustomplot.h:4991
QString mDateTimeFormat
Definition: qcustomplot.h:1625
AnchorIndex
Definition: qcustomplot.h:3554
bool antialiasedZeroLine() const
Definition: qcustomplot.h:1885
QFont selectedLabelFont() const
Definition: qcustomplot.h:2048
QPen pen() const
Definition: qcustomplot.h:1886
bool interpolate() const
Definition: qcustomplot.h:5767
QColor mTextColor
Definition: qcustomplot.h:2124
Definition: qcustomplot.h:1503
double mainValue() const
Definition: qcustomplot.h:5585
Definition: qcustomplot.h:1607
virtual void wheelEvent(QWheelEvent *event)
QFont font() const
Definition: qcustomplot.h:4959
WidthType
Definition: qcustomplot.h:2841
QColor textColor() const
Definition: qcustomplot.h:4960
Selection behaves like stMultipleDataRanges, but if there are any data points selected, the entire plottable is drawn as selected.
Definition: qcustomplot.h:297
QPoint toPoint() const
Definition: qcustomplot.h:408
0x0002 Grid lines
Definition: qcustomplot.h:119
QBrush brush() const
Definition: qcustomplot.h:6321
QPoint topLeft() const
Definition: qcustomplot.h:4662
bool mOpenGl
Definition: qcustomplot.h:3786
SelectionType
Definition: qcustomplot.h:296
Definition: qcustomplot.h:140
QCPRange valueRange() const
Definition: qcustomplot.h:5284
bool selectable() const
Definition: qcustomplot.h:4740
Definition: qcustomplot.h:1644
0x0080 Scatter symbols of plottables (excluding scatter symbols of type ssPixmap) ...
Definition: qcustomplot.h:125
QCPColorGradient gradient() const
Definition: qcustomplot.h:5071
int width() const
Definition: qcustomplot.h:4659
Definition: qcustomplot.h:555
0x0004 Sub grid lines
Definition: qcustomplot.h:120
double sortKey() const
Definition: qcustomplot.h:5277
ScaleStrategy
Definition: qcustomplot.h:1706
virtual void wheelEvent(QWheelEvent *event)
bool operator!=(const QCPColorGradient &other) const
Definition: qcustomplot.h:4477
LineStyle lineStyle() const
Definition: qcustomplot.h:5194
QFont mSelectedFont
Definition: qcustomplot.h:2125
QCPAxisRect * axisRect() const
Definition: qcustomplot.h:2015
QCPItemAnchor * parentAnchor() const
Definition: qcustomplot.h:3471
BracketStyle style() const
Definition: qcustomplot.h:6638
static QCPBarsData fromSortKey(double sortKey)
Definition: qcustomplot.h:5458
TimeUnit
Definition: qcustomplot.h:1653
bool scaled() const
Definition: qcustomplot.h:6470
QSharedPointer< QCPAxisTicker > ticker() const
Definition: qcustomplot.h:2019
bool noAntialiasingOnDrag() const
Definition: qcustomplot.h:3643
TickStepStrategy mTickStepStrategy
Definition: qcustomplot.h:1572
Qt::AspectRatioMode backgroundScaledMode() const
Definition: qcustomplot.h:3636
Definition: qcustomplot.h:1738
virtual int elementCount() const Q_DECL_OVERRIDE
Definition: qcustomplot.h:1379
QString name() const
Definition: qcustomplot.h:3413
virtual void mousePressEvent(QMouseEvent *event, const QVariant &details)
Definition: qcustomplot.h:823
static bool sortKeyIsMainKey()
Definition: qcustomplot.h:5140
QCPScatterStyle scatterStyle() const
Definition: qcustomplot.h:5327
double key() const
Definition: qcustomplot.h:3474
QPen selectedBasePen() const
Definition: qcustomplot.h:2051
0x040 Items are selectable (Rectangles, Arrows, Textitems, etc. see QCPAbstractItem) ...
Definition: qcustomplot.h:161
QPen zeroLinePen() const
Definition: qcustomplot.h:1888
double mainKey() const
Definition: qcustomplot.h:5142
Whether to use immediate or queued refresh depends on whether the plotting hint QCP::phImmediateRefre...
Definition: qcustomplot.h:3623
QCPBarDataMap * data() const
Definition: qcustomplot.h:2857
virtual void draw(QCPPainter *painter) Q_DECL_OVERRIDE
Definition: qcustomplot.h:1274
double baseValue() const
Definition: qcustomplot.h:5514
0x02 Mode for all sorts of exports (e.g. PNG, PDF,...). For example, this prevents using cached pixma...
Definition: qcustomplot.h:322
void coordsToPixels(double key, double value, double &x, double &y) const
int padding() const
Definition: qcustomplot.h:2043
Qt::TimeSpec mDateTimeSpec
Definition: qcustomplot.h:1626
QPen iconBorderPen() const
Definition: qcustomplot.h:4850
QCPSelectionRect * selectionRect() const
Definition: qcustomplot.h:3647
Definition: qcustomplot.h:2823
QColor textColor() const
Definition: qcustomplot.h:4737
bool mSubTicks
Definition: qcustomplot.h:2161
bool isNull() const
Definition: qcustomplot.h:411
AxisType
Definition: qcustomplot.h:1042
double devicePixelRatio() const
Definition: qcustomplot.h:529
double symbolGap() const
Definition: qcustomplot.h:6025
bool operator!=(const QCPDataRange &other) const
Definition: qcustomplot.h:902
void setFont(const QFont &font)
QFont tickLabelFont() const
Definition: qcustomplot.h:2023
double stackingGap() const
Definition: qcustomplot.h:5515
0x8000 Other elements that don't fit into any of the existing categories
Definition: qcustomplot.h:229
QPen selectedIconBorderPen() const
Definition: qcustomplot.h:4854
QCPLayout * layout() const
Definition: qcustomplot.h:1225
bool autoSqueeze() const
Definition: qcustomplot.h:2423
QCPLineEnding tail() const
Definition: qcustomplot.h:6151
double mSymbolGap
Definition: qcustomplot.h:6064
QColor selectedTextColor() const
Definition: qcustomplot.h:4857
double size() const
Definition: qcustomplot.h:799
QSharedPointer< QCPErrorBarsDataContainer > mDataContainer
Definition: qcustomplot.h:6060
QPixmap background() const
Definition: qcustomplot.h:3634
int levelCount() const
Definition: qcustomplot.h:4480
double mPiTickStep
Definition: qcustomplot.h:1813
virtual QRect clipRect() const
QBrush brush() const
Definition: qcustomplot.h:3319
void add(const QCPDataContainer< DataType > &data)
Definition: qcustomplot.h:2672
int valueSize() const
Definition: qcustomplot.h:5701
QPointF coords() const
Definition: qcustomplot.h:3476
iterator end()
Definition: qcustomplot.h:2445
QCPRange valueRange() const
Definition: qcustomplot.h:5703
Definition: qcustomplot.h:4524
QVector< double > outliers
Definition: qcustomplot.h:5596
QCP::PlottingHints plottingHints() const
Definition: qcustomplot.h:3644
virtual QPointF dataPixelPosition(int index) const Q_DECL_OVERRIDE
Definition: qcustomplot.h:4192
virtual void mousePressEvent(QMouseEvent *event)
Definition: qcustomplot.h:408
Definition: qcustomplot.h:1696
QCPDataSelection selection() const
Definition: qcustomplot.h:3324
bool mOpenGlCacheLabelsBackup
Definition: qcustomplot.h:3800
int begin() const
Definition: qcustomplot.h:905
virtual QCPRange getValueRange(bool &foundRange, SignDomain inSignDomain=sdBoth) const =0
QBrush brush() const
Definition: qcustomplot.h:4845
virtual void deselectEvent(bool *selectionStateChanged)
QCPAbstractPlottable1D(QCPAxis *keyAxis, QCPAxis *valueAxis)
Definition: qcustomplot.h:4104
QCP::SelectionType selectable() const
Definition: qcustomplot.h:3322
QColor color() const
Definition: qcustomplot.h:6317
0x01 Mode for vectorized painting (e.g. PDF export). For example, this prevents some antialiasing fix...
Definition: qcustomplot.h:321
QCP::AntialiasedElements mNotAADragBackup
Definition: qcustomplot.h:2181
SelectablePart
Definition: qcustomplot.h:2194
QCPSelectionDecorator * selectionDecorator() const
Definition: qcustomplot.h:3325
static bool sortKeyIsMainKey()
Definition: qcustomplot.h:5459
double bufferDevicePixelRatio() const
Definition: qcustomplot.h:3633
The plottable is not selectable.
Definition: qcustomplot.h:296
QPen selectedPen() const
Definition: qcustomplot.h:6199
Resolution is given in dots per centimeter (dpcm)
Definition: qcustomplot.h:171
QPoint topRight() const
Definition: qcustomplot.h:4663
ScaleType
Definition: qcustomplot.h:1072
bool antialiasedScatters() const
Definition: qcustomplot.h:3317
bool twoColored() const
Definition: qcustomplot.h:5902
double errorPlus
Definition: qcustomplot.h:5973
bool isValid() const
Definition: qcustomplot.h:915
QPen selectedPen() const
Definition: qcustomplot.h:6406
QVector< DataType > mData
Definition: qcustomplot.h:2459
bool selected() const
Definition: qcustomplot.h:3530
QBrush selectedBrush() const
Definition: qcustomplot.h:4855
QPen tickPen() const
Definition: qcustomplot.h:2037
double logBase() const
Definition: qcustomplot.h:1841
void setEnd(int end)
Definition: qcustomplot.h:912
QFont font() const
Definition: qcustomplot.h:4736
SizeConstraintRect
Definition: qcustomplot.h:1216
Definition: qcustomplot.h:2490
QString mTimeFormat
Definition: qcustomplot.h:1673
int selectionTolerance() const
Definition: qcustomplot.h:3642
QHash< TimeUnit, QString > mFormatPattern
Definition: qcustomplot.h:1678
virtual QSize maximumOuterSizeHint() const
int barWidth() const
Definition: qcustomplot.h:5073
QCPAxis * valueAxis() const
Definition: qcustomplot.h:3478
0x02 right margin
Definition: qcustomplot.h:101
FillOrder
Definition: qcustomplot.h:1349
The negative sign domain, i.e. numbers smaller than zero.
Definition: qcustomplot.h:191
const QCPRange operator/(const QCPRange &range, double value)
Definition: qcustomplot.h:592
QCPLayoutInset * insetLayout() const
Definition: qcustomplot.h:4645
QCPRange mDragStartRange
Definition: qcustomplot.h:2180
bool periodicity() const
Definition: qcustomplot.h:1796
QSize size() const
Definition: qcustomplot.h:527
QPointer< QCPLayerable > mMouseEventLayerable
Definition: qcustomplot.h:3792
Definition: qcustomplot.h:2997
int height() const
Definition: qcustomplot.h:4660
QColor selectedLabelColor() const
Definition: qcustomplot.h:2050
QString suffixPart
Definition: qcustomplot.h:2272
QSize minimumSize() const
Definition: qcustomplot.h:1231
Definition: qcustomplot.h:1388
QBrush brush() const
Definition: qcustomplot.h:6556
QPen penNegative() const
Definition: qcustomplot.h:5906
SpacingType
Definition: qcustomplot.h:2754
QCPDataContainer()
Definition: qcustomplot.h:2607
QCPDataRange dataRange(int index=0) const
iterator begin()
Definition: qcustomplot.h:2444
QPen bracketPen() const
Definition: qcustomplot.h:4547
QCPAxis * axis() const
Definition: qcustomplot.h:5067
bool mMouseHasMoved
Definition: qcustomplot.h:3791
QCPDataContainer< QCPBarsData > QCPBarsDataContainer
Definition: qcustomplot.h:5480
bool tickLabels() const
Definition: qcustomplot.h:2021
FillOrder mFillOrder
Definition: qcustomplot.h:1406
bool antialiased() const
Definition: qcustomplot.h:716
double value
Definition: qcustomplot.h:5466
void drawLine(const QLineF &line)
QSharedPointer< QCPDataContainer< DataType > > mDataContainer
Definition: qcustomplot.h:3902
QPen mPen
Definition: qcustomplot.h:1463
ChartStyle
Definition: qcustomplot.h:3163
PainterMode
Definition: qcustomplot.h:320
QColor textColor() const
Definition: qcustomplot.h:4847
const QMetaObject staticMetaObject
QBrush mBrush
Definition: qcustomplot.h:1130
static Qt::Orientation orientation(AxisType type)
Definition: qcustomplot.h:2123
QString dateTimeFormat() const
Definition: qcustomplot.h:1609
int mSubTickCount
Definition: qcustomplot.h:1761
int right() const
Definition: qcustomplot.h:4656
QPoint center() const
Definition: qcustomplot.h:4666
0x002 Axis ranges are zoomable with the mouse wheel (see QCPAxisRect::setRangeZoom, QCPAxisRect::setRangeZoomAxes)
Definition: qcustomplot.h:156
friend class QCPAxisRect
Definition: qcustomplot.h:472
Definition: qcustomplot.h:5966
QString mText
Definition: qcustomplot.h:4990
SizeConstraintRect mSizeConstraintRect
Definition: qcustomplot.h:1262
LineStyle lineStyle() const
Definition: qcustomplot.h:5329
Definition: qcustomplot.h:1362
PlottingHint
Definition: qcustomplot.h:139
double piValue() const
Definition: qcustomplot.h:1795
Cosmetic pens are exported normally (e.g. in PDF exports, cosmetic pens always appear as 1 pixel on s...
Definition: qcustomplot.h:181
FractionStyle mFractionStyle
Definition: qcustomplot.h:1810
double mainKey() const
Definition: qcustomplot.h:5461
MarginSide
Definition: qcustomplot.h:100
QCPAxis::ScaleType dataScaleType() const
Definition: qcustomplot.h:5766
QMargins padding() const
Definition: qcustomplot.h:6329
QPen pen() const
Definition: qcustomplot.h:6319
Definition: qcustomplot.h:3145
double upperQuartile
Definition: qcustomplot.h:5595
void getDataSegments(QList< QCPDataRange > &selectedSegments, QList< QCPDataRange > &unselectedSegments) const
Definition: qcustomplot.h:4358
void setAutoSqueeze(bool enabled)
Definition: qcustomplot.h:2623
QPixmap pixmap() const
Definition: qcustomplot.h:2360
bool periodic() const
Definition: qcustomplot.h:4483
QCPScatterStyle mScatterStyle
Definition: qcustomplot.h:3280
Definition: qcustomplot.h:3046
int fieldWidth(TimeUnit unit) const
Definition: qcustomplot.h:1665
double sortKey() const
Definition: qcustomplot.h:5138
QBrush brushNegative() const
Definition: qcustomplot.h:5904
bool mSelected
Definition: qcustomplot.h:1466
double mWhiskerWidth
Definition: qcustomplot.h:6063
const QCPRange operator-(const QCPRange &range, double value)
Definition: qcustomplot.h:562
QCPColorMapData * data() const
Definition: qcustomplot.h:5764
QBrush selectedBrush() const
Definition: qcustomplot.h:1416
WidthType widthType() const
Definition: qcustomplot.h:5901
BracketStyle bracketStyle() const
Definition: qcustomplot.h:4551
bool rangeReversed() const
Definition: qcustomplot.h:2018
double spacing() const
Definition: qcustomplot.h:5411
QBrush brush() const
Definition: qcustomplot.h:6251
double size() const
Definition: qcustomplot.h:2356
QCPSelectionRect * mSelectionRect
Definition: qcustomplot.h:3785
virtual bool sortKeyIsMainKey() const Q_DECL_OVERRIDE
Definition: qcustomplot.h:4209
LineStyle
Definition: qcustomplot.h:2673
WidthType mWidthType
Definition: qcustomplot.h:5937
QFont font() const
Definition: qcustomplot.h:4846
QMap< double, QColor > colorStops() const
Definition: qcustomplot.h:4481
const QCPRange range() const
Definition: qcustomplot.h:2017
static bool sortKeyIsMainKey()
Definition: qcustomplot.h:5835
QColor tickLabelColor() const
Definition: qcustomplot.h:2024
int mPreallocIteration
Definition: qcustomplot.h:2461
When dragging the mouse, a selection rect becomes active. Upon releasing, plottable data points that ...
Definition: qcustomplot.h:274
QCPRange dataBounds() const
Definition: qcustomplot.h:5704
Resolution is given in dots per meter (dpm)
Definition: qcustomplot.h:170
QPen subTickPen() const
Definition: qcustomplot.h:2038
double x() const
Definition: qcustomplot.h:396
QFont selectedFont() const
Definition: qcustomplot.h:6324
void limitIteratorsToDataRange(const_iterator &begin, const_iterator &end, const QCPDataRange &dataRange) const
Definition: qcustomplot.h:3171
Definition: qcustomplot.h:5995
double size() const
Definition: qcustomplot.h:6558
void applyDefaultAntialiasingHint(QCPPainter *painter) const
int wrap() const
Definition: qcustomplot.h:1364
double dot(const QCPVector2D &vec) const
Definition: qcustomplot.h:415
Interaction
Definition: qcustomplot.h:155
int mBracketWidth
Definition: qcustomplot.h:4574
QString text() const
Definition: qcustomplot.h:4957
QPen mSelectedPen
Definition: qcustomplot.h:1463
int end() const
Definition: qcustomplot.h:906
int textFlags() const
Definition: qcustomplot.h:4958
bool isEmpty() const
Definition: qcustomplot.h:5421