PlotMSAxesTab.qo.h

Go to the documentation of this file.
00001 //# PlotMSAxesTab.qo.h: Plot tab for axes parameters.
00002 //# Copyright (C) 2009
00003 //# Associated Universities, Inc. Washington DC, USA.
00004 //#
00005 //# This library is free software; you can redistribute it and/or modify it
00006 //# under the terms of the GNU Library General Public License as published by
00007 //# the Free Software Foundation; either version 2 of the License, or (at your
00008 //# option) any later version.
00009 //#
00010 //# This library is distributed in the hope that it will be useful, but WITHOUT
00011 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00012 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00013 //# License for more details.
00014 //#
00015 //# You should have received a copy of the GNU Library General Public License
00016 //# along with this library; if not, write to the Free Software Foundation,
00017 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00018 //#
00019 //# Correspondence concerning AIPS++ should be addressed as follows:
00020 //#        Internet email: aips2-request@nrao.edu.
00021 //#        Postal address: AIPS++ Project Office
00022 //#                        National Radio Astronomy Observatory
00023 //#                        520 Edgemont Road
00024 //#                        Charlottesville, VA 22903-2475 USA
00025 //#
00026 //# $Id: $
00027 #ifndef PLOTMSAXESTAB_QO_H_
00028 #define PLOTMSAXESTAB_QO_H_
00029 
00030 #include <plotms/GuiTabs/PlotMSAxesTab.ui.h>
00031 
00032 #include <plotms/GuiTabs/PlotMSPlotTab.qo.h>
00033 
00034 namespace casa {
00035 
00036 //# Forward declarations
00037 class PlotMSAxisWidget;
00038 
00039 
00040 // Subclass of PlotMSPlotSubtab that manages plot axes parameters.
00041 class PlotMSAxesTab : public PlotMSPlotSubtab, Ui::AxesTab {
00042     Q_OBJECT
00043     
00044 public:
00045     // Constructor which takes the parent tab and plotter.
00046     PlotMSAxesTab(PlotMSPlotTab* plotTab, PlotMSPlotter* parent);
00047     
00048     // Destructor.
00049     ~PlotMSAxesTab();
00050     
00051     
00052     // Implements PlotMSTab::tabName().
00053     QString tabName() const { return "Axes"; }
00054     
00055     // Implements PlotMSPlotSubtab::getValue().  WARNING: for now, only works
00056     // with PlotMSSinglePlotParameters.
00057     void getValue(PlotMSPlotParameters& params) const;
00058     
00059     // Implements PlotMSPlotSubtab::setValue().  WARNING: for now, only works
00060     // with PlotMSSinglePlotParameters.
00061     void setValue(const PlotMSPlotParameters& params);
00062     
00063     // Implements PlotMSPlotSubtab::update().  WARNING: for now, only works
00064     // with PlotMSSinglePlotParameters.
00065     void update(const PlotMSPlot& plot);
00066     
00067     //Makes sure the user has not specified duplicate axes in data/location.
00068     bool isAxesValid() const;
00069 
00070 signals:
00071         //Identifier for a y-axis has changed.
00072         void yAxisIdentifierChanged( int index, QString id );
00073 
00074         //A y-axis has been removed.
00075         void yAxisIdentifierRemoved( int index );
00076 
00077 private slots:
00078         //Add a new y-axis.
00079         void addYWidget();
00080 
00081         //Remove a y-axis.
00082         void removeYWidget();
00083 
00084         //Selected data for a y-axis has changed.
00085         void axisIdentifierChanged(PlotMSAxisWidget* axisWidget);
00086 
00087         //Display the settings for a new y-axis.
00088         void yAxisSelected( int index );
00089 
00090 private:
00091 
00092         //Hide/show features associated with multipleYAxes.
00093         void setMultipleAxesYEnabled();
00094 
00095         //Relabel based on the new y-axis index.
00096         void setYAxisLabel( PlotMSAxisWidget* yWidget, int index );
00097 
00098         // Get cache data for manual range
00099         void setRangeFromCache(bool foundInCache, bool isDate);
00100 
00101     // Widgets for the x axis and y axis, respectively.
00102     PlotMSAxisWidget* itsXWidget_;
00103     QList<PlotMSAxisWidget*> itsYWidgets_;
00104 };
00105 
00106 }
00107 
00108 #endif /* PLOTMSAXESTAB_QO_H_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 31 Aug 2016 for casa by  doxygen 1.6.1