Fixed text file permissions
[snark14.git] / tools / Display / displaywindow.hpp
1 /** @file displaywindow.hpp
2     @package snark14Display
3     @author Bruno M. Carvalho and Deniz Sarioz
4     licensed under (open-source) QPL v1.0
5     which accompanies this distribution in the file QPL
6 */
7
8 #ifndef DISPLAYWINDOW_H
9 #define DISPLAYWINDOW_H
10
11 #include "variables.hpp"
12 #include "displaywidget.hpp"
13 #include <qvariant.h>
14 #include <qdialog.h>
15 #include <qimage.h>
16 #include <qwidget.h>
17 class QVBoxLayout; 
18 class QHBoxLayout; 
19 class QGridLayout; 
20 class QLabel;
21 class QLineEdit;
22 class QPushButton;
23 class QRadioButton;
24 class QSlider;
25 class QListBox;
26 class QImage;
27 class QPixmap;
28 class QScrollView;
29
30 // class displaywindow : public QDialog
31 class displaywindow : public QWidget
32
33     Q_OBJECT
34
35 public:
36     displaywindow( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 , DIGDataFormat fileformat = DIGDataFormat_BINARY, int imagenumber = 0, int x = 0 , int y = 0 );
37     ~displaywindow();
38
39     bool useglobal, usedifference, useintensity;
40     int id;
41     QString imagename;
42     QImage* recp;
43     bool converted;
44     double **image;
45     double **diffimage;
46     bool status;
47     double maxval,minval,diffmaxval,diffminval;
48     double lowthreshold,highthreshold,difflowthreshold,diffhighthreshold;
49     double range,Range;
50     int zoomval;
51     int maxzoom;
52     displayWidget* displaywidget;
53     QScrollView* scrollv;
54     QLabel* zoomlabel;
55     QSlider* zoomslider;
56     QLineEdit* zoom;
57     QPushButton* setzoombutton;
58   //    QRadioButton* globalthresholdbutton;
59   //    QRadioButton* differencebutton;
60   //    QRadioButton* intensitybutton;
61     QLabel* lowthreshlabel;
62     QSlider* lowthreshslider;
63     QLineEdit* lowthresh;
64     QPushButton* setlowthreshbutton;
65     QLabel* highthreshlabel;
66     QSlider* highthreshslider;
67     QLineEdit* highthresh;
68     QPushButton* sethighthreshbutton;
69     QLabel* pixelposlabel;
70     QLineEdit* pixelpos;
71     QLabel* pixelvaluelabel;
72     QLineEdit* pixelvalue;
73     QPushButton* profilebutton;
74     QPushButton* linesbutton;
75     QPushButton* savebutton;
76     QPushButton* closebutton;
77 public slots:
78     void updateClickedPixel(int cx,int cy);
79     void updateZoom();
80     void updateZoomslider();
81
82     void setGlobal(bool on);
83     void setDifference(bool on);
84     void setIntensity(bool on);
85
86     bool isGlobalthreshs();
87     void updateGlobalthreshs();
88   //    void setGlobalthreshs(bool value);
89     void setGlobalthreshs();
90   //    void differencePhantom();
91   //    void intensity();
92     void updateLowthresh();
93     double getLowthresh();
94     void updateLowthreshslider();
95     void updateHighthresh();
96     double getHighthresh();
97     void updateHighthreshslider();
98     void resetImage();
99     void resetDiffImage();
100     void resetImageRange();
101     void callLines();
102     void saveImage();
103     void closeWindow();
104
105  protected:
106     virtual void closeEvent(QCloseEvent *e);
107 };
108
109 #endif // DISPLAYWINDOW_H