casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PlotMSDataSummaryTab.qo.h
Go to the documentation of this file.
1 //# Copyright (C) 2009
2 //# Associated Universities, Inc. Washington DC, USA.
3 //#
4 //# This library is free software; you can redistribute it and/or modify it
5 //# under the terms of the GNU Library General Public License as published by
6 //# the Free Software Foundation; either version 2 of the License, or (at your
7 //# option) any later version.
8 //#
9 //# This library is distributed in the hope that it will be useful, but WITHOUT
10 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 //# License for more details.
13 //#
14 //# You should have received a copy of the GNU Library General Public License
15 //# along with this library; if not, write to the Free Software Foundation,
16 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
17 //#
18 //# Correspondence concerning AIPS++ should be addressed as follows:
19 //# Internet email: aips2-request@nrao.edu.
20 //# Postal address: AIPS++ Project Office
21 //# National Radio Astronomy Observatory
22 //# 520 Edgemont Road
23 //# Charlottesville, VA 22903-2475 USA
24 //#
25 //# $Id: $
26 #ifndef PLOTMSDATASUMMARYTAB_QO_H_
27 #define PLOTMSDATASUMMARYTAB_QO_H_
28 
30 
31 #include <plotms/GuiTabs/PlotMSDataSummaryTab.ui.h>
33 #include <plotms/PlotMS/PlotMS.h>
35 
36 namespace casa {
37 
38 class PlotMSDataCollapsible;
39 class PlotMSPlotTab;
40 
45  Q_OBJECT
46 
47 public:
48  // Constructor which takes the parent tab and plotter.
50 
51  // Destructor.
53 
54  // Implements PlotMSTab::tabName().
55  QString tabName() const { return "Plot"; }
56 
57  // Implements PlotMSParametersWatcher::parametersHaveChanged(). Updates
58  // the GUI as needed if the given parameters are the current PlotMSPlot's
59  // parameters.
61  int updateFlag);
62 
63  // Implements PlotMSPlotManagerWatcher::plotsChanged().
64  void plotsChanged(const PlotMSPlotManager& manager);
65 
66  //Size of the grid (rows & cols).
67  void setGridSize( int rowCount, int colCount );
68 
69  // Returns the axes that the user has selected to load/release into the cache.
70  std::vector<std::vector<PMS::Axis> > selectedLoadAxes() const;
71  std::vector<std::vector<PMS::Axis> > selectedReleaseAxes() const;
72 
73  //Tell all of the supported plots to update their displays.
74  bool plot();
75 
76  //Add a plot
77  void insertData( int index );
78 
79  //Return the currently supported plots.
80  std::vector<PlotMSPlot*> getCurrentPlots();
81 
82  void emptyLayout();
83 
84 
85  //Get the files that the user loaded.
86  std::vector<casacore::String> getFiles() const;
87  void completePlotting( bool success, PlotMSPlot* plot );
88 signals:
89  void changed( int index );
90 
91 protected:
92  void resizeEvent( QResizeEvent* event );
93 
94 private slots:
95  void singleDataChanged(PlotMSDataCollapsible* collapsible);
96  void addSinglePlot( int plotIndex = -1);
97  void observeModKeys();
98  void close( PlotMSDataCollapsible* collapsible );
99 
100 private:
101  //This was put in to support overplotting. When two plots are sharing the
102  //same canvas, we don't want to trigger a redraw until all the plots sharing
103  //the same canvas are done updating their data in background threads.
104  void completePlotting( bool success, int plotIndex);
105  void fillLayout();
106 
107  void refreshPageHeader();
108 
109  QList<PlotMSDataCollapsible*> dataList;
110  QWidget* scrollWidget;
111  QSpacerItem* bottomSpacer;
112  int rowLimit;
113  int colLimit;
114 
115  // Flag set if user uses shift+plot or otherwise requests reload&replot
118  Ui::PlotMSDataSummaryTabClass ui;
119 };
120 
121 }
122 
123 #endif /* PLOTMSDATASUMMARYTAB_QO_H_ */
void singleDataChanged(PlotMSDataCollapsible *collapsible)
bool plot()
Tell all of the supported plots to update their displays.
void addSinglePlot(int plotIndex=-1)
std::vector< std::vector< PMS::Axis > > selectedReleaseAxes() const
void parametersHaveChanged(const PlotMSWatchedParameters &params, int updateFlag)
Implements PlotMSParametersWatcher::parametersHaveChanged().
void close(PlotMSDataCollapsible *collapsible)
bool its_force_reload
Flag set if user uses shift+plot or otherwise requests reload&amp;replot.
QList< PlotMSDataCollapsible * > dataList
Abstract class for parameters that may be watched by one or more interested classes.
std::vector< std::vector< PMS::Axis > > selectedLoadAxes() const
Returns the axes that the user has selected to load/release into the cache.
void plotsChanged(const PlotMSPlotManager &manager)
Implements PlotMSPlotManagerWatcher::plotsChanged().
QString tabName() const
Implements PlotMSTab::tabName().
void insertData(int index)
Add a plot.
Class for a single &quot;plot&quot; concept.
Definition: PlotMSPlot.h:57
void completePlotting(bool success, PlotMSPlot *plot)
~PlotMSDataSummaryTab()
Destructor.
Ui::PlotMSDataSummaryTabClass ui
PlotMSDataSummaryTab(PlotMSPlotter *parent)
Constructor which takes the parent tab and plotter.
void setGridSize(int rowCount, int colCount)
Size of the grid (rows &amp; cols).
Interface for any class that wants to be notified when the plots in the manager have changed...
std::vector< casacore::String > getFiles() const
Get the files that the user loaded.
Handles adding multiple plots to the GUI.
Represents a single plot&#39;s properties that can be shown maximized or minimized; handles whether a plo...
Abstract parent for any widget that goes in the tabbed side panel of the PlotMSPlotter.
Definition: PlotMSTab.qo.h:48
High(ish)-level plotter class that manages the GUI (semi-) transparently to the rest of PlotMS...
Class which manages PlotMSPlots for plotms.
void resizeEvent(QResizeEvent *event)
std::vector< PlotMSPlot * > getCurrentPlots()
Return the currently supported plots.