void CustomPlot::mouseMove(QMouseEvent *event)
{
if (tracer == 0 || textTip == 0) {
return;
}
//跟踪鼠标点击事件点击位置
QCPGraph *graph = (QCPGraph *)customPlot->plottableAt(event->pos(), true);
QRect rect(0, 0, 1, 1);
QString labx, laby;
int offset = 10;
bool toolTip = false;
if(graph != 0) {
double posKey;
double key = 0, value = 0;
QPoint p;
p.setX(event->pos().x());
p.setY(event->pos().y());
#ifdef old
foreach(QCPData data, graph->data()->values()) {
key = data.key;
value = data.value;
#else
for (int i = 0; i < graph->dataCount(); i++) {
key = graph->dataMainKey(i);
value = graph->dataMainValue(i);
#en