Changeset View
Changeset View
Standalone View
Standalone View
kstars/fitsviewer/fitstab.h
Show All 22 Lines | |||||
23 | #include <QToolBox> | 23 | #include <QToolBox> | ||
24 | #include <QUrl> | 24 | #include <QUrl> | ||
25 | #include <QWidget> | 25 | #include <QWidget> | ||
26 | #include "ui_fitsheaderdialog.h" | 26 | #include "ui_fitsheaderdialog.h" | ||
27 | #include "ui_statform.h" | 27 | #include "ui_statform.h" | ||
28 | #include <QFuture> | 28 | #include <QFuture> | ||
29 | #include <QPointer> | 29 | #include <QPointer> | ||
30 | #include <QListWidget> | 30 | #include <QListWidget> | ||
31 | #include <QLabel> | ||||
32 | #include <QPushButton> | ||||
33 | #include <QSlider> | ||||
31 | 34 | | |||
32 | #include <memory> | 35 | #include <memory> | ||
33 | 36 | | |||
34 | class FITSHistogram; | 37 | class FITSHistogram; | ||
35 | class FITSView; | 38 | class FITSView; | ||
36 | class FITSViewer; | 39 | class FITSViewer; | ||
37 | class FITSData; | 40 | class FITSData; | ||
38 | 41 | | |||
▲ Show 20 Lines • Show All 85 Lines • ▼ Show 20 Line(s) | 124 | public slots: | |||
124 | void ZoomOut(); | 127 | void ZoomOut(); | ||
125 | void ZoomDefault(); | 128 | void ZoomDefault(); | ||
126 | 129 | | |||
127 | protected: | 130 | protected: | ||
128 | virtual void closeEvent(QCloseEvent *ev) override; | 131 | virtual void closeEvent(QCloseEvent *ev) override; | ||
129 | 132 | | |||
130 | private: | 133 | private: | ||
131 | bool setupView(FITSMode mode, FITSScale filter); | 134 | bool setupView(FITSMode mode, FITSScale filter); | ||
135 | | ||||
136 | QHBoxLayout* setupStretchBar(); | ||||
137 | void setStretchUIValues(bool adjustSliders); | ||||
138 | void rescaleShadows(); | ||||
139 | void rescaleMidtones(); | ||||
140 | | ||||
132 | void processData(); | 141 | void processData(); | ||
133 | 142 | | |||
134 | /** Ask user whether he wants to save changes and save if he do. */ | 143 | /** Ask user whether he wants to save changes and save if he do. */ | ||
135 | 144 | | |||
136 | /// The FITSTools Toolbox | 145 | /// The FITSTools Toolbox | ||
137 | QPointer<QToolBox> fitsTools; | 146 | QPointer<QToolBox> fitsTools; | ||
138 | /// The Splitter for th FITSTools Toolbox | 147 | /// The Splitter for th FITSTools Toolbox | ||
139 | QPointer<QSplitter> fitsSplitter; | 148 | QPointer<QSplitter> fitsSplitter; | ||
Show All 16 Lines | |||||
156 | QUndoStack *undoStack { nullptr }; | 165 | QUndoStack *undoStack { nullptr }; | ||
157 | /// FITS File name and path | 166 | /// FITS File name and path | ||
158 | QUrl currentURL; | 167 | QUrl currentURL; | ||
159 | 168 | | |||
160 | bool mDirty { false }; | 169 | bool mDirty { false }; | ||
161 | QString previewText; | 170 | QString previewText; | ||
162 | int uid { 0 }; | 171 | int uid { 0 }; | ||
163 | 172 | | |||
164 | //QFuture<void> histogramFuture; | 173 | // Stretch bar widgets | ||
174 | std::unique_ptr<QLabel> shadowsLabel, midtonesLabel, highlightsLabel; | ||||
175 | std::unique_ptr<QLabel> shadowsVal, midtonesVal, highlightsVal; | ||||
176 | std::unique_ptr<QSlider> shadowsSlider, midtonesSlider, highlightsSlider; | ||||
177 | std::unique_ptr<QPushButton> stretchButton, autoButton; | ||||
178 | float maxShadows {0.5}, maxMidtones {0.5}, maxHighlights {1.0}; | ||||
165 | 179 | | |||
180 | //QFuture<void> histogramFuture; | ||||
166 | 181 | | |||
167 | signals: | 182 | signals: | ||
168 | void debayerToggled(bool); | 183 | void debayerToggled(bool); | ||
169 | void newStatus(const QString &msg, FITSBar id); | 184 | void newStatus(const QString &msg, FITSBar id); | ||
170 | void changeStatus(bool clean); | 185 | void changeStatus(bool clean); | ||
171 | void loaded(); | 186 | void loaded(); | ||
172 | void failed(); | 187 | void failed(); | ||
173 | }; | 188 | }; |