QCustomPlot User Manual (3) and qcustomplot User Manual

Source: Internet
Author: User

QCustomPlot User Manual (3) and qcustomplot User Manual

I. Scope of change

QCustomPlot *customplot;customplot->setInteraction(QCP::iRangeDrag,true);

Allows controls to be dragged.

customplot->axisRect()->setRangeDrag(Qt::Vertical);// Qt::Horizontal

The control can only be dragged up on one side. It is supported by both water and vertical by default.

customplot->setInteraction(QCP::iRangeZoom,true);

Allows the control to be scaled.

customplot->axisRect()->setRangeZoomAxes(QCPAxis *  horizontal, QCPAxis *  vertical);

Set the coordinate axis for scaling.

customplot->axisRect()->setRangeZoom();

Set the scaling direction. Both horizontal and vertical are supported by default.

customplot->axisRect()->setRangeZoomFactor();

You can set the scaling ratio to the same value, or set the horizontal and vertical values respectively.

Ii. Select Elements

customplot->setInteraction(QCP::iSelectPlottables,true);

Set the elements to selectable.

This can be enabled in the setInteraction function.

customplot->graph()->setSelected(bool);

You can use setSelected to set whether an element can be selected.

customplot->deselectAll();

Deselect all selected items.
The attributes of the selected elements can be set as follows:

QCPGraph::setSelectedPen, QCPGraph::setSelectedBrush, QCPAxis::setSelectedLabelFont, QCPAxis::setSelectedBasePen, QCPItemText::setSelectedColor

QCPAxis is composed of scales, values, and labels. Each part can be selected separately:

customplot->xAxis->setSelectableParts();

The parameter can be

 QCPAxis::spNone, QCPAxis::spAxis, QCPAxis::spTickLabels, and QCPAxis::spAxisLabel

.

QCustomPlot supports low-level response signals, such:

QCustomPlot::mouseDoubleClick, mousePress, mouseMove, mouseRelease, and mouseWheel

And advanced, such:

QCustomPlot::plottableClick, plottableDoubleClick, itemClick, itemDoubleClick, axisClick, axisDoubleClick, legendClick, legendDoubleClick, titleClick, and titleDoubleClick

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.