casa
5.7.0-16
|
High(ish)-level plotter class that manages the GUI (semi-) transparently to the rest of PlotMS. More...
#include <PlotMSPlotter.qo.h>
Public Slots | |
virtual void | showError (const casacore::String &message, const casacore::String &title, bool isWarning) |
Shows the given error/warning message in a GUI window. More... | |
virtual void | showMessage (const casacore::String &message, const casacore::String &title, bool warning=false) |
Shows the given informational message in a GUI window. More... | |
virtual void | clearMessage () |
Clears the message in a GUI window. More... | |
void | showAbout () |
Slot for showing an "about" dialog. More... | |
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)... More... | |
virtual bool | close () |
Public Member Functions | |
virtual bool | isActionEnabled (PlotMSAction::Type type) const |
Methods from the client interface. More... | |
virtual std::vector< PlotMSPlot * > | getCurrentPlots () const |
Return the current client plot. More... | |
virtual bool | plot () |
virtual std::vector < std::vector< PMS::Axis > > | getSelectedLoadAxes () const |
Retrieve the plot load axes the user has specified. More... | |
virtual std::vector < std::vector< PMS::Axis > > | getSelectedReleaseAxes () const |
Retrieve the release axes the user has specified. More... | |
virtual PlotMSFlagging | getFlagging () const |
Retrieve flagging information specified by the client. More... | |
virtual bool | isInteractive () const |
Return whether the client is interactive (a GUI) or noninteractive (a script) More... | |
virtual void | canvasAdded (PlotCanvasPtr &canvas) |
Add a plot to those displayed. More... | |
virtual void | setAnnotationModeActive (PlotMSAction::Type type, bool active) |
Use to enable annotations in the GUI client. More... | |
virtual std::vector < casacore::String > | getFiles () const |
Return a list of files loaded in the client. More... | |
PlotMSPlotter (PlotMSApp *parent, Plotter::Implementation impl=Plotter::DEFAULT) | |
Non-Static //. More... | |
~PlotMSPlotter () | |
Destructor. More... | |
PlotMSApp * | getParent () |
Accessor methods. More... | |
QtProgressWidget * | getProgressWidget () |
PlotMSAnnotator & | getAnnotator () |
virtual bool | isDrawing () const |
virtual bool | isClosed () const |
void | setShowProgress (bool showProgressDialog) |
Execution Methods //. More... | |
virtual void | showGUI (bool show=true) |
Shows/hides the GUI. More... | |
virtual bool | guiShown () const |
Returns true if the GUI is currently visible, false otherwise. More... | |
virtual int | execLoop () |
Enters the plotter's execution loop, and returns its return value. More... | |
virtual void | doThreadedOperation (ThreadController *thread) |
Runs the given operation thread, keeping GUI and progress information synchronized as necessary. More... | |
bool | canvasDrawBeginning (PlotOperationPtr drawOperation, bool drawingIsThreaded, int drawnLayersFlag) |
Implements PlotDrawWatcher::canvasDrawBeginning(). More... | |
virtual ThreadController * | getThreadController (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. More... | |
void | showIterationButtons (bool show) |
GUI Methods //. More... | |
bool | showQuestion (const casacore::String &message, const casacore::String &title) |
Pops up a dialog to ask the user the given question with the given window title. More... | |
void | setWindowTitle (const casacore::String &windowTitle) |
Plotter Customization Methods //. More... | |
void | setStatusText (const casacore::String &statusText) |
Sets the status bar text to the given. More... | |
void | clearStatusText () |
Clears the status bar text. More... | |
void | setToolButtonStyle (Qt::ToolButtonStyle style) |
Overrides QMainWindow::setToolButtonStyle(). More... | |
const QMap< PlotMSAction::Type, QAction * > & | plotActionMap () const |
Action Methods //. More... | |
void | synchronizeAction (PlotMSAction::Type action, QAbstractButton *button) |
Synchronizes the given button with the given action type. More... | |
casacore::String | actionText (PlotMSAction::Type type) |
Gets/Sets the text for the QAction associated with the given PlotMSApp action. More... | |
void | setActionText (PlotMSAction::Type type, const casacore::String &text) |
bool | actionIsChecked (PlotMSAction::Type type) const |
Gets/Sets whether the QAction associated with the given PlotMSApp action is checked. More... | |
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 More... | |
virtual void | setFlagging (PlotMSFlagging flag) |
Flagging. More... | |
virtual void | gridSizeChanged (int rowCount, int colCount) |
Public Member Functions inherited from casa::PlotDrawWatcher | |
PlotDrawWatcher () | |
Constructor. More... | |
virtual | ~PlotDrawWatcher () |
Destructor. More... | |
Public Member Functions inherited from casa::Client | |
virtual void | setCommonAxes (bool commonX, bool commonY) |
In the case of a grid of plots whether to use common x- or y- axes. More... | |
virtual bool | isCommonAxisX () const |
virtual bool | isCommonAxisY () const |
virtual void | setAxisLocation (PlotAxis locationX, PlotAxis locationY) |
virtual PlotAxis | getAxisLocationX () const |
virtual PlotAxis | getAxisLocationY () const |
virtual bool | exportToFormat (const PlotExportFormat &format) |
virtual void | showError (const casacore::String &message, const casacore::String &title, bool isWarning)=0 |
Display an error in a client dependent way. More... | |
virtual void | showMessage (const casacore::String &message, const casacore::String &title, bool warning=false)=0 |
Display a message. More... | |
virtual void | clearMessage ()=0 |
virtual void | setCanvasCachedAxesStackImageSize (int width, int height) |
virtual PlotterPtr | getPlotter () |
Get the abstraction that holds the plots. More... | |
virtual PlotSymbolPtr | createSymbol (const PlotSymbolPtr ©) |
Ask the client to make a deep copy of the given plot symbol. More... | |
virtual PlotSymbolPtr | createSymbol (const casacore::String &descriptor, casacore::Int size, const casacore::String &color, const casacore::String &fillPattern, bool outline) |
Ask the client to make a symbol with the given specifications for insertion into the plot. More... | |
virtual PlotLoggerPtr | getLogger () |
Logging is client (implementation) specific so that client needs to be asked for the logger. More... | |
virtual bool | isVisible (PlotCanvasPtr &canvas) |
Is the plot visible? More... | |
virtual std::vector < PlotCanvasPtr > | currentCanvases () |
virtual void | holdDrawing () |
Keeps resizes from flooding event loop (dragging). More... | |
virtual void | releaseDrawing () |
virtual bool | allDrawingHeld () const |
virtual void | setOperationCompleted (bool completed) |
virtual int | showAndExec (bool show=true) |
virtual bool | close ()=0 |
virtual PlotFactoryPtr | getPlotFactory () |
Static Public Member Functions | |
static casacore::String | aboutText (Plotter::Implementation implementation, bool useHTML=true) |
Static //. More... | |
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). More... | |
Protected Member Functions inherited from casa::Client | |
Client () | |
virtual | ~Client () |
Private Slots | |
void | action_ () |
Method for when an action has been triggered. More... | |
void | action (QAction *which) |
Method for when the given action has been triggered. More... | |
void | currentThreadFinished () |
Slot for when the currently running thread is finished. More... | |
void | summarize () |
Summarize an MS. More... | |
void | exportPlots () |
Export the current plots. More... | |
void | tabChanged () |
Private Member Functions | |
bool | _triggerAction (PlotMSAction::Type type) |
void | initialize (Plotter::Implementation impl) |
Initializes the plotter with the given implementation. More... | |
Private Attributes | |
PlotMSApp * | itsParent_ |
PlotMSApp parent. More... | |
bool | isQt_ |
Flag for whether the underlying Plotter is Qt-based or not. More... | |
bool | isClosed_ |
Flag for whether the widget is open or not. More... | |
QList< QWidget * > | itsEnableWidgets_ |
Widgets to be enabled/disabled during threading. More... | |
PlotMSDataSummaryTab * | itsPlotTab_ |
Plot tab. More... | |
PlotMSFlaggingTab * | itsFlaggingTab_ |
Flagging tab (on the plot tab). More... | |
PlotMSToolsTab * | itsToolsTab_ |
Tools tab. More... | |
PlotMSAnnotatorTab * | itsAnnotatorTab_ |
Annotator tab. More... | |
PlotMSOptionsTab * | itsOptionsTab_ |
Options tab. More... | |
QList< QToolButton * > | itsToolButtons_ |
Tool buttons on the tabs. More... | |
QtProgressWidget * | itsThreadProgress_ |
Widget for displaying thread progress. More... | |
PlotMSThread * | itsCurrentThread_ |
Current thread (or NULL for none). More... | |
std::vector< PlotMSThread * > | itsWaitingThreads_ |
Waiting threads. More... | |
QMap< PlotMSAction::Type, QAction * > | itsActionMap_ |
casacore::Map between PlotMSApp actions and QActions. More... | |
QtActionSynchronizer | itsActionSynchronizer_ |
Action synchronizer. More... | |
PlotMSAnnotator | itsAnnotator_ |
Annotator tool. More... | |
QString | itsAboutString_ |
"About" string. More... | |
bool | showProgressWidget |
QTabWidget * | tabWidget |
Additional Inherited Members | |
Protected Attributes inherited from casa::Client | |
PlotterPtr | itsPlotter_ |
Plotter. More... | |
PlotFactoryPtr | itsFactory_ |
Plot factory. More... | |
High(ish)-level plotter class that manages the GUI (semi-) transparently to the rest of PlotMS.
Definition at line 64 of file PlotMSPlotter.qo.h.
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.
|
private |
|
static |
Static //.
Returns "about" text for the given implementation, using HTML or not.
|
privateslot |
Method for when the given action has been triggered.
Referenced by action_().
|
inlineprivateslot |
Method for when an action has been triggered.
Definition at line 308 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.
casacore::String casa::PlotMSPlotter::actionText | ( | PlotMSAction::Type | type | ) |
Gets/Sets the text for the QAction associated with the given PlotMSApp action.
|
virtual |
Add a plot to those displayed.
Implements casa::Client.
|
virtual |
Implements PlotDrawWatcher::canvasDrawBeginning().
Implements casa::PlotDrawWatcher.
|
inlinevirtualslot |
Clears the message in a GUI window.
Definition at line 211 of file PlotMSPlotter.qo.h.
References clearStatusText().
|
inline |
Clears the status bar text.
Definition at line 166 of file PlotMSPlotter.qo.h.
References setStatusText().
Referenced by clearMessage().
|
virtualslot |
|
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).
|
privateslot |
Slot for when the currently running thread is finished.
Performs cleanup and starts next waiting thread if applicable.
|
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 |
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 |
export a plot to a file
Implements casa::Client.
|
privateslot |
Export the current plots.
|
inline |
Definition at line 108 of file PlotMSPlotter.qo.h.
References itsAnnotator_.
|
virtual |
Return the current client plot.
Implements casa::Client.
|
virtual |
Return a list of files loaded in the client.
Implements casa::Client.
|
virtual |
Retrieve flagging information specified by the client.
Implements casa::Client.
|
inline |
|
inline |
Definition at line 106 of file PlotMSPlotter.qo.h.
References itsThreadProgress_.
|
virtual |
Retrieve the plot load axes the user has specified.
Implements casa::Client.
|
virtual |
Retrieve the release axes the user has specified.
Implements casa::Client.
|
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 |
Implements casa::Client.
|
virtual |
Returns true if the GUI is currently visible, false otherwise.
Implements casa::Client.
|
private |
Initializes the plotter with the given implementation.
MUST be called from constructors.
|
virtual |
Methods from the client interface.
Implements casa::Client.
|
virtual |
Implements casa::Client.
|
virtual |
Implements casa::Client.
|
virtual |
Return whether the client is interactive (a GUI) or noninteractive (a script)
Implements casa::Client.
|
virtual |
Implements casa::Client.
const QMap<PlotMSAction::Type, QAction*>& casa::PlotMSPlotter::plotActionMap | ( | ) | const |
|
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 casacore::String & | text | ||
) |
|
virtual |
Use to enable annotations in the GUI client.
Reimplemented from casa::Client.
|
virtual |
Flagging.
Implements casa::Client.
void casa::PlotMSPlotter::setShowProgress | ( | bool | showProgressDialog | ) |
Execution Methods //.
void casa::PlotMSPlotter::setStatusText | ( | const casacore::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 casacore::String & | windowTitle | ) |
Plotter Customization Methods //.
Sets the window title to the given.
|
slot |
Slot for showing an "about" dialog.
|
virtualslot |
Shows the given error/warning message in a GUI window.
|
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.
|
virtualslot |
Shows the given informational message in a GUI window.
bool casa::PlotMSPlotter::showQuestion | ( | const casacore::String & | message, |
const casacore::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.
|
privateslot |
Summarize an MS.
void casa::PlotMSPlotter::synchronizeAction | ( | PlotMSAction::Type | action, |
QAbstractButton * | button | ||
) |
Synchronizes the given button with the given action type.
(See QtActionSynchronizer class.)
|
privateslot |
|
private |
Flag for whether the widget is open or not.
Definition at line 248 of file PlotMSPlotter.qo.h.
|
private |
Flag for whether the underlying Plotter is Qt-based or not.
Definition at line 245 of file PlotMSPlotter.qo.h.
|
private |
"About" string.
Definition at line 293 of file PlotMSPlotter.qo.h.
|
private |
casacore::Map between PlotMSApp actions and QActions.
Definition at line 284 of file PlotMSPlotter.qo.h.
|
private |
Action synchronizer.
Definition at line 287 of file PlotMSPlotter.qo.h.
|
private |
|
private |
Annotator tab.
Definition at line 266 of file PlotMSPlotter.qo.h.
|
private |
Current thread (or NULL for none).
Definition at line 278 of file PlotMSPlotter.qo.h.
|
private |
Widgets to be enabled/disabled during threading.
Definition at line 254 of file PlotMSPlotter.qo.h.
|
private |
Flagging tab (on the plot tab).
Definition at line 260 of file PlotMSPlotter.qo.h.
|
private |
Options tab.
Definition at line 269 of file PlotMSPlotter.qo.h.
|
private |
|
private |
Plot tab.
Definition at line 257 of file PlotMSPlotter.qo.h.
|
private |
Widget for displaying thread progress.
Definition at line 275 of file PlotMSPlotter.qo.h.
Referenced by getProgressWidget().
|
private |
Tool buttons on the tabs.
Definition at line 272 of file PlotMSPlotter.qo.h.
|
private |
Tools tab.
Definition at line 263 of file PlotMSPlotter.qo.h.
|
private |
Waiting threads.
Definition at line 281 of file PlotMSPlotter.qo.h.
|
private |
Definition at line 295 of file PlotMSPlotter.qo.h.
|
private |
Definition at line 297 of file PlotMSPlotter.qo.h.