39 m_PlottingMode(NoPlot),
42 m_ColorMap (m_SettingsSaver, this,
"colorMap", 0,
"Image Color Map Index"),
43 m_ScalingMode (m_SettingsSaver, this,
"scalingMode", 0,
"Image Scaling Mode"),
44 m_MinimumPct (m_SettingsSaver, this,
"minimumPct", 0,
"Image Display Minimum %"),
45 m_MaximumPct (m_SettingsSaver, this,
"maximumPct", 100,
"Image Display Maximum %"),
46 m_MinimumPctle (m_SettingsSaver, this,
"minimumPctle", 0,
"Image Display Minimum Percentile"),
47 m_MaximumPctle (m_SettingsSaver, this,
"maximumPctle", 99,
"Image Display Maximum Percentile"),
48 m_MinimumVal (m_SettingsSaver, this,
"minimumVal", 0,
"Image Display Minimum Value"),
49 m_MaximumVal (m_SettingsSaver, this,
"maximumVal", 10000,
"Image Display Maximum Value"),
50 m_HistFullVis (m_SettingsSaver, this,
"histFullVis", true,
"Full Image Histogram Visible?"),
51 m_HistAVis (m_SettingsSaver, this,
"histAVis", false,
"Histogram A Visible?"),
52 m_HistBVis (m_SettingsSaver, this,
"histBVis", false,
"Histogram B Visible?"),
53 m_HistCVis (m_SettingsSaver, this,
"histCVis", false,
"Histogram C Visible"),
54 m_HistALeft (m_SettingsSaver, this,
"histALeft", 10,
"Histogram A Left"),
55 m_HistATop (m_SettingsSaver, this,
"histATop", 10,
"Histogram A Top"),
56 m_HistARight (m_SettingsSaver, this,
"histARight", 20,
"Histogram A Right"),
57 m_HistABottom (m_SettingsSaver, this,
"histABottom", 20,
"Histogram A Bottom"),
58 m_HistBLeft (m_SettingsSaver, this,
"histBLeft", 30,
"Histogram B Left"),
59 m_HistBTop (m_SettingsSaver, this,
"histBTop", 30,
"Histogram B Top"),
60 m_HistBRight (m_SettingsSaver, this,
"histBRight", 40,
"Histogram B Right"),
61 m_HistBBottom (m_SettingsSaver, this,
"histBBottom", 40,
"Histogram B Bottom"),
62 m_HistCLeft (m_SettingsSaver, this,
"histCLeft", 50,
"Histogram B Left"),
63 m_HistCTop (m_SettingsSaver, this,
"histCTop", 50,
"Histogram B Top"),
64 m_HistCRight (m_SettingsSaver, this,
"histCRight", 60,
"Histogram B Right"),
65 m_HistCBottom (m_SettingsSaver, this,
"histCBottom", 60,
"Histogram B Bottom"),
66 m_SliceHStart (m_SettingsSaver, this,
"sliceHStart", 0,
"Horizontal Slice Start"),
67 m_SliceHSummed (m_SettingsSaver, this,
"sliceHSummed", 1,
"Horizontal Slice Summed"),
68 m_SliceHSkipped(m_SettingsSaver, this,
"sliceHSkipped", 0,
"Horizontal Slice Skipped"),
69 m_SliceHRepeats(m_SettingsSaver, this,
"sliceHRepeats", 100,
"Horizontal Slice Repeats"),
70 m_SliceVStart (m_SettingsSaver, this,
"sliceVStart", 0,
"Vertical Slice Start"),
71 m_SliceVSummed (m_SettingsSaver, this,
"sliceVSummed", 1,
"Vertical Slice Summed"),
72 m_SliceVSkipped(m_SettingsSaver, this,
"sliceVSkipped", 0,
"Vertical Slice Skipped"),
73 m_SliceVRepeats(m_SettingsSaver, this,
"sliceVRepeats", 100,
"Vertical Slice Repeats")
81 setWindowTitle(tr(
"%1 Graph from %2")
82 .arg(objp->pathName())
83 .arg(e->get_ExperimentName()));
85 setWindowTitle(tr(
"%1 Graph")
86 .arg(objp->pathName()));
88 setWindowTitle(
"Unknown Graph");
92 m_ImagePlot->init(settings);
94 m_PlotModeSelector->clear();
98 connect(m_PlotModeSelector, SIGNAL(currentIndexChanged(
int)),
101 connect(m_ImageZoomInButton, SIGNAL(clicked(
bool)), m_ImagePlot, SLOT(enableZooming()));
102 connect(m_ImageZoomOutButton, SIGNAL(clicked(
bool)), m_ImagePlot, SLOT(zoomOut()));
103 connect(m_ImageZoomAllButton, SIGNAL(clicked(
bool)), m_ImagePlot, SLOT(autoScale()));
104 connect(m_ImageMeasureButton, SIGNAL(clicked(
bool)), m_ImagePlot, SLOT(enableMeasuring()));
106 m_ImagePlot->enableZooming();
108 setAttribute(Qt::WA_DeleteOnClose,
true);
111 connect(objp.data(), SIGNAL(dataObjectChanged()),
this, SLOT(
updateDisplay()));
120 printf(
"Deleting Graph Window\n");
132 QSharedPointer<QcepImageDataBase> image = qSharedPointerDynamicCast<QcepImageDataBase>(
m_Object);
139 if (image || array) {
146 m_Controller = QSharedPointer<QcepImageDataGraphController>(
153 m_Controller = QSharedPointer<QcepImageHistogramGraphController>(
160 m_Controller = QSharedPointer<QcepImageSliceGraphController>(
167 }
else if (integ || col || scan || group) {
171 m_Controller = QSharedPointer<QcepScatterPlotGraphController> (
180 int idx = m_PlotModeSelector->findData(mode);
183 m_PlotModeSelector->setCurrentIndex(idx);
192 m_PlotModeSelector->addItem(
"2-D Image Plot",
ImagePlot);
196 m_PlotModeSelector->addItem(
"Scatter Plot",
ScatterPlot);
200 m_PlotModeSelector->addItem(
"Histogram of Image",
HistogramPlot);
208 m_PlotModeSelector->addItem(
"Vertical Slices",
VerticalSlice);
215 QString newName = m_PlotModeSelector->itemText(idx);
216 int newMode = m_PlotModeSelector->itemData(idx).toInt();
218 bool b = m_PlotModeSelector->blockSignals(
true);
220 if (QMessageBox::question(
this,
221 tr(
"Change Plotting Mode?"),
222 tr(
"Do you want to change the plotting mode to %1").arg(newName),
223 QMessageBox::Ok, QMessageBox::Cancel) == QMessageBox::Ok) {
225 m_PlotModeSelector->clear();
234 m_PlotModeSelector->setCurrentIndex(oldIdx);
238 m_PlotModeSelector->blockSignals(b);
257 return QMessageBox::question(
this, tr(
"Really Close?"),
258 tr(
"Do you really want to close the window %1 ?")
260 QMessageBox::Ok | QMessageBox::Cancel) == QMessageBox::Ok;
282 m_ImagePlot->detachItems(QwtPlotItem::Rtti_PlotCurve);
288 curve->attach(m_ImagePlot);
QSharedPointer< QcepDataArray > QcepDataArrayPtr
QSharedPointer< QcepDataGroup > QcepDataGroupPtr
void allowGraphMode(int mode)
QSharedPointer< QcepDataColumnScan > QcepDataColumnScanPtr
void changeGraphMode(int idx)
int controllerColumn() const
QSharedPointer< QcepDataColumn > QcepDataColumnPtr
void setGraphMode(int mode)
void closeEvent(QCloseEvent *event)
void appendCurve(QwtPlotCurve *curve)
QSharedPointer< QcepIntegratedData > QcepIntegratedDataPtr
QcepSettingsSaverPtr m_SettingsSaver
QWeakPointer< QcepExperiment > QcepExperimentWPtr
QcepDataObjectGraphWindow(QcepExperimentWPtr expt, QcepDataObjectWPtr obj, QWidget *parent=0)
QcepExperimentWPtr m_Experiment
QWeakPointer< QcepDataObject > QcepDataObjectWPtr
QSharedPointer< QcepPlotSettings > QcepPlotSettingsPtr
QcepExperimentWPtr experiment()
virtual ~QcepDataObjectGraphWindow()
QcepDataObjectGraphControllerPtr m_Controller
QSharedPointer< QcepDataObject > QcepDataObjectPtr
QcepDataObjectWPtr m_Object
int controllerRow() const
QSharedPointer< QcepExperiment > QcepExperimentPtr