Kstars
qcustomplot.h
160// Qt version < 6.2.0: to get metatypes Q_GADGET/Q_ENUMS/Q_FLAGS in namespace we have to make it look like a class during moc-run
161#if QT_VERSION >= 0x060200 // don't use QT_VERSION_CHECK here, some moc versions don't understand it
193 \see QCustomPlot::savePng, QCustomPlot::saveJpg, QCustomPlot::saveBmp, QCustomPlot::saveRastered
205enum ExportPen { epNoCosmetic ///< Cosmetic pens are converted to pens with pixel width 1 when exporting
206 ,epAllowCosmetic ///< Cosmetic pens are exported normally (e.g. in PDF exports, cosmetic pens always appear as 1 pixel on screen, independent of viewer zoom level)
236 Defines what objects of a plot can be forcibly drawn antialiased/not antialiased. If an object is
237 neither forcibly drawn antialiased nor forcibly drawn not antialiased, it is up to the respective
251 ,aeScatters = 0x0080 ///< <tt>0x0080</tt> Scatter symbols of plottables (excluding scatter symbols of type ssPixmap)
254 ,aeOther = 0x8000 ///< <tt>0x8000</tt> Other elements that don't fit into any of the existing categories
266 ,phFastPolylines = 0x001 ///< <tt>0x001</tt> Graph/Curve lines are drawn with a faster method. This reduces the quality especially of the line segment
267 ///< joins, thus is most effective for pen sizes larger than 1. It is only used for solid line pens.
268 ,phImmediateRefresh = 0x002 ///< <tt>0x002</tt> causes an immediate repaint() instead of a soft update() when QCustomPlot::replot() is called with parameter \ref QCustomPlot::rpRefreshHint.
269 ///< This is set by default to prevent the plot from freezing on fast consecutive replots (e.g. user drags ranges with mouse).
270 ,phCacheLabels = 0x004 ///< <tt>0x004</tt> axis (tick) labels will be cached as pixmaps, increasing replot performance.
282 ,iRangeDrag = 0x001 ///< <tt>0x001</tt> Axis ranges are draggable (see \ref QCPAxisRect::setRangeDrag, \ref QCPAxisRect::setRangeDragAxes)
283 ,iRangeZoom = 0x002 ///< <tt>0x002</tt> Axis ranges are zoomable with the mouse wheel (see \ref QCPAxisRect::setRangeZoom, \ref QCPAxisRect::setRangeZoomAxes)
284 ,iMultiSelect = 0x004 ///< <tt>0x004</tt> The user can select multiple objects by holding the modifier set by \ref QCustomPlot::setMultiSelectModifier while clicking
285 ,iSelectPlottables = 0x008 ///< <tt>0x008</tt> Plottables are selectable (e.g. graphs, curves, bars,... see QCPAbstractPlottable)
286 ,iSelectAxes = 0x010 ///< <tt>0x010</tt> Axes are selectable (or parts of them, see QCPAxis::setSelectableParts)
287 ,iSelectLegend = 0x020 ///< <tt>0x020</tt> Legends are selectable (or their child items, see QCPLegend::setSelectableParts)
288 ,iSelectItems = 0x040 ///< <tt>0x040</tt> Items are selectable (Rectangles, Arrows, Textitems, etc. see \ref QCPAbstractItem)
289 ,iSelectOther = 0x080 ///< <tt>0x080</tt> All other objects are selectable (e.g. your own derived layerables, other layout elements,...)
290 ,iSelectPlottablesBeyondAxisRect = 0x100 ///< <tt>0x100</tt> When performing plottable selection/hit tests, this flag extends the sensitive area beyond the axis rect
299enum SelectionRectMode { srmNone ///< The selection rect is disabled, and all mouse events are forwarded to the underlying objects, e.g. for axis range dragging
300 ,srmZoom ///< When dragging the mouse, a selection rect becomes active. Upon releasing, the axes that are currently set as range zoom axes (\ref QCPAxisRect::setRangeZoomAxes) will have their ranges zoomed accordingly.
301 ,srmSelect ///< When dragging the mouse, a selection rect becomes active. Upon releasing, plottable data points that were within the selection rect are selected, if the plottable's selectability setting permits. (See \ref dataselection "data selection mechanism" for details.)
419// for older Qt versions we have to declare the enums/flags as metatypes outside the namespace using Q_DECLARE_METATYPE:
492inline const QCPVector2D operator*(double factor, const QCPVector2D &vec) { return QCPVector2D(vec.mX*factor, vec.mY*factor); }
493inline const QCPVector2D operator*(const QCPVector2D &vec, double factor) { return QCPVector2D(vec.mX*factor, vec.mY*factor); }
494inline const QCPVector2D operator/(const QCPVector2D &vec, double divisor) { return QCPVector2D(vec.mX/divisor, vec.mY/divisor); }
495inline const QCPVector2D operator+(const QCPVector2D &vec1, const QCPVector2D &vec2) { return QCPVector2D(vec1.mX+vec2.mX, vec1.mY+vec2.mY); }
496inline const QCPVector2D operator-(const QCPVector2D &vec1, const QCPVector2D &vec2) { return QCPVector2D(vec1.mX-vec2.mX, vec1.mY-vec2.mY); }
497inline const QCPVector2D operator-(const QCPVector2D &vec) { return QCPVector2D(-vec.mX, -vec.mY); }
520 Defines special modes the painter can operate in. They disable or enable certain subsets of features/fixes/workarounds,
523 enum PainterMode { pmDefault = 0x00 ///< <tt>0x00</tt> Default mode for painting on screen devices
524 ,pmVectorized = 0x01 ///< <tt>0x01</tt> Mode for vectorized painting (e.g. PDF export). For example, this prevents some antialiasing fixes.
525 ,pmNoCaching = 0x02 ///< <tt>0x02</tt> Mode for all sorts of exports (e.g. PNG, PDF,...). For example, this prevents using cached pixmap labels
526 ,pmNonCosmetic = 0x04 ///< <tt>0x04</tt> Turns pen widths 0 to 1, i.e. disables cosmetic pens. (A cosmetic pen is always drawn with width 1 pixel in the vector image/pdf viewer, independent of zoom.)
656 explicit QCPPaintBufferGlFbo(const QSize &size, double devicePixelRatio, QWeakPointer<QOpenGLContext> glContext, QWeakPointer<QOpenGLPaintDevice> glPaintDevice);
702 enum LayerMode { lmLogical ///< Layer is used only for rendering order, and shares paint buffer with all other adjacent logical layers.
703 ,lmBuffered ///< Layer has its own paint buffer and may be replotted individually (see \ref replot).
762 QCPLayerable(QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=nullptr);
779 virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const;
802 virtual void selectEvent(QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged);
815 void applyAntialiasingHint(QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const;
839 bool operator==(const QCPRange& other) const { return lower == other.lower && upper == other.upper; }
955 bool operator==(const QCPDataRange& other) const { return mBegin == other.mBegin && mEnd == other.mEnd; }
974 QCPDataRange adjusted(int changeBegin, int changeEnd) const { return QCPDataRange(mBegin+changeBegin, mEnd+changeEnd); }
998 friend inline const QCPDataSelection operator+(const QCPDataSelection& a, const QCPDataSelection& b);
999 friend inline const QCPDataSelection operator+(const QCPDataRange& a, const QCPDataSelection& b);
1000 friend inline const QCPDataSelection operator+(const QCPDataSelection& a, const QCPDataRange& b);
1002 friend inline const QCPDataSelection operator-(const QCPDataSelection& a, const QCPDataSelection& b);
1003 friend inline const QCPDataSelection operator-(const QCPDataRange& a, const QCPDataSelection& b);
1004 friend inline const QCPDataSelection operator-(const QCPDataSelection& a, const QCPDataRange& b);
1029 inline static bool lessThanDataRangeBegin(const QCPDataRange &a, const QCPDataRange &b) { return a.begin() < b.begin(); }
1035 Return a \ref QCPDataSelection with the data points in \a a joined with the data points in \a b.
1046 Return a \ref QCPDataSelection with the data points in \a a joined with the data points in \a b.
1057 Return a \ref QCPDataSelection with the data points in \a a joined with the data points in \a b.
1068 Return a \ref QCPDataSelection with the data points in \a a joined with the data points in \a b.
1215 QList<QCPLayoutElement*> elements(QCP::MarginSide side) const { return mChildren.value(side); }
1249 Q_PROPERTY(SizeConstraintRect sizeConstraintRect READ sizeConstraintRect WRITE setSizeConstraintRect)
1256 enum UpdatePhase { upPreparation ///< Phase used for any type of preparation that needs to be done before margin calculation and layout
1265 margins (e.g. in the case of a QCPAxisRect the axis labels), whereas the inner rect (\ref rect)
1270 enum SizeConstraintRect { scrInnerRect ///< Minimum/Maximum size constraints apply to inner rect
1271 , scrOuterRect ///< Minimum/Maximum size constraints apply to outer rect, thus include layout element margins
1288 QCPMarginGroup *marginGroup(QCP::MarginSide side) const { return mMarginGroups.value(side, nullptr); }
1310 virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const Q_DECL_OVERRIDE;
1327 virtual void applyDefaultAntialiasingHint(QCPPainter *painter) const Q_DECL_OVERRIDE { Q_UNUSED(painter) }
1371 QVector<int> getSectionSizes(QVector<int> maxSizes, QVector<int> minSizes, QVector<double> stretchFactors, int totalSize) const;
1387 Q_PROPERTY(QList<double> columnStretchFactors READ columnStretchFactors WRITE setColumnStretchFactors)
1403 enum FillOrder { foRowsFirst ///< Rows are filled first, and a new element is wrapped to the next column if the row count would exceed \ref setWrap.
1404 ,foColumnsFirst ///< Columns are filled first, and a new element is wrapped to the next row if the column count would exceed \ref setWrap.
1479 enum InsetPlacement { ipFree ///< The element may be positioned/sized arbitrarily, see \ref setInsetRect
1480 ,ipBorderAligned ///< The element is aligned to one of the layout sides, see \ref setInsetAlignment
1538 and \ref setLength. Some decorations like \ref esDisc, \ref esSquare, \ref esDiamond and \ref esBar only
1541 \see QCPItemLine::setHead, QCPItemLine::setTail, QCPItemCurve::setHead, QCPItemCurve::setTail, QCPAxis::setLowerEnding, QCPAxis::setUpperEnding
1678 QTransform transform; // the transform about the label anchor which is at (0, 0). Does not contain final absolute x/y positioning on the plot/axis
1695 double mRotation; // this is the rotation applied uniformly to all labels, not the heterogeneous rotation in amCircularRotated mode
1701 QByteArray mLabelParameterHash; // to determine whether mLabelCache needs to be cleared due to changed parameters
1707 virtual void drawLabelMaybeCached(QCPPainter *painter, const QFont &font, const QColor &color, const QPointF &pos, AnchorSide side, double rotation, const QString &text);
1708 virtual QByteArray generateLabelParameterHash() const; // TODO: get rid of this in favor of invalidation flag upon setters?
1713 LabelData getTickLabelData(const QFont &font, const QColor &color, double rotation, AnchorSide side, const QString &text) const;
1715 //void getMaxTickLabelSize(const QFont &font, const QString &text, QSize *tickLabelsSize) const;
1717 QByteArray cacheKey(const QString &text, const QColor &color, double rotation, AnchorSide side) const;
1737 Defines the strategies that the axis ticker may follow when choosing the size of the tick step.
1743 tssReadability ///< A nicely readable tick step is prioritized over matching the requested number of ticks (see \ref setTickCount)
1744 ,tssMeetTickCount ///< Less readable tick steps are allowed which in turn facilitates getting closer to the requested tick count
1762 virtual void generate(const QCPRange &range, const QLocale &locale, QChar formatChar, int precision, QVector<double> &ticks, QVector<double> *subTicks, QVector<QString> *tickLabels);
1773 virtual QString getTickLabel(double tick, const QLocale &locale, QChar formatChar, int precision);
1815 void setTickOrigin(double origin); // hides base class method but calls baseclass implementation ("using" throws off IDEs and doxygen)
1836 virtual QString getTickLabel(double tick, const QLocale &locale, QChar formatChar, int precision) Q_DECL_OVERRIDE;
1837 virtual QVector<double> createTickVector(double tickStep, const QCPRange &range) Q_DECL_OVERRIDE;
1855 enum TimeUnit { tuMilliseconds ///< Milliseconds, one thousandth of a second (%%z in \ref setTimeFormat)
1908 enum ScaleStrategy { ssNone ///< Modifications are not allowed, the specified tick step is absolutely fixed. This might cause a high tick density and overlapping labels if the axis range is zoomed out.
1909 ,ssMultiples ///< An integer multiple of the specified tick step is allowed. The used factor follows the base class properties of \ref setTickStepStrategy and \ref setTickCount.
1968 virtual QString getTickLabel(double tick, const QLocale &locale, QChar formatChar, int precision) Q_DECL_OVERRIDE;
1987 enum FractionStyle { fsFloatingPoint ///< Fractions are displayed as regular decimal floating point numbers, e.g. "0.25" or "0.125".
1988 ,fsAsciiFractions ///< Fractions are written as rationals using ASCII characters only, e.g. "1/4" or "1/8"
1989 ,fsUnicodeFractions ///< Fractions are written using sub- and superscript UTF-8 digits and the fraction symbol.
2060 virtual QVector<double> createTickVector(double tickStep, const QCPRange &range) Q_DECL_OVERRIDE;
2155 Q_PROPERTY(SelectableParts selectedParts READ selectedParts WRITE setSelectedParts NOTIFY selectionChanged)
2156 Q_PROPERTY(SelectableParts selectableParts READ selectableParts WRITE setSelectableParts NOTIFY selectableChanged)
2157 Q_PROPERTY(QFont selectedTickLabelFont READ selectedTickLabelFont WRITE setSelectedTickLabelFont)
2159 Q_PROPERTY(QColor selectedTickLabelColor READ selectedTickLabelColor WRITE setSelectedTickLabelColor)
2173 enum AxisType { atLeft = 0x01 ///< <tt>0x01</tt> Axis is vertical and on the left side of the axis rect
2195 ,stLogarithmic ///< Logarithmic scaling with correspondingly transformed axis coordinates (possibly also \ref setTicker to a \ref QCPAxisTickerLog instance).
2306 virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const Q_DECL_OVERRIDE;
2310 int pixelOrientation() const { return rangeReversed() != (orientation()==Qt::Vertical) ? -1 : 1; }
2324 static Qt::Orientation orientation(AxisType type) { return type==atBottom || type==atTop ? Qt::Horizontal : Qt::Vertical; }
2392 virtual void selectEvent(QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged) Q_DECL_OVERRIDE;
2452 int tickLengthIn, tickLengthOut, subTickLengthIn, subTickLengthOut; // directly accessed by QCPAxis setters/getters
2478 QByteArray mLabelParameterHash; // to determine whether mLabelCache needs to be cleared due to changed parameters
2484 virtual void placeTickLabel(QCPPainter *painter, double position, int distanceToAxis, const QString &text, QSize *tickLabelsSize);
2485 virtual void drawTickLabel(QCPPainter *painter, double x, double y, const TickLabelData &labelData) const;
2488 virtual void getMaxTickLabelSize(const QFont &font, const QString &text, QSize *tickLabelsSize) const;
2527 enum ScatterShape { ssNone ///< no scatter symbols are drawn (e.g. in QCPGraph, data only represented with lines)
2528 ,ssDot ///< \enumimage{ssDot.png} a single pixel (use \ref ssDisc or \ref ssCircle if you want a round shape with a certain radius)
2532 ,ssDisc ///< \enumimage{ssDisc.png} a circle which is filled with the pen's color (not the brush as with ssCircle)
2535 ,ssStar ///< \enumimage{ssStar.png} a star with eight arms, i.e. a combination of cross and plus
2537 ,ssTriangleInverted ///< \enumimage{ssTriangleInverted.png} an equilateral triangle, standing on corner
2542 ,ssPeace ///< \enumimage{ssPeace.png} a circle, with one vertical and two downward diagonal lines
2543 ,ssPixmap ///< a custom pixmap specified by \ref setPixmap, centered on the data point coordinates
2554 QCPScatterStyle(const QPainterPath &customPath, const QPen &pen, const QBrush &brush=Qt::NoBrush, double size=6);
2610inline bool qcpLessThanSortKey(const DataType &a, const DataType &b) { return a.sortKey() < b.sortKey(); }
2613class QCPDataContainer // no QCP_LIB_DECL, template class ends up in header (cpp included below)
2651 QCPRange valueRange(bool &foundRange, QCP::SignDomain signDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange());
2653 void limitIteratorsToDataRange(const_iterator &begin, const_iterator &end, const QCPDataRange &dataRange) const;
2672////////////////////////////////////////////////////////////////////////////////////////////////////
2674////////////////////////////////////////////////////////////////////////////////////////////////////
2679 This class template provides a fast container for data storage of one-dimensional data. The data
2683 The data is stored in a sorted fashion, which allows very quick lookups by the sorted key as well
2684 as retrieval of ranges (see \ref findBegin, \ref findEnd, \ref keyRange) using binary search. The
2688 using the fact that existing data is always sorted. The user can further improve performance by
2689 specifying that added data is already itself sorted by key, if he can guarantee that this is the
2692 The data can be accessed with the provided const iterators (\ref constBegin, \ref constEnd). If
2693 it is necessary to alter existing data in-place, the non-const iterators can be used (\ref begin,
2694 \ref end). Changing data members that are not the sort key (for most data types called \a key) is
2697 Great care must be taken however if the sort key is modified through the non-const iterators. For
2699 manipulation. It is thus the responsibility of the user to leave the container in a sorted state
2714 \li <tt>double sortKey() const</tt>\n Returns the member variable of this data point that is the
2720 \li <tt>static bool sortKeyIsMainKey()</tt>\n Returns true if the sort key is equal to the main
2721 key (see method \c mainKey below). For most plottables this is the case. It is not the case for
2722 example for \ref QCPCurve, which uses \a t as sort key and \a key as main key. This is the reason
2725 \li <tt>double mainKey() const</tt>\n Returns the variable of this data point considered the main
2726 key. This is commonly the variable that is used as the coordinate of this data point on the key
2734 \li <tt>QCPRange valueRange() const</tt>\n Returns the range this data point spans in the value
2736 both lower and upper set to the main data point value. However if the data points can represent
2738 values at each \a key) this method should return the range those values span. This method is used
2769 You can manipulate the data points in-place through the non-const iterators, but great care must
2778 You can manipulate the data points in-place through the non-const iterators, but great care must
2786 the available elements in this container, returns \ref constEnd, i.e. an iterator past the last
2879 if (oldSize > 0 && !qcpLessThanSortKey<DataType>(*constBegin(), *(data.constEnd()-1))) // prepend if new data keys are all smaller than or equal to existing ones
2889 if (oldSize > 0 && !qcpLessThanSortKey<DataType>(*(constEnd()-n-1), *(constEnd()-n))) // if appended range keys aren't all greater than existing ones, merge the two partitions
2916 if (alreadySorted && oldSize > 0 && !qcpLessThanSortKey<DataType>(*constBegin(), *(data.constEnd()-1))) // prepend if new data is sorted and keys are all smaller than or equal to existing ones
2928 if (oldSize > 0 && !qcpLessThanSortKey<DataType>(*(constEnd()-n-1), *(constEnd()-n))) // if appended range keys aren't all greater than existing ones, merge the two partitions
2942 if (isEmpty() || !qcpLessThanSortKey<DataType>(data, *(constEnd()-1))) // quickly handle appends if new data key is greater or equal to existing ones
2945 } else if (qcpLessThanSortKey<DataType>(data, *constBegin())) // quickly handle prepends using preallocated space
2953 QCPDataContainer<DataType>::iterator insertionPoint = std::lower_bound(begin(), end(), data, qcpLessThanSortKey<DataType>);
2967 QCPDataContainer<DataType>::iterator itEnd = std::lower_bound(begin(), end(), DataType::fromSortKey(sortKey), qcpLessThanSortKey<DataType>);
2981 QCPDataContainer<DataType>::iterator it = std::upper_bound(begin(), end(), DataType::fromSortKey(sortKey), qcpLessThanSortKey<DataType>);
3001 QCPDataContainer<DataType>::iterator it = std::lower_bound(begin(), end(), DataType::fromSortKey(sortKeyFrom), qcpLessThanSortKey<DataType>);
3002 QCPDataContainer<DataType>::iterator itEnd = std::upper_bound(it, end(), DataType::fromSortKey(sortKeyTo), qcpLessThanSortKey<DataType>);
3020 QCPDataContainer::iterator it = std::lower_bound(begin(), end(), DataType::fromSortKey(sortKey), qcpLessThanSortKey<DataType>);
3048 When setting, adding or removing points using the QCPDataContainer interface (\ref set, \ref add,
3051 points by accessing and modifying it through the non-const iterators (\ref begin, \ref end), it
3052 is your responsibility to bring the container back into a sorted state before any other methods
3069 The parameters \a preAllocation and \a postAllocation control whether pre- and/or post allocation
3094 This can be used in conjunction with \ref findEnd to iterate over data points within a given key
3095 range, including or excluding the bounding data points that are just beyond the specified range.
3105typename QCPDataContainer<DataType>::const_iterator QCPDataContainer<DataType>::findBegin(double sortKey, bool expandedRange) const
3110 QCPDataContainer<DataType>::const_iterator it = std::lower_bound(constBegin(), constEnd(), DataType::fromSortKey(sortKey), qcpLessThanSortKey<DataType>);
3111 if (expandedRange && it != constBegin()) // also covers it == constEnd case, and we know --constEnd is valid because mData isn't empty
3117 Returns an iterator to the element after the data point with a (sort-)key that is equal to, just
3118 above or just below \a sortKey. If \a expandedRange is true, the data point just above \a sortKey
3122 key range, including the bounding data points that are just below and above the specified range.
3132typename QCPDataContainer<DataType>::const_iterator QCPDataContainer<DataType>::findEnd(double sortKey, bool expandedRange) const
3137 QCPDataContainer<DataType>::const_iterator it = std::upper_bound(constBegin(), constEnd(), DataType::fromSortKey(sortKey), qcpLessThanSortKey<DataType>);
3153 If the DataType reports that its main key is equal to the sort key (\a sortKeyIsMainKey), as is
3175 if (DataType::sortKeyIsMainKey()) // if DataType is sorted by main key (e.g. QCPGraph, but not QCPCurve), use faster algorithm by finding just first and last key with non-NaN value
3269 you should not use the returned QCPRange (e.g. the data container is empty or all points have the
3284QCPRange QCPDataContainer<DataType>::valueRange(bool &foundRange, QCP::SignDomain signDomain, const QCPRange &inKeyRange)
3307 if (restrictKeyRange && (it->mainKey() < inKeyRange.lower || it->mainKey() > inKeyRange.upper))
3310 if ((current.lower < range.lower || !haveLower) && !qIsNaN(current.lower) && std::isfinite(current.lower))
3315 if ((current.upper > range.upper || !haveUpper) && !qIsNaN(current.upper) && std::isfinite(current.upper))
3325 if (restrictKeyRange && (it->mainKey() < inKeyRange.lower || it->mainKey() > inKeyRange.upper))
3328 if ((current.lower < range.lower || !haveLower) && current.lower < 0 && !qIsNaN(current.lower) && std::isfinite(current.lower))
3333 if ((current.upper > range.upper || !haveUpper) && current.upper < 0 && !qIsNaN(current.upper) && std::isfinite(current.upper))
3343 if (restrictKeyRange && (it->mainKey() < inKeyRange.lower || it->mainKey() > inKeyRange.upper))
3346 if ((current.lower < range.lower || !haveLower) && current.lower > 0 && !qIsNaN(current.lower) && std::isfinite(current.lower))
3368 This function doesn't require for \a dataRange to be within the bounds of this data container's
3372void QCPDataContainer<DataType>::limitIteratorsToDataRange(const_iterator &begin, const_iterator &end, const QCPDataRange &dataRange) const
3382 Increases the preallocation pool to have a size of at least \a minimumPreallocSize. Depending on
3386 if \a minimumPreallocSize is smaller than or equal to the current preallocation pool size, this
3407 This method decides, depending on the total allocation size and the size of the unused pre- and
3411 If \ref setAutoSqueeze is enabled, this method is called automatically each time data points are
3427 if (totalAlloc > 650000) // if allocation is larger, shrink earlier with respect to total used size
3429 shrinkPostAllocation = postAllocSize > usedSize*1.5; // QVector grow strategy is 2^n for static data. Watch out not to oscillate!
3431 } else if (totalAlloc > 1000) // below 10 MiB raw data be generous with preallocated memory, below 1k points don't even bother
3459 QCPScatterStyle::ScatterProperties usedScatterProperties() const { return mUsedScatterProperties; }
3464 void setScatterStyle(const QCPScatterStyle &scatterStyle, QCPScatterStyle::ScatterProperties usedProperties=QCPScatterStyle::spPen);
3506 Q_PROPERTY(QCP::SelectionType selectable READ selectable WRITE setSelectable NOTIFY selectableChanged)
3507 Q_PROPERTY(QCPDataSelection selection READ selection WRITE setSelection NOTIFY selectionChanged)
3508 Q_PROPERTY(QCPSelectionDecorator* selectionDecorator READ selectionDecorator WRITE setSelectionDecorator)
3540 virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const Q_DECL_OVERRIDE = 0; // actually introduced in QCPLayerable as non-pure, but we want to force reimplementation for plottables
3542 virtual QCPRange getKeyRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth) const = 0;
3543 virtual QCPRange getValueRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange()) const = 0;
3580 virtual void selectEvent(QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged) Q_DECL_OVERRIDE;
3609 QCPItemAnchor(QCustomPlot *parentPlot, QCPAbstractItem *parentItem, const QString &name, int anchorId=-1);
3631 void removeChildX(QCPItemPosition *pos); // called from pos when its parent anchor is reset or pos deleted
3633 void removeChildY(QCPItemPosition *pos); // called from pos when its parent anchor is reset or pos deleted
3653 enum PositionType { ptAbsolute ///< Static positioning in pixels, starting from the top left corner of the viewport/widget.
3654 ,ptViewportRatio ///< Static positioning given by a fraction of the viewport size. For example, if you call setCoords(0, 0), the position will be at the top
3655 ///< left corner of the viewport/widget. setCoords(1, 1) will be at the bottom right corner, setCoords(0.5, 0) will be horizontally centered and
3657 ,ptAxisRectRatio ///< Static positioning given by a fraction of the axis rect size (see \ref setAxisRect). For example, if you call setCoords(0, 0), the position will be at the top
3658 ///< left corner of the axis rect. setCoords(1, 1) will be at the bottom right corner, setCoords(0.5, 0) will be horizontally centered and
3659 ///< vertically at the top of the axis rect, etc. You can also go beyond the axis rect by providing negative coordinates or coordinates larger than 1.
3660 ,ptPlotCoords ///< Dynamic positioning at a plot coordinate defined by two axes (see \ref setAxes).
3739 virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const Q_DECL_OVERRIDE = 0;
3766 virtual void selectEvent(QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged) Q_DECL_OVERRIDE;
3797 Q_PROPERTY(Qt::AspectRatioMode backgroundScaledMode READ backgroundScaledMode WRITE setBackgroundScaledMode)
3799 Q_PROPERTY(bool autoAddPlottableToLegend READ autoAddPlottableToLegend WRITE setAutoAddPlottableToLegend)
3802 Q_PROPERTY(Qt::KeyboardModifier multiSelectModifier READ multiSelectModifier WRITE setMultiSelectModifier)
3821 enum RefreshPriority { rpImmediateRefresh ///< Replots immediately and repaints the widget immediately by calling QWidget::repaint() after the replot
3822 ,rpQueuedRefresh ///< Replots immediately, but queues the widget repaint, by calling QWidget::update() after the replot. This way multiple redundant widget repaints can be avoided.
3823 ,rpRefreshHint ///< Whether to use immediate or queued refresh depends on whether the plotting hint \ref QCP::phImmediateRefresh is set, see \ref setPlottingHints.
3824 ,rpQueuedReplot ///< Queues the entire replot for the next event loop iteration. This way multiple redundant replots can be avoided. The actual replot is then done with \ref rpRefreshHint priority.
3854 void setBackground(const QPixmap &pm, bool scaled, Qt::AspectRatioMode mode=Qt::KeepAspectRatioByExpanding);
3861 void setNotAntialiasedElement(QCP::AntialiasedElement notAntialiasedElement, bool enabled=true);
3884 PlottableType *plottableAt(const QPointF &pos, bool onlySelectable=false, int *dataIndex=nullptr) const;
3885 QCPAbstractPlottable *plottableAt(const QPointF &pos, bool onlySelectable=false, int *dataIndex=nullptr) const;
3918 bool addLayer(const QString &name, QCPLayer *otherLayer=nullptr, LayerInsertMode insertMode=limAbove);
3934 bool savePdf(const QString &fileName, int width=0, int height=0, QCP::ExportPen exportPen=QCP::epAllowCosmetic, const QString &pdfCreator=QString(), const QString &pdfTitle=QString());
3935 bool savePng(const QString &fileName, int width=0, int height=0, double scale=1.0, int quality=-1, int resolution=96, QCP::ResolutionUnit resolutionUnit=QCP::ruDotsPerInch);
3936 bool saveJpg(const QString &fileName, int width=0, int height=0, double scale=1.0, int quality=-1, int resolution=96, QCP::ResolutionUnit resolutionUnit=QCP::ruDotsPerInch);
3937 bool saveBmp(const QString &fileName, int width=0, int height=0, double scale=1.0, int resolution=96, QCP::ResolutionUnit resolutionUnit=QCP::ruDotsPerInch);
3938 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);
3975 QList<QCPGraph*> mGraphs; // extra list of plottables also in mPlottables that are of type QCPGraph
4039 QCPLayerable *layerableAt(const QPointF &pos, bool onlySelectable, QVariant *selectionDetails=nullptr) const;
4040 QList<QCPLayerable*> layerableListAt(const QPointF &pos, bool onlySelectable, QList<QVariant> *selectionDetails=nullptr) const;
4066 Plottables that only consist of single lines (like graphs) have a tolerance band around them, see
4067 \ref setSelectionTolerance. If multiple plottables come into consideration, the one closest to \a
4073 if \a dataIndex is non-null, it is set to the index of the plottable's data point that is closest
4081PlottableType *QCustomPlot::plottableAt(const QPointF &pos, bool onlySelectable, int *dataIndex) const
4085 double resultDistance = mSelectionTolerance; // only regard clicks with distances smaller than mSelectionTolerance as selections, so initialize with that value
4090 if (!currentPlottable || (onlySelectable && !currentPlottable->selectable())) // we could have also passed onlySelectable to the selectTest function, but checking here is faster, because we have access to QCPAbstractPlottable::selectable
4092 if (currentPlottable->clipRect().contains(pos.toPoint())) // only consider clicks where the plottable is actually visible
4095 double currentDistance = currentPlottable->selectTest(pos, false, dataIndex ? &details : nullptr);
4115 Returns the item at the pixel position \a pos. The item type (a QCPAbstractItem subclass) that shall be
4116 taken into consideration can be specified via the template parameter. Items that only consist of single
4118 setSelectionTolerance. If multiple items come into consideration, the one closest to \a pos is returned.
4120 If \a onlySelectable is true, only items that are selectable (QCPAbstractItem::setSelectable) are
4131 double resultDistance = mSelectionTolerance; // only regard clicks with distances smaller than mSelectionTolerance as selections, so initialize with that value
4136 if (!currentItem || (onlySelectable && !currentItem->selectable())) // we could have also passed onlySelectable to the selectTest function, but checking here is faster, because we have access to QCPAbstractItem::selectable
4138 if (!currentItem->clipToAxisRect() || currentItem->clipRect().contains(pos.toPoint())) // only consider clicks inside axis cliprect of the item if actually clipped to it
4178class QCPAbstractPlottable1D : public QCPAbstractPlottable, public QCPPlottableInterface1D // no QCP_LIB_DECL, template class ends up in header (cpp included below)
4194 virtual QCPDataSelection selectTestRect(const QRectF &rect, bool onlySelectable) const Q_DECL_OVERRIDE;
4199 virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const Q_DECL_OVERRIDE;
4207 void getDataSegments(QList<QCPDataRange> &selectedSegments, QList<QCPDataRange> &unselectedSegments) const;
4218////////////////////////////////////////////////////////////////////////////////////////////////////
4220////////////////////////////////////////////////////////////////////////////////////////////////////
4228 For example, it is implemented by the template class \ref QCPAbstractPlottable1D (the preferred
4233 If your plottable doesn't derive from \ref QCPAbstractPlottable1D but still wants to provide a 1d
4240 interface by calling \ref QCPAbstractPlottable::interface1D and testing it for a non-zero return
4252/*! \fn virtual QCPDataSelection QCPPlottableInterface1D::selectTestRect(const QRectF &rect, bool onlySelectable) const = 0;
4254 Returns a data selection containing all the data points of this plottable which are contained (or
4255 hit by) \a rect. This is used mainly in the selection rect interaction for data selection (\ref
4261 \note \a rect must be a normalized rect (positive or zero width and height). This is especially
4263 normalized. Use <tt>QRect::normalized()</tt> when passing a rect which might not be normalized.
4271 qcpdatacontainer-datatype "QCPDataContainer DataType" documentation for details about this naming
4280 qcpdatacontainer-datatype "QCPDataContainer DataType" documentation for details about this naming
4289 qcpdatacontainer-datatype "QCPDataContainer DataType" documentation for details about this naming
4298 qcpdatacontainer-datatype "QCPDataContainer DataType" documentation for details about this naming
4315 Returns whether the sort key (\ref dataSortKey) is identical to the main key (\ref dataMainKey).
4318 qcpdatacontainer-datatype "QCPDataContainer DataType" documentation for details about this naming
4322/*! \fn virtual int QCPPlottableInterface1D::findBegin(double sortKey, bool expandedRange) const = 0
4324 Returns the index of the data point with a (sort-)key that is equal to, just below, or just above
4325 \a sortKey. If \a expandedRange is true, the data point just below \a sortKey will be considered,
4328 This can be used in conjunction with \ref findEnd to iterate over data points within a given key
4329 range, including or excluding the bounding data points that are just beyond the specified range.
4339/*! \fn virtual int QCPPlottableInterface1D::findEnd(double sortKey, bool expandedRange) const = 0
4342 just below \a sortKey. If \a expandedRange is true, the data point just above \a sortKey will be
4346 key range, including the bounding data points that are just below and above the specified range.
4348 If \a expandedRange is true but there are no data points above \a sortKey, the index just above the
4359////////////////////////////////////////////////////////////////////////////////////////////////////
4361////////////////////////////////////////////////////////////////////////////////////////////////////
4366 This template class derives from \ref QCPAbstractPlottable and from the abstract interface \ref
4367 QCPPlottableInterface1D. It serves as a base class for all one-dimensional data (i.e. data with
4371 QCPGraphData or \ref QCPCurveData). The main purpose of this base class is to provide the member
4372 \a mDataContainer (a shared pointer to a \ref QCPDataContainer "QCPDataContainer<DataType>") and
4377 \ref getDataSegments. This is useful when subclasses implement their \ref draw method and need to
4384 again, to provide a more accurate hit test based on their specific data visualization geometry.
4404QCPAbstractPlottable1D<DataType>::QCPAbstractPlottable1D(QCPAxis *keyAxis, QCPAxis *valueAxis) :
4515 Implements a rect-selection algorithm assuming the data (accessed via the 1D data interface) is
4522QCPDataSelection QCPAbstractPlottable1D<DataType>::selectTestRect(const QRectF &rect, bool onlySelectable) const
4534 QCPRange keyRange(key1, key2); // QCPRange normalizes internally so we don't have to care about whether key1 < key2
4538 if (DataType::sortKeyIsMainKey()) // we can assume that data is sorted by main key, so can reduce the searched key interval:
4546 int currentSegmentBegin = -1; // -1 means we're currently not in a segment that's contained in rect
4553 } else if (!valueRange.contains(it->mainValue()) || !keyRange.contains(it->mainKey())) // segment just ended
4555 result.addDataRange(QCPDataRange(currentSegmentBegin, int(it-mDataContainer->constBegin())), false);
4561 result.addDataRange(QCPDataRange(currentSegmentBegin, int(end-mDataContainer->constBegin())), false);
4586 Implements a point-selection algorithm assuming the data (accessed via the 1D data interface) is
4590 If \a details is not 0, it will be set to a \ref QCPDataSelection, describing the closest data point
4596double QCPAbstractPlottable1D<DataType>::selectTest(const QPointF &pos, bool onlySelectable, QVariant *details) const
4609 if (DataType::sortKeyIsMainKey()) // we can assume that data is sorted by main key, so can reduce the searched key interval:
4611 // determine which key range comes into question, taking selection tolerance around pos into account:
4613 pixelsToCoords(pos-QPointF(mParentPlot->selectionTolerance(), mParentPlot->selectionTolerance()), posKeyMin, dummy);
4614 pixelsToCoords(pos+QPointF(mParentPlot->selectionTolerance(), mParentPlot->selectionTolerance()), posKeyMax, dummy);
4628 if (keyRange.contains(mainKey) && valueRange.contains(mainValue)) // make sure data point is inside visible range, for speedup in cases where sort key isn't main key and we iterate over all points
4630 const double currentDistSqr = QCPVector2D(coordsToPixels(mainKey, mainValue)-pos).lengthSquared();
4658void QCPAbstractPlottable1D<DataType>::getDataSegments(QList<QCPDataRange> &selectedSegments, QList<QCPDataRange> &unselectedSegments) const
4662 if (mSelectable == QCP::stWhole) // stWhole selection type draws the entire plottable with selected style if mSelection isn't empty
4678 A helper method which draws a line with the passed \a painter, according to the pixel data in \a
4679 lineData. NaN points create gaps in the line, as expected from QCustomPlot's plottables (this is
4683 Further it uses a faster line drawing technique based on \ref QCPPainter::drawLine rather than \c
4688void QCPAbstractPlottable1D<DataType>::drawPolyline(QCPPainter *painter, const QVector<QPointF> &lineData) const
4690 // if drawing lines in plot (instead of PDF), reduce 1px lines to cosmetic, because at least in
4691 // Qt6 drawing of "1px" width lines is much slower even though it has same appearance apart from
4711 while (i < lineDataSize && (qIsNaN(lineData.at(i).y()) || qIsNaN(lineData.at(i).x()))) // make sure first point is not NaN
4716 if (!qIsNaN(lineData.at(i).y()) && !qIsNaN(lineData.at(i).x())) // NaNs create a gap in the line
4733 if (qIsNaN(lineData.at(i).y()) || qIsNaN(lineData.at(i).x()) || qIsInf(lineData.at(i).y())) // NaNs create a gap in the line. Also filter Infs which make drawPolyline block
4735 painter->drawPolyline(lineData.constData()+segmentStart, i-segmentStart); // i, because we don't want to include the current NaN point
4761 enum ColorInterpolation { ciRGB ///< Color channels red, green and blue are linearly interpolated
4762 ,ciHSV ///< Color channels hue, saturation and value are linearly interpolated (The hue is interpolated over the shortest angle distance)
4771 enum NanHandling { nhNone ///< NaN data points are not explicitly handled and shouldn't occur in the data (this gives slight performance improvement)
4772 ,nhLowestColor ///< NaN data points appear as the lowest color defined in this QCPColorGradient
4773 ,nhHighestColor ///< NaN data points appear as the highest color defined in this QCPColorGradient
4783 enum GradientPreset { gpGrayscale ///< Continuous lightness from black to white (suited for non-biased data representation)
4784 ,gpHot ///< Continuous lightness from black over firey colors to white (suited for non-biased data representation)
4785 ,gpCold ///< Continuous lightness from black over icey colors to white (suited for non-biased data representation)
4786 ,gpNight ///< Continuous lightness from black over weak blueish colors to white (suited for non-biased data representation)
4789 ,gpIon ///< Half hue spectrum from black over purple to blue and finally green (creates banding illusion but allows more precise magnitude estimates)
4790 ,gpThermal ///< Colors suitable for thermal imaging, ranging from dark blue over purple to orange, yellow and white
4791 ,gpPolar ///< Colors suitable to emphasize polarity around the center, with blue for negative, black in the middle and red for positive values
4792 ,gpSpectrum ///< An approximation of the visible light spectrum (creates banding illusion but allows more precise magnitude estimates)
4793 ,gpJet ///< Hue variation similar to a spectrum, often used in numerical visualization (creates banding illusion but allows more precise magnitude estimates)
4794 ,gpHues ///< Full hue cycle, with highest and lowest color red (suitable for periodic data, such as angles and phases, see \ref setPeriodic)
4821 void colorize(const double *data, const QCPRange &range, QRgb *scanLine, int n, int dataIndexFactor=1, bool logarithmic=false);
4822 void colorize(const double *data, const unsigned char *alpha, const QCPRange &range, QRgb *scanLine, int n, int dataIndexFactor=1, bool logarithmic=false);
4867 ,bsHalfEllipse ///< A half ellipse is drawn. The size of the ellipse is given by the bracket width/height properties.
4868 ,bsEllipse ///< An ellipse is drawn. The size of the ellipse is given by the bracket width/height properties.
4870 ,bsUserStyle ///< Start custom bracket styles at this index when subclassing and reimplementing \ref drawBracket.
4912 double getTangentAngle(const QCPPlottableInterface1D *interface1d, int dataIndex, int direction) const;
4930 Q_PROPERTY(Qt::AspectRatioMode backgroundScaledMode READ backgroundScaledMode WRITE setBackgroundScaledMode)
4953 void setBackground(const QPixmap &pm, bool scaled, Qt::AspectRatioMode mode=Qt::KeepAspectRatioByExpanding);
5083 virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const Q_DECL_OVERRIDE;
5104 virtual void selectEvent(QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged) Q_DECL_OVERRIDE;
5149 Q_PROPERTY(SelectableParts selectableParts READ selectableParts WRITE setSelectableParts NOTIFY selectionChanged)
5150 Q_PROPERTY(SelectableParts selectedParts READ selectedParts WRITE setSelectedParts NOTIFY selectableChanged)
5152 Q_PROPERTY(QPen selectedIconBorderPen READ selectedIconBorderPen WRITE setSelectedIconBorderPen)
5208 virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const Q_DECL_OVERRIDE;
5246 virtual void selectEvent(QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged) Q_DECL_OVERRIDE;
5284 QCPTextElement(QCustomPlot *parentPlot, const QString &text, const QString &fontFamily, double pointSize);
5308 virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const Q_DECL_OVERRIDE;
5311 virtual void mouseDoubleClickEvent(QMouseEvent *event, const QVariant &details) Q_DECL_OVERRIDE;
5336 virtual void selectEvent(QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged) Q_DECL_OVERRIDE;
5386 Q_PROPERTY(QCPAxis::ScaleType dataScaleType READ dataScaleType WRITE setDataScaleType NOTIFY dataScaleTypeChanged)
5487 This template instantiation is the container in which QCPGraph holds its data. For details about
5510 enum LineStyle { lsNone ///< data points are not connected with any lines (e.g. data only represented
5513 ,lsStepLeft ///< line is drawn as steps where the step height is the value of the left data point
5514 ,lsStepRight ///< line is drawn as steps where the step height is the value of the right data point
5533 void setData(const QVector<double> &keys, const QVector<double> &values, bool alreadySorted=false);
5541 void addData(const QVector<double> &keys, const QVector<double> &values, bool alreadySorted=false);
5545 virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const Q_DECL_OVERRIDE;
5546 virtual QCPRange getKeyRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth) const Q_DECL_OVERRIDE;
5547 virtual QCPRange getValueRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange()) const Q_DECL_OVERRIDE;
5563 virtual void drawScatterPlot(QCPPainter *painter, const QVector<QPointF> &scatters, const QCPScatterStyle &style) const;
5567 virtual void getOptimizedLineData(QVector<QCPGraphData> *lineData, const QCPGraphDataContainer::const_iterator &begin, const QCPGraphDataContainer::const_iterator &end) const;
5568 virtual void getOptimizedScatterData(QVector<QCPGraphData> *scatterData, QCPGraphDataContainer::const_iterator begin, QCPGraphDataContainer::const_iterator end) const;
5571 void getVisibleDataBounds(QCPGraphDataContainer::const_iterator &begin, QCPGraphDataContainer::const_iterator &end, const QCPDataRange &rangeRestriction) const;
5579 QVector<QCPDataRange> getNonNanSegments(const QVector<QPointF> *lineData, Qt::Orientation keyOrientation) const;
5580 QVector<QPair<QCPDataRange, QCPDataRange> > getOverlappingSegments(QVector<QCPDataRange> thisSegments, const QVector<QPointF> *thisData, QVector<QCPDataRange> otherSegments, const QVector<QPointF> *otherData) const;
5581 bool segmentsIntersect(double aLower, double aUpper, double bLower, double bUpper, int &bPrecedence) const;
5584 const QPolygonF getChannelFillPolygon(const QVector<QPointF> *thisData, QCPDataRange thisSegment, const QVector<QPointF> *otherData, QCPDataRange otherSegment) const;
5627 This template instantiation is the container in which QCPCurve holds its data. For details about
5664 void setData(const QVector<double> &t, const QVector<double> &keys, const QVector<double> &values, bool alreadySorted=false);
5671 void addData(const QVector<double> &t, const QVector<double> &keys, const QVector<double> &values, bool alreadySorted=false);
5677 virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const Q_DECL_OVERRIDE;
5678 virtual QCPRange getKeyRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth) const Q_DECL_OVERRIDE;
5679 virtual QCPRange getValueRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange()) const Q_DECL_OVERRIDE;
5693 virtual void drawScatterPlot(QCPPainter *painter, const QVector<QPointF> &points, const QCPScatterStyle &style) const;
5696 void getCurveLines(QVector<QPointF> *lines, const QCPDataRange &dataRange, double penWidth) const;
5697 void getScatters(QVector<QPointF> *scatters, const QCPDataRange &dataRange, double scatterWidth) const;
5698 int getRegion(double key, double value, double keyMin, double valueMax, double keyMax, double valueMin) const;
5699 QPointF getOptimizedPoint(int otherRegion, double otherKey, double otherValue, double key, double value, double keyMin, double valueMax, double keyMax, double valueMin) const;
5700 QVector<QPointF> getOptimizedCornerPoints(int prevRegion, int currentRegion, double prevKey, double prevValue, double key, double value, double keyMin, double valueMax, double keyMax, double valueMin) const;
5702 bool getTraverse(double prevKey, double prevValue, double key, double value, double keyMin, double valueMax, double keyMax, double valueMin, QPointF &crossA, QPointF &crossB) const;
5703 void getTraverseCornerPoints(int prevRegion, int currentRegion, double keyMin, double valueMax, double keyMax, double valueMin, QVector<QPointF> &beforeTraverse, QVector<QPointF> &afterTraverse) const;
5795 inline QCPRange valueRange() const { return QCPRange(value, value); } // note that bar base value isn't held in each QCPBarsData and thus can't/shouldn't be returned here
5806 This template instantiation is the container in which QCPBars holds its data. For details about
5853 void setData(const QVector<double> &keys, const QVector<double> &values, bool alreadySorted=false);
5861 void addData(const QVector<double> &keys, const QVector<double> &values, bool alreadySorted=false);
5867 virtual QCPDataSelection selectTestRect(const QRectF &rect, bool onlySelectable) const Q_DECL_OVERRIDE;
5868 virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const Q_DECL_OVERRIDE;
5869 virtual QCPRange getKeyRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth) const Q_DECL_OVERRIDE;
5870 virtual QCPRange getValueRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange()) const Q_DECL_OVERRIDE;
5887 void getVisibleDataBounds(QCPBarsDataContainer::const_iterator &begin, QCPBarsDataContainer::const_iterator &end) const;
5909 QCPStatisticalBoxData(double key, double minimum, double lowerQuartile, double median, double upperQuartile, double maximum, const QVector<double>& outliers=QVector<double>());
5912 inline static QCPStatisticalBoxData fromSortKey(double sortKey) { return QCPStatisticalBoxData(sortKey, 0, 0, 0, 0, 0); }
5921 for (QVector<double>::const_iterator it = outliers.constBegin(); it != outliers.constEnd(); ++it)
5971 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);
5981 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);
5982 void addData(double key, double minimum, double lowerQuartile, double median, double upperQuartile, double maximum, const QVector<double> &outliers=QVector<double>());
5985 virtual QCPDataSelection selectTestRect(const QRectF &rect, bool onlySelectable) const Q_DECL_OVERRIDE;
5986 virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const Q_DECL_OVERRIDE;
5987 virtual QCPRange getKeyRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth) const Q_DECL_OVERRIDE;
5988 virtual QCPRange getValueRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange()) const Q_DECL_OVERRIDE;
6004 virtual void drawStatisticalBox(QCPPainter *painter, QCPStatisticalBoxDataContainer::const_iterator it, const QCPScatterStyle &outlierStyle) const;
6007 void getVisibleDataBounds(QCPStatisticalBoxDataContainer::const_iterator &begin, QCPStatisticalBoxDataContainer::const_iterator &end) const;
6025 QCPColorMapData(int keySize, int valueSize, const QCPRange &keyRange, const QCPRange &valueRange);
6084 Q_PROPERTY(QCPAxis::ScaleType dataScaleType READ dataScaleType WRITE setDataScaleType NOTIFY dataScaleTypeChanged)
6114 Q_SLOT void updateLegendIcon(Qt::TransformationMode transformMode=Qt::SmoothTransformation, const QSize &thumbSize=QSize(32, 18));
6117 virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const Q_DECL_OVERRIDE;
6118 virtual QCPRange getKeyRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth) const Q_DECL_OVERRIDE;
6165 inline static QCPFinancialData fromSortKey(double sortKey) { return QCPFinancialData(sortKey, 0, 0, 0, 0); }
6171 inline QCPRange valueRange() const { return QCPRange(low, high); } // open and close must lie between low and high, so we don't need to check them
6183 about the generic container, see the documentation of the class template \ref QCPDataContainer.
6241 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);
6252 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);
6256 virtual QCPDataSelection selectTestRect(const QRectF &rect, bool onlySelectable) const Q_DECL_OVERRIDE;
6257 virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const Q_DECL_OVERRIDE;
6258 virtual QCPRange getKeyRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth) const Q_DECL_OVERRIDE;
6259 virtual QCPRange getValueRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange()) const Q_DECL_OVERRIDE;
6262 static QCPFinancialDataContainer timeSeriesToOhlc(const QVector<double> &time, const QVector<double> &value, double timeBinSize, double timeBinOffset = 0);
6278 void drawOhlcPlot(QCPPainter *painter, const QCPFinancialDataContainer::const_iterator &begin, const QCPFinancialDataContainer::const_iterator &end, bool isSelected);
6279 void drawCandlestickPlot(QCPPainter *painter, const QCPFinancialDataContainer::const_iterator &begin, const QCPFinancialDataContainer::const_iterator &end, bool isSelected);
6281 double ohlcSelectTest(const QPointF &pos, const QCPFinancialDataContainer::const_iterator &begin, const QCPFinancialDataContainer::const_iterator &end, QCPFinancialDataContainer::const_iterator &closestDataPoint) const;
6282 double candlestickSelectTest(const QPointF &pos, const QCPFinancialDataContainer::const_iterator &begin, const QCPFinancialDataContainer::const_iterator &end, QCPFinancialDataContainer::const_iterator &closestDataPoint) const;
6319 sortable key, but merely an index (as \c QVector provides), which maps one-to-one to the indices
6344 enum ErrorType { etKeyError ///< The errors are for the key dimension (bars appear parallel to the key axis)
6345 ,etValueError ///< The errors are for the value dimension (bars appear parallel to the value axis)
6381 virtual QCPDataSelection selectTestRect(const QRectF &rect, bool onlySelectable) const Q_DECL_OVERRIDE;
6386 virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const Q_DECL_OVERRIDE;
6400 virtual QCPRange getKeyRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth) const Q_DECL_OVERRIDE;
6401 virtual QCPRange getValueRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange()) const Q_DECL_OVERRIDE;
6404 void getErrorBarLines(QCPErrorBarsDataContainer::const_iterator it, QVector<QLineF> &backbones, QVector<QLineF> &whiskers) const;
6405 void getVisibleDataBounds(QCPErrorBarsDataContainer::const_iterator &begin, QCPErrorBarsDataContainer::const_iterator &end, const QCPDataRange &rangeRestriction) const;
6406 double pointDistance(const QPointF &pixelPoint, QCPErrorBarsDataContainer::const_iterator &closestData) const;
6408 void getDataSegments(QList<QCPDataRange> &selectedSegments, QList<QCPDataRange> &unselectedSegments) const;
6442 virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const Q_DECL_OVERRIDE;
6455 QLineF getRectClippedStraightLine(const QCPVector2D &base, const QCPVector2D &vec, const QRect &rect) const;
6491 virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const Q_DECL_OVERRIDE;
6505 QLineF getRectClippedLine(const QCPVector2D &start, const QCPVector2D &end, const QRect &rect) const;
6541 virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const Q_DECL_OVERRIDE;
6592 virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const Q_DECL_OVERRIDE;
6678 virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const Q_DECL_OVERRIDE;
6691 enum AnchorIndex {aiTopLeft, aiTop, aiTopRight, aiRight, aiBottomRight, aiBottom, aiBottomLeft, aiLeft};
6709 QPointF getTextDrawPoint(const QPointF &pos, const QRectF &rect, Qt::Alignment positionAlignment) const;
6748 virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const Q_DECL_OVERRIDE;
6809 void setScaled(bool scaled, Qt::AspectRatioMode aspectRatioMode=Qt::KeepAspectRatio, Qt::TransformationMode transformationMode=Qt::SmoothTransformation);
6814 virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const Q_DECL_OVERRIDE;
6869 The different visual appearances a tracer item can have. Some styles size may be controlled with \ref setSize.
7017 enum AngleReference { arAbsolute ///< The axis tilt is given in absolute degrees. The zero is to the right and positive angles are measured counter-clockwise.
7018 ,arAngularAxis ///< The axis tilt is measured in the angular coordinate system given by the parent angular axis.
7026 ,stLogarithmic ///< Logarithmic scaling with correspondingly transformed axis coordinates (possibly also \ref setTicker to a \ref QCPAxisTickerLog instance).
7145 virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE;
7220 virtual void selectEvent(QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged) Q_DECL_OVERRIDE;
7338 void setBackground(const QPixmap &pm, bool scaled, Qt::AspectRatioMode mode=Qt::KeepAspectRatioByExpanding);
7389 virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const Q_DECL_OVERRIDE;
7407 double coordToAngleRad(double coord) const { return mAngleRad+(coord-mRange.lower)/mRange.size()*(mRangeReversed ? -2.0*M_PI : 2.0*M_PI); } // mention in doc that return doesn't wrap
7408 double angleRadToCoord(double angleRad) const { return mRange.lower+(angleRad-mAngleRad)/(mRangeReversed ? -2.0*M_PI : 2.0*M_PI)*mRange.size(); }
7593 void drawRadialGrid(QCPPainter *painter, const QPointF ¢er, const QVector<double> &coords, const QPen &pen, const QPen &zeroPen=Qt::NoPen);
7687 void setData(const QVector<double> &keys, const QVector<double> &values, bool alreadySorted=false);
7692 void addData(const QVector<double> &keys, const QVector<double> &values, bool alreadySorted=false);
7707 virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=0) const override; // actually introduced in QCPLayerable as non-pure, but we want to force reimplementation for plottables
7708 virtual QCPPlottableInterface1D *interface1D() { return 0; } // TODO: return this later, when QCPAbstractPolarPlottable is created
7709 virtual QCPRange getKeyRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth) const;
7710 virtual QCPRange getValueRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange()) const;
7739 virtual void selectEvent(QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged) override;
7744 virtual void drawScatterPlot(QCPPainter *painter, const QVector<QPointF> &scatters, const QCPScatterStyle &style) const;
7752 double pointDistance(const QPointF &pixelPoint, QCPGraphDataContainer::const_iterator &closestData) const;
7755 void getDataSegments(QList<QCPDataRange> &selectedSegments, QList<QCPDataRange> &unselectedSegments) const;
7757 void getVisibleDataBounds(QCPGraphDataContainer::const_iterator &begin, QCPGraphDataContainer::const_iterator &end, const QCPDataRange &rangeRestriction) const;
7760 void getOptimizedLineData(QVector<QCPGraphData> *lineData, const QCPGraphDataContainer::const_iterator &begin, const QCPGraphDataContainer::const_iterator &end) const;
virtual void applyDefaultAntialiasingHint(QCPPainter *painter) const override
Definition qcustomplot.cpp:13118
virtual void deselectEvent(bool *selectionStateChanged) override
Definition qcustomplot.cpp:13250
QCPItemPosition * createPosition(const QString &name)
Definition qcustomplot.cpp:13192
void setClipAxisRect(QCPAxisRect *rect)
Definition qcustomplot.cpp:12980
double rectDistance(const QRectF &rect, const QPointF &pos, bool filledRect) const
Definition qcustomplot.cpp:13136
Q_SLOT void setSelectable(bool selectable)
Definition qcustomplot.cpp:12996
virtual void draw(QCPPainter *painter) override=0
QCPAbstractItem(QCustomPlot *parentPlot)
Definition qcustomplot.cpp:12933
void selectionChanged(bool selected)
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const override=0
virtual QCP::Interaction selectionCategory() const override
Definition qcustomplot.cpp:13262
virtual void selectEvent(QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged) override
Definition qcustomplot.cpp:13236
virtual QPointF anchorPixelPosition(int anchorId) const
Definition qcustomplot.cpp:13172
QCPItemAnchor * createAnchor(const QString &name, int anchorId)
Definition qcustomplot.cpp:13226
The abstract base class for all entries in a QCPLegend.
Definition qcustomplot.h:5051
virtual QCP::Interaction selectionCategory() const override
Definition qcustomplot.cpp:19619
void setSelectedTextColor(const QColor &color)
Definition qcustomplot.cpp:18805
void setTextColor(const QColor &color)
Definition qcustomplot.cpp:18783
Q_SLOT void setSelected(bool selected)
Definition qcustomplot.cpp:18832
void selectionChanged(bool selected)
void setSelectedFont(const QFont &font)
Definition qcustomplot.cpp:18794
Q_SLOT void setSelectable(bool selectable)
Definition qcustomplot.cpp:18815
virtual QRect clipRect() const override
Definition qcustomplot.cpp:18862
virtual void deselectEvent(bool *selectionStateChanged) override
Definition qcustomplot.cpp:18882
virtual void applyDefaultAntialiasingHint(QCPPainter *painter) const override
Definition qcustomplot.cpp:18856
virtual void draw(QCPPainter *painter) override=0
virtual void selectEvent(QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged) override
Definition qcustomplot.cpp:18868
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const override
Definition qcustomplot.cpp:18842
QCPAbstractLegendItem(QCPLegend *parent)
Definition qcustomplot.cpp:18754
The abstract base class for paint buffers, which define the rendering backend.
Definition qcustomplot.h:575
virtual void draw(QCPPainter *painter) const =0
QCPAbstractPaintBuffer(const QSize &size, double devicePixelRatio)
Definition qcustomplot.cpp:581
void setDevicePixelRatio(double ratio)
Definition qcustomplot.cpp:638
virtual void clear(const QColor &color)=0
virtual void reallocateBuffer()=0
virtual QCPPainter * startPainting()=0
void setInvalidated(bool invalidated=true)
Definition qcustomplot.cpp:624
virtual QPointF dataPixelPosition(int index) const override
Definition qcustomplot.h:4492
virtual int findBegin(double sortKey, bool expandedRange=true) const override
Definition qcustomplot.h:4571
QCPAbstractPlottable1D(QCPAxis *keyAxis, QCPAxis *valueAxis)
Definition qcustomplot.h:4404
virtual int dataCount() const override
Definition qcustomplot.h:4419
virtual int findEnd(double sortKey, bool expandedRange=true) const override
Definition qcustomplot.h:4580
virtual double dataMainKey(int index) const override
Definition qcustomplot.h:4428
void drawPolyline(QCPPainter *painter, const QVector< QPointF > &lineData) const
Definition qcustomplot.h:4688
virtual bool sortKeyIsMainKey() const override
Definition qcustomplot.h:4509
virtual double dataSortKey(int index) const override
Definition qcustomplot.h:4444
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const override
Definition qcustomplot.h:4596
virtual QCPRange dataValueRange(int index) const override
Definition qcustomplot.h:4476
virtual QCPPlottableInterface1D * interface1D() override
Definition qcustomplot.h:4200
virtual double dataMainValue(int index) const override
Definition qcustomplot.h:4460
void getDataSegments(QList< QCPDataRange > &selectedSegments, QList< QCPDataRange > &unselectedSegments) const
Definition qcustomplot.h:4658
virtual QCPDataSelection selectTestRect(const QRectF &rect, bool onlySelectable) const override
Definition qcustomplot.h:4522
The abstract base class for all data representing objects in a plot.
Definition qcustomplot.h:3496
void setAntialiasedFill(bool enabled)
Definition qcustomplot.cpp:11465
void applyDefaultAntialiasingHint(QCPPainter *painter) const override
Definition qcustomplot.cpp:11915
void rescaleAxes(bool onlyEnlarge=false) const
Definition qcustomplot.cpp:11712
virtual void draw(QCPPainter *painter) override=0
void setSelectionDecorator(QCPSelectionDecorator *decorator)
Definition qcustomplot.cpp:11579
Q_SLOT void setSelection(QCPDataSelection selection)
Definition qcustomplot.cpp:11559
void setAntialiasedScatters(bool enabled)
Definition qcustomplot.cpp:11476
void pixelsToCoords(double x, double y, double &key, double &value) const
Definition qcustomplot.cpp:11673
void selectionChanged(bool selected)
virtual QCPPlottableInterface1D * interface1D()
Definition qcustomplot.h:3541
virtual QCPRange getKeyRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth) const =0
virtual void deselectEvent(bool *selectionStateChanged) override
Definition qcustomplot.cpp:11984
void selectableChanged(QCP::SelectionType selectable)
void rescaleValueAxis(bool onlyEnlarge=false, bool inKeyRange=false) const
Definition qcustomplot.cpp:11765
virtual void drawLegendIcon(QCPPainter *painter, const QRectF &rect) const =0
QCPSelectionDecorator * selectionDecorator() const
Definition qcustomplot.h:3525
void selectionChanged(const QCPDataSelection &selection)
void coordsToPixels(double key, double value, double &x, double &y) const
Definition qcustomplot.cpp:11631
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const override=0
void applyFillAntialiasingHint(QCPPainter *painter) const
Definition qcustomplot.cpp:11931
virtual QCPRange getValueRange(bool &foundRange, QCP::SignDomain inSignDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange()) const =0
virtual void selectEvent(QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged) override
Definition qcustomplot.cpp:11953
Q_SLOT void setSelectable(QCP::SelectionType selectable)
Definition qcustomplot.cpp:11605
virtual QRect clipRect() const override
Definition qcustomplot.cpp:11886
void applyScattersAntialiasingHint(QCPPainter *painter) const
Definition qcustomplot.cpp:11947
virtual QCP::Interaction selectionCategory() const override
Definition qcustomplot.cpp:11895
void rescaleKeyAxis(bool onlyEnlarge=false) const
Definition qcustomplot.cpp:11723
QCPAbstractPlottable(QCPAxis *keyAxis, QCPAxis *valueAxis)
Definition qcustomplot.cpp:11420
QCPAxisPainterPrivate(QCustomPlot *parentPlot)
Definition qcustomplot.cpp:9900
virtual TickLabelData getTickLabelData(const QFont &font, const QString &text) const
Definition qcustomplot.cpp:10347
virtual QPointF getTickLabelDrawOffset(const TickLabelData &labelData) const
Definition qcustomplot.cpp:10429
virtual void getMaxTickLabelSize(const QFont &font, const QString &text, QSize *tickLabelsSize) const
Definition qcustomplot.cpp:10530
virtual void drawTickLabel(QCPPainter *painter, double x, double y, const TickLabelData &labelData) const
Definition qcustomplot.cpp:10308
virtual QByteArray generateLabelParameterHash() const
Definition qcustomplot.cpp:10187
virtual void placeTickLabel(QCPPainter *painter, double position, int distanceToAxis, const QString &text, QSize *tickLabelsSize)
Definition qcustomplot.cpp:10219
Holds multiple axes and arranges them in a rectangular shape.
Definition qcustomplot.h:4925
virtual void mouseMoveEvent(QMouseEvent *event, const QPointF &startPos) override
Definition qcustomplot.cpp:18577
QCPAxis * addAxis(QCPAxis::AxisType type, QCPAxis *axis=nullptr)
Definition qcustomplot.cpp:17696
QCPAxis * axis(QCPAxis::AxisType type, int index=0) const
Definition qcustomplot.cpp:17625
void setBackgroundScaledMode(Qt::AspectRatioMode mode)
Definition qcustomplot.cpp:18116
QCPAxisRect(QCustomPlot *parentPlot, bool setupDefaultAxes=true)
Definition qcustomplot.cpp:17557
void setRangeDragAxes(QCPAxis *horizontal, QCPAxis *vertical)
Definition qcustomplot.cpp:18263
virtual int calculateAutoMargin(QCP::MarginSide side) override
Definition qcustomplot.cpp:18494
QCPAxis * rangeZoomAxis(Qt::Orientation orientation)
Definition qcustomplot.cpp:18141
QCPAxis * rangeDragAxis(Qt::Orientation orientation)
Definition qcustomplot.cpp:18127
QList< QCPAxis * > addAxes(QCPAxis::AxisTypes types)
Definition qcustomplot.cpp:17751
void setRangeZoom(Qt::Orientations orientations)
Definition qcustomplot.cpp:18247
QList< QCPAxis * > rangeZoomAxes(Qt::Orientation orientation)
Definition qcustomplot.cpp:18180
void setRangeZoomFactor(double horizontalFactor, double verticalFactor)
Definition qcustomplot.cpp:18405
QList< QCPAxis * > axes(QCPAxis::AxisTypes types) const
Definition qcustomplot.cpp:17646
void setRangeZoomAxes(QCPAxis *horizontal, QCPAxis *vertical)
Definition qcustomplot.cpp:18335
virtual void wheelEvent(QWheelEvent *event) override
Definition qcustomplot.cpp:18663
virtual void mousePressEvent(QMouseEvent *event, const QVariant &details) override
Definition qcustomplot.cpp:18545
QList< QCPAxis * > rangeDragAxes(Qt::Orientation orientation)
Definition qcustomplot.cpp:18154
virtual void mouseReleaseEvent(QMouseEvent *event, const QPointF &startPos) override
Definition qcustomplot.cpp:18637
double rangeZoomFactor(Qt::Orientation orientation)
Definition qcustomplot.cpp:18206
void setRangeDrag(Qt::Orientations orientations)
Definition qcustomplot.cpp:18227
void setBackgroundScaled(bool scaled)
Definition qcustomplot.cpp:18106
static double dateTimeToKey(const QDateTime &dateTime)
Definition qcustomplot.cpp:6804
void setTimeZone(const QTimeZone &zone)
Definition qcustomplot.cpp:6602
virtual QVector< double > createTickVector(double tickStep, const QCPRange &range) override
Definition qcustomplot.cpp:6739
static QDateTime keyToDateTime(double key)
Definition qcustomplot.cpp:6784
virtual int getSubTickCount(double tickStep) override
Definition qcustomplot.cpp:6682
void setTickOrigin(double origin)
Definition qcustomplot.cpp:6618
virtual double getTickStep(const QCPRange &range) override
Definition qcustomplot.cpp:6648
virtual QString getTickLabel(double tick, const QLocale &locale, QChar formatChar, int precision) override
Definition qcustomplot.cpp:6718
void setDateTimeFormat(const QString &format)
Definition qcustomplot.cpp:6572
void setDateTimeSpec(Qt::TimeSpec spec)
Definition qcustomplot.cpp:6590
@ ssMultiples
An integer multiple of the specified tick step is allowed. The used factor follows the base class pro...
Definition qcustomplot.h:1909
@ ssNone
Modifications are not allowed, the specified tick step is absolutely fixed. This might cause a high t...
Definition qcustomplot.h:1908
virtual int getSubTickCount(double tickStep) override
Definition qcustomplot.cpp:7776
virtual QVector< double > createTickVector(double tickStep, const QCPRange &range) override
Definition qcustomplot.cpp:7794
Specialized axis ticker to display ticks in units of an arbitrary constant, for example pi.
Definition qcustomplot.h:1979
@ fsFloatingPoint
Fractions are displayed as regular decimal floating point numbers, e.g. "0.25" or "0....
Definition qcustomplot.h:1987
@ fsAsciiFractions
Fractions are written as rationals using ASCII characters only, e.g. "1/4" or "1/8".
Definition qcustomplot.h:1988
@ fsUnicodeFractions
Fractions are written using sub- and superscript UTF-8 digits and the fraction symbol.
Definition qcustomplot.h:1989
Specialized axis ticker for time spans in units of milliseconds to days.
Definition qcustomplot.h:1847
@ tuMilliseconds
Milliseconds, one thousandth of a second (%z in setTimeFormat)
Definition qcustomplot.h:1855
The base class tick generator used by QCPAxis to create tick positions and tick labels.
Definition qcustomplot.h:1733
@ tssMeetTickCount
Less readable tick steps are allowed which in turn facilitates getting closer to the requested tick c...
Definition qcustomplot.h:1744
@ tssReadability
A nicely readable tick step is prioritized over matching the requested number of ticks (see setTickCo...
Definition qcustomplot.h:1743
virtual void wheelEvent(QWheelEvent *event) override
Definition qcustomplot.cpp:9625
void setSelectedLabelFont(const QFont &font)
Definition qcustomplot.cpp:9021
void rangeChanged(const QCPRange &newRange)
void setLowerEnding(const QCPLineEnding &ending)
Definition qcustomplot.cpp:9090
void setTickLabelRotation(double degrees)
Definition qcustomplot.cpp:8659
virtual void mouseReleaseEvent(QMouseEvent *event, const QPointF &startPos) override
Definition qcustomplot.cpp:9598
@ lsInside
Tick labels will be displayed inside the axis rect and clipped to the inner axis rect.
Definition qcustomplot.h:2186
void setSelectedSubTickPen(const QPen &pen)
Definition qcustomplot.cpp:9075
void scaleTypeChanged(QCPAxis::ScaleType scaleType)
@ stLogarithmic
Logarithmic scaling with correspondingly transformed axis coordinates (possibly also setTicker to a Q...
Definition qcustomplot.h:2195
void setTickLabelColor(const QColor &color)
Definition qcustomplot.cpp:8645
virtual void applyDefaultAntialiasingHint(QCPPainter *painter) const override
Definition qcustomplot.cpp:9669
void setTicker(QSharedPointer< QCPAxisTicker > ticker)
Definition qcustomplot.cpp:8573
Q_SLOT void setSelectableParts(const QCPAxis::SelectableParts &selectableParts)
Definition qcustomplot.cpp:8419
void setSelectedLabelColor(const QColor &color)
Definition qcustomplot.cpp:9045
void selectionChanged(const QCPAxis::SelectableParts &parts)
void setUpperEnding(const QCPLineEnding &ending)
Definition qcustomplot.cpp:9105
virtual QCP::Interaction selectionCategory() const override
Definition qcustomplot.cpp:9874
void setSelectedTickLabelFont(const QFont &font)
Definition qcustomplot.cpp:9007
virtual void mousePressEvent(QMouseEvent *event, const QVariant &details) override
Definition qcustomplot.cpp:9526
void setSelectedTickLabelColor(const QColor &color)
Definition qcustomplot.cpp:9032
void selectableChanged(const QCPAxis::SelectableParts &parts)
void rangeChanged(const QCPRange &newRange, const QCPRange &oldRange)
virtual void selectEvent(QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged) override
Definition qcustomplot.cpp:9489
virtual void deselectEvent(bool *selectionStateChanged) override
Definition qcustomplot.cpp:9503
Q_SLOT void setSelectedParts(const QCPAxis::SelectableParts &selectedParts)
Definition qcustomplot.cpp:8443
@ spTickLabels
Tick labels (numbers) of this axis (as a whole, not individually)
Definition qcustomplot.h:2204
virtual void mouseMoveEvent(QMouseEvent *event, const QPointF &startPos) override
Definition qcustomplot.cpp:9564
Q_SLOT void setScaleType(QCPAxis::ScaleType type)
Definition qcustomplot.cpp:8371
@ atBottom
0x08 Axis is horizontal and on the bottom side of the axis rect
Definition qcustomplot.h:2176
void setNumberFormat(const QString &formatCode)
Definition qcustomplot.cpp:8716
Groups multiple QCPBars together so they appear side by side.
Definition qcustomplot.h:5718
void setSpacingType(SpacingType spacingType)
Definition qcustomplot.cpp:24050
@ stPlotCoords
Bar spacing is in key coordinates and thus scales with the key axis range.
Definition qcustomplot.h:5733
@ stAxisRectRatio
Bar spacing is given by a fraction of the axis rect size.
Definition qcustomplot.h:5732
@ wtAxisRectRatio
Bar width is given by a fraction of the axis rect size.
Definition qcustomplot.h:5833
@ wtPlotCoords
Bar width is in key coordinates and thus scales with the key axis range.
Definition qcustomplot.h:5834
Defines a color gradient for use with e.g. QCPColorMap.
Definition qcustomplot.h:4753
@ ciHSV
Color channels hue, saturation and value are linearly interpolated (The hue is interpolated over the ...
Definition qcustomplot.h:4762
@ gpNight
Continuous lightness from black over weak blueish colors to white (suited for non-biased data represe...
Definition qcustomplot.h:4786
@ gpHues
Full hue cycle, with highest and lowest color red (suitable for periodic data, such as angles and pha...
Definition qcustomplot.h:4794
@ gpGeography
Colors suitable to represent different elevations on geographical maps.
Definition qcustomplot.h:4788
@ gpIon
Half hue spectrum from black over purple to blue and finally green (creates banding illusion but allo...
Definition qcustomplot.h:4789
@ gpHot
Continuous lightness from black over firey colors to white (suited for non-biased data representation...
Definition qcustomplot.h:4784
@ gpJet
Hue variation similar to a spectrum, often used in numerical visualization (creates banding illusion ...
Definition qcustomplot.h:4793
@ gpPolar
Colors suitable to emphasize polarity around the center, with blue for negative, black in the middle ...
Definition qcustomplot.h:4791
@ gpSpectrum
An approximation of the visible light spectrum (creates banding illusion but allows more precise magn...
Definition qcustomplot.h:4792
@ gpGrayscale
Continuous lightness from black to white (suited for non-biased data representation)
Definition qcustomplot.h:4783
@ gpCold
Continuous lightness from black over icey colors to white (suited for non-biased data representation)
Definition qcustomplot.h:4785
@ gpThermal
Colors suitable for thermal imaging, ranging from dark blue over purple to orange,...
Definition qcustomplot.h:4790
@ nhHighestColor
NaN data points appear as the highest color defined in this QCPColorGradient.
Definition qcustomplot.h:4773
@ nhLowestColor
NaN data points appear as the lowest color defined in this QCPColorGradient.
Definition qcustomplot.h:4772
@ nhNone
NaN data points are not explicitly handled and shouldn't occur in the data (this gives slight perform...
Definition qcustomplot.h:4771
@ nhNanColor
NaN data points appear as the color defined with setNanColor.
Definition qcustomplot.h:4775
Holds the two-dimensional data of a QCPColorMap plottable.
Definition qcustomplot.h:6023
void setKeyRange(const QCPRange &keyRange)
Definition qcustomplot.cpp:26047
unsigned char alpha(int keyIndex, int valueIndex)
Definition qcustomplot.cpp:25940
void setCell(int keyIndex, int valueIndex, double z)
Definition qcustomplot.cpp:26105
QCPColorMapData(int keySize, int valueSize, const QCPRange &keyRange, const QCPRange &valueRange)
Definition qcustomplot.cpp:25850
void setRange(const QCPRange &keyRange, const QCPRange &valueRange)
Definition qcustomplot.cpp:26031
void setAlpha(int keyIndex, int valueIndex, unsigned char alpha)
Definition qcustomplot.cpp:26134
void setValueRange(const QCPRange &valueRange)
Definition qcustomplot.cpp:26062
void setData(double key, double value, double z)
Definition qcustomplot.cpp:26079
QCPColorMapData & operator=(const QCPColorMapData &other)
Definition qcustomplot.cpp:25888
A plottable representing a two-dimensional color map in a plot.
Definition qcustomplot.h:6080
void gradientChanged(const QCPColorGradient &newGradient)
Q_SLOT void setGradient(const QCPColorGradient &gradient)
Definition qcustomplot.cpp:26534
void dataRangeChanged(const QCPRange &newRange)
virtual void drawLegendIcon(QCPPainter *painter, const QRectF &rect) const override
Definition qcustomplot.cpp:26903
void dataScaleTypeChanged(QCPAxis::ScaleType scaleType)
Q_SLOT void setDataRange(const QCPRange &dataRange)
Definition qcustomplot.cpp:26492
Q_SLOT void setDataScaleType(QCPAxis::ScaleType scaleType)
Definition qcustomplot.cpp:26511
QCPColorMap(QCPAxis *keyAxis, QCPAxis *valueAxis)
Definition qcustomplot.cpp:26443
void setColorScale(QCPColorScale *colorScale)
Definition qcustomplot.cpp:26586
Q_SLOT void axisSelectionChanged(QCPAxis::SelectableParts selectedParts)
Definition qcustomplot.cpp:20676
Q_SLOT void axisSelectableChanged(QCPAxis::SelectableParts selectableParts)
Definition qcustomplot.cpp:20701
void updateGradientImage()
Definition qcustomplot.cpp:20633
QCPColorScaleAxisRectPrivate(QCPColorScale *parentColorScale)
Definition qcustomplot.cpp:20571
virtual void draw(QCPPainter *painter) override
Definition qcustomplot.cpp:20611
A color scale for use with color coding data such as QCPColorMap.
Definition qcustomplot.h:5381
Q_SLOT void setGradient(const QCPColorGradient &gradient)
Definition qcustomplot.cpp:20298
virtual void mouseReleaseEvent(QMouseEvent *event, const QPointF &startPos) override
Definition qcustomplot.cpp:20532
virtual void mouseMoveEvent(QMouseEvent *event, const QPointF &startPos) override
Definition qcustomplot.cpp:20521
virtual void wheelEvent(QWheelEvent *event) override
Definition qcustomplot.cpp:20543
void gradientChanged(const QCPColorGradient &newGradient)
void dataScaleTypeChanged(QCPAxis::ScaleType scaleType)
void dataRangeChanged(const QCPRange &newRange)
virtual void mousePressEvent(QMouseEvent *event, const QVariant &details) override
Definition qcustomplot.cpp:20510
Q_SLOT void setDataRange(const QCPRange &dataRange)
Definition qcustomplot.cpp:20248
virtual void applyDefaultAntialiasingHint(QCPPainter *painter) const override
Definition qcustomplot.cpp:20504
Q_SLOT void setDataScaleType(QCPAxis::ScaleType scaleType)
Definition qcustomplot.cpp:20278
static QCPCurveData fromSortKey(double sortKey)
Definition qcustomplot.h:5609
void setScatterStyle(const QCPScatterStyle &style)
Definition qcustomplot.cpp:22735
The generic data container for one-dimensional plottables.
Definition qcustomplot.h:2614
const_iterator findBegin(double sortKey, bool expandedRange=true) const
Definition qcustomplot.h:3105
QCPRange valueRange(bool &foundRange, QCP::SignDomain signDomain=QCP::sdBoth, const QCPRange &inKeyRange=QCPRange())
Definition qcustomplot.h:3284
void add(const QCPDataContainer< DataType > &data)
Definition qcustomplot.h:2871
void add(const QVector< DataType > &data, bool alreadySorted=false)
Definition qcustomplot.h:2903
bool qcpLessThanSortKey(const DataType &a, const DataType &b)
Definition qcustomplot.h:2610
void squeeze(bool preAllocation=true, bool postAllocation=true)
Definition qcustomplot.h:3073
void limitIteratorsToDataRange(const_iterator &begin, const_iterator &end, const QCPDataRange &dataRange) const
Definition qcustomplot.h:3372
void preallocateGrow(int minimumPreallocSize)
Definition qcustomplot.h:3390
QCPRange keyRange(bool &foundRange, QCP::SignDomain signDomain=QCP::sdBoth)
Definition qcustomplot.h:3159
void remove(double sortKeyFrom, double sortKeyTo)
Definition qcustomplot.h:2996
void set(const QCPDataContainer< DataType > &data)
Definition qcustomplot.h:2839
const_iterator findEnd(double sortKey, bool expandedRange=true) const
Definition qcustomplot.h:3132
void set(const QVector< DataType > &data, bool alreadySorted=false)
Definition qcustomplot.h:2855
QCPDataRange adjusted(int changeBegin, int changeEnd) const
Definition qcustomplot.h:974
QCPDataRange bounded(const QCPDataRange &other) const
Definition qcustomplot.cpp:2283
Describes a data set by holding multiple QCPDataRange instances.
Definition qcustomplot.h:987
friend const QCPDataSelection operator-(const QCPDataSelection &a, const QCPDataSelection &b)
Definition qcustomplot.h:1081
QCPDataSelection & operator+=(const QCPDataSelection &other)
Definition qcustomplot.cpp:2450
void addDataRange(const QCPDataRange &dataRange, bool simplify=true)
Definition qcustomplot.cpp:2574
friend const QCPDataSelection operator+(const QCPDataSelection &a, const QCPDataSelection &b)
Definition qcustomplot.h:1038
bool operator==(const QCPDataSelection &other) const
Definition qcustomplot.cpp:2434
QCPDataSelection & operator-=(const QCPDataSelection &other)
Definition qcustomplot.cpp:2470
QCPDataSelection inverse(const QCPDataRange &outerRange) const
Definition qcustomplot.cpp:2739
Holds the data of one single error bar for QCPErrorBars.
Definition qcustomplot.h:6298
A plottable that adds a set of error bars to other plottables.
Definition qcustomplot.h:6327
QCPErrorBars(QCPAxis *keyAxis, QCPAxis *valueAxis)
Definition qcustomplot.cpp:27994
void setData(QSharedPointer< QCPErrorBarsDataContainer > data)
Definition qcustomplot.cpp:28027
@ etValueError
The errors are for the value dimension (bars appear parallel to the value axis)
Definition qcustomplot.h:6345
@ etKeyError
The errors are for the key dimension (bars appear parallel to the key axis)
Definition qcustomplot.h:6344
void setDataPlottable(QCPAbstractPlottable *plottable)
Definition qcustomplot.cpp:28077
QSharedPointer< QCPErrorBarsDataContainer > data() const
Definition qcustomplot.h:6352
virtual QCPPlottableInterface1D * interface1D() override
Definition qcustomplot.h:6387
static QCPFinancialData fromSortKey(double sortKey)
Definition qcustomplot.h:6165
QCPFinancial(QCPAxis *keyAxis, QCPAxis *valueAxis)
Definition qcustomplot.cpp:27100
void setBrushPositive(const QBrush &brush)
Definition qcustomplot.cpp:27209
void setBrushNegative(const QBrush &brush)
Definition qcustomplot.cpp:27223
QSharedPointer< QCPFinancialDataContainer > data() const
Definition qcustomplot.h:6229
@ wtPlotCoords
width is in key coordinates and thus scales with the key axis range
Definition qcustomplot.h:6211
static QCPGraphData fromSortKey(double sortKey)
Definition qcustomplot.h:5470
void setScatterStyle(const QCPScatterStyle &style)
Definition qcustomplot.cpp:20957
void setChannelFillGraph(QCPGraph *targetGraph)
Definition qcustomplot.cpp:20987
@ lsStepCenter
line is drawn as steps where the step is in between two data points
Definition qcustomplot.h:5515
@ lsStepRight
line is drawn as steps where the step height is the value of the right data point
Definition qcustomplot.h:5514
@ lsImpulse
each data point is represented by a line parallel to the value axis, which reaches from the data poin...
Definition qcustomplot.h:5516
@ lsStepLeft
line is drawn as steps where the step height is the value of the left data point
Definition qcustomplot.h:5513
void setAntialiasedZeroLine(bool enabled)
Definition qcustomplot.cpp:7900
void setAntialiasedSubGrid(bool enabled)
Definition qcustomplot.cpp:7892
void drawSubGridLines(QCPPainter *painter) const
Definition qcustomplot.cpp:8043
virtual void applyDefaultAntialiasingHint(QCPPainter *painter) const override
Definition qcustomplot.cpp:7945
An anchor of an item to which positions can be attached to.
Definition qcustomplot.h:3606
QCPItemAnchor(QCustomPlot *parentPlot, QCPAbstractItem *parentItem, const QString &name, int anchorId=-1)
Definition qcustomplot.cpp:12044
virtual QCPItemPosition * toQCPItemPosition()
Definition qcustomplot.h:3627
A bracket for referencing/highlighting certain parts in the plot.
Definition qcustomplot.h:6940
QCPItemBracket(QCustomPlot *parentPlot)
Definition qcustomplot.cpp:30802
@ bsCalligraphic
A curly brace with varying stroke width giving a calligraphic impression.
Definition qcustomplot.h:6958
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const override
Definition qcustomplot.cpp:29363
virtual QPointF anchorPixelPosition(int anchorId) const override
Definition qcustomplot.cpp:30087
QCPItemEllipse(QCustomPlot *parentPlot)
Definition qcustomplot.cpp:29961
void setSelectedBrush(const QBrush &brush)
Definition qcustomplot.cpp:30025
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const override
Definition qcustomplot.cpp:30031
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const override
Definition qcustomplot.cpp:29121
QLineF getRectClippedLine(const QCPVector2D &start, const QCPVector2D &end, const QRect &rect) const
Definition qcustomplot.cpp:29161
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const override
Definition qcustomplot.cpp:30226
void updateScaledPixmap(QRect finalRect=QRect(), bool flipHorz=false, bool flipVert=false)
Definition qcustomplot.cpp:30297
QRect getFinalRect(bool *flippedHorz=nullptr, bool *flippedVert=nullptr) const
Definition qcustomplot.cpp:30339
virtual QPointF anchorPixelPosition(int anchorId) const override
Definition qcustomplot.cpp:30258
void setScaled(bool scaled, Qt::AspectRatioMode aspectRatioMode=Qt::KeepAspectRatio, Qt::TransformationMode transformationMode=Qt::SmoothTransformation)
Definition qcustomplot.cpp:30197
QCPItemPosition(QCustomPlot *parentPlot, QCPAbstractItem *parentItem, const QString &name)
Definition qcustomplot.cpp:12218
@ ptAxisRectRatio
Static positioning given by a fraction of the axis rect size (see setAxisRect).
Definition qcustomplot.h:3657
@ ptAbsolute
Static positioning in pixels, starting from the top left corner of the viewport/widget.
Definition qcustomplot.h:3653
@ ptViewportRatio
Static positioning given by a fraction of the viewport size.
Definition qcustomplot.h:3654
@ ptPlotCoords
Dynamic positioning at a plot coordinate defined by two axes (see setAxes).
Definition qcustomplot.h:3660
virtual QCPItemPosition * toQCPItemPosition() override
Definition qcustomplot.h:3704
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const override
Definition qcustomplot.cpp:29523
virtual QPointF anchorPixelPosition(int anchorId) const override
Definition qcustomplot.cpp:29553
void setSelectedBrush(const QBrush &brush)
Definition qcustomplot.cpp:29517
QCPItemStraightLine(QCustomPlot *parentPlot)
Definition qcustomplot.cpp:28875
QLineF getRectClippedStraightLine(const QCPVector2D &base, const QCPVector2D &vec, const QRect &rect) const
Definition qcustomplot.cpp:28944
void setSelectedPen(const QPen &pen)
Definition qcustomplot.cpp:28906
virtual void draw(QCPPainter *painter) override
Definition qcustomplot.cpp:28922
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const override
Definition qcustomplot.cpp:28912
QPointF getTextDrawPoint(const QPointF &pos, const QRectF &rect, Qt::Alignment positionAlignment) const
Definition qcustomplot.cpp:29881
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const override
Definition qcustomplot.cpp:29784
void setSelectedBrush(const QBrush &brush)
Definition qcustomplot.cpp:29704
void setPositionAlignment(Qt::Alignment alignment)
Definition qcustomplot.cpp:29752
virtual QPointF anchorPixelPosition(int anchorId) const override
Definition qcustomplot.cpp:29840
void setTextAlignment(Qt::Alignment alignment)
Definition qcustomplot.cpp:29760
void setSelectedColor(const QColor &color)
Definition qcustomplot.cpp:29660
void setSelectedBrush(const QBrush &brush)
Definition qcustomplot.cpp:30498
@ tsCrosshair
A plus shaped crosshair which spans the complete axis rect.
Definition qcustomplot.h:6875
QCPLabelPainterPrivate(QCustomPlot *parentPlot)
Definition qcustomplot.cpp:5484
A layer that may contain objects, to control the rendering order.
Definition qcustomplot.h:683
QCPLayer(QCustomPlot *parentPlot, const QString &layerName)
Definition qcustomplot.cpp:1067
@ lmLogical
Layer is used only for rendering order, and shares paint buffer with all other adjacent logical layer...
Definition qcustomplot.h:702
@ lmBuffered
Layer has its own paint buffer and may be replotted individually (see replot).
Definition qcustomplot.h:703
virtual void applyDefaultAntialiasingHint(QCPPainter *painter) const =0
virtual void mouseDoubleClickEvent(QMouseEvent *event, const QVariant &details)
Definition qcustomplot.cpp:1808
QCPLayerable(QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=nullptr)
Definition qcustomplot.cpp:1366
virtual void selectEvent(QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged)
Definition qcustomplot.cpp:1690
void initializeParentPlot(QCustomPlot *parentPlot)
Definition qcustomplot.cpp:1528
virtual QCP::Interaction selectionCategory() const
Definition qcustomplot.cpp:1640
virtual void mouseMoveEvent(QMouseEvent *event, const QPointF &startPos)
Definition qcustomplot.cpp:1758
virtual void mouseReleaseEvent(QMouseEvent *event, const QPointF &startPos)
Definition qcustomplot.cpp:1776
void setParentLayerable(QCPLayerable *parentLayerable)
Definition qcustomplot.cpp:1554
virtual void parentPlotInitialized(QCustomPlot *parentPlot)
Definition qcustomplot.cpp:1624
void layerChanged(QCPLayer *newLayer)
void applyAntialiasingHint(QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
Definition qcustomplot.cpp:1598
virtual void draw(QCPPainter *painter)=0
virtual void deselectEvent(bool *selectionStateChanged)
Definition qcustomplot.cpp:1710
virtual void mousePressEvent(QMouseEvent *event, const QVariant &details)
Definition qcustomplot.cpp:1740
bool moveToLayer(QCPLayer *layer, bool prepend)
Definition qcustomplot.cpp:1567
The abstract base class for all objects that form the layout system.
Definition qcustomplot.h:1239
void setMinimumMargins(const QMargins &margins)
Definition qcustomplot.cpp:3278
@ scrOuterRect
Minimum/Maximum size constraints apply to outer rect, thus include layout element margins.
Definition qcustomplot.h:1271
@ upLayout
Final phase in which the layout system places the rects of the elements.
Definition qcustomplot.h:1258
@ upPreparation
Phase used for any type of preparation that needs to be done before margin calculation and layout.
Definition qcustomplot.h:1256
QCPLayoutElement(QCustomPlot *parentPlot=nullptr)
Definition qcustomplot.cpp:3207
void setSizeConstraintRect(SizeConstraintRect constraintRect)
Definition qcustomplot.cpp:3373
void setMinimumSize(const QSize &size)
Definition qcustomplot.cpp:3313
void setMaximumSize(const QSize &size)
Definition qcustomplot.cpp:3342
virtual void applyDefaultAntialiasingHint(QCPPainter *painter) const override
Definition qcustomplot.h:1327
void setRowStretchFactors(const QList< double > &factors)
Definition qcustomplot.cpp:4318
void setColumnStretchFactors(const QList< double > &factors)
Definition qcustomplot.cpp:4265
@ foRowsFirst
Rows are filled first, and a new element is wrapped to the next column if the row count would exceed ...
Definition qcustomplot.h:1403
@ foColumnsFirst
Columns are filled first, and a new element is wrapped to the next row if the column count would exce...
Definition qcustomplot.h:1404
void setFillOrder(FillOrder order, bool rearrange=true)
Definition qcustomplot.cpp:4402
A layout that places child elements aligned to the border or arbitrarily positioned.
Definition qcustomplot.h:1473
@ ipFree
The element may be positioned/sized arbitrarily, see setInsetRect.
Definition qcustomplot.h:1479
@ ipBorderAligned
The element is aligned to one of the layout sides, see setInsetAlignment.
Definition qcustomplot.h:1480
QVector< int > getSectionSizes(QVector< int > maxSizes, QVector< int > minSizes, QVector< double > stretchFactors, int totalSize) const
Definition qcustomplot.cpp:3896
virtual QList< QCPLayoutElement * > elements(bool recursive) const override
Definition qcustomplot.cpp:3697
static QSize getFinalMinimumOuterSize(const QCPLayoutElement *el)
Definition qcustomplot.cpp:4020
virtual QCPLayoutElement * takeAt(int index)=0
virtual QCPLayoutElement * elementAt(int index) const =0
virtual int elementCount() const =0
virtual bool take(QCPLayoutElement *element)=0
static QSize getFinalMaximumOuterSize(const QCPLayoutElement *el)
Definition qcustomplot.cpp:4045
virtual QCP::Interaction selectionCategory() const override
Definition qcustomplot.cpp:19613
Q_SLOT void setSelectedParts(const SelectableParts &selectedParts)
Definition qcustomplot.cpp:19260
void setSelectedBorderPen(const QPen &pen)
Definition qcustomplot.cpp:19291
virtual void deselectEvent(bool *selectionStateChanged) override
Definition qcustomplot.cpp:19600
virtual void applyDefaultAntialiasingHint(QCPPainter *painter) const override
Definition qcustomplot.cpp:19532
virtual void selectEvent(QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged) override
Definition qcustomplot.cpp:19586
void setSelectedTextColor(const QColor &color)
Definition qcustomplot.cpp:19341
void selectionChanged(QCPLegend::SelectableParts parts)
void setSelectedBrush(const QBrush &brush)
Definition qcustomplot.cpp:19312
virtual void parentPlotInitialized(QCustomPlot *parentPlot) override
Definition qcustomplot.cpp:19625
Q_SLOT void setSelectableParts(const SelectableParts &selectableParts)
Definition qcustomplot.cpp:19230
void setSelectedIconBorderPen(const QPen &pen)
Definition qcustomplot.cpp:19301
Handles the different ending decorations for line-like items.
Definition qcustomplot.h:1529
@ esHalfBar
A bar perpendicular to the line, pointing out to only one side (to which side can be changed with set...
Definition qcustomplot.h:1551
@ esFlatArrow
A filled arrow head with a straight/flat back (a triangle)
Definition qcustomplot.h:1544
A margin group allows synchronization of margin sides if working with multiple layout elements.
Definition qcustomplot.h:1208
QCPMarginGroup(QCustomPlot *parentPlot)
Definition qcustomplot.cpp:3041
QList< QCPLayoutElement * > elements(QCP::MarginSide side) const
Definition qcustomplot.h:1215
virtual QCPPainter * startPainting() override
Definition qcustomplot.cpp:678
virtual void draw(QCPPainter *painter) const override
Definition qcustomplot.cpp:688
virtual void reallocateBuffer() override
Definition qcustomplot.cpp:703
QCPPaintBufferPixmap(const QSize &size, double devicePixelRatio)
Definition qcustomplot.cpp:667
@ pmNonCosmetic
0x04 Turns pen widths 0 to 1, i.e. disables cosmetic pens. (A cosmetic pen is always drawn with width...
Definition qcustomplot.h:526
@ pmNoCaching
0x02 Mode for all sorts of exports (e.g. PNG, PDF,...). For example, this prevents using cached pixma...
Definition qcustomplot.h:525
@ pmVectorized
0x01 Mode for vectorized painting (e.g. PDF export). For example, this prevents some antialiasing fix...
Definition qcustomplot.h:524
Defines an abstract interface for one-dimensional plottables.
Definition qcustomplot.h:4161
virtual QCPDataSelection selectTestRect(const QRectF &rect, bool onlySelectable) const =0
virtual double dataMainValue(int index) const =0
virtual int findEnd(double sortKey, bool expandedRange=true) const =0
virtual QPointF dataPixelPosition(int index) const =0
virtual double dataMainKey(int index) const =0
virtual double dataSortKey(int index) const =0
virtual int findBegin(double sortKey, bool expandedRange=true) const =0
virtual bool sortKeyIsMainKey() const =0
virtual int dataCount() const =0
virtual QCPRange dataValueRange(int index) const =0
virtual QSize minimumOuterSizeHint() const override
Definition qcustomplot.cpp:19004
QCPPlottableLegendItem(QCPLegend *parent, QCPAbstractPlottable *plottable)
Definition qcustomplot.cpp:18928
virtual void draw(QCPPainter *painter) override
Definition qcustomplot.cpp:18971
QPen getIconBorderPen() const
Definition qcustomplot.cpp:18940
The main container for polar plots, representing the angular axis as a circle.
Definition qcustomplot.h:7259
@ spTickLabels
Tick labels (numbers) of this axis (as a whole, not individually)
Definition qcustomplot.h:7271
QCPPolarAxisAngular(QCustomPlot *parentPlot)
Definition qcustomplot.cpp:32574
QSharedPointer< QCPAxisTicker > ticker() const
Definition qcustomplot.h:7061
virtual void deselectEvent(bool *selectionStateChanged) override
Definition qcustomplot.cpp:32158
@ stLogarithmic
Logarithmic scaling with correspondingly transformed axis coordinates (possibly also setTicker to a Q...
Definition qcustomplot.h:7026
virtual QCP::Interaction selectionCategory() const override
Definition qcustomplot.cpp:32464
virtual void mouseReleaseEvent(QMouseEvent *event, const QPointF &startPos) override
Definition qcustomplot.cpp:32255
@ arAngularAxis
The axis tilt is measured in the angular coordinate system given by the parent angular axis.
Definition qcustomplot.h:7018
@ arAbsolute
The axis tilt is given in absolute degrees. The zero is to the right and positive angles are measured...
Definition qcustomplot.h:7017
void selectionChanged(const QCPPolarAxisRadial::SelectableParts &parts)
void scaleTypeChanged(QCPPolarAxisRadial::ScaleType scaleType)
void rangeChanged(const QCPRange &newRange)
virtual void draw(QCPPainter *painter) override
Definition qcustomplot.cpp:32331
QColor getTickLabelColor() const
Definition qcustomplot.cpp:32447
QCPPolarAxisRadial(QCPPolarAxisAngular *parent)
Definition qcustomplot.cpp:31099
void selectableChanged(const QCPPolarAxisRadial::SelectableParts &parts)
@ spTickLabels
Tick labels (numbers) of this axis (as a whole, not individually)
Definition qcustomplot.h:7035
virtual void mouseMoveEvent(QMouseEvent *event, const QPointF &startPos) override
Definition qcustomplot.cpp:32217
virtual void mousePressEvent(QMouseEvent *event, const QVariant &details) override
Definition qcustomplot.cpp:32181
virtual void selectEvent(QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged) override
Definition qcustomplot.cpp:32144
virtual void applyDefaultAntialiasingHint(QCPPainter *painter) const override
Definition qcustomplot.cpp:32320
virtual void wheelEvent(QWheelEvent *event) override
Definition qcustomplot.cpp:32282
QCPPolarGraph(QCPPolarAxisAngular *keyAxis, QCPPolarAxisRadial *valueAxis)
Definition qcustomplot.cpp:34458
The grid in both angular and radial dimensions for polar plots.
Definition qcustomplot.h:7532
QCPPolarGrid(QCPPolarAxisAngular *parentAxis)
Definition qcustomplot.cpp:34182
virtual void draw(QCPPainter *painter) override
Definition qcustomplot.cpp:34371
virtual QSize minimumOuterSizeHint() const override
Definition qcustomplot.cpp:34397
friend const QCPRange operator/(const QCPRange &range, double value)
Definition qcustomplot.h:936
friend const QCPRange operator*(const QCPRange &range, double value)
Definition qcustomplot.h:916
friend const QCPRange operator-(const QCPRange &range, double value)
Definition qcustomplot.h:906
friend const QCPRange operator+(const QCPRange &, double)
Definition qcustomplot.h:886
@ ssDot
\enumimage{ssDot.png} a single pixel (use ssDisc or ssCircle if you want a round shape with a certain...
Definition qcustomplot.h:2528
@ ssCustom
custom painter operations are performed per scatter (As QPainterPath, see setCustomPath)
Definition qcustomplot.h:2544
@ ssDisc
\enumimage{ssDisc.png} a circle which is filled with the pen's color (not the brush as with ssCircle)
Definition qcustomplot.h:2532
@ ssCrossCircle
\enumimage{ssCrossCircle.png} a circle with a cross inside
Definition qcustomplot.h:2540
@ ssStar
\enumimage{ssStar.png} a star with eight arms, i.e. a combination of cross and plus
Definition qcustomplot.h:2535
@ ssTriangleInverted
\enumimage{ssTriangleInverted.png} an equilateral triangle, standing on corner
Definition qcustomplot.h:2537
@ ssCrossSquare
\enumimage{ssCrossSquare.png} a square with a cross inside
Definition qcustomplot.h:2538
@ ssTriangle
\enumimage{ssTriangle.png} an equilateral triangle, standing on baseline
Definition qcustomplot.h:2536
@ ssPixmap
a custom pixmap specified by setPixmap, centered on the data point coordinates
Definition qcustomplot.h:2543
@ ssNone
no scatter symbols are drawn (e.g. in QCPGraph, data only represented with lines)
Definition qcustomplot.h:2527
@ ssPeace
\enumimage{ssPeace.png} a circle, with one vertical and two downward diagonal lines
Definition qcustomplot.h:2542
A selection decorator which draws brackets around each selected data segment.
Definition qcustomplot.h:4856
@ bsUserStyle
Start custom bracket styles at this index when subclassing and reimplementing drawBracket.
Definition qcustomplot.h:4870
@ bsEllipse
An ellipse is drawn. The size of the ellipse is given by the bracket width/height properties.
Definition qcustomplot.h:4868
@ bsHalfEllipse
A half ellipse is drawn. The size of the ellipse is given by the bracket width/height properties.
Definition qcustomplot.h:4867
QCPSelectionDecoratorBracket()
Definition qcustomplot.cpp:17164
Controls how a plottable's data selection is drawn.
Definition qcustomplot.h:3449
QCPScatterStyle getFinalScatterStyle(const QCPScatterStyle &unselectedStyle) const
Definition qcustomplot.cpp:11143
void applyBrush(QCPPainter *painter) const
Definition qcustomplot.cpp:11130
virtual void copyFrom(const QCPSelectionDecorator *other)
Definition qcustomplot.cpp:11161
virtual void drawDecoration(QCPPainter *painter, QCPDataSelection selection)
Definition qcustomplot.cpp:11176
void applyPen(QCPPainter *painter) const
Definition qcustomplot.cpp:11120
void setUsedScatterProperties(const QCPScatterStyle::ScatterProperties &properties)
Definition qcustomplot.cpp:11110
void setScatterStyle(const QCPScatterStyle &scatterStyle, QCPScatterStyle::ScatterProperties usedProperties=QCPScatterStyle::spPen)
Definition qcustomplot.cpp:11097
virtual bool registerWithPlottable(QCPAbstractPlottable *plottable)
Definition qcustomplot.cpp:11191
Provides rect/rubber-band data selection and range zoom interaction.
Definition qcustomplot.h:1154
void accepted(const QRect &rect, QMouseEvent *event)
virtual void keyPressEvent(QKeyEvent *event)
Definition qcustomplot.cpp:2957
void changed(const QRect &rect, QMouseEvent *event)
virtual void startSelection(QMouseEvent *event)
Definition qcustomplot.cpp:2918
virtual void applyDefaultAntialiasingHint(QCPPainter *painter) const override
Definition qcustomplot.cpp:2967
virtual void endSelection(QMouseEvent *event)
Definition qcustomplot.cpp:2944
void started(QMouseEvent *event)
virtual void moveSelection(QMouseEvent *event)
Definition qcustomplot.cpp:2931
virtual void draw(QCPPainter *painter) override
Definition qcustomplot.cpp:2978
QCPSelectionRect(QCustomPlot *parentPlot)
Definition qcustomplot.cpp:2846
void canceled(const QRect &rect, QInputEvent *event)
static QCPStatisticalBoxData fromSortKey(double sortKey)
Definition qcustomplot.h:5912
void setWhiskerAntialiased(bool enabled)
Definition qcustomplot.cpp:25439
QSharedPointer< QCPStatisticalBoxDataContainer > data() const
Definition qcustomplot.h:5960
QCPStatisticalBox(QCPAxis *keyAxis, QCPAxis *valueAxis)
Definition qcustomplot.cpp:25329
void setWhiskerBarPen(const QPen &pen)
Definition qcustomplot.cpp:25428
void setOutlierStyle(const QCPScatterStyle &style)
Definition qcustomplot.cpp:25458
void setWhiskerWidth(double width)
Definition qcustomplot.cpp:25398
void setSelectedFont(const QFont &font)
Definition qcustomplot.cpp:19854
virtual void mouseDoubleClickEvent(QMouseEvent *event, const QVariant &details) override
Definition qcustomplot.cpp:20011
virtual QSize maximumOuterSizeHint() const override
Definition qcustomplot.cpp:19925
Q_SLOT void setSelectable(bool selectable)
Definition qcustomplot.cpp:19875
virtual void selectEvent(QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged) override
Definition qcustomplot.cpp:19935
void selectionChanged(bool selected)
virtual void mousePressEvent(QMouseEvent *event, const QVariant &details) override
Definition qcustomplot.cpp:19988
virtual void mouseReleaseEvent(QMouseEvent *event, const QPointF &startPos) override
Definition qcustomplot.cpp:20000
void doubleClicked(QMouseEvent *event)
virtual void applyDefaultAntialiasingHint(QCPPainter *painter) const override
Definition qcustomplot.cpp:19901
void setSelectedTextColor(const QColor &color)
Definition qcustomplot.cpp:19864
void clicked(QMouseEvent *event)
virtual double selectTest(const QPointF &pos, bool onlySelectable, QVariant *details=nullptr) const override
Definition qcustomplot.cpp:19970
QCPTextElement(QCustomPlot *parentPlot)
Definition qcustomplot.cpp:19681
virtual QSize minimumOuterSizeHint() const override
Definition qcustomplot.cpp:19915
virtual void deselectEvent(bool *selectionStateChanged) override
Definition qcustomplot.cpp:19949
The central class of the library. This is the QWidget which displays the plot and interacts with the ...
Definition qcustomplot.h:3791
void legendDoubleClick(QCPLegend *legend, QCPAbstractLegendItem *item, QMouseEvent *event)
void beforeReplot()
void setBackgroundScaled(bool scaled)
Definition qcustomplot.cpp:14220
QList< QCPLayerable * > layerableListAt(const QPointF &pos, bool onlySelectable, QList< QVariant > *selectionDetails=nullptr) const
Definition qcustomplot.cpp:16350
@ rpQueuedReplot
Queues the entire replot for the next event loop iteration. This way multiple redundant replots can b...
Definition qcustomplot.h:3824
@ rpRefreshHint
Whether to use immediate or queued refresh depends on whether the plotting hint QCP::phImmediateRefre...
Definition qcustomplot.h:3823
@ rpImmediateRefresh
Replots immediately and repaints the widget immediately by calling QWidget::repaint() after the replo...
Definition qcustomplot.h:3821
@ rpQueuedRefresh
Replots immediately, but queues the widget repaint, by calling QWidget::update() after the replot....
Definition qcustomplot.h:3822
void setBackgroundScaledMode(Qt::AspectRatioMode mode)
Definition qcustomplot.cpp:14231
void setSelectionTolerance(int pixels)
Definition qcustomplot.cpp:13902
void selectionChangedByUser()
PlottableType * plottableAt(const QPointF &pos, bool onlySelectable=false, int *dataIndex=nullptr) const
Definition qcustomplot.h:4081
virtual Q_SLOT void processRectZoom(QRect rect, QMouseEvent *event)
Definition qcustomplot.cpp:16139
void axisDoubleClick(QCPAxis *axis, QCPAxis::SelectablePart part, QMouseEvent *event)
void afterReplot()
void mouseMove(QMouseEvent *event)
void setNoAntialiasingOnDrag(bool enabled)
Definition qcustomplot.cpp:13916
void legendClick(QCPLegend *legend, QCPAbstractLegendItem *item, QMouseEvent *event)
void setOpenGl(bool enabled, int multisampling=16)
Definition qcustomplot.cpp:14068
virtual void mouseReleaseEvent(QMouseEvent *event) override
Definition qcustomplot.cpp:15657
virtual void mouseDoubleClickEvent(QMouseEvent *event) override
Definition qcustomplot.cpp:15526
void plottableDoubleClick(QCPAbstractPlottable *plottable, int dataIndex, QMouseEvent *event)
ItemType * itemAt(const QPointF &pos, bool onlySelectable=false) const
Definition qcustomplot.h:4128
virtual void resizeEvent(QResizeEvent *event) override
Definition qcustomplot.cpp:15509
void setMultiSelectModifier(Qt::KeyboardModifier modifier)
Definition qcustomplot.cpp:13958
QCPAbstractPaintBuffer * createPaintBuffer()
Definition qcustomplot.cpp:15887
QCPLayerable * layerableAt(const QPointF &pos, bool onlySelectable, QVariant *selectionDetails=nullptr) const
Definition qcustomplot.cpp:16319
void mouseDoubleClick(QMouseEvent *event)
virtual void legendRemoved(QCPLegend *legend)
Definition qcustomplot.cpp:16028
void afterLayout()
virtual void mousePressEvent(QMouseEvent *event) override
Definition qcustomplot.cpp:15578
void axisClick(QCPAxis *axis, QCPAxis::SelectablePart part, QMouseEvent *event)
virtual Q_SLOT void processRectSelection(QRect rect, QMouseEvent *event)
Definition qcustomplot.cpp:16051
virtual Q_SLOT void processPointSelection(QMouseEvent *event)
Definition qcustomplot.cpp:16168
void mouseWheel(QWheelEvent *event)
void itemDoubleClick(QCPAbstractItem *item, QMouseEvent *event)
void mouseRelease(QMouseEvent *event)
void mousePress(QMouseEvent *event)
virtual void wheelEvent(QWheelEvent *event) override
Definition qcustomplot.cpp:15711
bool hasInvalidatedPaintBuffers()
Definition qcustomplot.cpp:15914
void setAutoAddPlottableToLegend(bool on)
Definition qcustomplot.cpp:13810
void itemClick(QCPAbstractItem *item, QMouseEvent *event)
virtual void paintEvent(QPaintEvent *event) override
Definition qcustomplot.cpp:15471
bool registerPlottable(QCPAbstractPlottable *plottable)
Definition qcustomplot.cpp:16215
virtual QSize minimumSizeHint() const override
Definition qcustomplot.cpp:15451
void plottableClick(QCPAbstractPlottable *plottable, int dataIndex, QMouseEvent *event)
virtual void mouseMoveEvent(QMouseEvent *event) override
Definition qcustomplot.cpp:15628
void update(Part *part, const QByteArray &data, qint64 dataSize)
KDOCTOOLS_EXPORT QString transform(const QString &file, const QString &stylesheet, const QList< const char * > ¶ms=QList< const char * >())
VehicleSection::Type type(QStringView coachNumber, QStringView coachClassification)
QString name(StandardAction id)
KGuiItem save()
KGuiItem clear()
const QList< QKeySequence > & begin()
QString label(StandardShortcut id)
ItemType
QCA_EXPORT const SecureArray operator+(const SecureArray &a, const SecureArray &b)
Definition qcustomplot.h:166
@ epAllowCosmetic
Cosmetic pens are exported normally (e.g. in PDF exports, cosmetic pens always appear as 1 pixel on s...
Definition qcustomplot.h:206
@ epNoCosmetic
Cosmetic pens are converted to pens with pixel width 1 when exporting.
Definition qcustomplot.h:205
int getMarginValue(const QMargins &margins, QCP::MarginSide side)
Definition qcustomplot.h:377
@ iSelectLegend
0x020 Legends are selectable (or their child items, see QCPLegend::setSelectableParts)
Definition qcustomplot.h:287
@ iRangeDrag
0x001 Axis ranges are draggable (see QCPAxisRect::setRangeDrag, QCPAxisRect::setRangeDragAxes)
Definition qcustomplot.h:282
@ iSelectPlottables
0x008 Plottables are selectable (e.g. graphs, curves, bars,... see QCPAbstractPlottable)
Definition qcustomplot.h:285
@ iRangeZoom
0x002 Axis ranges are zoomable with the mouse wheel (see QCPAxisRect::setRangeZoom,...
Definition qcustomplot.h:283
@ iSelectPlottablesBeyondAxisRect
0x100 When performing plottable selection/hit tests, this flag extends the sensitive area beyond the ...
Definition qcustomplot.h:290
@ iSelectAxes
0x010 Axes are selectable (or parts of them, see QCPAxis::setSelectableParts)
Definition qcustomplot.h:286
@ iSelectItems
0x040 Items are selectable (Rectangles, Arrows, Textitems, etc. see QCPAbstractItem)
Definition qcustomplot.h:288
@ iMultiSelect
0x004 The user can select multiple objects by holding the modifier set by QCustomPlot::setMultiSelect...
Definition qcustomplot.h:284
@ iSelectOther
0x080 All other objects are selectable (e.g. your own derived layerables, other layout elements,...
Definition qcustomplot.h:289
@ phImmediateRefresh
0x002 causes an immediate repaint() instead of a soft update() when QCustomPlot::replot() is called w...
Definition qcustomplot.h:268
@ phCacheLabels
0x004 axis (tick) labels will be cached as pixmaps, increasing replot performance.
Definition qcustomplot.h:270
@ phFastPolylines
0x001 Graph/Curve lines are drawn with a faster method.
Definition qcustomplot.h:266
@ stMultipleDataRanges
Any combination of data points/ranges can be selected.
Definition qcustomplot.h:327
@ stDataRange
Multiple contiguous data points (a data range) can be selected.
Definition qcustomplot.h:326
@ stWhole
Selection behaves like stMultipleDataRanges, but if there are any data points selected,...
Definition qcustomplot.h:324
@ srmCustom
When dragging the mouse, a selection rect becomes active. It is the programmer's responsibility to co...
Definition qcustomplot.h:302
@ srmSelect
When dragging the mouse, a selection rect becomes active. Upon releasing, plottable data points that ...
Definition qcustomplot.h:301
@ srmZoom
When dragging the mouse, a selection rect becomes active. Upon releasing, the axes that are currently...
Definition qcustomplot.h:300
@ srmNone
The selection rect is disabled, and all mouse events are forwarded to the underlying objects,...
Definition qcustomplot.h:299
@ aeOther
0x8000 Other elements that don't fit into any of the existing categories
Definition qcustomplot.h:254
@ aeScatters
0x0080 Scatter symbols of plottables (excluding scatter symbols of type ssPixmap)
Definition qcustomplot.h:251
void setMarginValue(QMargins &margins, QCP::MarginSide side, int value)
Definition qcustomplot.h:357
bool testFlag(Enum flag) const const
const_reference at(qsizetype i) const const
void clear()
const_iterator constBegin() const const
const_pointer constData() const const
const_iterator constEnd() const const
bool isEmpty() const const
qsizetype size() const const
T value(qsizetype i) const const
int bottom() const const
int left() const const
int right() const const
void setBottom(int bottom)
void setLeft(int left)
void setRight(int right)
void setTop(int Top)
int top() const const
QObject(QObject *parent)
Q_GADGETQ_GADGET
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
Q_SLOTQ_SLOT
virtual bool event(QEvent *e)
QObject * parent() const const
T qobject_cast(QObject *object)
QPainter()
Antialiasing
void drawPolyline(const QPoint *points, int pointCount)
const QPen & pen() const const
void setWidth(int width)
Qt::PenStyle style() const const
qreal widthF() const const
T * data() const const
QPointF bottomRight() const const
QPointF topLeft() const const
AlignmentFlag
AspectRatioMode
NoBrush
KeyboardModifier
Vertical
PenStyle
TimeSpec
TransformationMode
void setValue(QVariant &&value)
T value() const const
QWidget(QWidget *parent, Qt::WindowFlags f)
virtual bool event(QEvent *event) override
pos
rect
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:53:00 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:53:00 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.