canvaspicker.cpp
来自「This a framework to test new ideas in tr」· C++ 代码 · 共 30 行
CPP
30 行
#include <qevent.h>#include <qwhatsthis.h>#include <qpainter.h>#include <qwt_plot.h>#include <qwt_plot_canvas.h>#include "canvaspicker.h"CanvasPicker::CanvasPicker(QwtPlot *plot): QObject(plot), d_selectedCurve(-1), d_selectedPoint(-1){ QwtPlotCanvas *canvas = plot->canvas(); canvas->installEventFilter(this); // We want the focus, but no focus rect. The // selected point will be highlighted instead. canvas->setFocusPolicy(QWidget::StrongFocus); canvas->setFocusIndicator(QwtPlotCanvas::ItemFocusIndicator); canvas->setFocus(); canvas->setCursor(Qt::pointingHandCursor); QWhatsThis::add(canvas, "All points can be moved using the left mouse button " "or with these keys:\n\n" "- Up:\t\tSelect next curve\n" "- Down:\t\tSelect previous curve\n" "- Left,
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?