casa::PlotMSPlotter Class Reference

High(ish)-level plotter class that manages the GUI (semi-) transparently to the rest of PlotMS. More...

#include <PlotMSPlotter.qo.h>

Inheritance diagram for casa::PlotMSPlotter:
casa::PlotDrawWatcher casa::Client

List of all members.

Public Slots

virtual void showError (const String &message, const String &title, bool isWarning)
 Shows the given error/warning message in a GUI window.
virtual void showMessage (const String &message, const String &title, bool warning=false)
 Shows the given informational message in a GUI window.
virtual void clearMessage ()
 Clears the message in a GUI window.
void showAbout ()
 Slot for showing an "about" dialog.
void prepareForPlotting ()
 Take any clean-up actions before a Plot is made 1) unclick any zoom, pan, etc buttons to avoid bug in zoom stack 2) .
virtual bool close ()

Public Member Functions

virtual bool isActionEnabled (PlotMSAction::Type type) const
 Methods from the client interface.
virtual vector< PlotMSPlot * > getCurrentPlots () const
 Return the current client plot.
virtual bool plot ()
virtual vector< vector
< PMS::Axis > > 
getSelectedLoadAxes () const
 Retrieve the plot load axes the user has specified.
virtual vector< vector
< PMS::Axis > > 
getSelectedReleaseAxes () const
 Retrieve the release axes the user has specified.
virtual PlotMSFlagging getFlagging () const
 Retrieve flagging information specified by the client.
virtual bool isInteractive () const
 Return whether the client is interactive (a GUI) or noninteractive (a script).
virtual void canvasAdded (PlotCanvasPtr &canvas)
 Add a plot to those displayed.
virtual void setAnnotationModeActive (PlotMSAction::Type type, bool active)
 Use to enable annotations in the GUI client.
virtual vector< String > getFiles () const
 Return a list of files loaded in the client.
 PlotMSPlotter (PlotMSApp *parent, Plotter::Implementation impl=Plotter::DEFAULT)
 Non-Static //.
 ~PlotMSPlotter ()
 Destructor.
PlotMSAppgetParent ()
 Accessor methods.
QtProgressWidgetgetProgressWidget ()
PlotMSAnnotatorgetAnnotator ()
virtual bool isDrawing () const
virtual bool isClosed () const
void setShowProgress (bool showProgressDialog)
 Execution Methods //.
virtual void showGUI (bool show=true)
 Shows/hides the GUI.
virtual bool guiShown () const
 Returns true if the GUI is currently visible, false otherwise.
virtual int execLoop ()
 Enters the plotter's execution loop, and returns its return value.
virtual void doThreadedOperation (ThreadController *thread)
 Runs the given operation thread, keeping GUI and progress information synchronized as necessary.
bool canvasDrawBeginning (PlotOperationPtr drawOperation, bool drawingIsThreaded, int drawnLayersFlag)
 Implements PlotDrawWatcher::canvasDrawBeginning().
virtual ThreadControllergetThreadController (PlotMSAction::Type type, PMSPTMethod postThreadMethod=NULL, PlotMSPlot *plot=NULL, int index=-1)
 FactoryMethod for producing a thread controller to manage a specific type of threaded operation.
void showIterationButtons (bool show)
 GUI Methods //.
bool showQuestion (const String &message, const String &title)
 Pops up a dialog to ask the user the given question with the given window title.
void setWindowTitle (const String &windowTitle)
 Plotter Customization Methods //.
void setStatusText (const String &statusText)
 Sets the status bar text to the given.
void clearStatusText ()
 Clears the status bar text.
void setToolButtonStyle (Qt::ToolButtonStyle style)
 Overrides QMainWindow::setToolButtonStyle().
const QMap< PlotMSAction::Type,
QAction * > & 
plotActionMap () const
 Action Methods //.
void synchronizeAction (PlotMSAction::Type action, QAbstractButton *button)
 Synchronizes the given button with the given action type.
String actionText (PlotMSAction::Type type)
 Gets/Sets the text for the QAction associated with the given PlotMSApp action.
void setActionText (PlotMSAction::Type type, const String &text)
bool actionIsChecked (PlotMSAction::Type type) const
 Gets/Sets whether the QAction associated with the given PlotMSApp action is checked.
void setActionIsChecked (PlotMSAction::Type type, bool checked, bool alsoTriggerAction=false)
virtual bool exportPlot (const PlotExportFormat &format, const bool async)
 export a plot to a file
virtual void setFlagging (PlotMSFlagging flag)
 Flagging.
virtual void gridSizeChanged (int rowCount, int colCount)

Static Public Member Functions

static String aboutText (Plotter::Implementation implementation, bool useHTML=true)
 Static //.

Protected Member Functions

void closeEvent (QCloseEvent *event)
 Overrides QWidget::closeEvent(), in case we're dealing with a plotter that isn't Qt and thus is in its own window (and possibly its own execution loop).

Private Slots

void action_ ()
 Method for when an action has been triggered.
void action (QAction *which)
 Method for when the given action has been triggered.
void currentThreadFinished ()
 Slot for when the currently running thread is finished.
void summarize ()
 Summarize an MS.
void exportPlots ()
 Export the current plots.
void tabChanged ()

Private Member Functions

bool _triggerAction (PlotMSAction::Type type)
void initialize (Plotter::Implementation impl)
 Initializes the plotter with the given implementation.

Private Attributes

PlotMSAppitsParent_
 PlotMSApp parent.
bool isQt_
 Flag for whether the underlying Plotter is Qt-based or not.
bool isClosed_
 Flag for whether the widget is open or not.
QList< QWidget * > itsEnableWidgets_
 Widgets to be enabled/disabled during threading.
PlotMSDataSummaryTabitsPlotTab_
 Plot tab.
PlotMSFlaggingTabitsFlaggingTab_
 Flagging tab (on the plot tab).
PlotMSToolsTabitsToolsTab_
 Tools tab.
PlotMSAnnotatorTabitsAnnotatorTab_
 Annotator tab.
PlotMSOptionsTabitsOptionsTab_
 Options tab.
QList< QToolButton * > itsToolButtons_
 Tool buttons on the tabs.
QtProgressWidgetitsThreadProgress_
 Widget for displaying thread progress.
PlotMSThreaditsCurrentThread_
 Current thread (or NULL for none).
vector< PlotMSThread * > itsWaitingThreads_
 Waiting threads.
QMap< PlotMSAction::Type,
QAction * > 
itsActionMap_
 Map between PlotMSApp actions and QActions.
QtActionSynchronizer itsActionSynchronizer_
 Action synchronizer.
PlotMSAnnotator itsAnnotator_
 Annotator tool.
QString itsAboutString_
 "About" string.
bool showProgressWidget
QTabWidget * tabWidget

Detailed Description

High(ish)-level plotter class that manages the GUI (semi-) transparently to the rest of PlotMS.

Definition at line 59 of file PlotMSPlotter.qo.h.


Constructor & Destructor Documentation

casa::PlotMSPlotter::PlotMSPlotter ( PlotMSApp parent,
Plotter::Implementation  impl = Plotter::DEFAULT 
)

Non-Static //.

Constructor that creates a plotter with the given parent using the given implementation.

casa::PlotMSPlotter::~PlotMSPlotter (  ) 

Destructor.


Member Function Documentation

bool casa::PlotMSPlotter::_triggerAction ( PlotMSAction::Type  type  )  [private]
static String casa::PlotMSPlotter::aboutText ( Plotter::Implementation  implementation,
bool  useHTML = true 
) [static]

Static //.

Returns "about" text for the given implementation, using HTML or not.

void casa::PlotMSPlotter::action ( QAction *  which  )  [private, slot]

Method for when the given action has been triggered.

Referenced by action_().

void casa::PlotMSPlotter::action_ (  )  [inline, private, slot]

Method for when an action has been triggered.

Definition at line 295 of file PlotMSPlotter.qo.h.

References action().

bool casa::PlotMSPlotter::actionIsChecked ( PlotMSAction::Type  type  )  const

Gets/Sets whether the QAction associated with the given PlotMSApp action is checked.

Has no effect on actions that are not checkable.

String casa::PlotMSPlotter::actionText ( PlotMSAction::Type  type  ) 

Gets/Sets the text for the QAction associated with the given PlotMSApp action.

virtual void casa::PlotMSPlotter::canvasAdded ( PlotCanvasPtr canvas  )  [virtual]

Add a plot to those displayed.

Implements casa::Client.

bool casa::PlotMSPlotter::canvasDrawBeginning ( PlotOperationPtr  drawOperation,
bool  drawingIsThreaded,
int  drawnLayersFlag 
) [virtual]
virtual void casa::PlotMSPlotter::clearMessage (  )  [inline, virtual, slot]

Clears the message in a GUI window.

Implements casa::Client.

Definition at line 206 of file PlotMSPlotter.qo.h.

References clearStatusText().

void casa::PlotMSPlotter::clearStatusText (  )  [inline]

Clears the status bar text.

Definition at line 161 of file PlotMSPlotter.qo.h.

References setStatusText().

Referenced by clearMessage().

virtual bool casa::PlotMSPlotter::close (  )  [virtual, slot]

Implements casa::Client.

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

Overrides QWidget::closeEvent(), in case we're dealing with a plotter that isn't Qt and thus is in its own window (and possibly its own execution loop).

void casa::PlotMSPlotter::currentThreadFinished (  )  [private, slot]

Slot for when the currently running thread is finished.

Performs cleanup and starts next waiting thread if applicable.

virtual void casa::PlotMSPlotter::doThreadedOperation ( ThreadController thread  )  [virtual]

Runs the given operation thread, keeping GUI and progress information synchronized as necessary.

The given thread will be deleted upon completion.

Implements casa::Client.

virtual int casa::PlotMSPlotter::execLoop (  )  [virtual]

Enters the plotter's execution loop, and returns its return value.

Only during this execution loops will GUI windows be shown and GUI events be handled. The execution loop ends when the user clicks the "close" or "quit" buttons. This method can be called multiple times.

Implements casa::Client.

virtual bool casa::PlotMSPlotter::exportPlot ( const PlotExportFormat format,
const bool  async 
) [virtual]

export a plot to a file

Implements casa::Client.

void casa::PlotMSPlotter::exportPlots (  )  [private, slot]

Export the current plots.

PlotMSAnnotator& casa::PlotMSPlotter::getAnnotator (  )  [inline]

Definition at line 103 of file PlotMSPlotter.qo.h.

References itsAnnotator_.

virtual vector<PlotMSPlot*> casa::PlotMSPlotter::getCurrentPlots (  )  const [virtual]

Return the current client plot.

Implements casa::Client.

virtual vector<String> casa::PlotMSPlotter::getFiles (  )  const [virtual]

Return a list of files loaded in the client.

Implements casa::Client.

virtual PlotMSFlagging casa::PlotMSPlotter::getFlagging (  )  const [virtual]

Retrieve flagging information specified by the client.

Implements casa::Client.

PlotMSApp* casa::PlotMSPlotter::getParent (  )  [inline]

Accessor methods.

Definition at line 99 of file PlotMSPlotter.qo.h.

References itsParent_.

QtProgressWidget* casa::PlotMSPlotter::getProgressWidget (  )  [inline]

Definition at line 101 of file PlotMSPlotter.qo.h.

References itsThreadProgress_.

virtual vector<vector<PMS::Axis> > casa::PlotMSPlotter::getSelectedLoadAxes (  )  const [virtual]

Retrieve the plot load axes the user has specified.

Implements casa::Client.

virtual vector<vector<PMS::Axis> > casa::PlotMSPlotter::getSelectedReleaseAxes (  )  const [virtual]

Retrieve the release axes the user has specified.

Implements casa::Client.

virtual ThreadController* casa::PlotMSPlotter::getThreadController ( PlotMSAction::Type  type,
PMSPTMethod  postThreadMethod = NULL,
PlotMSPlot postThreadObject = NULL,
int  index = -1 
) [virtual]

FactoryMethod for producing a thread controller to manage a specific type of threaded operation.

Examples include caching, exporting a plot, and drawing.

Implements casa::Client.

virtual void casa::PlotMSPlotter::gridSizeChanged ( int  rowCount,
int  colCount 
) [virtual]

Implements casa::Client.

virtual bool casa::PlotMSPlotter::guiShown (  )  const [virtual]

Returns true if the GUI is currently visible, false otherwise.

Implements casa::Client.

void casa::PlotMSPlotter::initialize ( Plotter::Implementation  impl  )  [private]

Initializes the plotter with the given implementation.

MUST be called from constructors.

virtual bool casa::PlotMSPlotter::isActionEnabled ( PlotMSAction::Type  type  )  const [virtual]

Methods from the client interface.

Implements casa::Client.

virtual bool casa::PlotMSPlotter::isClosed (  )  const [virtual]

Implements casa::Client.

virtual bool casa::PlotMSPlotter::isDrawing (  )  const [virtual]

Implements casa::Client.

virtual bool casa::PlotMSPlotter::isInteractive (  )  const [virtual]

Return whether the client is interactive (a GUI) or noninteractive (a script).

Implements casa::Client.

virtual bool casa::PlotMSPlotter::plot (  )  [virtual]

Implements casa::Client.

const QMap<PlotMSAction::Type, QAction*>& casa::PlotMSPlotter::plotActionMap (  )  const

Action Methods //.

Returns a map between PlotMSApp actions and the QActions associated with them in the GUI. Triggering the QActions will trigger the proper PlotMSApp action, and the QAction will be kept properly checked as needed.

void casa::PlotMSPlotter::prepareForPlotting (  )  [slot]

Take any clean-up actions before a Plot is made 1) unclick any zoom, pan, etc buttons to avoid bug in zoom stack 2) .

.. anything else needed in the future ..\.

void casa::PlotMSPlotter::setActionIsChecked ( PlotMSAction::Type  type,
bool  checked,
bool  alsoTriggerAction = false 
)
void casa::PlotMSPlotter::setActionText ( PlotMSAction::Type  type,
const String &  text 
)
virtual void casa::PlotMSPlotter::setAnnotationModeActive ( PlotMSAction::Type  ,
bool   
) [virtual]

Use to enable annotations in the GUI client.

Reimplemented from casa::Client.

virtual void casa::PlotMSPlotter::setFlagging ( PlotMSFlagging  flag  )  [virtual]

Flagging.

Implements casa::Client.

void casa::PlotMSPlotter::setShowProgress ( bool  showProgressDialog  ) 

Execution Methods //.

void casa::PlotMSPlotter::setStatusText ( const String &  statusText  ) 

Sets the status bar text to the given.

Referenced by clearStatusText().

void casa::PlotMSPlotter::setToolButtonStyle ( Qt::ToolButtonStyle  style  ) 

Overrides QMainWindow::setToolButtonStyle().

void casa::PlotMSPlotter::setWindowTitle ( const String &  windowTitle  ) 

Plotter Customization Methods //.

Sets the window title to the given.

void casa::PlotMSPlotter::showAbout (  )  [slot]

Slot for showing an "about" dialog.

virtual void casa::PlotMSPlotter::showError ( const String &  message,
const String &  title,
bool  isWarning 
) [virtual, slot]

Shows the given error/warning message in a GUI window.

Implements casa::Client.

virtual void casa::PlotMSPlotter::showGUI ( bool  show = true  )  [virtual]

Shows/hides the GUI.

Implements casa::Client.

void casa::PlotMSPlotter::showIterationButtons ( bool  show  ) 

GUI Methods //.

Shows/Hides the "iteration" widgets and actions on the GUI.

virtual void casa::PlotMSPlotter::showMessage ( const String &  message,
const String &  title,
bool  warning = false 
) [virtual, slot]

Shows the given informational message in a GUI window.

Implements casa::Client.

bool casa::PlotMSPlotter::showQuestion ( const String &  message,
const String &  title 
)

Pops up a dialog to ask the user the given question with the given window title.

Returns true if the user says "Yes"; false for "No" or otherwise rejecting the dialog.

void casa::PlotMSPlotter::summarize (  )  [private, slot]

Summarize an MS.

void casa::PlotMSPlotter::synchronizeAction ( PlotMSAction::Type  action,
QAbstractButton *  button 
)

Synchronizes the given button with the given action type.

(See QtActionSynchronizer class.)

void casa::PlotMSPlotter::tabChanged (  )  [private, slot]

Member Data Documentation

Flag for whether the widget is open or not.

Definition at line 235 of file PlotMSPlotter.qo.h.

Flag for whether the underlying Plotter is Qt-based or not.

Definition at line 232 of file PlotMSPlotter.qo.h.

"About" string.

Definition at line 280 of file PlotMSPlotter.qo.h.

Map between PlotMSApp actions and QActions.

Definition at line 271 of file PlotMSPlotter.qo.h.

Action synchronizer.

Definition at line 274 of file PlotMSPlotter.qo.h.

Annotator tool.

Definition at line 277 of file PlotMSPlotter.qo.h.

Referenced by getAnnotator().

Annotator tab.

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

Current thread (or NULL for none).

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

QList<QWidget*> casa::PlotMSPlotter::itsEnableWidgets_ [private]

Widgets to be enabled/disabled during threading.

Definition at line 241 of file PlotMSPlotter.qo.h.

Flagging tab (on the plot tab).

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

Options tab.

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

PlotMSApp parent.

Definition at line 229 of file PlotMSPlotter.qo.h.

Referenced by getParent().

Plot tab.

Definition at line 244 of file PlotMSPlotter.qo.h.

Widget for displaying thread progress.

Definition at line 262 of file PlotMSPlotter.qo.h.

Referenced by getProgressWidget().

QList<QToolButton*> casa::PlotMSPlotter::itsToolButtons_ [private]

Tool buttons on the tabs.

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

Tools tab.

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

Waiting threads.

Definition at line 268 of file PlotMSPlotter.qo.h.

Definition at line 282 of file PlotMSPlotter.qo.h.

QTabWidget* casa::PlotMSPlotter::tabWidget [private]

Definition at line 284 of file PlotMSPlotter.qo.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1