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
1 change: 0 additions & 1 deletion DFTFringe.pro
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,6 @@ HEADERS += bezier/bezier.h \
wavefrontaveragefilterdlg.h \
wavefrontfilterdlg.h \
wavefrontloader.h \
wavefrontstats.h \
wftexaminer.h \
wftstats.h \
zernikedlg.h \
Expand Down
1 change: 0 additions & 1 deletion DFTFringe_Dale.pro
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ HEADERS += mainwindow.h \
metricsdisplay.h \
reviewwindow.h \
vortex.h \
wavefrontstats.h \
wavefrontloader.h \
rotationdlg.h \
wftstats.h \
Expand Down
1 change: 0 additions & 1 deletion DFTFringe_QT5.pro
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,6 @@ HEADERS += bezier/bezier.h \
wavefrontaveragefilterdlg.h \
wavefrontfilterdlg.h \
wavefrontloader.h \
wavefrontstats.h \
wftexaminer.h \
wftstats.h \
zernikedlg.h \
Expand Down
4 changes: 2 additions & 2 deletions IgramArea.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ public slots:
void zoomIn();
void zoomOut();
void igramOutlineParmsChanged(const outlineParms &parms);
void increase( int i = 1);
void increaseValue(int);
void increase();
void decrease();
void zoomFull();
void toggleHideOutline();
Expand Down Expand Up @@ -201,7 +202,6 @@ public slots:
QDockWidget *dock;
void drawBoundary();
void resizeImage();
void createActions();
void zoom(int del, QPointF zoompt);
bool modified;
bool scribbling;
Expand Down
2 changes: 1 addition & 1 deletion astigscatterplot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ astigScatterPlot::astigScatterPlot(QWidget *parent):QwtPlot( parent ),m_max(.3)
{

Picker = new myPlotPicker( this );
connect(Picker, SIGNAL(mySelected(QString)),this,SLOT(selectedwave(QString)));
connect(Picker, &myPlotPicker::mySelected,this,&astigScatterPlot::selectedwave);

QwtPlotGrid *grid = new QwtPlotGrid();
grid->setPen( Qt::gray, 0.0, Qt::DotLine );
Expand Down
15 changes: 10 additions & 5 deletions astigstatsdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ void astigStatsDlg::plot(){
QwtLegend *l = new QwtLegend();
ui->mPlot->insertLegend( l, QwtPlot::TopLegend );
l->setDefaultItemMode( QwtLegendData::Checkable );
connect(l, SIGNAL(checked(QVariant,bool,int)), this, SLOT(showItem(QVariant ,bool,int)));
connect(l, &QwtLegend::checked, this, &astigStatsDlg::showItem);

if(picker != nullptr){
delete picker;
Expand Down Expand Up @@ -734,17 +734,22 @@ void astigStatsDlg::on_distribution_clicked()
distributionWindow->setLayout(layout);
// build the toolBar
QPushButton *pbMakePDF = new QPushButton("Save as PDF");
connect(pbMakePDF, SIGNAL(pressed()), this, SLOT(on_savePdf()));
connect(pbMakePDF, &QAbstractButton::pressed, this, &astigStatsDlg::on_savePdf);
QCheckBox *showSamplesCB = new QCheckBox("Show individual samples");
showSamplesCB->setChecked(showSamples);
connect(showSamplesCB, SIGNAL(clicked(bool)), this, SLOT(showSamplesChanged(bool)));
connect(showSamplesCB, &QAbstractButton::clicked, this, &astigStatsDlg::showSamplesChanged);
QSpinBox *runningAvgNSB = new QSpinBox;
runningAvgNSB->setValue(runningAvgN);
runningAvgNSB->setMaximum(1000);
runningAvgNSB->setSingleStep(10);
connect(runningAvgNSB, SIGNAL(valueChanged(int)), this, SLOT(runningNChanged(int)));
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
connect(runningAvgNSB, &QSpinBox::valueChanged, this, &astigStatsDlg::runningNChanged);
#else
// QSpinBox::valueChanged is overloaded in Qt5
connect(runningAvgNSB, QOverload<int>::of(&QSpinBox::valueChanged), this, &astigStatsDlg::runningNChanged);
#endif
QCheckBox *polarCB = new QCheckBox("Polar");
connect(polarCB, SIGNAL(clicked(bool)), this, SLOT(usePolar(bool)));
connect(polarCB, &QAbstractButton::clicked, this, &astigStatsDlg::usePolar);


toolLayout->addWidget(showSamplesCB);
Expand Down
20 changes: 10 additions & 10 deletions batchigramwizard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ void batchIntro::showContextMenu(QPoint pos)

// Create menu and insert some actions
QMenu myMenu;
myMenu.addAction("Erase", this, SLOT(eraseItem()));
myMenu.addAction("Erase", this, &batchIntro::eraseItem);

// Show context menu at handling position
myMenu.exec(globalPos);
Expand Down Expand Up @@ -136,21 +136,21 @@ batchIntro::batchIntro(QStringList files, QWidget *manager, QWidget *p):
filesList->addItem(itm);
}
filesList->setContextMenuPolicy(Qt::CustomContextMenu);
connect(filesList, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showContextMenu(QPoint)));
connect(filesList, &QWidget::customContextMenuRequested, this, &batchIntro::showContextMenu);

connect(this, SIGNAL(processBatchList(QStringList)), qobject_cast<MainWindow *>(manager), SLOT(batchProcess(QStringList)));
connect(this, &batchIntro::processBatchList, qobject_cast<MainWindow *>(manager), &MainWindow::batchProcess);
QSettings set;

pgrBar = new QProgressBar;
batchIgramWizard::addFiles = new QPushButton(tr("Add Files"));
batchIgramWizard::skipFile = new QPushButton(tr("Skip"));
connect(batchIgramWizard::skipFile, SIGNAL(clicked(bool)), qobject_cast<MainWindow *>(manager), SLOT(skipBatchItem()));
connect(batchIgramWizard::skipFile, &QAbstractButton::clicked, qobject_cast<MainWindow *>(manager), &MainWindow::skipBatchItem);
batchIgramWizard::skipFile->setEnabled(false);
connect(batchIgramWizard::addFiles, SIGNAL(pressed()), this, SLOT(addFiles()));
connect(batchIgramWizard::addFiles, &QAbstractButton::pressed, this, &batchIntro::addFiles);
batchIgramWizard::autoCb = new QCheckBox(tr("Auto"),this);
batchIgramWizard::filterCb = new QCheckBox(tr("Filter"),this);
batchIgramWizard::filterCb->setChecked( set.value("batchWizardFilterFlag", false).toBool());
connect(batchIgramWizard::filterCb, SIGNAL(clicked(bool)), this, SLOT(on_filter(bool)));
connect(batchIgramWizard::filterCb, &QAbstractButton::clicked, this, &batchIntro::on_filter);
batchIgramWizard::saveFile = new QCheckBox(tr("Save wavefront file"),this);
batchIgramWizard::saveFile->setChecked(set.value("batchSaveFile", false).toBool());
batchIgramWizard::deletePreviousWave = new QCheckBox(tr("Delete Prev Wave"), this);
Expand All @@ -159,13 +159,13 @@ batchIntro::batchIntro(QStringList files, QWidget *manager, QWidget *p):
batchIgramWizard::deletePreviousWave->setChecked(set.value("deletePrevWave", false).toBool());
batchIgramWizard::showProcessPlots = new QCheckBox(tr("Show Process Plots"));
batchIgramWizard::showProcessPlots->setChecked(true);
connect(batchIgramWizard::showProcessPlots, SIGNAL(clicked(bool)),this, SLOT(showPlots(bool)));
connect(batchIgramWizard::saveFile, SIGNAL(clicked(bool)),this, SLOT(on_saveFiles(bool)));
connect(batchIgramWizard::deletePreviousWave, SIGNAL(clicked(bool)),this, SLOT(on_deletePreviousWave(bool)));
connect(batchIgramWizard::showProcessPlots, &QAbstractButton::clicked,this, &batchIntro::showPlots);
connect(batchIgramWizard::saveFile, &QAbstractButton::clicked,this, &batchIntro::on_saveFiles);
connect(batchIgramWizard::deletePreviousWave, &QAbstractButton::clicked,this, &batchIntro::on_deletePreviousWave);
QHBoxLayout *hlayout = new QHBoxLayout();
QGroupBox *outlineGB = new QGroupBox("Auto Outlines");
batchIgramWizard::goPb = new QPushButton(tr("Process Igrams"),this);
connect(batchIgramWizard::goPb, SIGNAL(pressed()), this, SLOT(processBatch()));
connect(batchIgramWizard::goPb, &QAbstractButton::pressed, this, &batchIntro::processBatch);
batchIgramWizard::goPb->setStyleSheet("QPushButton{"
" background-color: red;"
"border-style: outset;"
Expand Down
2 changes: 1 addition & 1 deletion camwizardpage1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ CamWizardPage1::CamWizardPage1(QWidget *parent) :
{
ui->setupUi(this);
ui->listWidget->setContextMenuPolicy(Qt::CustomContextMenu);
connect(ui->listWidget, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showContextMenu(QPoint)));
connect(ui->listWidget, &QWidget::customContextMenuRequested, this, &CamWizardPage1::showContextMenu);
QSettings set;
Pattern p = (Pattern)(set.value("camCalibratePattern", CIRCLES_GRID).toInt());
ui->columns->blockSignals(true);
Expand Down
3 changes: 1 addition & 2 deletions contourplot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -492,8 +492,7 @@ ContourPlot::ContourPlot( QWidget *parent, ContourTools *tools, bool minimal ):
tracker_ = new MyZoomer(this->canvas(), this);


connect(picker_, SIGNAL(selected(const QPointF&)),
SLOT(selected(const QPointF&)));
connect(picker_, QOverload<const QPointF&>::of(&QwtPlotPicker::selected), this, &ContourPlot::selected);

QSettings settings;
m_colorMapNdx = settings.value("colorMapType",0).toInt();
Expand Down
7 changes: 2 additions & 5 deletions contourplot.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,8 @@ class ContourPlot: public QwtPlot
void newContourRange(double);
void sigPointSelected(QPointF );

public Q_SLOTS:
void selected(QPointF pos);


public Q_SLOTS:
public slots:
void selected(QPointF pos);
void showContour( bool on );
void showSpectrogram(bool on );
void setAlpha( int );
Expand Down
23 changes: 11 additions & 12 deletions contourtools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
****************************************************************************/
#include "contourtools.h"
#include "ui_contourtools.h"
#include "contourplot.h"
#include <QColorDialog>
#include <QPalette>
#include <QSettings>
Expand Down Expand Up @@ -55,7 +56,7 @@ ContourTools::ContourTools(QWidget *parent) :
ui->lineColorDisplay->setPalette(pal);
ui->lineColorDisplay->setAutoFillBackground( true );
m_minmaxEditTimer = new QTimer(this);
connect(m_minmaxEditTimer, SIGNAL(timeout()),this, SLOT(updateMinMax()));
connect(m_minmaxEditTimer, &QTimer::timeout,this, &ContourTools::updateMinMax);

}

Expand All @@ -65,17 +66,15 @@ ContourTools::~ContourTools()
delete ui;
}

void ContourTools::connectTo(QWidget *view){
connect(this, SIGNAL(ContourMapColorChanged(int)), view, SLOT(ContourMapColorChanged(int)));
connect(this, SIGNAL(contourZeroOffsetChanged(const QString &)),
view, SLOT(contourZeroOffsetChanged(const QString &)));
connect(this, SIGNAL(contourColorRangeChanged(const QString &)),
view, SLOT(contourColorRangeChanged(const QString &)));
connect(view, SIGNAL(setMinMaxValues(double,double)),this, SLOT(setMinMaxValues(double,double)));
connect(this, SIGNAL(contourWaveRangeChanged(double)),view, SLOT(contourWaveRangeChanged(double)));
connect(view, SIGNAL(setWaveRange(double)),this, SLOT(setWaveRange(double)));
connect(this, SIGNAL(lineColorChanged(QColor)), view, SLOT(on_line_color_changed(QColor)));
connect(this, SIGNAL(newDisplayErrorRange(double,double)), view, SLOT(newDisplayErrorRange(double,double)));
void ContourTools::connectTo(ContourPlot *view){
connect(this, &ContourTools::ContourMapColorChanged, view, &ContourPlot::ContourMapColorChanged);
connect(this, &ContourTools::contourZeroOffsetChanged, view, &ContourPlot::contourZeroOffsetChanged);
connect(this, &ContourTools::contourColorRangeChanged, view, &ContourPlot::contourColorRangeChanged);
connect(view, &ContourPlot::setMinMaxValues,this, &ContourTools::setMinMaxValues);
connect(this, &ContourTools::contourWaveRangeChanged, view, &ContourPlot::contourWaveRangeChanged);
connect(view, &ContourPlot::setWaveRange,this, &ContourTools::setWaveRange);
connect(this, &ContourTools::lineColorChanged, view, &ContourPlot::on_line_color_changed);
connect(this, &ContourTools::newDisplayErrorRange, view, &ContourPlot::newDisplayErrorRange);
enablTools(false);
}

Expand Down
5 changes: 4 additions & 1 deletion contourtools.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@

#include <QDockWidget>
#include <QTimer>

class ContourPlot;

namespace Ui {
class ContourTools;
}
Expand All @@ -31,7 +34,7 @@ class ContourTools : public QDockWidget
public:
explicit ContourTools(QWidget *parent = 0);
~ContourTools();
void connectTo(QWidget *view);
void connectTo(ContourPlot *view);
double m_interval;
void enablTools(bool b);
double m_min;
Expand Down
6 changes: 3 additions & 3 deletions contourview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ contourView::contourView(QWidget *parent, ContourTools *tools) :
ui->fillContourCB->setChecked(set.value("contourShowFill", true).toBool());
ui->showRuler->setChecked(set.value("contourShowRuler",false).toBool());
setContextMenuPolicy(Qt::CustomContextMenu);
connect(this, SIGNAL(customContextMenuRequested(QPoint)), this,
SLOT(showContextMenu(QPoint)));
connect(this, &QWidget::customContextMenuRequested, this,
&contourView::showContextMenu);
setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
ps = new pixelStats;

Expand Down Expand Up @@ -76,7 +76,7 @@ void contourView::showContextMenu(QPoint pos)
// Create menu and insert some actions
QMenu myMenu;
QString txt = (zoomed)? tr("Restore to MainWindow") : tr("FullScreen");
myMenu.addAction(txt, this, SLOT(zoom()));
myMenu.addAction(txt, this, &contourView::zoom);

// Show context menu at handling position
myMenu.exec(globalPos);
Expand Down
3 changes: 2 additions & 1 deletion contourview.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ private slots:

void on_showRuler_clicked(bool checked);

void updateRuler();
void on_LinkProfileCB_clicked(bool checked);
public slots:
void updateRuler();

private:
Ui::contourView *ui;
Expand Down
20 changes: 10 additions & 10 deletions dftarea.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,30 +117,30 @@
m_Psidlg->setGeometry(rec);


connect(m_Psidlg, SIGNAL(computePhase()),this, SLOT(computePhases()));
connect(m_Psidlg, &PSI_dlg::computePhase,this, &DFTArea::computePhases);
ui->setupUi(this);
m_gamma = 2.5;

connect(tools,SIGNAL(dftChannel(const QString&)), this, SLOT(setChannel(const QString&)));
connect(tools,SIGNAL(dftSizeVal(int)), this, SLOT(dftSizeVal(int)));
connect(tools,SIGNAL(dftCenterFilter(double)), this, SLOT(dftCenterFilter(double)));
connect(tools,SIGNAL(makeSurface()), this,SLOT(makeSurface()));
connect(tools,SIGNAL(doDFT()), this,SLOT(doDFT()));
connect(tools,SIGNAL(showResized()),this, SLOT(showResizedDlg()));
connect(tools,&DFTTools::dftChannel, this, &DFTArea::setChannel);
connect(tools,&DFTTools::dftSizeVal, this, &DFTArea::dftSizeVal);
connect(tools,&DFTTools::dftCenterFilter, this, &DFTArea::dftCenterFilter);
connect(tools,&DFTTools::makeSurface, this,&DFTArea::makeSurface);
connect(tools,&DFTTools::doDFT, this,&DFTArea::doDFT);
connect(tools,&DFTTools::showResized,this, &DFTArea::showResizedDlg);

QShortcut *shortcut = new QShortcut(QKeySequence(Qt::Key_Plus), this);
QObject::connect(shortcut, SIGNAL(activated()), this, SLOT(zoomPlus()));
QObject::connect(shortcut, &QShortcut::activated, this, &DFTArea::zoomPlus);
shortcut = new QShortcut(QKeySequence(Qt::Key_Minus), this);
QObject::connect(shortcut, SIGNAL(activated()), this, SLOT(zoomMinus()));
QObject::connect(shortcut, &QShortcut::activated, this, &DFTArea::zoomMinus);
shortcut = new QShortcut(QKeySequence(Qt::Key_F), this);
QObject::connect(shortcut, SIGNAL(activated()), this, SLOT(zoomFit()));
QObject::connect(shortcut, &QShortcut::activated, this, &DFTArea::zoomFit);

tools->connectTo(this);
capture = false;
QSettings set;
m_center_filter = set.value("DFT Center Filter", 10).toDouble();
qDebug() << "init center" << m_center_filter;
emit updateFilterSize(m_center_filter);

Check warning on line 143 in dftarea.cpp

View workflow job for this annotation

GitHub Actions / build-linux-clazy

Emitting inside constructor probably has no effect [-Wclazy-incorrect-emit]
installEventFilter(this);

/*
Expand Down
2 changes: 1 addition & 1 deletion dftarea.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public slots:
void setDftSizeVal(int);
void selectDFTTab();
void updateFilterSize(int);
void newWavefront(cv::Mat, CircleOutline, CircleOutline, QString,
void newWavefront(cv::Mat, CircleOutline, CircleOutline, const QString &,
QVector<std::vector<cv::Point> >);
void dftReady(QImage);
void statusBarUpdate(QString, int);
Expand Down
8 changes: 5 additions & 3 deletions dfttools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#include "vortex.h"
#include <QSettings>
#include "settings2.h"
#include "dftarea.h"

DFTTools::DFTTools(QWidget *parent) :
QDockWidget(parent),
ui(new Ui::DFTTools)
Expand All @@ -30,9 +32,9 @@ DFTTools::DFTTools(QWidget *parent) :
ui->dftSizeSB->setValue(set.value("DFTSize", 640).toInt());

}
void DFTTools::connectTo(QWidget *view){
connect(view, SIGNAL(updateFilterSize(int)),this, SLOT(setCenterFilterValue(int)));
connect(ui->gammaSl, SIGNAL(valueChanged(int)), view, SLOT(gamma(int)));
void DFTTools::connectTo(DFTArea *view){
connect(view, &DFTArea::updateFilterSize, this, &DFTTools::setCenterFilterValue);
connect(ui->gammaSl, &QSlider::valueChanged, view, &DFTArea::gamma);
}
DFTTools::~DFTTools()
{
Expand Down
4 changes: 3 additions & 1 deletion dfttools.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

#include <QDockWidget>

class DFTArea;

namespace Ui {
class DFTTools;
}
Expand All @@ -30,7 +32,7 @@ class DFTTools : public QDockWidget

public:
explicit DFTTools(QWidget *parent = 0);
void connectTo(QWidget *view);
void connectTo(DFTArea *view);
bool wasPressed;
void imageSize(const QString &txt);
void setDFTSize(int val);
Expand Down
10 changes: 5 additions & 5 deletions foucaultview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ foucaultView::foucaultView(QWidget *parent, SurfaceManager *sm) :
ui->setupUi(this);
QSettings set;
ui->lpiSb->setValue(set.value("ronchiLPI", 100).toDouble());
connect(&m_guiTimer, SIGNAL(timeout()), this, SLOT(on_makePb_clicked()));
connect(&m_guiTimer, &QTimer::timeout, this, &foucaultView::on_makePb_clicked);
ui->rocOffsetSb->setSuffix(" inch");
ui->useMM->setChecked(set.value("simUseMM",false).toBool());
ui->RonchiX->blockSignals(true);
Expand All @@ -30,8 +30,8 @@ foucaultView::foucaultView(QWidget *parent, SurfaceManager *sm) :
if (ui->useMM->isChecked()){
on_useMM_clicked(true);
}
connect(this, SIGNAL(customContextMenuRequested(QPoint)), this,
SLOT(showContextMenu(QPoint)));
connect(this, &QWidget::customContextMenuRequested, this,
&foucaultView::showContextMenu);
setContextMenuPolicy(Qt::CustomContextMenu);
}

Expand Down Expand Up @@ -72,8 +72,8 @@ void foucaultView::showContextMenu(QPoint pos)
QPoint globalPos = mapToGlobal(pos);
// Create menu and insert some actions
QMenu myMenu;
myMenu.addAction("Save Ronchi image", this, SLOT(saveRonchiImage()));
myMenu.addAction("Save Foucault Image", this, SLOT(saveFoucaultImage()));
myMenu.addAction("Save Ronchi image", this, &foucaultView::saveRonchiImage);
myMenu.addAction("Save Foucault Image", this, &foucaultView::saveFoucaultImage);

// Show context menu at handling position
myMenu.exec(globalPos);
Expand Down
4 changes: 2 additions & 2 deletions graphmodifier.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class GraphModifier : public QObject
void setReverseValueAxis(int enabled);
void setReflection(bool enabled);

public Q_SLOTS:
public slots:
void changeRange(int range);
void changeStyle(int style);
void changeSelectionMode(int selectionMode);
Expand All @@ -79,7 +79,7 @@ public Q_SLOTS:
void setAxisTitleFixed(bool enabled);
void zoomToSelectedBar();

Q_SIGNALS:
signals:
void shadowQualityChanged(int quality);
void backgroundEnabledChanged(bool enabled);
void gridEnabledChanged(bool enabled);
Expand Down
Loading
Loading