casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ZoomWidget.qo.h
Go to the documentation of this file.
1 //# Copyright (C) 2005
2 //# Associated Universities, Inc. Washington DC, USA.
3 //#
4 //# This library is free software; you can redistribute it and/or modify it
5 //# under the terms of the GNU Library General Public License as published by
6 //# the Free Software Foundation; either version 2 of the License, or (at your
7 //# option) any later version.
8 //#
9 //# This library is distributed in the hope that it will be useful, but WITHOUT
10 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 //# License for more details.
13 //#
14 //# You should have received a copy of the GNU Library General Public License
15 //# along with this library; if not, write to the Free Software Foundation,
16 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
17 //#
18 //# Correspondence concerning AIPS++ should be addressed as follows:
19 //# Internet email: aips2-request@nrao.edu.
20 //# Postal address: AIPS++ Project Office
21 //# National Radio Astronomy Observatory
22 //# 520 Edgemont Road
23 //# Charlottesville, VA 22903-2475 USA
24 //#
25 #ifndef ZOOMWIDGET_QO_H
26 #define ZOOMWIDGET_QO_H
27 
28 #include <QWidget>
29 #include <guitools/Histogram/ZoomWidget.ui.h>
31 
32 namespace casacore{
33 
34 template <class T> class ImageInterface;
35 class ImageRegion;
36 }
37 
38 namespace casa {
39 
40 
41 class ZoomWidget : public QWidget
42 {
43  Q_OBJECT
44 
45 public:
46  ZoomWidget(bool rangeControls, QWidget *parent = 0);
47  void setImage( const std::shared_ptr<const casacore::ImageInterface<float> > image );
49  void copyState( ZoomWidget* other );
50 
51  ~ZoomWidget();
52 
53 signals:
54  void zoomRange( float min, float max );
55  void zoomNeutral();
56  void zoomGraphicalRange();
57  void finished();
58 
59 
60 private slots:
61  void percentageToggled( bool selected );
62  void zoom();
63 
64 private:
65  void calculateRange( );
66 
67  //Added because custom widgets as menu items were appearing transparent
68  //on the MAC.
69  void setDefaultBackground();
70 
71  Ui::ZoomWidgetClass ui;
72  QStringList zoomList;
73  std::shared_ptr<const casacore::ImageInterface<float> > image;
75 };
76 
77 }
78 
79 #endif // ZOOMWIDGET_QO_H
#define max(a, b)
Definition: hio.h:44
#define min(a, b)
Definition: hio.h:45
casacore::ImageRegion * region
Definition: ZoomWidget.qo.h:74
void setRegion(casacore::ImageRegion *region)
void setDefaultBackground()
Added because custom widgets as menu items were appearing transparent on the MAC. ...
void copyState(ZoomWidget *other)
Ui::ZoomWidgetClass ui
Definition: ZoomWidget.qo.h:71
void zoomGraphicalRange()
QStringList zoomList
Definition: ZoomWidget.qo.h:72
void zoomRange(float min, float max)
ZoomWidget(bool rangeControls, QWidget *parent=0)
Class to hold a region of interest in an image.
Definition: ImageRegion.h:86
void percentageToggled(bool selected)
void setImage(const std::shared_ptr< const casacore::ImageInterface< float > > image)
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42
std::shared_ptr< const casacore::ImageInterface< float > > image
Definition: ZoomWidget.qo.h:73