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