PlotMSDataSummaryTab.qo.h

Go to the documentation of this file.
00001 //# Copyright (C) 2009
00002 //# Associated Universities, Inc. Washington DC, USA.
00003 //#
00004 //# This library is free software; you can redistribute it and/or modify it
00005 //# under the terms of the GNU Library General Public License as published by
00006 //# the Free Software Foundation; either version 2 of the License, or (at your
00007 //# option) any later version.
00008 //#
00009 //# This library is distributed in the hope that it will be useful, but WITHOUT
00010 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00011 //# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00012 //# License for more details.
00013 //#
00014 //# You should have received a copy of the GNU Library General Public License
00015 //# along with this library; if not, write to the Free Software Foundation,
00016 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
00017 //#
00018 //# Correspondence concerning AIPS++ should be addressed as follows:
00019 //#        Internet email: aips2-request@nrao.edu.
00020 //#        Postal address: AIPS++ Project Office
00021 //#                        National Radio Astronomy Observatory
00022 //#                        520 Edgemont Road
00023 //#                        Charlottesville, VA 22903-2475 USA
00024 //#
00025 //# $Id: $
00026 #ifndef PLOTMSDATASUMMARYTAB_QO_H_
00027 #define PLOTMSDATASUMMARYTAB_QO_H_
00028 
00029 #include <plotms/GuiTabs/PlotMSDataSummaryTab.ui.h>
00030 #include <plotms/Plots/PlotMSPlotParameters.h>
00031 #include <plotms/PlotMS/PlotMS.h>
00032 #include <plotms/GuiTabs/PlotMSTab.qo.h>
00033 
00034 namespace casa {
00035 
00036 class PlotMSDataCollapsible;
00037 class PlotMSPlotTab;
00038 
00042 class PlotMSDataSummaryTab : public PlotMSTab, public PlotMSPlotManagerWatcher {
00043     Q_OBJECT
00044     
00045 public:    
00046     // Constructor which takes the parent tab and plotter.
00047     PlotMSDataSummaryTab(PlotMSPlotter* parent);
00048     
00049     // Destructor.
00050     ~PlotMSDataSummaryTab();
00051     
00052     // Implements PlotMSTab::tabName().
00053     QString tabName() const { return "Plot"; }
00054     
00055     // Implements PlotMSParametersWatcher::parametersHaveChanged().  Updates
00056     // the GUI as needed if the given parameters are the current PlotMSPlot's
00057     // parameters.
00058     void parametersHaveChanged(const PlotMSWatchedParameters& params,
00059                int updateFlag);
00060 
00061     // Implements PlotMSPlotManagerWatcher::plotsChanged().
00062     void plotsChanged(const PlotMSPlotManager& manager);
00063 
00064     //Size of the grid (rows & cols).
00065     void setGridSize( int rowCount, int colCount );
00066 
00067     // Returns the axes that the user has selected to load/release into the cache.
00068      vector<vector<PMS::Axis> > selectedLoadAxes() const;
00069      vector<vector<PMS::Axis> > selectedReleaseAxes() const;
00070 
00071      //Tell all of the supported plots to update their displays.
00072     bool plot();
00073 
00074     //Add a plot
00075     void insertData( int index );
00076 
00077     //Return the currently supported plots.
00078     vector<PlotMSPlot*> getCurrentPlots();
00079 
00080     void emptyLayout();
00081 
00082 
00083     //Get the files that the user loaded.
00084     vector<String> getFiles() const;
00085     void completePlotting( bool success, PlotMSPlot* plot );
00086 signals:
00087         void changed( int index );
00088 
00089 protected:
00090         void resizeEvent( QResizeEvent* event );
00091 
00092 private slots:
00093         void singleDataChanged(PlotMSDataCollapsible* collapsible);
00094         void addSinglePlot( int plotIndex = -1);
00095         void observeModKeys();
00096         void close( PlotMSDataCollapsible* collapsible );
00097 
00098 private:
00099         //This was put in to support overplotting.  When two plots are sharing the
00100         //same canvas, we don't want to trigger a redraw until all the plots sharing
00101         //the same canvas are done updating their data in background threads.
00102     void completePlotting( bool success, int plotIndex);
00103     void fillLayout();
00104 
00105     QList<PlotMSDataCollapsible*> dataList;
00106     QWidget* scrollWidget;
00107     QSpacerItem* bottomSpacer;
00108     int rowLimit;
00109     int colLimit;
00110 
00111     // Flag set if user uses shift+plot or otherwise requests reload&replot
00112     bool its_force_reload;
00113     bool makingPlot;
00114     Ui::PlotMSDataSummaryTabClass ui;
00115 };
00116 
00117 }
00118 
00119 #endif /* PLOTMSDATASUMMARYTAB_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