xxxx18一60岁hd中国/日韩女同互慰一区二区/西西人体扒开双腿无遮挡/日韩欧美黄色一级片 - 色护士精品影院www

資源簡(jiǎn)介

實(shí)現(xiàn)QtCharts曲線圖移動(dòng)和縮放(重新實(shí)現(xiàn)QChartView部分函數(shù)),主要功能如下: 1. 按住鼠標(biāo)左鍵拖動(dòng)曲線可移動(dòng)曲線; 2. 滾動(dòng)鼠標(biāo)滾輪實(shí)現(xiàn)圖形X軸方向的縮放; 3. 安裝Ctrl,滾動(dòng)鼠標(biāo)滾輪實(shí)現(xiàn)圖形Y軸方向的縮放; 4. 按鼠標(biāo)右鍵恢復(fù)圖形初始狀態(tài); 5. 縮放過(guò)程以鼠標(biāo)當(dāng)前位置為縮放中心; 6. 鼠標(biāo)移動(dòng)過(guò)程中會(huì)在左上角顯示當(dāng)前坐標(biāo)。

資源截圖

代碼片段和文件信息

#include?“ChartView.h“
#include?
#include?

ChartView::ChartView(QChart?*chart?QWidget?*parent)
????:?QChartView(chart?parent)
{
m_isPress?=?false;
m_ctrlPress?=?false;
m_alreadySaveRange?=?false;
m_coordItem?=?nullptr;

this->setDragMode(QGraphicsView::RubberBandDrag);
this->setMouseTracking(false);
setCursor(QCursor(Qt::PointingHandCursor));?//設(shè)置鼠標(biāo)指針為手指形
}

ChartView::~ChartView()
{
}

void?ChartView::mousePressEvent(QMouseEvent?*event)
{
if?(event->button()?==?Qt::LeftButton)
{
????????m_lastPoint?=?event->pos();
????????m_isPress?=?true;
}
}

void?ChartView::mouseMoveEvent(QMouseEvent?*event)
{
if?(!m_coordItem)
{
m_coordItem?=?new?QGraphicsSimpleTextItem(this->chart());
m_coordItem->setZValue(5);
m_coord

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2020-04-27?22:21??MyCharts\
?????文件????????3704??2020-04-27?22:06??MyCharts\ChartView.cpp
?????文件?????????782??2020-04-27?22:05??MyCharts\ChartView.h
?????文件?????????910??2020-04-27?22:07??MyCharts\main.cpp
?????文件????????1005??2020-04-27?21:56??MyCharts\MyCharts.pro

評(píng)論

共有 條評(píng)論