casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PlotMSCacheThread.qo.h
Go to the documentation of this file.
1 //# PlotMSCacheThread.qo.h: Subclass of PlotMSThread for cache loading.
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 PLOTMSCACHETHREAD_QO_H_
28 #define PLOTMSCACHETHREAD_QO_H_
29 
35 
36 #include <QThread>
37 
38 #include <vector>
39 
40 namespace casa {
41 
42 //# Forward Declarations
43 class PlotMSCacheBase;
44 class PlotMSPlotter;
45 
46 // Subclass of PlotMSThread for loading axes in a PlotMSCache.
48  Q_OBJECT
49 
50  //# Friend class declarations.
51  friend class PlotMSCacheBase;
52  friend class MSCache;
53  friend class CalCache;
55 
56 public:
57 
60  PMSPTObject postThreadObject = NULL);
61 
62  // Destructor.
64 
65 
66  // Implements PlotMSThread::startOperation().
67  virtual void startOperation();
68 
69  virtual void cancelOperation();
70 
71  virtual QString getName() const;
72  virtual bool isCacheThread() const;
73 
74 protected:
75 
76 
77  // Allows the cache to set the progress.
78  void setProgress(unsigned int progress) {
80 
81  // Allows the cache to set the status.
82  void setStatus(const casacore::String& status) {
84 
85  // Allows the cache to set the progress and the status.
86  void setProgressAndStatus(unsigned int progress, const casacore::String& status);
87 
88  // Slot for when the QThread finishes.
89  virtual void threadFinished();
90 
91 private:
92  PlotMSCacheThread( const PlotMSCacheThread& other );
94 
95  // Plotter
97 
98  // Data.
100 
101  // Load (true) or release (false) axes.
102  bool itsLoad_;
103 
104  // Axes.
105  std::vector<PMS::Axis> itsAxes_;
106 
107  // Axes data columns.
108  std::vector<PMS::DataColumn> itsAxesData_;
109 
110  // casacore::MS selection/averaging info
115 
116  // Whether to set up the cache afterwards.
118 
119  // Last set progress.
120  unsigned int itsLastProgress_;
121 
122  // Last set status.
124 
125 };
126 
127 }
128 
129 #endif /* PLOTMSCACHETHREAD_QO_H_ */
virtual void cancelOperation()
Specifies averaging parameters for an MS.
virtual void postThreadMethod()
Executes the post-thread method as needed.
PlotMSCacheThread operator=(const PlotMSCacheThread &other)
Specifies an casacore::MS selection.
PlotMSCacheBase * itsCache_
Data.
PlotMSCacheThread(QtProgressWidget *progress, PlotMSPlotter *plotter, PMSPTMethod postThreadMethod=NULL, PMSPTObject postThreadObject=NULL)
void * PMSPTObject
Typedefs for using post-thread methods.
casacore::String itsMSName_
casacore::MS selection/averaging info
std::vector< PMS::DataColumn > itsAxesData_
Axes data columns.
bool itsSetupPlot_
Whether to set up the cache afterwards.
virtual QString getName() const
casacore::String itsLastStatus_
Last set status.
void setProgress(unsigned int progress)
Allows the cache to set the progress.
PlotMSPlotter * itsPlotter_
Plotter.
PlotMSTransformations itsTransformations_
Abstract class to control a threaded operation from the GUI.
void PMSPTMethod(PMSPTObject, bool)
virtual bool isCacheThread() const
Specifies averaging parameters for an MS.
virtual void threadFinished()
Slot for when the QThread finishes.
~PlotMSCacheThread()
Destructor.
virtual void startOperation()
Implements PlotMSThread::startOperation().
ABSTRACT CLASSES Deliberately vague to be general enough to allow for many different types of but is it too vague to be useful Since the interface is meant to be a simple plotter
Definition: PlotData.h:48
String: the storage and methods of handling collections of characters.
Definition: String.h:223
std::vector< PMS::Axis > itsAxes_
Axes.
GUI for displaying progress information.
High(ish)-level plotter class that manages the GUI (semi-) transparently to the rest of PlotMS...
bool itsLoad_
Load (true) or release (false) axes.
void setStatus(const casacore::String &status)
Allows the cache to set the status.
void setProgressAndStatus(unsigned int progress, const casacore::String &status)
Allows the cache to set the progress and the status.
Subclass of PlotMSThread for loading axes in a PlotMSCache.
unsigned int itsLastProgress_
Last set progress.