casa
5.7.0-16
|
Widget to collect plot parameters and plot on the canvas. More...
#include <TBPlotter.qo.h>
Public Member Functions | |
TBPlotter (TBBrowser *browser, PlotFactoryPtr factory) | |
Constructor that takes the parent browser. More... | |
~TBPlotter () | |
QProgressPanel * | addProgressPanel (casacore::String label, bool hideable, bool cancelable) |
Adds a QProgressPanel to the plotter with the given parameters and returns it. More... | |
void | removeProgressPanel (QProgressPanel *panel) |
Removes the given QProgressPanel from the plotter. More... | |
Protected Member Functions | |
void | closeEvent (QCloseEvent *event) |
Capture when the window closes. More... | |
Private Slots | |
void | tableChosen (QString name) |
Slot for when the user chooses a different table from the combobox. More... | |
void | xChosen (int x) |
Slot for when the user chooses a field for the x-axis. More... | |
void | yChosen (int y) |
Slot for when the user chooses a field for the y-axis. More... | |
void | chosen (bool x, int i) |
Slot for code common to xChosen and yChosen. More... | |
void | indexChosen (bool x) |
Slot for when [index] is chosen. More... | |
void | indexReleased (bool x, int i) |
Slot for when [index] is deselected. More... | |
void | plot () |
Slot for the "Clear and Plot" button. More... | |
void | overplot () |
Slot for the "Overplot" button. More... | |
void | openNewPlotter () |
Opens a new TBPlotter window. More... | |
void | tableOpened (casacore::String table, casacore::String fullpath) |
Slot for when a table is opened in the browser. More... | |
void | tableClosed (casacore::String table) |
Slot for when a table is closed in the browser. More... | |
void | clear () |
Slot for the "Clear" button. More... | |
void | allRows () |
Slot for the "All Rows" button. More... | |
void | setColor (QLineEdit *lineEdit) |
Slot to open a QColorDialog for the given line edit. More... | |
void | setLineColor () |
Convenience slot. More... | |
void | setSymbolColor () |
Convenience slot. More... | |
void | exportImage () |
Slot to export the current plot canvas to the image format specified by the QComboBox. More... | |
void | filterRuleEntered (int i) |
Slot for when the user enters a filter rule for the table at the given index. More... | |
void | filterRuleCleared (int i) |
Slot for when the user enters a filter rule for the table at the given index. More... | |
void | gridChanged () |
Slot for when the user changes the grid options. More... | |
void | regionSelected (bool selected) |
void | selectLocate () |
Slot for when the user clicks "locate". More... | |
void | clearSelection () |
Slot for when the user clears the currently selected region. More... | |
Private Member Functions | |
void | doPlot (bool overplot=true) |
Collects the parameters and plots as indicated. More... | |
void | enableRowIteration (bool visible) |
Show/Hide row iteration GUI when [index] is deselected/selected. More... | |
Private Attributes | |
TBBrowser * | browser |
Parent browser. More... | |
PlotFactoryPtr | factory |
Plotter factory. More... | |
std::map< casacore::String, std::vector< std::vector< int > * > > | dimensions |
For each table the plotter knows about, the dimensions of the fields are kept for fast access. More... | |
std::vector< int > | adjustedIndices |
Since only certain field types are plottable, adjustedIndices allows for translation between the index of the combobox (which contains only plottable fields) and the index in the table (which contains all fields). More... | |
PlotSlicer | xSlice |
PlotSlicer for the x-axis. More... | |
PlotSlicer | ySlice |
PlotSlicer for the y-axis. More... | |
std::vector< casacore::String > | types |
Types for the displayed plottable fields. More... | |
bool | xValid |
Is true if the current selection for the x-axis is valid, false otherwise. More... | |
bool | yValid |
Is true if the current selection for the x-axis is valid, false otherwise. More... | |
bool | update |
Flag to indicate whether GUI-generated events are "genuine.". More... | |
TBPlotCanvas * | plotCanvas |
Plot canvas. More... | |
QStandardItemModel * | xChooserModel |
Model for xChooser and yChooser to disable [index] selection. More... | |
QStandardItemModel * | yChooserModel |
bool | isIndexPlot |
Flag to indicate whether index based plot is selected or not. More... | |
Widget to collect plot parameters and plot on the canvas.
A TBPlotter consists of a TBPlotCanvas and other widgets to control plot parameters and other options. The TBPlotter has four sections in a vertical layout. The first section is the TBPlotCanvas. The second is the data parameters: which table and rows to use, which fields to plot, etc. The third is the graph format: scatter vs. line, point formatting, etc. The fourth are plotting tools such as saving as an image.
Definition at line 185 of file TBPlotter.qo.h.
casa::TBPlotter::TBPlotter | ( | TBBrowser * | browser, |
PlotFactoryPtr | factory | ||
) |
Constructor that takes the parent browser.
casa::TBPlotter::~TBPlotter | ( | ) |
QProgressPanel* casa::TBPlotter::addProgressPanel | ( | casacore::String | label, |
bool | hideable, | ||
bool | cancelable | ||
) |
Adds a QProgressPanel to the plotter with the given parameters and returns it.
|
privateslot |
Slot for the "All Rows" button.
Sets the row selection to be all the rows in the currently selected table.
|
privateslot |
Slot for code common to xChosen and yChosen.
|
privateslot |
Slot for the "Clear" button.
|
privateslot |
Slot for when the user clears the currently selected region.
|
protected |
Capture when the window closes.
If the parameters dock widget is floating, close it manually.
|
private |
Collects the parameters and plots as indicated.
|
private |
Show/Hide row iteration GUI when [index] is deselected/selected.
|
privateslot |
Slot to export the current plot canvas to the image format specified by the QComboBox.
|
privateslot |
Slot for when the user enters a filter rule for the table at the given index.
|
privateslot |
Slot for when the user enters a filter rule for the table at the given index.
|
privateslot |
Slot for when the user changes the grid options.
|
privateslot |
Slot for when [index] is chosen.
|
privateslot |
Slot for when [index] is deselected.
|
privateslot |
Opens a new TBPlotter window.
|
privateslot |
Slot for the "Overplot" button.
See doPlot(true);
|
privateslot |
Slot for the "Clear and Plot" button.
See doPlot(false);
|
privateslot |
void casa::TBPlotter::removeProgressPanel | ( | QProgressPanel * | panel | ) |
Removes the given QProgressPanel from the plotter.
|
privateslot |
Slot for when the user clicks "locate".
|
privateslot |
Slot to open a QColorDialog for the given line edit.
Referenced by setLineColor(), and setSymbolColor().
|
inlineprivateslot |
|
inlineprivateslot |
|
privateslot |
Slot for when the user chooses a different table from the combobox.
Updates the displayed options for the table.
|
privateslot |
Slot for when a table is closed in the browser.
Removes the table name from the list of opened tables.
|
privateslot |
Slot for when a table is opened in the browser.
Adds the table name to the list of opened tables.
|
privateslot |
Slot for when the user chooses a field for the x-axis.
|
privateslot |
Slot for when the user chooses a field for the y-axis.
|
private |
Since only certain field types are plottable, adjustedIndices allows for translation between the index of the combobox (which contains only plottable fields) and the index in the table (which contains all fields).
So, for example, adjustedIndices[plottableIndex] = tableIndex.
Definition at line 224 of file TBPlotter.qo.h.
|
private |
Parent browser.
Definition at line 210 of file TBPlotter.qo.h.
|
private |
For each table the plotter knows about, the dimensions of the fields are kept for fast access.
So, for example, the dimensions of a field can be found with dimensions[tableName][columnIndex].
Definition at line 218 of file TBPlotter.qo.h.
|
private |
Plotter factory.
Definition at line 213 of file TBPlotter.qo.h.
|
private |
Flag to indicate whether index based plot is selected or not.
Definition at line 258 of file TBPlotter.qo.h.
|
private |
Plot canvas.
Definition at line 247 of file TBPlotter.qo.h.
|
private |
Types for the displayed plottable fields.
Definition at line 233 of file TBPlotter.qo.h.
|
private |
Flag to indicate whether GUI-generated events are "genuine.".
Definition at line 244 of file TBPlotter.qo.h.
|
private |
Model for xChooser and yChooser to disable [index] selection.
Definition at line 254 of file TBPlotter.qo.h.
|
private |
PlotSlicer for the x-axis.
Definition at line 227 of file TBPlotter.qo.h.
|
private |
Is true if the current selection for the x-axis is valid, false otherwise.
If the axis is invalid, it cannot be used for plotting.
Definition at line 237 of file TBPlotter.qo.h.
|
private |
Definition at line 255 of file TBPlotter.qo.h.
|
private |
PlotSlicer for the y-axis.
Definition at line 230 of file TBPlotter.qo.h.
|
private |
Is true if the current selection for the x-axis is valid, false otherwise.
If the axis is invalid, it cannot be used for plotting.
Definition at line 241 of file TBPlotter.qo.h.