3 #include <QContextMenuEvent>
20 QwtScaleMap xMap = canvasMap(QwtPlot::xBottom);
21 QwtScaleMap yMap = canvasMap(QwtPlot::yLeft);
23 QWidget *canv = canvas();
25 QPoint evlocal = canv->mapFromParent(event->pos());
27 double x = xMap.invTransform(evlocal.x());
28 double y = yMap.invTransform(evlocal.y());
32 QAction *auSc = plotMenu.addAction(
"Autoscale");
33 QAction *prGr = plotMenu.addAction(
"Print Graph...");
35 QAction *lgSc = plotMenu.addAction(
"Log Intensity Scale?");
36 lgSc->setCheckable(
true);
37 lgSc->setChecked(set->get_DisplayLog());
39 QAction *shMk = plotMenu.addAction(
"Show Mask?");
40 shMk->setCheckable(
true);
41 shMk->setChecked(set->get_MaskShown());
43 QAction *shRoi = plotMenu.addAction(
"Show ROI Outlines?");
44 shRoi->setCheckable(
true);
45 shRoi->setChecked(set->get_DisplayROI());
46 QAction *mvRoi = plotMenu.addAction(tr(
"Move selected ROI centers to (%1,%2)").arg(x).arg(y));
47 plotMenu.addSeparator();
49 QAction *zap = plotMenu.addAction(tr(
"Zap (replace with avg of neighboring values) pixel [%1,%2]").arg((
int)x).arg(
int(y)));
51 QAction *action = plotMenu.exec(event->globalPos());
55 }
else if (action == prGr) {
57 }
else if (action == lgSc) {
59 }
else if (action == shMk) {
61 }
else if (action == shRoi) {
63 }
else if (action == mvRoi) {
65 }
else if (action == zap) {
void moveSelectedROICenter(double x, double y)
QWeakPointer< QxrdImagePlotSettings > QxrdImagePlotSettingsWPtr
QxrdImagePlotSettingsWPtr m_ImagePlotSettings
void zapPixel(int x, int y)
void init(QxrdImagePlotSettingsWPtr settings)
void init(QxrdImagePlotSettingsWPtr settings)
QxrdDetectorImagePlot(QWidget *parent=0)
QSharedPointer< QxrdImagePlotSettings > QxrdImagePlotSettingsPtr
void contextMenuEvent(QContextMenuEvent *event)