FileBox.qo.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef FILEBOX_H
00031 #define FILEBOX_H
00032
00033 #include <casa/aips.h>
00034 #include <casa/Containers/Record.h>
00035 #include <display/QtViewer/QtDisplayPanel.qo.h>
00036 #include <display/DisplayDatas/DisplayData.h>
00037
00038 #include <graphics/X11/X_enter.h>
00039 #include <QtCore>
00040 #include <QtGui>
00041 #include <QList>
00042 #include <QPushButton>
00043 #include <QComboBox>
00044 #include <graphics/X11/X_exit.h>
00045
00046 namespace casa {
00047
00048 class RSComposite;
00049 class WCUnion;
00050
00051 class FileBox : public QWidget {
00052
00053 Q_OBJECT
00054
00055 public:
00056
00057 FileBox(QtDisplayPanel* qdp);
00058 ~FileBox() {}
00059
00060 public slots:
00061
00062
00063 void drawRegion(Record mousereg, WorldCanvasHolder *wch);
00064
00065
00066 void newRegion_(String imgFilename);
00067
00068
00069 void changeAxis(String, String, String, std::vector<int> );
00070
00071
00072 void activate(Record);
00073
00074
00075 void wcChanged(const String,
00076 const Vector<Double>, const Vector<Double>);
00077
00078 virtual void closeEvent ( QCloseEvent * event );
00079
00080 signals:
00081 void hideFileBox();
00082
00083 protected slots:
00084
00085
00086 void loadRegionFromFile();
00087
00088
00089 void saveRegionToFile();
00090
00091
00092 void deleteAll();
00093
00094
00095 void showHideAll();
00096
00097
00098 void colorAll(const QString&);
00099
00100
00101 void doIt();
00102
00103
00104 void showHelp();
00105
00106
00107 void reShape(const QString&);
00108
00109 void zPlaneChanged();
00110 void pPlaneChanged();
00111 protected:
00112
00113 void rotateBox(int cb);
00114 void addBox(RegionShape*);
00115 void deleteBox(RegionShape*);
00116 void reDraw();
00117
00118 void addRegionsToShape(RSComposite*& theShapes,
00119 const WCRegion*& wcreg);
00120
00121 WCUnion* unfoldCompositeRegionToSimpleUnion(const WCRegion*& wcreg);
00122 void unfoldIntoSimpleRegionPtrs(PtrBlock<const WCRegion*>& outRegPtrs,
00123 const WCRegion*& wcreg);
00124
00125
00126 RSComposite *regionToShape(
00127 QtDisplayData* qdd, const ImageRegion* wcreg);
00128
00129 bool planeAllowed(String, String);
00130 bool chanAllowed(const Double, const Double);
00131 bool polAllowed(const Double, const Double);
00132
00133 private:
00134
00135 QtDisplayPanel* qdp_;
00136
00137 PtrBlock<const ImageRegion*> unionRegions_p;
00138 DisplayData* regData;
00139
00140 RegionShape* activeShape;
00141
00142 QTimer* timer;
00143 bool flash;
00144
00145 int cb;
00146 int zIndex;
00147 int pIndex;
00148 String zAxis;
00149
00150
00151 QGroupBox* tGroup;
00152 QPushButton* load;
00153 QPushButton* save;
00154 QPushButton* showHide;
00155 QPushButton* removeAll;
00156 QComboBox* color;
00157
00158 QLineEdit* chan;
00159 QLineEdit* corr;
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177 };
00178
00179
00180 }
00181
00182 #endif