casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PlotMSExportThread.qo.h
Go to the documentation of this file.
1 //# PlotMSExportThread.qo.h: Subclass of PlotMSThread for exporting plots.
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 PLOTMSEXPORTTHREAD_QO_H_
28 #define PLOTMSEXPORTTHREAD_QO_H_
29 
33 //#include <QThread>
34 #include <QMutex>
35 #include <vector>
36 
37 namespace casa {
38 
39 //# Forward Declarations
40 class PlotMSPlot;
41 class PlotMSPlotter;
42 
43 // Subclass of PlotMSThread for exporting a plot.
45  Q_OBJECT
46 
47 
48 
49 public:
50  // Constructor which takes the plot to export, the export format
51  // parameters, and optional post-thread method parameters.
53  /*PlotMSPlot* plot, const PlotExportFormat& format, bool interactive,*/
54  PMSPTMethod postThreadMethod = NULL, PMSPTObject postThreadObject = NULL
55  );
56 
57  // Destructor.
59  virtual void cancel();
60 
61  // Implements PlotMSThread::startOperation().
62  virtual void startOperation();
63 
64  // Implements PlotOperationWatcher::operationChanged().
65  void operationChanged(const PlotOperation& operation);
66 
67  virtual QString getName() const;
68 
69 protected:
70  // Slot for when the QThread finishes.
71  virtual void threadFinished();
72 
73 private:
74  PlotMSExportThread( const PlotMSExportThread& other );
76 
77  // Plot.
78  std::vector<PlotMSPlot*> itsPlots_;
79 
80  // Format.
81  //PlotExportFormat itsFormat_;
83 
84  // Export operations.
85  std::vector<std::vector<PlotOperationPtr> >itsOperations_;
86 
87  // Mutex.
88  QMutex itsMutex_;
89 
91 
92 };
93 
94 
95 
96 }
97 
98 #endif /* PLOTMSEXPORTTHREAD_QO_H_ */
virtual void postThreadMethod()
Executes the post-thread method as needed.
std::vector< PlotMSPlot * > itsPlots_
Plot.
Simple object to synchronize operation progress information across threads.
Definition: PlotOperation.h:68
PlotMSExportThread operator=(const PlotMSExportThread &other)
virtual void startOperation()
Implements PlotMSThread::startOperation().
void * PMSPTObject
Typedefs for using post-thread methods.
Abstract interface for any object that wants to watch a PlotOperation object for changes.
Subclass of PlotMSThread for exporting a plot.
PlotMSExportThread(QtProgressWidget *widget, PlotMSPlotter *plotter, const casacore::String &location, PMSPTMethod postThreadMethod=NULL, PMSPTObject postThreadObject=NULL)
Constructor which takes the plot to export, the export format parameters, and optional post-thread me...
~PlotMSExportThread()
Destructor.
virtual void threadFinished()
Slot for when the QThread finishes.
virtual void cancel()
For when the user requests &quot;cancel&quot; for the thread.
virtual QString getName() const
Abstract class to control a threaded operation from the GUI.
void PMSPTMethod(PMSPTObject, bool)
casacore::String exportLocation
Format.
std::vector< std::vector< PlotOperationPtr > > itsOperations_
Export operations.
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
GUI for displaying progress information.
High(ish)-level plotter class that manages the GUI (semi-) transparently to the rest of PlotMS...
void operationChanged(const PlotOperation &operation)
Implements PlotOperationWatcher::operationChanged().