diff options
| author | Christoph Berg <myon@debian.org> | 2026-04-07 19:04:48 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2026-04-07 19:04:48 +0200 |
| commit | 9b9d6a272fa4204d45956828da3f20b7be49f675 (patch) | |
| tree | b611f981259a12a2bfd4d7305843929447f1bb74 /qmap/main.cpp | |
| parent | 2f7ab3ab46786fa2a5931dae22a1b119b5cfdafa (diff) | |
| parent | f647d78463c1250ce9c99af664615fafccf5e959 (diff) | |
Update upstream source from tag 'upstream/3.0.0'
Update to upstream version '3.0.0'
with Debian dir 3b764e9a4be12ad8351230b538640dd98ddb9d05
Diffstat (limited to 'qmap/main.cpp')
| -rw-r--r--[-rwxr-xr-x] | qmap/main.cpp | 112 |
1 files changed, 58 insertions, 54 deletions
diff --git a/qmap/main.cpp b/qmap/main.cpp index 784044fa..63a707a0 100755..100644 --- a/qmap/main.cpp +++ b/qmap/main.cpp @@ -1,54 +1,58 @@ -#include <fftw3.h>
-#ifdef QT5
-#include <QtWidgets>
-#else
-#include <QtGui>
-#endif
-#include <QApplication>
-
-#include "revision_utils.hpp"
-#include "mainwindow.h"
-
-extern "C" {
- // Fortran procedures we need
- void four2a_ (_Complex float *, int * nfft, int * ndim, int * isign, int * iform, int len);
-
- void _gfortran_set_args(int argc, char *argv[]);
- void _gfortran_set_convert(int conv);
- void ftninit_(void);
- void fftbig_(float dd[], int* nfft);
-}
-
-int main(int argc, char *argv[])
-{
- QApplication a {argc, argv};
-
-// Initialize libgfortran:
- _gfortran_set_args(argc, argv);
- _gfortran_set_convert(0);
- ftninit_();
-
- // Override programs executable basename as application name.
- a.setApplicationName ("QMAP");
- a.setApplicationVersion ("0.5");
- // switch off as we share an Info.plist file with WSJT-X
- a.setAttribute (Qt::AA_DontUseNativeMenuBar);
- MainWindow w;
- w.show ();
- QObject::connect (&a, &QApplication::lastWindowClosed, &a, &QApplication::quit);
- 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);
- fftbig_(nullptr, &nfft);
- }
- fftwf_forget_wisdom ();
- fftwf_cleanup ();
- return result;
-}
+#include <fftw3.h> +#ifdef QT5 +#include <QtWidgets> +#else +#include <QtGui> +#endif +#include <QApplication> + +#include "revision_utils.hpp" +#include "mainwindow.h" + +extern "C" { + // Fortran procedures we need + void four2a_ (_Complex float *, int * nfft, int * ndim, int * isign, int * iform, int len); + + void _gfortran_set_args(int argc, char *argv[]); + void _gfortran_set_convert(int conv); + void ftninit_(void); + void fftbig_(float dd[], int* nfft); +} + +int main(int argc, char *argv[]) +{ + QApplication a {argc, argv}; + +// Initialize libgfortran: + _gfortran_set_args(argc, argv); + _gfortran_set_convert(0); + ftninit_(); + + // Read optional file to disable highDPI scaling + QFile f("DisableHighDpiScaling"); + if (!f.exists()) QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); + + // Override programs executable basename as application name. + a.setApplicationName ("QMAP"); + a.setApplicationVersion ("0.6"); + // switch off as we share an Info.plist file with WSJT-X + a.setAttribute (Qt::AA_DontUseNativeMenuBar); + MainWindow w; + w.show (); + QObject::connect (&a, &QApplication::lastWindowClosed, &a, &QApplication::quit); + 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); + fftbig_(nullptr, &nfft); + } + fftwf_forget_wisdom (); + fftwf_cleanup (); + return result; +} |
