Changeset View
Changeset View
Standalone View
Standalone View
kstars/fitsviewer/fitstab.h
Show All 21 Lines | |||||
22 | #include <QSplitter> | 22 | #include <QSplitter> | ||
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 | 31 | | |||
31 | #include <memory> | 32 | #include <memory> | ||
32 | 33 | | |||
33 | class FITSHistogram; | 34 | class FITSHistogram; | ||
34 | class FITSView; | 35 | class FITSView; | ||
35 | class FITSViewer; | 36 | class FITSViewer; | ||
36 | 37 | | |||
37 | /** | 38 | /** | ||
38 | * @brief The FITSTab class holds information on the current view (drawing area) in addition to the undo/redo stacks | 39 | * @brief The FITSTab class holds information on the current view (drawing area) in addition to the undo/redo stacks | ||
39 | * and status of current document (clean or dirty). It also creates the corresponding histogram associated with the | 40 | * and status of current document (clean or dirty). It also creates the corresponding histogram associated with the | ||
40 | * image data that is stored in the FITSView class. | 41 | * image data that is stored in the FITSView class. | ||
41 | * @author Jasem Mutlaq | 42 | * @author Jasem Mutlaq | ||
42 | */ | 43 | */ | ||
43 | class FITSTab : public QWidget | 44 | class FITSTab : public QWidget | ||
44 | { | 45 | { | ||
45 | Q_OBJECT | 46 | Q_OBJECT | ||
46 | public: | 47 | public: | ||
47 | explicit FITSTab(FITSViewer *parent); | 48 | explicit FITSTab(FITSViewer *parent); | ||
48 | virtual ~FITSTab(); | 49 | virtual ~FITSTab(); | ||
49 | 50 | | |||
51 | void clearRecentFITS(); | ||||
52 | void selectRecentFITS(int i); | ||||
50 | void loadFITS(const QUrl &imageURL, FITSMode mode = FITS_NORMAL, FITSScale filter = FITS_NONE, bool silent = true); | 53 | void loadFITS(const QUrl &imageURL, FITSMode mode = FITS_NORMAL, FITSScale filter = FITS_NONE, bool silent = true); | ||
51 | int saveFITS(const QString &filename); | 54 | int saveFITS(const QString &filename); | ||
52 | 55 | | |||
53 | inline QUndoStack *getUndoStack() { return undoStack; } | 56 | inline QUndoStack *getUndoStack() { return undoStack; } | ||
54 | inline QUrl *getCurrentURL() { return ¤tURL; } | 57 | inline QUrl *getCurrentURL() { return ¤tURL; } | ||
55 | inline FITSView *getView() { return view.get(); } | 58 | inline FITSView *getView() { return view.get(); } | ||
56 | inline QPointer<FITSHistogram> getHistogram() { return histogram; } | 59 | inline QPointer<FITSHistogram> getHistogram() { return histogram; } | ||
57 | inline QPointer<FITSViewer> getViewer() { return viewer; } | 60 | inline QPointer<FITSViewer> getViewer() { return viewer; } | ||
Show All 38 Lines | 90 | private: | |||
96 | Ui::fitsHeaderDialog header; | 99 | Ui::fitsHeaderDialog header; | ||
97 | /// The Statistics Panel | 100 | /// The Statistics Panel | ||
98 | QPointer<QDialog> statWidget; | 101 | QPointer<QDialog> statWidget; | ||
99 | Ui::statForm stat; | 102 | Ui::statForm stat; | ||
100 | /// FITS Histogram | 103 | /// FITS Histogram | ||
101 | QPointer<FITSHistogram> histogram; | 104 | QPointer<FITSHistogram> histogram; | ||
102 | QPointer<FITSViewer> viewer; | 105 | QPointer<FITSViewer> viewer; | ||
103 | 106 | | |||
107 | QPointer<QListWidget> recentImages; | ||||
108 | | ||||
104 | /// FITS image object | 109 | /// FITS image object | ||
105 | std::unique_ptr<FITSView> view; | 110 | std::unique_ptr<FITSView> view; | ||
106 | 111 | | |||
107 | /// History for undo/redo | 112 | /// History for undo/redo | ||
108 | QUndoStack *undoStack { nullptr }; | 113 | QUndoStack *undoStack { nullptr }; | ||
109 | /// FITS File name and path | 114 | /// FITS File name and path | ||
110 | QUrl currentURL; | 115 | QUrl currentURL; | ||
111 | 116 | | |||
Show All 14 Lines |