casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PlotMSToolsTab.qo.h
Go to the documentation of this file.
1 //# PlotMSToolsTab.qo.h: Subclass of PlotMSTab for tools management.
2 //# Copyright (C) 2009
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //# $Id: $
27 #ifndef PLOTMSTOOLSTAB_QO_H_
28 #define PLOTMSTOOLSTAB_QO_H_
29 
30 #include <plotms/GuiTabs/PlotMSToolsTab.ui.h>
31 
34 
35 namespace casa {
36 
37 
38 class PlotMSToolsTab; /* fwd */
39 
40 // Registered with all Canvases so Tracker can act upon key presses
42 
43  public:
45 
46  virtual void handleKey(const PlotKeyEvent& event);
47 
48  private:
50 };
51 
52 
53 
54 
55 // Subclass of PlotMSTab that handles the tools for the current plot. Watches
56 // no parameters.
57 class PlotMSToolsTab : public PlotMSTab, Ui::ToolsTab,
59  Q_OBJECT
60 
61 public:
62  // Constructor which takes the parent plotter, and the QtActionGroup to
63  // use to synchronize tool actions with the radio buttons on the tab.
65 
66  // Destructor.
68 
69 
70  // Implements PlotMSTab::tabName().
71  QString tabName() const { return "Tools"; }
72 
73  // Overrides PlotMSTab::toolButtons().
74  QList<QToolButton*> toolButtons() const;
75 
76  // Implements PlotMSParametersWatcher::parametersHaveChanged. Currently
77  // does nothing.
79  int updateFlag) { (void)params,(void)updateFlag; }
80 
81 
82  // Show/hide the iteration buttons on this tab.
83  void showIterationButtons(bool show);
84 
85 
86 
87 
88 public slots:
89  // Slot for when all tools are turned off, and the "None" radio button
90  // should be checked.
91  void toolsUnchecked();
92 
93  // Tracker "snapshot" feature. Copies value in live display
94  // into multi-line text box for user to copy/paste.
95  // Made a slot in case it's useful to connect to a signal, but
96  // for the initial version, this is not done.
98 
99  // Erase contents of the text box holding recorded tracker values
100  void clearRecordedValues();
101 
102 protected:
103  // Implements PlotTrackerToolNotifier::notifyTrackerChanged(). Updates the
104  // tracker information in the line edit, if the proper checkbox is toggled.
106 
107 public:
109 
110 };
111 
112 }
113 
114 #endif /* PLOTMSTOOLSTAB_QO_H_ */
TrackerKeyHandler * tracker_key_handler
void notifyTrackerChanged(PlotTrackerTool &tool)
Implements PlotTrackerToolNotifier::notifyTrackerChanged().
~PlotMSToolsTab()
Destructor.
Base class for a handler for PlotKeyEvent.
void toolsUnchecked()
Slot for when all tools are turned off, and the &quot;None&quot; radio button should be checked.
PlotMSToolsTab(PlotMSPlotter *parent)
Constructor which takes the parent plotter, and the QtActionGroup to use to synchronize tool actions ...
friend class PlotTrackerTool
Definition: PlotTool.h:732
QString tabName() const
Implements PlotMSTab::tabName().
QList< QToolButton * > toolButtons() const
Overrides PlotMSTab::toolButtons().
virtual void handleKey(const PlotKeyEvent &event)
Handle the given event.
void show(const variant &v)
Abstract class for parameters that may be watched by one or more interested classes.
Event for when the user makes a keyboard command when a canvas has focus.
Definition: PlotEvent.h:216
Interface for objects that want to be notified when the tracker tool changes.
Definition: PlotTool.h:731
TrackerKeyHandler(PlotMSToolsTab *)
void clearRecordedValues()
Erase contents of the text box holding recorded tracker values.
PlotMSToolsTab * tools_tab
Subclass of PlotMSTab that handles the tools for the current plot.
void parametersHaveChanged(const PlotMSWatchedParameters &params, int updateFlag)
Implements PlotMSParametersWatcher::parametersHaveChanged.
void showIterationButtons(bool show)
Show/hide the iteration buttons on this tab.
Abstract parent for any widget that goes in the tabbed side panel of the PlotMSPlotter.
Definition: PlotMSTab.qo.h:48
Registered with all Canvases so Tracker can act upon key presses.
High(ish)-level plotter class that manages the GUI (semi-) transparently to the rest of PlotMS...
void takeSnapshotOfTrackerValue()
Tracker &quot;snapshot&quot; feature.