mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-04 08:21:17 -05:00
MAP65 now compiles in QT5. Need to replace Qwt Thermo widgets.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@3823 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
7e3db081a5
commit
4bda372088
@ -45,8 +45,8 @@ void Astro::astroUpdate(QDateTime t, QString mygrid, QString hisgrid,
|
||||
|
||||
if(!astroBusy) {
|
||||
astroBusy=true;
|
||||
astrosub_(&nyear, &month, &nday, &uth, &nfreq, mygrid.toAscii(),
|
||||
hisgrid.toAscii(), &azsun, &elsun, &azmoon, &elmoon,
|
||||
astrosub_(&nyear, &month, &nday, &uth, &nfreq, mygrid.toLatin1(),
|
||||
hisgrid.toLatin1(), &azsun, &elsun, &azmoon, &elmoon,
|
||||
&azmoondx, &elmoondx, &ntsky, &ndop, &ndop00,&ramoon, &decmoon,
|
||||
&dgrd, &poloffset, &xnr, 6, 6);
|
||||
astroBusy=false;
|
||||
|
@ -109,7 +109,7 @@ void DevSetup::initDlg()
|
||||
ui.mult570SpinBox->setValue(m_mult570);
|
||||
ui.mult570TxSpinBox->setValue(m_mult570Tx);
|
||||
ui.cal570SpinBox->setValue(m_cal570);
|
||||
sscanf(m_colors.toAscii(),"%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x",
|
||||
sscanf(m_colors.toLatin1(),"%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x%2x",
|
||||
&r,&g,&b,&r0,&g0,&b0,&r1,&g1,&b1,&r2,&g2,&b2,&r3,&g3,&b3);
|
||||
updateColorLabels();
|
||||
ui.sbBackgroundRed->setValue(r);
|
||||
|
@ -18,7 +18,7 @@ void getfile(QString fname, bool xpol, int dbDgrd, int nfast)
|
||||
|
||||
memset(id,0,2*npts);
|
||||
char name[80];
|
||||
strcpy(name,fname.toAscii());
|
||||
strcpy(name,fname.toLatin1());
|
||||
FILE* fp=fopen(name,"rb");
|
||||
|
||||
if(fp != NULL) {
|
||||
@ -66,7 +66,7 @@ void savetf2(QString fname, bool xpol, int nfast)
|
||||
|
||||
qint16* buf=(qint16*)malloc(2*npts);
|
||||
char name[80];
|
||||
strcpy(name,fname.toAscii());
|
||||
strcpy(name,fname.toLatin1());
|
||||
FILE* fp=fopen(name,"wb");
|
||||
|
||||
if(fp != NULL) {
|
||||
|
@ -34,7 +34,8 @@ subroutine four2a(a,nfft,ndim,isign,iform)
|
||||
if(nfft.eq.nn(i) .and. isign.eq.ns(i) .and. &
|
||||
iform.eq.nf(i) .and. nloc.eq.nl(i)) go to 10
|
||||
enddo
|
||||
if(nplan.ge.NPMAX) stop 'Too many FFTW plans requested.'
|
||||
! if(nplan.ge.NPMAX) stop 'Too many FFTW plans requested.'
|
||||
if(nplan.ge.NPMAX) call exit(1)
|
||||
nplan=nplan+1
|
||||
i=nplan
|
||||
nn(i)=nfft
|
||||
@ -76,7 +77,8 @@ subroutine four2a(a,nfft,ndim,isign,iform)
|
||||
else if(isign.eq.1 .and. iform.eq.-1) then
|
||||
call sfftw_plan_dft_c2r_1d(plan(i),nfft,a,a,nflags)
|
||||
else
|
||||
stop 'Unsupported request in four2a'
|
||||
! stop 'Unsupported request in four2a'
|
||||
call exit(1)
|
||||
endif
|
||||
i=nplan
|
||||
if(nfft.le.NSMALL) then
|
||||
|
@ -15,7 +15,7 @@ C Convert ascii number, letter, or space to 0-36 for callsign packing.
|
||||
n=36
|
||||
else
|
||||
Print*,'Invalid character in callsign ',c,' ',ichar(c)
|
||||
stop
|
||||
call exit(1)
|
||||
endif
|
||||
nchar=n
|
||||
|
||||
|
7
main.cpp
7
main.cpp
@ -1,5 +1,10 @@
|
||||
#ifdef QT5
|
||||
#include <QtWidgets>
|
||||
#else
|
||||
#include <QtGui>
|
||||
#include <QtGui/QApplication>
|
||||
#endif
|
||||
#include <QApplication>
|
||||
|
||||
#include "mainwindow.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include "bandmap.h"
|
||||
#include "txtune.h"
|
||||
#include "sleep.h"
|
||||
#include <portaudio.h>
|
||||
#include "portaudio.h"
|
||||
|
||||
#define NFFT 32768
|
||||
|
||||
@ -157,8 +157,8 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
iqAmp=0;
|
||||
iqPhase=0;
|
||||
|
||||
ui->xThermo->setFillBrush(Qt::green);
|
||||
ui->yThermo->setFillBrush(Qt::magenta);
|
||||
// ui->xThermo->setFillBrush(Qt::green);
|
||||
// ui->yThermo->setFillBrush(Qt::magenta);
|
||||
|
||||
#ifdef WIN32
|
||||
while(true) {
|
||||
@ -530,8 +530,8 @@ void MainWindow::dataSink(int k)
|
||||
if(m_xpol) t.sprintf(" Rx noise: %5.1f %5.1f %5.1f %% ",px,py,m_pctZap);
|
||||
if(!m_xpol) t.sprintf(" Rx noise: %5.1f %5.1f %% ",px,m_pctZap);
|
||||
lab4->setText(t);
|
||||
ui->xThermo->setValue((double)px); //Update the bargraphs
|
||||
ui->yThermo->setValue((double)py);
|
||||
// ui->xThermo->setValue((double)px); //Update the bargraphs
|
||||
// ui->yThermo->setValue((double)py);
|
||||
if(m_monitoring || m_diskData) {
|
||||
g_pWideGraph->dataSink2(s,nkhz,ihsym,m_diskData,lstrong);
|
||||
}
|
||||
@ -1258,11 +1258,11 @@ void MainWindow::decode() //decode()
|
||||
QString hcall=(ui->dxCallEntry->text()+" ").mid(0,12);
|
||||
QString hgrid=(ui->dxGridEntry->text()+" ").mid(0,6);
|
||||
|
||||
strncpy(datcom_.mycall, mcall.toAscii(), 12);
|
||||
strncpy(datcom_.mygrid, mgrid.toAscii(), 6);
|
||||
strncpy(datcom_.hiscall, hcall.toAscii(), 12);
|
||||
strncpy(datcom_.hisgrid, hgrid.toAscii(), 6);
|
||||
strncpy(datcom_.datetime, m_dateTime.toAscii(), 20);
|
||||
strncpy(datcom_.mycall, mcall.toLatin1(), 12);
|
||||
strncpy(datcom_.mygrid, mgrid.toLatin1(), 6);
|
||||
strncpy(datcom_.hiscall, hcall.toLatin1(), 12);
|
||||
strncpy(datcom_.hisgrid, hgrid.toLatin1(), 6);
|
||||
strncpy(datcom_.datetime, m_dateTime.toLatin1(), 20);
|
||||
|
||||
//newdat=1 ==> this is new data, must do the big FFT
|
||||
//nagain=1 ==> decode only at fQSO +/- Tol
|
||||
@ -1455,7 +1455,7 @@ void MainWindow::guiUpdate()
|
||||
f.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Append);
|
||||
QTextStream out(&f);
|
||||
out << QDateTime::currentDateTimeUtc().toString("yyyy-MMM-dd hh:mm")
|
||||
<< " Tx message: " << QString::fromAscii(msgsent) << endl;
|
||||
<< " Tx message: " << QString::fromLatin1(msgsent) << endl;
|
||||
f.close();
|
||||
}
|
||||
|
||||
@ -1466,8 +1466,8 @@ void MainWindow::guiUpdate()
|
||||
if(iptt==1 && iptt0==0) nc1=-9; // TxDelay = 0.8 s
|
||||
if(nc1 <= 0) nc1++;
|
||||
if(nc1 == 0) {
|
||||
ui->xThermo->setValue(0.0); //Set the Thermos to zero
|
||||
ui->yThermo->setValue(0.0);
|
||||
// ui->xThermo->setValue(0.0); //Set the Thermos to zero
|
||||
// ui->yThermo->setValue(0.0);
|
||||
m_monitoring=false;
|
||||
soundInThread.setMonitoring(false);
|
||||
btxok=true;
|
||||
@ -1478,7 +1478,7 @@ void MainWindow::guiUpdate()
|
||||
f.open(QIODevice::WriteOnly | QIODevice::Text | QIODevice::Append);
|
||||
QTextStream out(&f);
|
||||
out << QDateTime::currentDateTimeUtc().toString("yyyy-MMM-dd hh:mm")
|
||||
<< " Tx message: " << QString::fromAscii(msgsent) << endl;
|
||||
<< " Tx message: " << QString::fromLatin1(msgsent) << endl;
|
||||
f.close();
|
||||
}
|
||||
|
||||
@ -1579,8 +1579,8 @@ void MainWindow::guiUpdate()
|
||||
QString utc = " " + t.time().toString() + " ";
|
||||
ui->labUTC->setText(utc);
|
||||
if((!m_monitoring and !m_diskData) or (khsym==m_hsym0)) {
|
||||
ui->xThermo->setValue(0.0); // Set Rx levels to 0
|
||||
ui->yThermo->setValue(0.0);
|
||||
// ui->xThermo->setValue(0.0); // Set Rx levels to 0
|
||||
// ui->yThermo->setValue(0.0);
|
||||
lab4->setText(" Rx noise: 0.0 0.0 0.0% ");
|
||||
}
|
||||
m_hsym0=khsym;
|
||||
|
@ -1,6 +1,7 @@
|
||||
#ifndef MAINWINDOW_H
|
||||
#define MAINWINDOW_H
|
||||
#include <QtGui>
|
||||
#include <QtWidgets>
|
||||
#include <QLabel>
|
||||
#include <QTimer>
|
||||
#include <QDateTime>
|
||||
@ -10,6 +11,7 @@
|
||||
#include "soundout.h"
|
||||
#include "commons.h"
|
||||
#include "sleep.h"
|
||||
#include <QtConcurrent/QtConcurrent>
|
||||
|
||||
#define NFFT 32768
|
||||
#define NSMAX 5760000
|
||||
|
@ -93,7 +93,7 @@
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Courier New'; font-size:10pt; font-weight:400; font-style:normal;">
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p></body></html></string>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html></string>
|
||||
</property>
|
||||
<property name="acceptRichText">
|
||||
<bool>false</bool>
|
||||
@ -243,68 +243,6 @@ p, li { white-space: pre-wrap; }
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QwtThermo" name="xThermo" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>43</width>
|
||||
<height>180</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="borderWidth" stdset="0">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maxValue" stdset="0">
|
||||
<double>60.000000000000000</double>
|
||||
</property>
|
||||
<property name="minValue" stdset="0">
|
||||
<double>0.000000000000000</double>
|
||||
</property>
|
||||
<property name="pipeWidth" stdset="0">
|
||||
<number>8</number>
|
||||
</property>
|
||||
<property name="value" stdset="0">
|
||||
<double>0.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QwtThermo" name="yThermo" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>12</width>
|
||||
<height>177</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="borderWidth" stdset="0">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maxValue" stdset="0">
|
||||
<double>60.000000000000000</double>
|
||||
</property>
|
||||
<property name="minValue" stdset="0">
|
||||
<double>0.000000000000000</double>
|
||||
</property>
|
||||
<property name="pipeWidth" stdset="0">
|
||||
<number>8</number>
|
||||
</property>
|
||||
<property name="value" stdset="0">
|
||||
<double>0.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
@ -854,7 +792,7 @@ p, li { white-space: pre-wrap; }
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string>buttonGroup</string>
|
||||
<string notr="true">buttonGroup</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
@ -882,7 +820,7 @@ p, li { white-space: pre-wrap; }
|
||||
<string/>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string>buttonGroup</string>
|
||||
<string notr="true">buttonGroup</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
@ -910,7 +848,7 @@ p, li { white-space: pre-wrap; }
|
||||
<string/>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string>buttonGroup</string>
|
||||
<string notr="true">buttonGroup</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
@ -938,7 +876,7 @@ p, li { white-space: pre-wrap; }
|
||||
<string/>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string>buttonGroup</string>
|
||||
<string notr="true">buttonGroup</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
@ -966,7 +904,7 @@ p, li { white-space: pre-wrap; }
|
||||
<string/>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string>buttonGroup</string>
|
||||
<string notr="true">buttonGroup</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
@ -994,7 +932,7 @@ p, li { white-space: pre-wrap; }
|
||||
<string/>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string>buttonGroup</string>
|
||||
<string notr="true">buttonGroup</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
@ -1613,11 +1551,6 @@ p, li { white-space: pre-wrap; }
|
||||
<extends>QTextBrowser</extends>
|
||||
<header>displaytext.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>QwtThermo</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>qwt_thermo.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections>
|
||||
|
@ -1,7 +1,7 @@
|
||||
[Setup]
|
||||
AppName=MAP65
|
||||
AppVerName=MAP65 Version 2.5 r3603
|
||||
AppCopyright=Copyright (C) 2001-2013 by Joe Taylor, K1JT
|
||||
AppVerName=MAP65 Version 2.5 r3653
|
||||
AppCopyright=Copyright (C) 2001-2014 by Joe Taylor, K1JT
|
||||
DefaultDirName=c:\MAP65
|
||||
DefaultGroupName=MAP65
|
||||
|
||||
@ -17,7 +17,6 @@ Source: "c:\Users\joe\wsjt\map65_install\wisdom2.bat"; DestDir: "{app}";
|
||||
Source: "c:\Users\joe\wsjt\map65_install\afmhot.dat"; DestDir: "{app}";
|
||||
Source: "c:\Users\joe\wsjt\map65_install\blue.dat"; DestDir: "{app}";
|
||||
Source: "c:\Users\joe\wsjt\map65_install\qthid.exe"; DestDir: "{app}";
|
||||
|
||||
Source: "c:\Users\joe\wsjt\QtSupport\*.dll"; DestDir: "{sys}"; Flags: onlyifdoesntexist
|
||||
|
||||
Source: "c:\Users\joe\wsjt\map65_install\save\dummy"; DestDir: "{app}\save";
|
||||
|
20
map65.pro
20
map65.pro
@ -5,12 +5,15 @@
|
||||
#-------------------------------------------------
|
||||
|
||||
QT += core gui network
|
||||
CONFIG += qwt thread
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
#CONFIG += qwt thread
|
||||
CONFIG += thread
|
||||
#CONFIG += console
|
||||
|
||||
TARGET = map65
|
||||
VERSION = 2.3.0
|
||||
TEMPLATE = app
|
||||
DEFINES = QT5
|
||||
|
||||
win32 {
|
||||
DEFINES = WIN32
|
||||
@ -47,8 +50,6 @@ HEADERS += mainwindow.h plotter.h soundin.h soundout.h \
|
||||
bandmap.h commons.h sleep.h astro.h displaytext.h \
|
||||
txtune.h
|
||||
|
||||
DEFINES += __cplusplus
|
||||
|
||||
FORMS += mainwindow.ui about.ui devsetup.ui widegraph.ui \
|
||||
messages.ui bandmap.ui astro.ui \
|
||||
txtune.ui
|
||||
@ -63,16 +64,19 @@ LIBS += -lfftw3f -lportaudio -lgfortran
|
||||
}
|
||||
|
||||
win32 {
|
||||
INCLUDEPATH += c:/qwt-6.0.1/include
|
||||
#INCLUDEPATH += c:/qwt-6.1.0/src
|
||||
LIBS += ../map65/libm65/libm65.a
|
||||
LIBS += ../map65/libfftw3f_win.a
|
||||
LIBS += ../QtSupport/palir-02.dll
|
||||
LIBS += /users/joe/wsjt/QtSupport/palir-02.dll
|
||||
LIBS += libwsock32
|
||||
LIBS += C:/MinGW/lib/libf95.a
|
||||
CONFIG(release) {
|
||||
LIBS += C:/qwt-6.0.1/lib/qwt.dll
|
||||
# LIBS += C:/qwt-6.1.0/lib/qwt.dll
|
||||
} else {
|
||||
LIBS += C:/qwt-6.0.1/lib/qwtd.dll
|
||||
# LIBS += C:/qwt-6.1.0/lib/qwtd.dll
|
||||
}
|
||||
LIBS += -lusb
|
||||
#LIBS += -lusb
|
||||
LIBS += /users/joe/linrad/3.37/libusb.a
|
||||
LIBS += -lQt5Concurrent
|
||||
#LIBS += c:\wsjt-env\Qt5\Tools\mingw48_32\i686-w64-mingw32\lib\libmingwex.a
|
||||
}
|
||||
|
@ -17,7 +17,13 @@
|
||||
#include <string.h> /* String function definitions */
|
||||
#include <unistd.h> /* UNIX standard function definitions */
|
||||
#include <sys/time.h>
|
||||
#include <usb.h>
|
||||
|
||||
#ifdef WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
//#include <usb.h>
|
||||
#include "/users/joe/linrad/3.37/usb.h"
|
||||
#include <QDebug>
|
||||
|
||||
#define USB_SUCCESS 0
|
||||
|
@ -1,5 +1,6 @@
|
||||
#ifndef WIDEGRAPH_H
|
||||
#define WIDEGRAPH_H
|
||||
#include <QtWidgets>
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
|
Loading…
Reference in New Issue
Block a user