-
Notifications
You must be signed in to change notification settings - Fork 61
autoinvert feature improvements #245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
7cfb48e
wip. Fancier auto invert feature where you have more options to let DFTF
gr5 6ffbef7
Minor tweaks to new auto-invert feature:
gr5 184bc74
auto invert small fixes:
gr5 af65f56
Merge in v7.4.0
gr5 c82385b
Merge branch 'master' into gr5
gr5 b74e7c0
Forgot to edit this 3rd project file. Should compile now.
gr5 565df90
Update mirrordlg.ui
gr5 dcb6a80
Update mirrordlg.ui
gr5 480759f
Update autoinvertdlg.ui
gr5 bd904e9
Removed singleton design pattern from autoinvertdlg.
gr5 7d10a47
Apply suggestion from @atsju
atsju File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| #include "autoinvertdlg.h" | ||
| #include "ui_autoinvertdlg.h" | ||
| #include "surfacemanager.h" | ||
|
|
||
| autoInvertDlg::autoInvertDlg(QWidget *parent) : | ||
| QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint), | ||
| ui(new Ui::autoInvertDlg) | ||
| { | ||
| ui->setupUi(this); | ||
| } | ||
|
|
||
| autoInvertDlg::~autoInvertDlg() | ||
| { | ||
| delete ui; | ||
| } | ||
|
|
||
| void autoInvertDlg::on_btnUseConic_clicked() | ||
| { | ||
| SurfaceManager *sm = SurfaceManager::get_instance(); | ||
| sm->m_inverseMode = invCONIC; | ||
| accept(); | ||
| } | ||
|
|
||
|
|
||
| void autoInvertDlg::on_btnManual_clicked() | ||
| { | ||
| SurfaceManager *sm = SurfaceManager::get_instance(); | ||
| sm->m_inverseMode = invMANUAL; | ||
| accept(); | ||
| } | ||
|
|
||
|
|
||
| void autoInvertDlg::on_btnInside_clicked() | ||
| { | ||
| SurfaceManager *sm = SurfaceManager::get_instance(); | ||
| sm->m_inverseMode = invINSIDE; | ||
| accept(); | ||
| } | ||
|
|
||
|
|
||
| void autoInvertDlg::on_btnOutside_clicked() | ||
| { | ||
| SurfaceManager *sm = SurfaceManager::get_instance(); | ||
| sm->m_inverseMode = invOUTSIDE; | ||
| accept(); | ||
| } | ||
|
|
||
| void autoInvertDlg::setMainLabel(const QString & str) { | ||
| ui->lblMain->setText(str); | ||
| } | ||
|
|
||
| void autoInvertDlg::enableConic(bool b) { | ||
| ui->btnUseConic->setEnabled(b); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| #ifndef AUTOINVERTDLG_H | ||
| #define AUTOINVERTDLG_H | ||
|
|
||
| #include <QDialog> | ||
|
|
||
| namespace Ui { | ||
| class autoInvertDlg; | ||
| } | ||
|
|
||
| class autoInvertDlg : public QDialog | ||
| { | ||
| Q_OBJECT | ||
|
|
||
| public: | ||
| explicit autoInvertDlg(QWidget *parent = nullptr); | ||
| ~autoInvertDlg(); | ||
| void setMainLabel(const QString & str); | ||
| void enableConic(bool b); | ||
|
|
||
|
|
||
| private slots: | ||
| void on_btnUseConic_clicked(); | ||
|
|
||
| void on_btnManual_clicked(); | ||
|
|
||
| void on_btnInside_clicked(); | ||
|
|
||
| void on_btnOutside_clicked(); | ||
|
|
||
| private: | ||
| Ui::autoInvertDlg *ui; | ||
| }; | ||
|
|
||
| #endif // AUTOINVERTDLG_H | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,187 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <ui version="4.0"> | ||
| <class>autoInvertDlg</class> | ||
| <widget class="QDialog" name="autoInvertDlg"> | ||
| <property name="geometry"> | ||
| <rect> | ||
| <x>0</x> | ||
| <y>0</y> | ||
| <width>678</width> | ||
| <height>464</height> | ||
| </rect> | ||
| </property> | ||
| <property name="windowTitle"> | ||
| <string>Invert Wavefront Mode</string> | ||
| </property> | ||
| <property name="modal"> | ||
| <bool>true</bool> | ||
| </property> | ||
| <widget class="QPushButton" name="btnManual"> | ||
| <property name="geometry"> | ||
| <rect> | ||
| <x>20</x> | ||
| <y>150</y> | ||
| <width>111</width> | ||
| <height>24</height> | ||
| </rect> | ||
| </property> | ||
| <property name="text"> | ||
| <string>Manual</string> | ||
| </property> | ||
| </widget> | ||
| <widget class="QPushButton" name="btnUseConic"> | ||
| <property name="geometry"> | ||
| <rect> | ||
| <x>20</x> | ||
| <y>80</y> | ||
| <width>111</width> | ||
| <height>24</height> | ||
| </rect> | ||
| </property> | ||
| <property name="text"> | ||
| <string>Match Conic</string> | ||
| </property> | ||
| </widget> | ||
| <widget class="QPushButton" name="btnInside"> | ||
| <property name="geometry"> | ||
| <rect> | ||
| <x>20</x> | ||
| <y>200</y> | ||
| <width>111</width> | ||
| <height>24</height> | ||
| </rect> | ||
| </property> | ||
| <property name="text"> | ||
| <string>Inside Focus</string> | ||
| </property> | ||
| </widget> | ||
| <widget class="QPushButton" name="btnOutside"> | ||
| <property name="geometry"> | ||
| <rect> | ||
| <x>20</x> | ||
| <y>280</y> | ||
| <width>111</width> | ||
| <height>24</height> | ||
| </rect> | ||
| </property> | ||
| <property name="text"> | ||
| <string>Outside Focus</string> | ||
| </property> | ||
| </widget> | ||
| <widget class="QLabel" name="label"> | ||
| <property name="geometry"> | ||
| <rect> | ||
| <x>140</x> | ||
| <y>150</y> | ||
| <width>521</width> | ||
| <height>41</height> | ||
| </rect> | ||
| </property> | ||
| <property name="text"> | ||
| <string>I'll invert the wavefront myself as needed</string> | ||
| </property> | ||
| <property name="alignment"> | ||
| <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> | ||
| </property> | ||
| <property name="wordWrap"> | ||
| <bool>true</bool> | ||
| </property> | ||
| </widget> | ||
| <widget class="QLabel" name="label_2"> | ||
| <property name="geometry"> | ||
| <rect> | ||
| <x>140</x> | ||
| <y>80</y> | ||
| <width>521</width> | ||
| <height>61</height> | ||
| </rect> | ||
| </property> | ||
| <property name="text"> | ||
| <string>Most common. This mirror is at least partially figured. DFTFringe will invert the wavefront if S.A. sign doesn't match mirror configuration conic constant sign. This option disabled if CC=0.</string> | ||
| </property> | ||
| <property name="alignment"> | ||
| <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> | ||
| </property> | ||
| <property name="wordWrap"> | ||
| <bool>true</bool> | ||
| </property> | ||
| </widget> | ||
| <widget class="QLabel" name="label_3"> | ||
| <property name="geometry"> | ||
| <rect> | ||
| <x>140</x> | ||
| <y>200</y> | ||
| <width>521</width> | ||
| <height>71</height> | ||
| </rect> | ||
| </property> | ||
| <property name="text"> | ||
| <string>This and future interferograms of this mirror are inside focus (interferometer closer to mirror). DFTFringe will use that fact to invert as needed.</string> | ||
| </property> | ||
| <property name="alignment"> | ||
| <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> | ||
| </property> | ||
| <property name="wordWrap"> | ||
| <bool>true</bool> | ||
| </property> | ||
| </widget> | ||
| <widget class="QLabel" name="label_4"> | ||
| <property name="geometry"> | ||
| <rect> | ||
| <x>140</x> | ||
| <y>280</y> | ||
| <width>521</width> | ||
| <height>61</height> | ||
| </rect> | ||
| </property> | ||
| <property name="text"> | ||
| <string>This and future interferograms of this mirror are outside focus (interferometer farther from mirror). DFTFringe will use that fact to invert as needed.</string> | ||
| </property> | ||
| <property name="alignment"> | ||
| <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> | ||
| </property> | ||
| <property name="wordWrap"> | ||
| <bool>true</bool> | ||
| </property> | ||
| </widget> | ||
| <widget class="QLabel" name="lblMain"> | ||
| <property name="geometry"> | ||
| <rect> | ||
| <x>20</x> | ||
| <y>0</y> | ||
| <width>641</width> | ||
| <height>61</height> | ||
| </rect> | ||
| </property> | ||
| <property name="font"> | ||
| <font> | ||
| <pointsize>14</pointsize> | ||
| </font> | ||
| </property> | ||
| <property name="text"> | ||
| <string>Your wavefront may be inverted. What do you want to do?</string> | ||
| </property> | ||
| <property name="wordWrap"> | ||
| <bool>true</bool> | ||
| </property> | ||
| </widget> | ||
| <widget class="QLabel" name="label_6"> | ||
| <property name="geometry"> | ||
| <rect> | ||
| <x>20</x> | ||
| <y>350</y> | ||
| <width>631</width> | ||
| <height>91</height> | ||
| </rect> | ||
| </property> | ||
| <property name="text"> | ||
| <string>Once you choose an option you won't be asked again until you restart the program. You can get back to this window from within the mirror configuration window.</string> | ||
| </property> | ||
| <property name="wordWrap"> | ||
| <bool>true</bool> | ||
| </property> | ||
| </widget> | ||
| </widget> | ||
| <resources/> | ||
| <connections/> | ||
| </ui> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if implementing singleton: need to delete copy constructor and operator