30 #include <casaqt/QtBrowser/TBPlotter.ui.h>
36 #include <QStandardItemModel>
152 void getDimension(std::vector<int>& d,
bool& complex,
bool& amp,
int& axis);
185 class TBPlotter :
public QMainWindow,
public Ui::Plotter {
218 std::map<casacore::String, std::vector<std::vector<int>*> >
dimensions;
233 std::vector<casacore::String>
types;
275 void chosen(
bool x,
int i);
void setSymbolColor()
Convenience slot.
void gridChanged()
Slot for when the user changes the grid options.
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...
void overplot()
Slot for the "Overplot" button.
void chosen(bool x, int i)
Slot for code common to xChosen and yChosen.
bool update
Flag to indicate whether GUI-generated events are "genuine.".
void enableRowIteration(bool visible)
Show/Hide row iteration GUI when [index] is deselected/selected.
void regionSelected(bool selected)
Widget to collect plot parameters and plot on the canvas.
void setColor(QLineEdit *lineEdit)
Slot to open a QColorDialog for the given line edit.
casacore::Data for plotting.
void xChosen(int x)
Slot for when the user chooses a field for the x-axis.
Canvas for data plotting using a given plotting implementation.
void filterRuleEntered(int i)
Slot for when the user enters a filter rule for the table at the given index.
bool yValid
Is true if the current selection for the x-axis is valid, false otherwise.
void closeEvent(QCloseEvent *event)
Capture when the window closes.
void clearSelection()
Slot for when the user clears the currently selected region.
Browser widget for managing opened tables.
void tableOpened(casacore::String table, casacore::String fullpath)
Slot for when a table is opened in the browser.
void allRows()
Slot for the "All Rows" button.
std::vector< casacore::String > types
Types for the displayed plottable fields.
ABSTRACT CLASSES Abstract class for colors Any implementation of color should be able to provide a hexadecimal form of the if a human readable name(i.e."black").In many places throughout the plotter
QStandardItemModel * xChooserModel
Model for xChooser and yChooser to disable [index] selection.
casacore::String title
Title for the plot; usually xAxisName vs.
QProgressPanel * addProgressPanel(casacore::String label, bool hideable, bool cancelable)
Adds a QProgressPanel to the plotter with the given parameters and returns it.
TBPlotData(PlotPointDataPtr d)
Constructor which takes the number of points and the two arrays.
bool complex
Indicates whether this field is complex or not.
void axisChosen(int axis)
Small widget to provide a variable number of spinners to create a slice.
bool complex
Whether the current slice is for a complex or not.
PlotFactoryPtr factory
Plotter factory.
bool xValid
Is true if the current selection for the x-axis is valid, false otherwise.
void filterRuleCleared(int i)
Slot for when the user enters a filter rule for the table at the given index.
TBTableTabs * table
casacore::Table this data is from.
TBBrowser * browser
Parent browser.
TBPlotCanvas * plotCanvas
Plot canvas.
PlotPointDataPtr data
Actual data.
bool complexAmp
If the field is complex, indicates whether the amplitude (true) or the phase (false) is used...
void indexChosen(bool x)
Slot for when [index] is chosen.
LatticeExprNode amp(const LatticeExprNode &left, const LatticeExprNode &right)
This function finds sqrt(left^2+right^2).
void tableClosed(casacore::String table)
Slot for when a table is closed in the browser.
TBPlotter(TBBrowser *browser, PlotFactoryPtr factory)
Constructor that takes the parent browser.
unsigned int colIndex
Indicates which field index is to be used.
void openNewPlotter()
Opens a new TBPlotter window.
std::vector< int > slice
If the field is an array, indicates the array slice to be used.
TBPlotData()
Default Constructor.
void tableChosen(QString name)
Slot for when the user chooses a different table from the combobox.
void yChosen(int y)
Slot for when the user chooses a field for the y-axis.
bool rowNumbers
Indicates whether this plot axis is only the row numbers (true) or an actual field (false)...
void clear()
Slot for the "Clear" button.
QSpinBox * plotAxisChooser
Spinbox and Label to choose axis.
bool setDimension(std::vector< int > *d, bool complex=false)
Sets the dimensions of the slicer to the given vector.
Convenience class with a label and progress meter.
void selectLocate()
Slot for when the user clicks "locate".
QComboBox * complexChooser
casacore::Complex chooser.
Collection of table backend and display tabs.
void removeProgressPanel(QProgressPanel *panel)
Removes the given QProgressPanel from the plotter.
std::vector< int > rows
Row numbers that correspond to the given data.
std::vector< QSpinBox * > spinners
All current spinners.
std::vector< int > adjustedIndices
Since only certain field types are plottable, adjustedIndices allows for translation between the inde...
void getDimension(std::vector< int > &d, bool &complex, bool &)
Retrieves the array slice into the given vector.
String: the storage and methods of handling collections of characters.
void doPlot(bool overplot=true)
Collects the parameters and plots as indicated.
void indexReleased(bool x, int i)
Slot for when [index] is deselected.
PlotSlicer xSlice
PlotSlicer for the x-axis.
Parameters for a single field for collecting plotting data.
QStandardItemModel * yChooserModel
void setLineColor()
Convenience slot.
PlotSlicer ySlice
PlotSlicer for the y-axis.
PlotSlicer()
Default Constructor.
void plot()
Slot for the "Clear and Plot" button.
void exportImage()
Slot to export the current plot canvas to the image format specified by the QComboBox.
PlotParams()
Default Constructor.
bool isIndexPlot
Flag to indicate whether index based plot is selected or not.