USGS

Isis 3.0 Developer's Reference (API)

Home

AdvancedStretchDialog.h

Go to the documentation of this file.
00001 #ifndef ADVANCEDSTRETCHDIALOG_H
00002 #define ADVANCEDSTRETCHDIALOG_H
00003 
00004 #include <QDialog>
00005 
00006 class QShowEvent;
00007 class QWidget;
00008 
00009 namespace Isis {
00010   class Stretch;
00011   class Histogram;
00012 };
00013 
00014 namespace Isis {
00015   class AdvancedStretch;
00016   class CubeViewport;
00017 
00029   class AdvancedStretchDialog : public QDialog {
00030       Q_OBJECT
00031 
00032     public:
00033       AdvancedStretchDialog(QWidget *parent);
00034       ~AdvancedStretchDialog();
00035 
00036       void enableRgbMode(Stretch &redStretch, Histogram &redHist,
00037                          Stretch &grnStretch, Histogram &grnHist,
00038                          Stretch &bluStretch, Histogram &bluHist);
00039       void updateHistograms(const Histogram &redHist,
00040                             const Histogram &grnHist,
00041                             const Histogram &bluHist);
00042 
00043       void updateForRGBMode(Stretch &redStretch, Histogram &redHist,
00044                             Stretch &grnStretch, Histogram &grnHist,
00045                             Stretch &bluStretch, Histogram &bluHist);
00046 
00047       void enableGrayMode(Stretch &grayStretch,
00048                           Histogram &grayHist);
00049       void updateHistogram(const Histogram &grayHist);
00050       bool isRgbMode() const;
00051 
00052       Stretch getGrayStretch();
00053       Stretch getRedStretch();
00054       Stretch getGrnStretch();
00055       Stretch getBluStretch();
00056 
00062       bool enabled() {
00063         return p_enabled;
00064       }
00065 
00071       void enable(bool enable) {
00072         p_enabled = enable;
00073       }
00074 
00075     signals:
00077       void stretchChanged();
00079       void visibilityChanged();
00080 
00081     public slots:
00082       void updateStretch(CubeViewport *);
00083 
00084     protected slots:
00085       void showEvent(QShowEvent *);
00086       void hideEvent(QHideEvent *);
00087 
00088     private:
00089       void destroyCurrentStretches();
00090 
00091     private:
00092       bool p_enabled; 
00093       AdvancedStretch *p_grayStretch; 
00094       AdvancedStretch *p_redStretch;  
00095       AdvancedStretch *p_grnStretch;  
00096       AdvancedStretch *p_bluStretch;  
00097 
00098   };
00099 };
00100 
00101 
00102 #endif