casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Slots | Public Member Functions | Protected Member Functions | Private Slots | Private Member Functions | Private Attributes | Friends | List of all members
casa::PlotMSPlotTab Class Reference

Subclass of PlotMSTab that manages PlotMSPlots in the GUI. More...

#include <PlotMSPlotTab.qo.h>

Inheritance diagram for casa::PlotMSPlotTab:
casa::PlotMSTab casa::PlotMSParametersWatcher

Public Slots

bool plot (bool forceReload)
 Slot for doing the plot, using the parameters set on the GUI for the current plot. More...
 

Public Member Functions

 PlotMSPlotTab (PlotMSPlotter *parent, int plotIndex=-1)
 Constructor which takes the parent plotter. More...
 
 ~PlotMSPlotTab ()
 Destructor. More...
 
QString tabName () const
 Implements PlotMSTab::tabName(). More...
 
QList< QToolButton * > toolButtons () const
 Overrides PlotMSTab::toolButtons(). More...
 
void parametersHaveChanged (const PlotMSWatchedParameters &params, int updateFlag)
 Implements PlotMSParametersWatcher::parametersHaveChanged(). More...
 
void plotsChanged (const PlotMSPlotManager &manager, int index=-1, bool show=true)
 Implements PlotMSPlotManagerWatcher::plotsChanged(). More...
 
PlotMSDataTabgetData ()
 Return the data to support overplots. More...
 
casacore::String getFileName () const
 
casacore::String getAveragingSummary () const
 
PlotMSPlotcurrentPlot () const
 Returns the currently selected plot. More...
 
PlotMSPlotParameters currentlySetParameters () const
 Returns the parameters currently set by the user on the GUI (but NOT necessarily set on the underlying plot parameters). More...
 
std::vector< PMS::Axis > selectedLoadAxes () const
 Returns the axes that the user has selected to load into the cache. More...
 
std::vector< PMS::Axis > selectedReleaseAxes () const
 Returns the axes that the user has selected to release from the cache. More...
 
bool setGridSize (int rowCount, int colCount)
 Returns true if the location of this plot is still valid after the grid size has changed; false otherwise. More...
 
void getLocation (int &rowIndex, int &colIndex)
 Return the location on the grid for this plot. More...
 
void removePlot ()
 Remove this plot. More...
 
bool isPlottable () const
 Returns whether this plot has a valid location on the page where it can be displayed. More...
 
void completePlotting (bool success)
 This was put in to support overplotting. More...
 
void clearData ()
 Remove old data from the plot. More...
 
bool managesPlot (PlotMSPlot *plot) const
 
- Public Member Functions inherited from casa::PlotMSTab
 PlotMSTab (PlotMSPlotter *parent)
 Non-Static //. More...
 
virtual ~PlotMSTab ()
 Destructor. More...
 
virtual void setupForMaxWidth (int maxWidth)
 Sets up the tab for the given maximum width. More...
 
- Public Member Functions inherited from casa::PlotMSParametersWatcher
 PlotMSParametersWatcher ()
 Constructor. More...
 
virtual ~PlotMSParametersWatcher ()
 Destructor. More...
 

Protected Member Functions

void clearSubtabs ()
 Clears set subtabs. More...
 
void clearAfter (int index)
 Clears set subtabs after (and including) the given index. More...
 
void addSubtab (PlotMSPlotSubtab *tab)
 Adds the given subtab to the end of the tab widget. More...
 
void insertSubtab (int index, PlotMSPlotSubtab *tab)
 Inserts the given subtab in the tab widget. More...
 
PlotMSAxesTabaddAxesSubtab ()
 Inserts one of the known subtab types if it is not already present, and returns a pointer to it. More...
 
PlotMSAxesTabinsertAxesSubtab (int index)
 
void insertAxes (int index)
 
PlotMSCacheTabaddCacheSubtab ()
 
PlotMSCacheTabinsertCacheSubtab (int index)
 
void insertCache (int index)
 
PlotMSCalibrationTabaddCalibrationSubtab ()
 
PlotMSCalibrationTabinsertCalibrationSubtab (int index)
 
void insertCalibration (int index)
 
PlotMSCanvasTabaddCanvasSubtab ()
 
PlotMSCanvasTabinsertCanvasSubtab (int index)
 
void insertCanvas (int index)
 
PlotMSDataTabaddDataSubtab ()
 
PlotMSDataTabinsertDataSubtab (int index)
 
void insertData (int index)
 
PlotMSDisplayTabaddDisplaySubtab ()
 
PlotMSDisplayTabinsertDisplaySubtab (int index)
 
void insertDisplay (int index)
 
PlotMSIterateTabaddIterateSubtab ()
 
PlotMSIterateTabinsertIterateSubtab (int index)
 
void insertIterate (int index)
 
PlotMSTransformationsTabaddTransformationsSubtab ()
 
PlotMSTransformationsTabinsertTransformationsSubtab (int index)
 
void insertTransformations (int index)
 
template<class T >
T * subtab ()
 Returns the first subtab with the given type, or NULL if there are none of that type. More...
 
- Protected Member Functions inherited from casa::PlotMSTab
void highlightWidgetText (QLabel *label, bool highlight)
 These alter the displayed text of Some widget types have a.title not a.text, and there's no Qt4 abstract class that encompasses all types that do have.text, so we overload highlightWidgetText for several classes. More...
 
void highlightWidgetText (QGroupBox *box, bool highlight)
 
void highlightWidgetText (QAbstractButton *but, bool highlight)
 

Private Slots

void tabChanged ()
 Slot for when the user changes the value for any parameters. More...
 
void changeAxisIdentifier (int index, QString id)
 A y-axis has changed its internal data. More...
 
void removeAxisIdentifier (int index)
 y-axis data has been removed. More...
 

Private Member Functions

PlotMSDataTabfindOrCreateDataTab ()
 
PlotMSIterateTabfindIterateTab () const
 
PlotMSDisplayTabfindDisplayTab ()
 
PlotMSAxesTabfindAxesTab ()
 
void setupForPlot ()
 Sets up the GUI to display the parameters for the given plot. More...
 
std::vector< PMS::Axis > selectedLoadOrReleaseAxes (bool load) const
 Returns the axes the user has selected to load or release, depending on the load flag. More...
 

Private Attributes

QList< PlotMSPlotSubtab * > itsSubtabs_
 PlotMSPlotSubtab objects in tab widget. More...
 
PlotMSPlotManageritsPlotManager_
 Reference to plot manager. More...
 
PlotMSPlotitsCurrentPlot_
 Currently selected plot. More...
 
PlotMSPlotParametersitsCurrentParameters_
 Parameters for the currently selected plot. More...
 
bool itsUpdateFlag_
 Whether or not to check for changed parameters and update the GUI accordingly. More...
 
bool closing
 
int plotIndex
 
int forceReloadCounter_
 

Friends

class PlotMSPlot
 
class PlotMSPlotter
 

Additional Inherited Members

- Static Public Member Functions inherited from casa::PlotMSTab
static bool setChooser (QComboBox *chooser, const QString &value)
 Static //. More...
 
static bool setChooser (QComboBox *chooser, const casacore::String &value)
 
static bool setChooser (QComboBox *chooser, const char *value)
 
- Static Protected Member Functions inherited from casa::PlotMSTab
static QString highlightifyText (const QString &text, bool highlight)
 Returns the given text altered with HTML tags for highlighting, meant to be assigned to a Qt widget's title or similar property. More...
 
static QString highlightifyText (const casacore::String &text, bool changed)
 Variation taking a casacore String. More...
 
static QString highlightifyText (const char *text, bool changed)
 Variation of highlightifyText taking plain C-style text. More...
 
- Protected Attributes inherited from casa::PlotMSTab
PlotMSAppitsParent_
 Parent. More...
 
PlotMSPlotteritsPlotter_
 Plotter. More...
 
QMap< QLabel *, QString > itsLabelDefaults_
 Default text for labels, so that they can be easily switched to red or normal depending on whether the item has changed or not. More...
 

Detailed Description

Subclass of PlotMSTab that manages PlotMSPlots in the GUI.

Watches the current PlotMSPlot's parameters for changes to update the GUI as needed and watches the PlotMSPlotManager for changes to the plots. public PlotMSPlotManagerWatcher

Definition at line 100 of file PlotMSPlotTab.qo.h.

Constructor & Destructor Documentation

casa::PlotMSPlotTab::PlotMSPlotTab ( PlotMSPlotter parent,
int  plotIndex = -1 
)

Constructor which takes the parent plotter.

casa::PlotMSPlotTab::~PlotMSPlotTab ( )

Destructor.

Member Function Documentation

PlotMSAxesTab* casa::PlotMSPlotTab::addAxesSubtab ( )
protected

Inserts one of the known subtab types if it is not already present, and returns a pointer to it.

PlotMSCacheTab* casa::PlotMSPlotTab::addCacheSubtab ( )
protected
PlotMSCalibrationTab* casa::PlotMSPlotTab::addCalibrationSubtab ( )
protected
PlotMSCanvasTab* casa::PlotMSPlotTab::addCanvasSubtab ( )
protected
PlotMSDataTab* casa::PlotMSPlotTab::addDataSubtab ( )
protected
PlotMSDisplayTab* casa::PlotMSPlotTab::addDisplaySubtab ( )
protected
PlotMSIterateTab* casa::PlotMSPlotTab::addIterateSubtab ( )
protected
void casa::PlotMSPlotTab::addSubtab ( PlotMSPlotSubtab tab)
protected

Adds the given subtab to the end of the tab widget.

PlotMSTransformationsTab* casa::PlotMSPlotTab::addTransformationsSubtab ( )
protected
void casa::PlotMSPlotTab::changeAxisIdentifier ( int  index,
QString  id 
)
privateslot

A y-axis has changed its internal data.

void casa::PlotMSPlotTab::clearAfter ( int  index)
protected

Clears set subtabs after (and including) the given index.

void casa::PlotMSPlotTab::clearData ( )

Remove old data from the plot.

void casa::PlotMSPlotTab::clearSubtabs ( )
protected

Clears set subtabs.

void casa::PlotMSPlotTab::completePlotting ( bool  success)

This was put in to support overplotting.

When two plots are sharing the same canvas, we don't want to trigger a redraw until all the plots sharing the same canvas are done updating their data in background threads.

PlotMSPlotParameters casa::PlotMSPlotTab::currentlySetParameters ( ) const

Returns the parameters currently set by the user on the GUI (but NOT necessarily set on the underlying plot parameters).

PlotMSPlot* casa::PlotMSPlotTab::currentPlot ( ) const

Returns the currently selected plot.

PlotMSAxesTab* casa::PlotMSPlotTab::findAxesTab ( )
private
PlotMSDisplayTab* casa::PlotMSPlotTab::findDisplayTab ( )
private
PlotMSIterateTab* casa::PlotMSPlotTab::findIterateTab ( ) const
private
PlotMSDataTab* casa::PlotMSPlotTab::findOrCreateDataTab ( )
private
casacore::String casa::PlotMSPlotTab::getAveragingSummary ( ) const
PlotMSDataTab* casa::PlotMSPlotTab::getData ( )

Return the data to support overplots.

casacore::String casa::PlotMSPlotTab::getFileName ( ) const
void casa::PlotMSPlotTab::getLocation ( int &  rowIndex,
int &  colIndex 
)

Return the location on the grid for this plot.

void casa::PlotMSPlotTab::insertAxes ( int  index)
protected
PlotMSAxesTab* casa::PlotMSPlotTab::insertAxesSubtab ( int  index)
protected
void casa::PlotMSPlotTab::insertCache ( int  index)
protected
PlotMSCacheTab* casa::PlotMSPlotTab::insertCacheSubtab ( int  index)
protected
void casa::PlotMSPlotTab::insertCalibration ( int  index)
protected
PlotMSCalibrationTab* casa::PlotMSPlotTab::insertCalibrationSubtab ( int  index)
protected
void casa::PlotMSPlotTab::insertCanvas ( int  index)
protected
PlotMSCanvasTab* casa::PlotMSPlotTab::insertCanvasSubtab ( int  index)
protected
void casa::PlotMSPlotTab::insertData ( int  index)
protected
PlotMSDataTab* casa::PlotMSPlotTab::insertDataSubtab ( int  index)
protected
void casa::PlotMSPlotTab::insertDisplay ( int  index)
protected
PlotMSDisplayTab* casa::PlotMSPlotTab::insertDisplaySubtab ( int  index)
protected
void casa::PlotMSPlotTab::insertIterate ( int  index)
protected
PlotMSIterateTab* casa::PlotMSPlotTab::insertIterateSubtab ( int  index)
protected
void casa::PlotMSPlotTab::insertSubtab ( int  index,
PlotMSPlotSubtab tab 
)
protected

Inserts the given subtab in the tab widget.

void casa::PlotMSPlotTab::insertTransformations ( int  index)
protected
PlotMSTransformationsTab* casa::PlotMSPlotTab::insertTransformationsSubtab ( int  index)
protected
bool casa::PlotMSPlotTab::isPlottable ( ) const

Returns whether this plot has a valid location on the page where it can be displayed.

bool casa::PlotMSPlotTab::managesPlot ( PlotMSPlot plot) const
void casa::PlotMSPlotTab::parametersHaveChanged ( const PlotMSWatchedParameters params,
int  updateFlag 
)
virtual

Implements PlotMSParametersWatcher::parametersHaveChanged().

Updates the GUI as needed if the given parameters are the current PlotMSPlot's parameters.

Implements casa::PlotMSParametersWatcher.

bool casa::PlotMSPlotTab::plot ( bool  forceReload)
slot

Slot for doing the plot, using the parameters set on the GUI for the current plot.

void casa::PlotMSPlotTab::plotsChanged ( const PlotMSPlotManager manager,
int  index = -1,
bool  show = true 
)
void casa::PlotMSPlotTab::removeAxisIdentifier ( int  index)
privateslot

y-axis data has been removed.

void casa::PlotMSPlotTab::removePlot ( )

Remove this plot.

std::vector<PMS::Axis> casa::PlotMSPlotTab::selectedLoadAxes ( ) const
inline

Returns the axes that the user has selected to load into the cache.

Definition at line 148 of file PlotMSPlotTab.qo.h.

References selectedLoadOrReleaseAxes().

std::vector<PMS::Axis> casa::PlotMSPlotTab::selectedLoadOrReleaseAxes ( bool  load) const
private

Returns the axes the user has selected to load or release, depending on the load flag.

Referenced by selectedLoadAxes(), and selectedReleaseAxes().

std::vector<PMS::Axis> casa::PlotMSPlotTab::selectedReleaseAxes ( ) const
inline

Returns the axes that the user has selected to release from the cache.

Definition at line 153 of file PlotMSPlotTab.qo.h.

References selectedLoadOrReleaseAxes().

bool casa::PlotMSPlotTab::setGridSize ( int  rowCount,
int  colCount 
)

Returns true if the location of this plot is still valid after the grid size has changed; false otherwise.

void casa::PlotMSPlotTab::setupForPlot ( )
private

Sets up the GUI to display the parameters for the given plot.

template<class T >
T* casa::PlotMSPlotTab::subtab ( )
inlineprotected

Returns the first subtab with the given type, or NULL if there are none of that type.

Definition at line 234 of file PlotMSPlotTab.qo.h.

References itsSubtabs_.

void casa::PlotMSPlotTab::tabChanged ( )
privateslot

Slot for when the user changes the value for any parameters.

Updates the GUI to show which parameters have been changed (if any).

QString casa::PlotMSPlotTab::tabName ( ) const
inlinevirtual

Implements PlotMSTab::tabName().

Implements casa::PlotMSTab.

Definition at line 118 of file PlotMSPlotTab.qo.h.

QList<QToolButton*> casa::PlotMSPlotTab::toolButtons ( ) const
virtual

Overrides PlotMSTab::toolButtons().

Should be called AFTER any tabs are added using addTab().

Reimplemented from casa::PlotMSTab.

Friends And Related Function Documentation

friend class PlotMSPlot
friend

Definition at line 106 of file PlotMSPlotTab.qo.h.

friend class PlotMSPlotter
friend

Definition at line 107 of file PlotMSPlotTab.qo.h.

Member Data Documentation

bool casa::PlotMSPlotTab::closing
private

Definition at line 264 of file PlotMSPlotTab.qo.h.

int casa::PlotMSPlotTab::forceReloadCounter_
private

Definition at line 267 of file PlotMSPlotTab.qo.h.

PlotMSPlotParameters* casa::PlotMSPlotTab::itsCurrentParameters_
private

Parameters for the currently selected plot.

Definition at line 259 of file PlotMSPlotTab.qo.h.

PlotMSPlot* casa::PlotMSPlotTab::itsCurrentPlot_
private

Currently selected plot.

Definition at line 256 of file PlotMSPlotTab.qo.h.

PlotMSPlotManager& casa::PlotMSPlotTab::itsPlotManager_
private

Reference to plot manager.

Definition at line 253 of file PlotMSPlotTab.qo.h.

QList<PlotMSPlotSubtab*> casa::PlotMSPlotTab::itsSubtabs_
private

PlotMSPlotSubtab objects in tab widget.

Definition at line 249 of file PlotMSPlotTab.qo.h.

Referenced by subtab().

bool casa::PlotMSPlotTab::itsUpdateFlag_
private

Whether or not to check for changed parameters and update the GUI accordingly.

Definition at line 263 of file PlotMSPlotTab.qo.h.

int casa::PlotMSPlotTab::plotIndex
private

Definition at line 265 of file PlotMSPlotTab.qo.h.


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