Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions DFTFringe.pro
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ SOURCES += SingleApplication/singleapplication.cpp \
astigscatterplot.cpp \
astigstatsdlg.cpp \
astigzoomer.cpp \
autoinvertdlg.cpp \
averagewavefrontfilesdlg.cpp \
batchigramwizard.cpp \
bathastigdlg.cpp \
Expand Down Expand Up @@ -279,6 +280,7 @@ HEADERS += bezier/bezier.h \
astigscatterplot.h \
astigstatsdlg.h \
astigzoomer.h \
autoinvertdlg.h \
averagewavefrontfilesdlg.h \
batchigramwizard.h \
bathastigdlg.h \
Expand Down Expand Up @@ -398,6 +400,7 @@ FORMS += arbitrarywavefronthelp.ui \
annulushelpdlg.ui \
astigpolargraph.ui \
astigstatsdlg.ui \
autoinvertdlg.ui \
averagewavefrontfilesdlg.ui \
batchigramwizard.ui \
bathastigdlg.ui \
Expand Down
4 changes: 3 additions & 1 deletion DFTFringe_Dale.pro
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ SOURCES += main.cpp \
arbitrarywavefronthelp.cpp \
arbitrarywavwidget.cpp \
astigpolargraph.cpp \
autoinvertdlg.cpp \
cpoint.cpp \
defocusdlg.cpp \
edgeplot.cpp \
Expand Down Expand Up @@ -154,6 +155,7 @@ HEADERS += mainwindow.h \
arbitrarywavefronthelp.h \
arbitrarywavwidget.h \
astigpolargraph.h \
autoinvertdlg.h \
cpoint.h \
defocusdlg.h \
edgeplot.h \
Expand Down Expand Up @@ -281,6 +283,7 @@ FORMS += mainwindow.ui \
annulushelpdlg.ui \
arbitrarywavefronthelp.ui \
astigpolargraph.ui \
autoinvertdlg.ui \
defocusdlg.ui \
dfttools.ui \
dftarea.ui \
Expand Down Expand Up @@ -388,7 +391,6 @@ LIBS += D:\opencv\opencv-3.4.12\build\bin\libopencv_imgproc3412.dll
LIBS += D:\opencv\opencv-3.4.12\build\bin\libopencv_features2d3412.dll
LIBS += D:\opencv\opencv-3.4.12\build\bin\libopencv_calib3d3412.dll


#LIBS += D:\armadillo\bin\libarmadillo.dll
LIBS += D:\lapack\build64\bin\liblapack.dll
LIBS += D:\lapack\build64\bin\libblas.dll
Expand Down
3 changes: 3 additions & 0 deletions DFTFringe_QT5.pro
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ SOURCES += SingleApplication/singleapplication.cpp \
astigscatterplot.cpp \
astigstatsdlg.cpp \
astigzoomer.cpp \
autoinvertdlg.cpp \
averagewavefrontfilesdlg.cpp \
batchigramwizard.cpp \
bathastigdlg.cpp \
Expand Down Expand Up @@ -278,6 +279,7 @@ HEADERS += bezier/bezier.h \
astigscatterplot.h \
astigstatsdlg.h \
astigzoomer.h \
autoinvertdlg.h \
averagewavefrontfilesdlg.h \
batchigramwizard.h \
bathastigdlg.h \
Expand Down Expand Up @@ -397,6 +399,7 @@ FORMS += arbitrarywavefronthelp.ui \
annulushelpdlg.ui \
astigpolargraph.ui \
astigstatsdlg.ui \
autoinvertdlg.ui \
averagewavefrontfilesdlg.ui \
batchigramwizard.ui \
bathastigdlg.ui \
Expand Down
54 changes: 54 additions & 0 deletions autoinvertdlg.cpp
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);
}
34 changes: 34 additions & 0 deletions autoinvertdlg.h
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);
Comment on lines 15 to 18
Copy link
Collaborator

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

    autoInvertDlg(autoInvertDlg const&) = delete;
    autoInvertDlg& operator=(autoInvertDlg const&) = delete;



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
187 changes: 187 additions & 0 deletions autoinvertdlg.ui
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>
5 changes: 3 additions & 2 deletions mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2119,7 +2119,8 @@ void MainWindow::on_actionastig_in_polar_triggered()

void MainWindow::on_actionStop_auto_invert_triggered()
{
m_surfaceManager->m_askAboutReverse = true;
QMessageBox::information(this, "auto invert", "DFTFringe will now ask if it thinks it needs to invert a wave front.");
m_surfaceManager->m_inverseMode = invNOTSET;
m_mirrorDlg->updateAutoInvertStatus();
//QMessageBox::information(this, "auto invert", "DFTFringe will now ask if it thinks it needs to invert a wave front.");
}

Loading
Loading