27 #ifndef PLOTMSPLOTTER_QO_H_
28 #define PLOTMSPLOTTER_QO_H_
30 #include <plotms/Gui/PlotMSPlotter.ui.h>
39 #include <QMainWindow>
40 #include <QToolButton>
41 #if defined(WITHOUT_DBUS)
50 class QtProgressWidget;
52 class PlotMSAnnotatorTab;
53 class PlotMSFlaggingTab;
54 class PlotMSOptionsTab;
56 class PlotMSExportTab;
59 class PlotMSDataSummaryTab;
81 virtual std::vector<casacore::String>
getFiles()
const;
138 bool drawingIsThreaded,
int drawnLayersFlag);
177 const QMap<PlotMSAction::Type, QAction*>&
plotActionMap()
const;
195 bool alsoTriggerAction =
false);
221 virtual bool close();
223 #if defined(WITHOUT_DBUS)
224 void grpc_handle_op( );
225 void grpc_exit_now( );
228 std::mutex grpc_queue_mutex;
229 std::queue<std::function<void()>> grpc_queue;
311 void action(QAction* which);
casacore::CountedPtr< PlotMSPlotter > PlotMSPlotterPtr
void synchronizeAction(PlotMSAction::Type action, QAbstractButton *button)
Synchronizes the given button with the given action type.
void showAbout()
Slot for showing an "about" dialog.
QList< QWidget * > itsEnableWidgets_
Widgets to be enabled/disabled during threading.
bool canvasDrawBeginning(PlotOperationPtr drawOperation, bool drawingIsThreaded, int drawnLayersFlag)
Implements PlotDrawWatcher::canvasDrawBeginning().
virtual bool isInteractive() const
Return whether the client is interactive (a GUI) or noninteractive (a script)
virtual void setFlagging(PlotMSFlagging flag)
Flagging.
const QMap< PlotMSAction::Type, QAction * > & plotActionMap() const
Action Methods //.
virtual bool guiShown() const
Returns true if the GUI is currently visible, false otherwise.
Subclass of PlotMouseTool for drawing/managing annotations on the plot canvases of PlotMSApp...
virtual std::vector< PlotMSPlot * > getCurrentPlots() const
Return the current client plot.
virtual Type type()
Return the type enum.
void closeEvent(QCloseEvent *event)
Overrides QWidget::closeEvent(), in case we're dealing with a plotter that isn't Qt and thus is in it...
bool _triggerAction(PlotMSAction::Type type)
void setShowProgress(bool showProgressDialog)
Execution Methods //.
bool actionIsChecked(PlotMSAction::Type type) const
Gets/Sets whether the QAction associated with the given PlotMSApp action is checked.
PlotMSAnnotator itsAnnotator_
Annotator tool.
virtual PlotMSFlagging getFlagging() const
Retrieve flagging information specified by the client.
QtActionSynchronizer itsActionSynchronizer_
Action synchronizer.
Subclass of PlotMSTab that handles flagging.
PlotMSApp * getParent()
Accessor methods.
PlotMSAnnotatorTab * itsAnnotatorTab_
Annotator tab.
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.
void show(const variant &v)
Subclass of PlotMSTab that handles interaction with the PlotMSAnnotator.
static casacore::String aboutText(Plotter::Implementation implementation, bool useHTML=true)
Static //.
std::vector< PlotMSThread * > itsWaitingThreads_
Waiting threads.
void setToolButtonStyle(Qt::ToolButtonStyle style)
Overrides QMainWindow::setToolButtonStyle().
bool isQt_
Flag for whether the underlying Plotter is Qt-based or not.
Controller class for plotms.
~PlotMSPlotter()
Destructor.
PlotMSToolsTab * itsToolsTab_
Tools tab.
void showIterationButtons(bool show)
GUI Methods //.
virtual std::vector< std::vector< PMS::Axis > > getSelectedLoadAxes() const
Retrieve the plot load axes the user has specified.
virtual void showMessage(const casacore::String &message, const casacore::String &title, bool warning=false)
Shows the given informational message in a GUI window.
virtual bool exportPlot(const PlotExportFormat &format, const bool async)
export a plot to a file
Specifies flagging parameters (including possibly flag extension) for an MS.
virtual void showError(const casacore::String &message, const casacore::String &title, bool isWarning)
Shows the given error/warning message in a GUI window.
Type
Static // Enum for implemented actions.
PlotMSOptionsTab * itsOptionsTab_
Options tab.
void setStatusText(const casacore::String &statusText)
Sets the status bar text to the given.
void setActionText(PlotMSAction::Type type, const casacore::String &text)
void currentThreadFinished()
Slot for when the currently running thread is finished.
Class for a single "plot" concept.
Subclass of PlotMSTab that handles options for PlotMSPlotter.
PlotMSPlotter(PlotMSApp *parent, Plotter::Implementation impl=Plotter::DEFAULT)
Non-Static //.
void setWindowTitle(const casacore::String &windowTitle)
Plotter Customization Methods //.
PlotMSThread * itsCurrentThread_
Current thread (or NULL for none).
virtual void clearMessage()
Clears the message in a GUI window.
virtual void canvasAdded(PlotCanvasPtr &canvas)
Add a plot to those displayed.
Abstraction for the interface between the client (possibly a GUI) and the model (plot engine) that is...
virtual std::vector< std::vector< PMS::Axis > > getSelectedReleaseAxes() const
Retrieve the release axes the user has specified.
void action_()
Method for when an action has been triggered.
casacore::String actionText(PlotMSAction::Type type)
Gets/Sets the text for the QAction associated with the given PlotMSApp action.
virtual void setAnnotationModeActive(PlotMSAction::Type type, bool active)
Use to enable annotations in the GUI client.
virtual int execLoop()
Enters the plotter's execution loop, and returns its return value.
void initialize(Plotter::Implementation impl)
Initializes the plotter with the given implementation.
bool isClosed_
Flag for whether the widget is open or not.
virtual void showGUI(bool show=true)
Shows/hides the GUI.
PlotMSDataSummaryTab * itsPlotTab_
Plot tab.
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...
void setActionIsChecked(PlotMSAction::Type type, bool checked, bool alsoTriggerAction=false)
Handles adding multiple plots to the GUI.
Abstract class to control a threaded operation from the GUI.
void PMSPTMethod(PMSPTObject, bool)
PlotMSAnnotator & getAnnotator()
PlotMSFlaggingTab * itsFlaggingTab_
Flagging tab (on the plot tab).
Abstract parent for any class that wants to be notified when the canvas is about to start drawing...
void prepareForPlotting()
Take any clean-up actions before a Plot is made 1) unclick any zoom, pan, etc buttons to avoid bug in...
String: the storage and methods of handling collections of characters.
QList< QToolButton * > itsToolButtons_
Tool buttons on the tabs.
virtual void doThreadedOperation(ThreadController *thread)
Runs the given operation thread, keeping GUI and progress information synchronized as necessary...
Default plotter implementation is set here.
High(ish)-level plotter class that manages the GUI (semi-) transparently to the rest of PlotMS...
void exportPlots()
Export the current plots.
PlotMSApp * itsParent_
PlotMSApp parent.
QtProgressWidget * itsThreadProgress_
Widget for displaying thread progress.
virtual bool isActionEnabled(PlotMSAction::Type type) const
Methods from the client interface.
virtual bool isDrawing() const
QMap< PlotMSAction::Type, QAction * > itsActionMap_
casacore::Map between PlotMSApp actions and QActions.
QtProgressWidget * getProgressWidget()
QString itsAboutString_
"About" string.
virtual void gridSizeChanged(int rowCount, int colCount)
This class is used to synchronize the checked state of actions with checkable buttons or other action...
void clearStatusText()
Clears the status bar text.
void summarize()
Summarize an MS.
virtual std::vector< casacore::String > getFiles() const
Return a list of files loaded in the client.
void action(QAction *which)
Method for when the given action has been triggered.
virtual bool isClosed() const