PlotSet Class Reference

A collection of plots in a single widget. More...

#include <PlotSet.h>

Inheritance diagram for PlotSet:

Inheritance graph

List of all members.

Public Member Functions

virtual void setName (const std::string &name)=0
virtual QWidget * getWidget ()=0
virtual const QWidget * getWidget () const =0
virtual PlotWidgetcreatePlot (const std::string &plotName, const PlotType &plotType)=0
virtual PlotWidgetgetPlot (const std::string &plotName) const =0
virtual void getPlots (const PlotType &plotType, std::vector< PlotWidget * > &plots) const =0
virtual void getPlots (std::vector< PlotWidget * > &plots) const =0
virtual unsigned int getNumPlots () const =0
virtual bool containsPlot (PlotWidget *pPlot) const =0
virtual bool setCurrentPlot (PlotWidget *pPlot)=0
virtual PlotWidgetgetCurrentPlot () const =0
virtual bool renamePlot (PlotWidget *pPlot, const std::string &newPlotName)=0
virtual bool deletePlot (PlotWidget *pPlot)=0
virtual void clear ()=0
virtual void setAssociatedView (View *pView)=0
virtual ViewgetAssociatedView ()=0
virtual const ViewgetAssociatedView () const =0
virtual std::string renamePlot (PlotWidget *pPlot)=0

Static Public Member Functions

static const std::string & signalRenamed ()
static const std::string & signalViewAssociated ()
static const std::string & signalPlotAdded ()
static const std::string & signalActivated ()
static const std::string & signalPlotDeleted ()

Protected Member Functions

virtual ~PlotSet ()


Detailed Description

A collection of plots in a single widget.

A plot set provides a grouping of plots within a single widget. A plot set displays individual plots on tabs along the bottom of the widget. Each tab contains a single plot widget.

To display multiple plot set widgets within a single widget, see the PlotSetGroup class.

This subclass of Subject will notify upon the following conditions:

See also:
PlotSetGroup, PlotWidget

Definition at line 41 of file PlotSet.h.


Constructor & Destructor Documentation

virtual PlotSet::~PlotSet (  )  [protected, virtual]

The plot set should be destroyed only if it is not owned by a parent widget by calling DesktopServices::deletePlotSet().

Definition at line 333 of file PlotSet.h.


Member Function Documentation

static const std::string& PlotSet::signalRenamed (  )  [static]

Emitted when the plot set is renamed with boost::any<std::string> containing the new plot set name.

See also:
setName()

Definition at line 50 of file PlotSet.h.

static const std::string& PlotSet::signalViewAssociated (  )  [static]

Emitted when a view is associated with the plot set with boost::any<View*> containing a pointer to the newly associated view.

See also:
setAssociatedView()

Definition at line 59 of file PlotSet.h.

static const std::string& PlotSet::signalPlotAdded (  )  [static]

Emitted when a plot widget is added to the plot set with boost::any<PlotWidget*> containing a pointer to the plot widget that is being added.

See also:
createPlot()

Definition at line 68 of file PlotSet.h.

static const std::string& PlotSet::signalActivated (  )  [static]

Emitted when a plot widget is activated with boost::any<PlotWidget*> containing a pointer to the newly activated plot widget.

See also:
setCurrentPlot()

Definition at line 77 of file PlotSet.h.

static const std::string& PlotSet::signalPlotDeleted (  )  [static]

Emitted when a plot widget is deleted from the plot set with boost::any<PlotWidget*> containing a pointer to the plot widget that is being deleted.

See also:
deletePlot(), clear()

Definition at line 86 of file PlotSet.h.

virtual void PlotSet::setName ( const std::string &  name  )  [pure virtual]

Sets the plot set name.

Parameters:
name The new plot set name. This method does nothing if an empty string is passed in.
Subject Notifications:
This method will notify signalRenamed() with boost::any<std::string> containing the new plot set name.

virtual QWidget* PlotSet::getWidget (  )  [pure virtual]

Returns the Qt widget pointer for this plot set widget.

Returns:
A non-const pointer to the Qt widget containing the plot set.
See also:
getWidget() const

virtual const QWidget* PlotSet::getWidget (  )  const [pure virtual]

Returns the Qt widget pointer for this plot set widget.

Returns:
A const pointer to the Qt widget containing the plot set.
See also:
getWidget()

virtual PlotWidget* PlotSet::createPlot ( const std::string &  plotName,
const PlotType plotType 
) [pure virtual]

Creates a new plot in the plot set.

This method creates an empty plot and adds it to plot set.

Parameters:
plotName The plot name.
plotType The plot type.
Returns:
A pointer to the created plot. NULL is returned if an error occurred and the plot could not be created.
Subject Notifications:
This method will notify signalPlotAdded() with boost::any<PlotWidget*> containing a pointer to the plot widget that is created.

virtual PlotWidget* PlotSet::getPlot ( const std::string &  plotName  )  const [pure virtual]

Retrieves the plot with a given name.

Parameters:
plotName The plot name.
Returns:
A pointer to the plot. NULL is returned if no plot exists with the given name in the plot set.
See also:
getPlots(), getCurrentPlot()

virtual void PlotSet::getPlots ( const PlotType plotType,
std::vector< PlotWidget * > &  plots 
) const [pure virtual]

Retrieves plots of a given type contained in the plot set.

Parameters:
plotType The plot type.
plots A vector to contain pointers to the plots in the plot set. The vector is emptied if the plot set does not contain any plots of the given type.
See also:
getPlot(), getCurrentPlot()

virtual void PlotSet::getPlots ( std::vector< PlotWidget * > &  plots  )  const [pure virtual]

Retrieves all plots contained in the plot set.

Parameters:
plots A vector to contain pointers to the plots in the plot set. The vector is emptied if the plot set does not contain any plots.
See also:
getPlot(), getCurrentPlot()

virtual unsigned int PlotSet::getNumPlots (  )  const [pure virtual]

Returns the number of plots in the plot set.

Returns:
The number of plots in the plot set.

virtual bool PlotSet::containsPlot ( PlotWidget pPlot  )  const [pure virtual]

Queries whether a plot exists in the plot set.

Parameters:
pPlot The plot to query for its existence.
Returns:
Returns true if the plot is contained in the plot set; otherwise returns false.

virtual bool PlotSet::setCurrentPlot ( PlotWidget pPlot  )  [pure virtual]

Sets the active plot in the plot set.

Parameters:
pPlot The plot to make the active plot. This method does nothing if NULL is passed in.
Returns:
Returns true if the plot was successfully activated; otherwise returns false.
Subject Notifications:
This method will notify signalActivated() with boost::any<PlotWidget*> containing a pointer to the newly activated plot widget.

virtual PlotWidget* PlotSet::getCurrentPlot (  )  const [pure virtual]

Returns the active plot for the plot set.

Returns:
A pointer to the active plot. NULL is returned if the plot set does not contain any plots.
See also:
getPlot()

virtual bool PlotSet::renamePlot ( PlotWidget pPlot,
const std::string &  newPlotName 
) [pure virtual]

Renames a plot in the plot set with a given name.

Parameters:
pPlot The plot to rename. This method does nothing if NULL is passed in.
newPlotName The new plot name, which appears on the tab. The name cannot have the same name as another plot in the plot set. This method does nothing if an empty string is passed in.
Returns:
Returns true if the plot was successfully renamed. Returns false if the plot does not exist or the new name is the same as that of another plot.
Subject Notifications:
This method will notify View::signalRenamed() with boost::any<std::string> containing the new plot name.
See also:
renamePlot(PlotWidget*)

virtual bool PlotSet::deletePlot ( PlotWidget pPlot  )  [pure virtual]

Deletes a plot in the plot set.

Parameters:
pPlot The plot to delete. This method does nothing if NULL is passed in.
Returns:
Returns true if the plot was successfully deleted from this plot set; otherwise returns false.
Subject Notifications:
This method will notify signalPlotDeleted() with boost::any<PlotWidget*> containing a pointer to the plot widget that is being deleted.

virtual void PlotSet::clear (  )  [pure virtual]

Removes all plots from the plot set.

Subject Notifications:
This method will notify signalPlotDeleted() with boost::any<PlotWidget*> containing a pointer to the plot widget that is being deleted for each plot removed from the set.

virtual void PlotSet::setAssociatedView ( View pView  )  [pure virtual]

Associates a view with the plot set.

This method associates a view with the plot set. When a view is associated with the plot set, plots are added and removed as layers are created and destroyed in the view.

Warning:
If the associated view is deleted, the plot set is also deleted automatically.
Parameters:
pView The view to associate with plot set. If pView is NULL, the plot set does not have an associated view.
Subject Notifications:
This method will notify signalViewAssociated() with boost::any<View*> containing a pointer to the newly associated view.

virtual View* PlotSet::getAssociatedView (  )  [pure virtual]

Returns the view associated with the plot set.

Returns:
A non-const pointer to the view currently associated with the plot set. NULL is returned if no view is associated.
See also:
setAssociatedView(), getAssociatedView() const

virtual const View* PlotSet::getAssociatedView (  )  const [pure virtual]

Returns the view associated with the plot set.

Returns:
A const pointer to the view currently associated with the plot set. NULL is returned if no view is associated.
See also:
setAssociatedView(), getAssociatedView()

virtual std::string PlotSet::renamePlot ( PlotWidget pPlot  )  [pure virtual]

Renames a plot in the plot set with a user-defined name.

This method prompts the user to select a new name for the given plot and renames the plot.

Parameters:
pPlot The plot to rename. This method does nothing if NULL is passed in.
Returns:
The new plot name, which is guaranteed to be unique for all plots in the plot set. An empty string is returned if the user cancels the process.
Subject Notifications:
This method will notify View::signalRenamed() with boost::any<std::string> containing the new plot name chosen by the user.
See also:
renamePlot(PlotWidget*, const std::string&)


Software Development Kit - Opticks 4.9.0 Build 16218