PlotMSExportThread.qo.h

Go to the documentation of this file.
00001 //# PlotMSExportThread.qo.h: Subclass of PlotMSThread for exporting plots.
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 PLOTMSEXPORTTHREAD_QO_H_
00028 #define PLOTMSEXPORTTHREAD_QO_H_
00029 
00030 #include <plotms/Threads/Gui/PlotMSThread.qo.h>
00031 #include <graphics/GenericPlotter/PlotOperation.h>
00032 #include <graphics/GenericPlotter/PlotOptions.h>
00033 //#include <QThread>
00034 #include <QMutex>
00035 #include <vector>
00036 
00037 namespace casa {
00038 
00039 //# Forward Declarations
00040 class PlotMSPlot;
00041 class PlotMSPlotter;
00042 
00043 // Subclass of PlotMSThread for exporting a plot.
00044 class PlotMSExportThread : public PlotMSThread, public PlotOperationWatcher {
00045     Q_OBJECT
00046     
00047 
00048     
00049 public:
00050     // Constructor which takes the plot to export, the export format
00051     // parameters, and optional post-thread method parameters.
00052     PlotMSExportThread( QtProgressWidget* widget, PlotMSPlotter* plotter, const String& location,
00053         /*PlotMSPlot* plot, const PlotExportFormat& format, bool interactive,*/
00054         PMSPTMethod postThreadMethod = NULL, PMSPTObject postThreadObject = NULL
00055     );
00056     
00057     // Destructor.
00058     ~PlotMSExportThread();
00059     virtual void cancel();
00060 
00061     // Implements PlotMSThread::startOperation().
00062     virtual void startOperation();
00063     
00064     // Implements PlotOperationWatcher::operationChanged().
00065     void operationChanged(const PlotOperation& operation);
00066 
00067     virtual QString getName() const;
00068 
00069 protected:
00070     // Slot for when the QThread finishes.
00071     virtual void threadFinished();
00072 
00073 private:
00074     PlotMSExportThread( const PlotMSExportThread& other );
00075     PlotMSExportThread operator=( const PlotMSExportThread& other );
00076 
00077     // Plot.
00078     vector<PlotMSPlot*> itsPlots_;
00079     
00080     // Format.
00081     //PlotExportFormat itsFormat_;
00082     String exportLocation;
00083     
00084     // Export operations.
00085     vector<vector<PlotOperationPtr> >itsOperations_;
00086     
00087     // Mutex.
00088     QMutex itsMutex_;
00089     
00090     PlotMSPlotter* itsPlotter_;
00091 
00092 };
00093 
00094 
00095 
00096 }
00097 
00098 #endif /* PLOTMSEXPORTTHREAD_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