casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Protected Member Functions | Private Slots | Private Member Functions | Private Attributes
casa::TBPlotter Class Reference

Widget to collect plot parameters and plot on the canvas. More...

#include <TBPlotter.qo.h>

List of all members.

Public Member Functions

 TBPlotter (TBBrowser *browser, PlotFactoryPtr factory)
 Constructor that takes the parent browser.
 ~TBPlotter ()
QProgressPaneladdProgressPanel (String label, bool hideable, bool cancelable)
 Adds a QProgressPanel to the plotter with the given parameters and returns it.
void removeProgressPanel (QProgressPanel *panel)
 Removes the given QProgressPanel from the plotter.

Protected Member Functions

void closeEvent (QCloseEvent *event)
 Capture when the window closes.

Private Slots

void tableChosen (QString name)
 Slot for when the user chooses a different table from the combobox.
void xChosen (int x)
 Slot for when the user chooses a field for the x-axis.
void yChosen (int y)
 Slot for when the user chooses a field for the y-axis.
void chosen (bool x, int i)
 Slot for code common to xChosen and yChosen.
void indexChosen (bool x)
 Slot for when [index] is chosen.
void indexReleased (bool x, int i)
 Slot for when [index] is deselected.
void plot ()
 Slot for the "Clear and Plot" button.
void overplot ()
 Slot for the "Overplot" button.
void openNewPlotter ()
 Opens a new TBPlotter window.
void tableOpened (String table, String fullpath)
 Slot for when a table is opened in the browser.
void tableClosed (String table)
 Slot for when a table is closed in the browser.
void clear ()
 Slot for the "Clear" button.
void allRows ()
 Slot for the "All Rows" button.
void setColor (QLineEdit *lineEdit)
 Slot to open a QColorDialog for the given line edit.
void setLineColor ()
 Convenience slot.
void setSymbolColor ()
 Convenience slot.
void exportImage ()
 Slot to export the current plot canvas to the image format specified by the QComboBox.
void filterRuleEntered (int i)
 Slot for when the user enters a filter rule for the table at the given index.
void filterRuleCleared (int i)
 Slot for when the user enters a filter rule for the table at the given index.
void gridChanged ()
 Slot for when the user changes the grid options.
void regionSelected (bool selected)
void selectLocate ()
 Slot for when the user clicks "locate".
void clearSelection ()
 Slot for when the user clears the currently selected region.

Private Member Functions

void doPlot (bool overplot=true)
 Collects the parameters and plots as indicated.
void enableRowIteration (bool visible)
 Show/Hide row iteration GUI when [index] is deselected/selected.

Private Attributes

TBBrowserbrowser
 Parent browser.
PlotFactoryPtr factory
 Plotter factory.
map< String, vector< vector
< int > * > > 
dimensions
 For each table the plotter knows about, the dimensions of the fields are kept for fast access.
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).
PlotSlicer xSlice
 PlotSlicer for the x-axis.
PlotSlicer ySlice
 PlotSlicer for the y-axis.
vector< Stringtypes
 Types for the displayed plottable fields.
bool xValid
 Is true if the current selection for the x-axis is valid, false otherwise.
bool yValid
 Is true if the current selection for the x-axis is valid, false otherwise.
bool update
 Flag to indicate whether GUI-generated events are "genuine.".
TBPlotCanvasplotCanvas
 Plot canvas.
QStandardItemModel * xChooserModel
 Model for xChooser and yChooser to disable [index] selection.
QStandardItemModel * yChooserModel
bool isIndexPlot
 Flag to indicate whether index based plot is selected or not.

Detailed Description

Widget to collect plot parameters and plot on the canvas.

Synopsis

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 188 of file TBPlotter.qo.h.


Constructor & Destructor Documentation

casa::TBPlotter::TBPlotter ( TBBrowser browser,
PlotFactoryPtr  factory 
)

Constructor that takes the parent browser.


Member Function Documentation

QProgressPanel* casa::TBPlotter::addProgressPanel ( String  label,
bool  hideable,
bool  cancelable 
)

Adds a QProgressPanel to the plotter with the given parameters and returns it.

void casa::TBPlotter::allRows ( ) [private, slot]

Slot for the "All Rows" button.

Sets the row selection to be all the rows in the currently selected table.

void casa::TBPlotter::chosen ( bool  x,
int  i 
) [private, slot]

Slot for code common to xChosen and yChosen.

void casa::TBPlotter::clear ( ) [private, slot]

Slot for the "Clear" button.

See TBPlotCanvas::clearAndHideAxes().

void casa::TBPlotter::clearSelection ( ) [private, slot]

Slot for when the user clears the currently selected region.

void casa::TBPlotter::closeEvent ( QCloseEvent *  event) [protected]

Capture when the window closes.

If the parameters dock widget is floating, close it manually.

void casa::TBPlotter::doPlot ( bool  overplot = true) [private]

Collects the parameters and plots as indicated.

void casa::TBPlotter::enableRowIteration ( bool  visible) [private]

Show/Hide row iteration GUI when [index] is deselected/selected.

void casa::TBPlotter::exportImage ( ) [private, slot]

Slot to export the current plot canvas to the image format specified by the QComboBox.

void casa::TBPlotter::filterRuleCleared ( int  i) [private, slot]

Slot for when the user enters a filter rule for the table at the given index.

void casa::TBPlotter::filterRuleEntered ( int  i) [private, slot]

Slot for when the user enters a filter rule for the table at the given index.

void casa::TBPlotter::gridChanged ( ) [private, slot]

Slot for when the user changes the grid options.

void casa::TBPlotter::indexChosen ( bool  x) [private, slot]

Slot for when [index] is chosen.

void casa::TBPlotter::indexReleased ( bool  x,
int  i 
) [private, slot]

Slot for when [index] is deselected.

void casa::TBPlotter::openNewPlotter ( ) [private, slot]

Opens a new TBPlotter window.

void casa::TBPlotter::overplot ( ) [private, slot]

Slot for the "Overplot" button.

See doPlot(true);

void casa::TBPlotter::plot ( ) [private, slot]

Slot for the "Clear and Plot" button.

See doPlot(false);

void casa::TBPlotter::regionSelected ( bool  selected) [private, slot]

Removes the given QProgressPanel from the plotter.

void casa::TBPlotter::selectLocate ( ) [private, slot]

Slot for when the user clicks "locate".

void casa::TBPlotter::setColor ( QLineEdit *  lineEdit) [private, slot]

Slot to open a QColorDialog for the given line edit.

void casa::TBPlotter::setLineColor ( ) [inline, private, slot]

Convenience slot.

Definition at line 314 of file TBPlotter.qo.h.

void casa::TBPlotter::setSymbolColor ( ) [inline, private, slot]

Convenience slot.

Definition at line 317 of file TBPlotter.qo.h.

void casa::TBPlotter::tableChosen ( QString  name) [private, slot]

Slot for when the user chooses a different table from the combobox.

Updates the displayed options for the table.

void casa::TBPlotter::tableClosed ( String  table) [private, slot]

Slot for when a table is closed in the browser.

Removes the table name from the list of opened tables.

void casa::TBPlotter::tableOpened ( String  table,
String  fullpath 
) [private, slot]

Slot for when a table is opened in the browser.

Adds the table name to the list of opened tables.

void casa::TBPlotter::xChosen ( int  x) [private, slot]

Slot for when the user chooses a field for the x-axis.

void casa::TBPlotter::yChosen ( int  y) [private, slot]

Slot for when the user chooses a field for the y-axis.


Member Data Documentation

vector<int> casa::TBPlotter::adjustedIndices [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 227 of file TBPlotter.qo.h.

Parent browser.

Definition at line 213 of file TBPlotter.qo.h.

map<String, vector<vector<int>*> > casa::TBPlotter::dimensions [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 221 of file TBPlotter.qo.h.

Plotter factory.

Definition at line 216 of file TBPlotter.qo.h.

Flag to indicate whether index based plot is selected or not.

Definition at line 261 of file TBPlotter.qo.h.

Plot canvas.

Definition at line 250 of file TBPlotter.qo.h.

vector<String> casa::TBPlotter::types [private]

Types for the displayed plottable fields.

Definition at line 236 of file TBPlotter.qo.h.

bool casa::TBPlotter::update [private]

Flag to indicate whether GUI-generated events are "genuine.".

Definition at line 247 of file TBPlotter.qo.h.

QStandardItemModel* casa::TBPlotter::xChooserModel [private]

Model for xChooser and yChooser to disable [index] selection.

Definition at line 257 of file TBPlotter.qo.h.

PlotSlicer for the x-axis.

Definition at line 230 of file TBPlotter.qo.h.

bool casa::TBPlotter::xValid [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 240 of file TBPlotter.qo.h.

QStandardItemModel* casa::TBPlotter::yChooserModel [private]

Definition at line 258 of file TBPlotter.qo.h.

PlotSlicer for the y-axis.

Definition at line 233 of file TBPlotter.qo.h.

bool casa::TBPlotter::yValid [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 244 of file TBPlotter.qo.h.


The documentation for this class was generated from the following file: