|
DDASToys for NSCLDAQ
6.2-000
|
A ROOT canvas embedded in a Qt application. More...


Public Member Functions | |
| QRootCanvas (FitManager *pFitMgr, QWidget *parent=nullptr) | |
| Constructor. More... | |
| virtual | ~QRootCanvas () |
| Destructor. | |
| TCanvas * | getCanvas () |
| Return a pointer to the ROOT canvas. More... | |
| void | drawHit (const ddastoys::DDASFitHit &hit) |
| Draw hit data on the canvas. More... | |
| void | clear () |
| Clear and update the ROOT canvas. | |
Protected Member Functions | |
| virtual void | mouseMoveEvent (QMouseEvent *e) |
| Handle Qt mouse move events on the ROOT canvas. More... | |
| virtual void | mousePressEvent (QMouseEvent *e) |
| Handle Qt mouse press events on the ROOT canvas. More... | |
| virtual void | mouseReleaseEvent (QMouseEvent *e) |
| Handle Qt mouse release events on the ROOT canvas. More... | |
| virtual void | paintEvent (QPaintEvent *) |
| Handle resize events in ROOT. | |
| virtual void | resizeEvent (QResizeEvent *) |
| Handle paint events in ROOT. | |
A ROOT canvas embedded in a Qt application.
Embedded ROOT canvas in a Qt application. Overrides Qt event handling for resize and paint events (e.g. re-draw after the canvas is hidden behind another window) as well as mouse events. This allows us to manipulate the ROOT canvas as expected: zooming on axes, right click actions, etc. Drawing on the canvas is bog-standard ROOT.
| QRootCanvas::QRootCanvas | ( | FitManager * | pFitMgr, |
| QWidget * | parent = nullptr |
||
| ) |
Constructor.
| pFitMgr | Pointer to a FitManager for plotting fit data. The FitManager object is handled by the caller. |
| parent | Pointer to QWidget parent object (optional, default=nullptr). |
Construct a QWidget and register it with the ROOT graphics backend. The canvas does not own the FitManager object.
| void QRootCanvas::drawHit | ( | const ddastoys::DDASFitHit & | hit | ) |
Draw hit data on the canvas.
| hit | References the hit we're plotting data from |
|
inline |
Return a pointer to the ROOT canvas.
|
protectedvirtual |
Handle Qt mouse move events on the ROOT canvas.
| e | Pointer to the QMouseEvent to handle |
|
protectedvirtual |
Handle Qt mouse press events on the ROOT canvas.
| e | Pointer to the QMouseEvent to handle |
|
protectedvirtual |
Handle Qt mouse release events on the ROOT canvas.
| e | Pointer to the QMouseEvent to handle |