资源简介
QT利用realtimechart画波形图,可以移动、放大、缩小、保存波形等操作。
代码片段和文件信息
///////////////////////////////////////////////////////////////////////////////////////////////////
// Copyright 2018 Advanced Software Engineering Limited
//
// You may use and modify the code in this file in your application provided the code and
// its modifications are used only in conjunction with ChartDirector. Usage of this software
// is subjected to the terms and condition of the ChartDirector license.
///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
// CChartViewer / CViewPortControl Implementation
//
// The CChartViewer is a subclass of CStatic for displaying chart images. It extends CStatic
// to support to support alpha transparency image maps clickable hot spots with tool tips
// zooming and scrolling and image update rate control. The CViewPortControl is a subclass of
// CStatic for visualizing and supporting interactive control of the CChartViewer viewport.
//
// To use these controls in a dialog in the Dialog Editor drag a Picture control (CStatic
// control) to the form configure its type as “Bitmap“ and give it a unique ID. Then right
// click on the control and add a variable to represent the control using CChartViewer or
// CViewPortControl as the variable type.
///////////////////////////////////////////////////////////////////////////////////////////////////
#include “stdafx.h“
#include “ChartViewer.h“
#include
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
/////////////////////////////////////////////////////////////////////////////
//
// CChartViewer
//
/////////////////////////////////////////////////////////////////////////////
//
// Build in mouse cursors for zooming and scrolling support
//
static HCURSOR getZoomInCursor();
static HCURSOR getZoomOutCursor();
static HCURSOR getNoZoomCursor();
static HCURSOR getNoMove2DCursor();
static HCURSOR getNoMoveHorizCursor();
static HCURSOR getNoMoveVertCursor();
//
// Internal constants
//
enum { NO_DELAY NEED_DELAY NEED_UPDATE };
enum { UPDATE_VIEW_PORT_TIMER = 1 DELAYED_MOUSE_MOVE_TIMER = 2 };
enum { UNDEFINED_COOR = -0x3fffffff };
//
// Constructor
//
CChartViewer::CChartViewer()
{
// current chart and hot spot tester
m_currentChart = 0;
m_hotSpotTester = 0;
// create the tool tip control
m_ToolTip.Create(this);
m_ToolTip.Activate(TRUE);
m_ToolTip.Modifystyle(0 TTS_NOPREFIX);
m_toolTipHasAttached = false;
// initialize chart configuration
m_selectBoxLineColor = RGB(0 0 0);
m_selectBoxLineWidth = 2;
m_mouseUsage = Chart::MouseUsageDefault;
m_zoomDirection = Chart::DirectionHorizontal;
m_zoomInRatio = 2;
m_zoomOutRatio = 0.5;
m_mouseWheelZoomRatio = 1;
m_scrollDirection = Chart::DirectionHorizontal;
m_minDragAmount = 5;
m_updateInterval = 20;
// current state of the mouse
m_isOnPlotArea = fal
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-11-28 03:03 extra_sample_pack_cpp\
目录 0 2018-11-28 03:03 extra_sample_pack_cpp\include\
文件 114261 2018-10-23 15:26 extra_sample_pack_cpp\include\bchartdir.h
文件 167153 2018-07-27 22:49 extra_sample_pack_cpp\include\chartdir.h
文件 104070 2015-05-06 13:25 extra_sample_pack_cpp\include\FinanceChart.h
文件 1399 2013-03-07 04:23 extra_sample_pack_cpp\include\memblock.h
目录 0 2018-11-28 03:03 extra_sample_pack_cpp\lib32\
文件 2768896 2018-11-07 00:58 extra_sample_pack_cpp\lib32\chartdir60.dll
文件 221392 2018-11-07 00:58 extra_sample_pack_cpp\lib32\chartdir60.lib
目录 0 2018-11-28 03:03 extra_sample_pack_cpp\lib64\
文件 4151296 2018-11-07 00:59 extra_sample_pack_cpp\lib64\chartdir60.dll
文件 216846 2018-11-07 00:59 extra_sample_pack_cpp\lib64\chartdir60.lib
文件 3523 2016-12-02 17:08 extra_sample_pack_cpp\LICENSE.TXT
目录 0 2018-12-01 01:52 extra_sample_pack_cpp\mfcdemo\
文件 4503 2018-11-28 03:03 extra_sample_pack_cpp\mfcdemo\extrasamplepackcpp.sln
目录 0 2018-12-01 01:52 extra_sample_pack_cpp\mfcdemo\realtimemeasure\
文件 48806 2018-11-30 23:49 extra_sample_pack_cpp\mfcdemo\realtimemeasure\ChartViewer.cpp
文件 14646 2018-10-13 05:20 extra_sample_pack_cpp\mfcdemo\realtimemeasure\ChartViewer.h
文件 1916 2018-05-14 01:54 extra_sample_pack_cpp\mfcdemo\realtimemeasure\realtimemeasure.cpp
文件 558 2018-05-14 01:54 extra_sample_pack_cpp\mfcdemo\realtimemeasure\realtimemeasure.h
文件 5254 2018-05-19 00:06 extra_sample_pack_cpp\mfcdemo\realtimemeasure\realtimemeasure.rc
文件 13520 2018-05-18 23:25 extra_sample_pack_cpp\mfcdemo\realtimemeasure\realtimemeasure.vcxproj
文件 828 2017-09-04 10:20 extra_sample_pack_cpp\mfcdemo\realtimemeasure\realtimemeasure.vcxproj.filters
文件 28003 2018-05-19 21:11 extra_sample_pack_cpp\mfcdemo\realtimemeasure\realtimemeasureDlg.cpp
文件 3092 2018-05-19 20:30 extra_sample_pack_cpp\mfcdemo\realtimemeasure\realtimemeasureDlg.h
目录 0 2018-11-28 03:03 extra_sample_pack_cpp\mfcdemo\realtimemeasure\res\
文件 1048 2018-05-14 01:51 extra_sample_pack_cpp\mfcdemo\realtimemeasure\Resource.h
文件 3406 2015-03-07 14:12 extra_sample_pack_cpp\mfcdemo\realtimemeasure\res\pointerPB.ico
文件 21630 2005-08-12 16:37 extra_sample_pack_cpp\mfcdemo\realtimemeasure\res\realtimemeasure.ico
文件 406 2018-05-14 01:46 extra_sample_pack_cpp\mfcdemo\realtimemeasure\res\realtimemeasure.rc2
文件 1486 2015-03-07 14:12 extra_sample_pack_cpp\mfcdemo\realtimemeasure\res\savePB.ico
............此处省略142个文件信息
- 上一篇:STM32F103C8T6与MQTT通信的源码
- 下一篇:基于STM32篮球比赛计分
相关资源
- STM32F103C8T6与MQTT通信的源码
-
Music_Pla
yer.zip - ESP8266使用MQTT协议连接阿里云
- 基于OpenCV3.0的手势识别.rar
- ESP8266程序加上MQTT调试工具
- QGraphicsView框架实现画板
- just_painter3.rar
- QT实现音频实时传输
- Firmware_F103 V1.3.rar
- qt-unified-windows-x86-3.0.6-online
- Visual Studio Community 2017
- 基于QTsocket的局域网聊天室
- STM32(TCP转MQTT).rar
- 天天爱消除
- Qt5的多线程小程序,实现按钮开关线
- DHT11温湿度传感器项目代码.rar
- 三维场景漫游.zip
- 巴斯勒相机开发程序
- OpenCV中对图片进行灰度处理
- 自定义QFileDialog
- QT实现扫雷源码
- Qt甘特图源码
- 张正友相机标定自己编写calibratie函数
- 快递单邮政编码识别系统的实现
- Ubuntu16.04中配置Qt5.9.1和OpenCV3.4.0过程
- OPC+UA+SDK
- 西门子开发的OPC UA客户端和源码
- 数据结构课程设计——哈夫曼编/译码
- 适用于VC的FFMpeg静态库已编译)
- QT之模仿手机主界面左右滑动翻页,带
评论
共有 条评论