2021-05-13 07:44:32 -04:00
|
|
|
#include <fftw3.h>
|
2014-03-03 11:27:25 -05:00
|
|
|
#ifdef QT5
|
|
|
|
#include <QtWidgets>
|
|
|
|
#else
|
2012-05-22 13:09:48 -04:00
|
|
|
#include <QtGui>
|
2014-03-03 11:27:25 -05:00
|
|
|
#endif
|
|
|
|
#include <QApplication>
|
|
|
|
|
2021-04-30 17:51:09 -04:00
|
|
|
#include "revision_utils.hpp"
|
2012-05-22 13:09:48 -04:00
|
|
|
#include "mainwindow.h"
|
|
|
|
|
2021-05-13 07:44:32 -04:00
|
|
|
extern "C" {
|
|
|
|
// Fortran procedures we need
|
|
|
|
void four2a_ (_Complex float *, int * nfft, int * ndim, int * isign, int * iform, int len);
|
|
|
|
}
|
|
|
|
|
2012-05-22 13:09:48 -04:00
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
2021-04-10 07:25:28 -04:00
|
|
|
QApplication a {argc, argv};
|
2021-04-30 17:51:09 -04:00
|
|
|
// Override programs executable basename as application name.
|
|
|
|
a.setApplicationName ("MAP65");
|
|
|
|
a.setApplicationVersion ("3.0.0-devel");
|
2021-05-20 20:23:26 -04:00
|
|
|
// switch off as we share an Info.plist file with WSJT-X
|
|
|
|
a.setAttribute (Qt::AA_DontUseNativeMenuBar);
|
2021-04-10 07:25:28 -04:00
|
|
|
MainWindow w;
|
|
|
|
w.show ();
|
2021-05-17 17:18:52 -04:00
|
|
|
QObject::connect (&a, &QApplication::lastWindowClosed, &a, &QApplication::quit);
|
2021-05-13 07:44:32 -04:00
|
|
|
auto result = a.exec ();
|
|
|
|
|
|
|
|
// clean up lazily initialized FFTW3 resources
|
|
|
|
{
|
|
|
|
int nfft {-1};
|
|
|
|
int ndim {1};
|
|
|
|
int isign {1};
|
|
|
|
int iform {1};
|
|
|
|
// free FFT plan resources
|
|
|
|
four2a_ (nullptr, &nfft, &ndim, &isign, &iform, 0);
|
|
|
|
}
|
|
|
|
fftwf_forget_wisdom ();
|
|
|
|
fftwf_cleanup ();
|
|
|
|
|
|
|
|
return result;
|
2012-05-22 13:09:48 -04:00
|
|
|
}
|