casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PlotMSAxesTab.qo.h
Go to the documentation of this file.
1 //# PlotMSAxesTab.qo.h: Plot tab for axes parameters.
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 PLOTMSAXESTAB_QO_H_
28 #define PLOTMSAXESTAB_QO_H_
29 
30 #include <plotms/GuiTabs/PlotMSAxesTab.ui.h>
31 
33 
34 namespace casa {
35 
36 //# Forward declarations
37 class PlotMSAxisWidget;
38 
39 
40 // Subclass of PlotMSPlotSubtab that manages plot axes parameters.
41 class PlotMSAxesTab : public PlotMSPlotSubtab, Ui::AxesTab {
42  Q_OBJECT
43 
44 public:
45  // Constructor which takes the parent tab and plotter.
46  PlotMSAxesTab(PlotMSPlotTab* plotTab, PlotMSPlotter* parent);
47 
48  // Destructor.
50 
51 
52  // Implements PlotMSTab::tabName().
53  QString tabName() const { return "Axes"; }
54 
55  // Implements PlotMSPlotSubtab::getValue(). WARNING: for now, only works
56  // with PlotMSSinglePlotParameters.
57  void getValue(PlotMSPlotParameters& params) const;
58 
59  // Implements PlotMSPlotSubtab::setValue(). WARNING: for now, only works
60  // with PlotMSSinglePlotParameters.
61  void setValue(const PlotMSPlotParameters& params);
62 
63  // Implements PlotMSPlotSubtab::update(). WARNING: for now, only works
64  // with PlotMSSinglePlotParameters.
65  void update(const PlotMSPlot& plot);
66 
67  //Makes sure the user has not specified duplicate axes in data/location.
68  bool isAxesValid() const;
69 
70 signals:
71  //Identifier for a y-axis has changed.
72  void yAxisIdentifierChanged( int index, QString id );
73 
74  //A y-axis has been removed.
75  void yAxisIdentifierRemoved( int index );
76 
77 private slots:
78  //Add a new y-axis.
79  void addYWidget();
80 
81  //Remove a y-axis.
82  void removeYWidget();
83 
84  //Selected data for a y-axis has changed.
85  void axisIdentifierChanged(PlotMSAxisWidget* axisWidget);
86 
87  //Display the settings for a new y-axis.
88  void yAxisSelected( int index );
89 
90  // atm/tsky/sideband enabled/changed
91  void overlayChanged();
92 
93 private:
94 
95  //Hide/show features associated with multipleYAxes.
97 
98  //Relabel based on the new y-axis index.
99  void setYAxisLabel( PlotMSAxisWidget* yWidget, int index );
100 
101  // Get cache data for manual range
102  void setRangeFromCache(bool foundInCache, bool isDate);
103 
104  // Widgets for the x axis and y axis, respectively.
106  QList<PlotMSAxisWidget*> itsYWidgets_;
107 };
108 
109 }
110 
111 #endif /* PLOTMSAXESTAB_QO_H_ */
void overlayChanged()
atm/tsky/sideband enabled/changed
void update(const PlotMSPlot &plot)
Implements PlotMSPlotSubtab::update().
void yAxisSelected(int index)
Display the settings for a new y-axis.
void setMultipleAxesYEnabled()
Hide/show features associated with multipleYAxes.
void addYWidget()
Add a new y-axis.
bool isAxesValid() const
Makes sure the user has not specified duplicate axes in data/location.
QList< PlotMSAxisWidget * > itsYWidgets_
QString tabName() const
Implements PlotMSTab::tabName().
Parameters for a PlotMSPlot.
void setValue(const PlotMSPlotParameters &params)
Implements PlotMSPlotSubtab::setValue().
PlotMSAxesTab(PlotMSPlotTab *plotTab, PlotMSPlotter *parent)
Constructor which takes the parent tab and plotter.
void yAxisIdentifierRemoved(int index)
A y-axis has been removed.
Subclass of PlotMSTab for tabs that are meant to be used as subtabs in a PlotMSPlotTab.
Class for a single &quot;plot&quot; concept.
Definition: PlotMSPlot.h:57
void axisIdentifierChanged(PlotMSAxisWidget *axisWidget)
Selected data for a y-axis has changed.
void setYAxisLabel(PlotMSAxisWidget *yWidget, int index)
Relabel based on the new y-axis index.
~PlotMSAxesTab()
Destructor.
void setRangeFromCache(bool foundInCache, bool isDate)
Get cache data for manual range.
Subclass of PlotMSPlotSubtab that manages plot axes parameters.
PlotMSAxisWidget * itsXWidget_
Widgets for the x axis and y axis, respectively.
High(ish)-level plotter class that manages the GUI (semi-) transparently to the rest of PlotMS...
void yAxisIdentifierChanged(int index, QString id)
Identifier for a y-axis has changed.
Subclass of PlotMSTab that manages PlotMSPlots in the GUI.
void getValue(PlotMSPlotParameters &params) const
Implements PlotMSPlotSubtab::getValue().
Widget for choosing a single axis.
void removeYWidget()
Remove a y-axis.