casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
QtExportManager.qo.h
Go to the documentation of this file.
1 //# QtDataManager.qo.h: Qt implementation of viewer data manager widget.
2 //# Copyright (C) 2005
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 
28 #ifndef QTEXPORTMANAGER_H_
29 #define QTEXPORTMANAGER_H_
30 // (Trailing underscore is not a typo -- do not remove it;
31 // QtDataManager.ui.h uses the QTDATAMANAGER_H symbol).
32 
33 
34 #include <casa/aips.h>
35 #include <casa/BasicSL/String.h>
36 //#include <display/QtViewer/QtLELEdit.qo.h>
37 
38 #include <graphics/X11/X_enter.h>
39 #include <QDir>
40 #include <QColor>
41 #include <QHash>
42 #include <QWidget>
43 //#dk Be careful to put *.ui.h within X_enter/exit bracket too,
44 //# because they'll have Qt includes.
45 //# E.g. <QApplication> needs the X11 definition of 'Display'
46 #include <display/QtViewer/QtExportManager.ui.h>
47 //#include <display/QtViewer/QtDataMgrMsSelect.ui.h>
48 #include <graphics/X11/X_exit.h>
49 
50 
51 namespace casacore{
52 
53  template <class T> class ImageInterface;
54 }
55 
56 namespace casa { //# NAMESPACE CASA - BEGIN
57 
58  class QtDisplayPanelGui;
59  class QtDisplayPanel;
60  class QtDisplayData;
61 
62  class QtExportManager : public QWidget, private Ui::QtExportManager {
63 
64  Q_OBJECT
65 
66  public:
67 
68  QtExportManager(QtDisplayPanelGui* panel=0, const char* name=0,
69  QWidget* parent=0 );
71 
72  public slots:
73  void updateEM(QtDisplayData* qdd=0, bool autoRegister=true);
74 
75  protected:
76  void fillFormatBox(int type);
77  QColor getDirColor(int);
78  QString getOutFileName(QString &filter);
79  QString getOutDirName(QString &);
80  QString getOutDirNameOLD(QString &filter);
81 
84  };
87  };
88 
89  QHash<int, casacore::String> dataType_;
90  QHash<QString, int> uiDataType_;
91  QHash<int, casacore::String> displayType_;
92  QHash<QString, int> uiDisplayType_;
93  QHash<int, QtDisplayData*> qddList_;
95 
96  protected slots:
97  void changeItemSelection();
98  void exportData();
99  void buildFileList();
100  void browseOutFilePath();
101  void browseFileSelection();
102  void browseFileSelectionOLD();
103 
105 
106 
107  private:
109  void getSectralCoordFlags(const casacore::ImageInterface<float>* img, bool &preferVelocity, bool &opticalVelocity,
110  bool &preferWavelength, bool &preferAirWavelength);
112  //void expImageInterfaceToMIRIAD(casacore::ImageInterface<float>* img, casacore::String outFile);
113  void messageFromEM(QString &msg);
114 
115  QWidget *parent_;
117  QDir dir_;
118  QTreeWidgetItem *selItem_;
120  };
121 
122 
123 
124 } //# NAMESPACE CASA - END
125 
126 #endif
QHash< int, QtDisplayData * > qddList_
QHash< QString, int > uiDataType_
QTreeWidgetItem * selItem_
void expImageInterfaceToFITS(casacore::ImageInterface< float > *img, casacore::String outFile)
virtual Type type()
Return the type enum.
void getSectralCoordFlags(const casacore::ImageInterface< float > *img, bool &preferVelocity, bool &opticalVelocity, bool &preferWavelength, bool &preferAirWavelength)
QString getOutDirNameOLD(QString &filter)
QString getOutDirName(QString &)
void fillFormatBox(int type)
void showDDCreateError_(casacore::String)
ABSTRACT CLASSES Abstract class for colors Any implementation of color should be able to provide a hexadecimal form of the if a human readable name(i.e."black").In many places throughout the plotter
QHash< int, casacore::String > dataType_
void messageFromEM(QString &msg)
void expImageInterfaceToMIRIAD(casacore::ImageInterface&lt;float&gt;* img, casacore::String outFile); ...
QColor getDirColor(int)
QtDisplayPanelGui * panel_
void updateEM(QtDisplayData *qdd=0, bool autoRegister=true)
QHash< QString, int > uiDisplayType_
QVector< int > exportTypes_
QString getOutFileName(QString &filter)
The main display window for the Qt version of the viewer.
std::set< ScanKey > filter(const std::set< ScanKey > scans, const ArrayKey &arrayKey)
given a set of scan keys, return the subset that matches the given array key
QtExportManager(QtDisplayPanelGui *panel=0, const char *name=0, QWidget *parent=0)
String: the storage and methods of handling collections of characters.
Definition: String.h:223
void expImageInterfaceToCASA(casacore::ImageInterface< float > *img, casacore::String outFile)
QHash< int, casacore::String > displayType_
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42