mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-03-22 03:58:50 -04:00
Add new required files; update Makefile.MinGW.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@3828 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
2719bda29f
commit
44f4956de2
@ -1,6 +1,7 @@
|
||||
# Makefile for MinGW on Windows
|
||||
CC = gcc
|
||||
FC = g95
|
||||
CXX = c:/wsjt-env/Qt5/Tools/mingw48_32/bin/g++
|
||||
|
||||
FFLAGS = -O2 -fbounds-check -Wall -Wno-precision-loss -fno-second-underscore
|
||||
CFLAGS = -I. -fbounds-check
|
||||
@ -43,7 +44,7 @@ OBJS3 = m65.o m65a.o map65a.o symspec.o decode0.o ftninit.o ftnquit.o \
|
||||
LIBS3 = -L'C:/wsjt-env/Qt5/5.2.1/mingw48_32/lib' -lQt5Core
|
||||
|
||||
m65.exe: $(OBJS3) libm65.a
|
||||
g++ -o m65.exe $(OBJS3) $(LIBS3) libm65.a ../libfftw3f_win.a \
|
||||
$(CXX) -o m65.exe $(OBJS3) $(LIBS3) libm65.a ../libfftw3f_win.a \
|
||||
c:/MinGW/lib/libf95.a
|
||||
cp m65.exe ../../map65_install
|
||||
|
||||
@ -67,7 +68,7 @@ INCPATH = -I'C:/wsjt-env/Qt5/5.2.1/mingw48_32/include/QtCore' \
|
||||
-I'C:/wsjt-env/Qt5/5.2.1/mingw48_32/include'
|
||||
|
||||
ipcomm.o: ipcomm.cpp
|
||||
g++ -c $(INCPATH) ipcomm.cpp
|
||||
$(CXX) -c $(INCPATH) ipcomm.cpp
|
||||
|
||||
#m65a.o: m65a.f90
|
||||
# $(FC) -c -fno-second-underscore -cpp m65a.f90
|
||||
|
@ -1,4 +1,4 @@
|
||||
//--------------------------------------------------------------- MainWindow
|
||||
//-------------------------------------------------------------- MainWindow
|
||||
#include "mainwindow.h"
|
||||
#include "ui_mainwindow.h"
|
||||
#include "devsetup.h"
|
||||
|
@ -6,7 +6,6 @@
|
||||
|
||||
QT += core gui network
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
#CONFIG += qwt thread
|
||||
CONFIG += thread
|
||||
#CONFIG += console
|
||||
|
||||
@ -57,24 +56,17 @@ FORMS += mainwindow.ui about.ui devsetup.ui widegraph.ui \
|
||||
RC_FILE = map65.rc
|
||||
|
||||
unix {
|
||||
INCLUDEPATH += -lqwt
|
||||
LIBS += ../map65/libm65/libm65.a
|
||||
LIBS += -lfftw3f -lportaudio -lgfortran
|
||||
#LIBS +- -lusb
|
||||
}
|
||||
|
||||
win32 {
|
||||
#INCLUDEPATH += c:/qwt-6.1.0/src
|
||||
LIBS += ../map65/libm65/libm65.a
|
||||
LIBS += ../map65/libfftw3f_win.a
|
||||
LIBS += /users/joe/wsjt/QtSupport/palir-02.dll
|
||||
LIBS += libwsock32
|
||||
LIBS += C:/MinGW/lib/libf95.a
|
||||
CONFIG(release) {
|
||||
# LIBS += C:/qwt-6.1.0/lib/qwt.dll
|
||||
} else {
|
||||
# LIBS += C:/qwt-6.1.0/lib/qwtd.dll
|
||||
}
|
||||
#LIBS += -lusb
|
||||
LIBS += /users/joe/linrad/3.37/libusb.a
|
||||
LIBS += -lQt5Concurrent
|
||||
|
51
meterwidget.cpp
Executable file
51
meterwidget.cpp
Executable file
@ -0,0 +1,51 @@
|
||||
// Simple bargraph meter
|
||||
// Implemented by Edson Pereira PY2SDR
|
||||
|
||||
#include "meterwidget.h"
|
||||
|
||||
MeterWidget::MeterWidget(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
m_signal(0)
|
||||
{
|
||||
for ( int i = 0; i < 10; i++ ) {
|
||||
signalQueue.enqueue(0);
|
||||
}
|
||||
}
|
||||
|
||||
void MeterWidget::setValue(int value)
|
||||
{
|
||||
m_signal = value;
|
||||
signalQueue.enqueue(value);
|
||||
signalQueue.dequeue();
|
||||
|
||||
// Get signal peak
|
||||
int tmp = 0;
|
||||
for (int i = 0; i < signalQueue.size(); ++i) {
|
||||
if (signalQueue.at(i) > tmp)
|
||||
tmp = signalQueue.at(i);
|
||||
}
|
||||
m_sigPeak = tmp;
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
void MeterWidget::paintEvent( QPaintEvent * )
|
||||
{
|
||||
int pos;
|
||||
QPainter p;
|
||||
|
||||
p.begin(this);
|
||||
|
||||
// Sanitize
|
||||
m_signal = m_signal < 0 ? 0 : m_signal;
|
||||
m_signal = m_signal > 60 ? 60 : m_signal;
|
||||
|
||||
pos = m_signal * 2;
|
||||
QRect r(0, height() - pos, width(), pos );
|
||||
p.fillRect(r, QColor( 255, 150, 0 ));
|
||||
|
||||
// Draw peak hold indicator
|
||||
p.setPen(Qt::black);
|
||||
pos = m_sigPeak * 2;
|
||||
p.drawLine(0, height() - pos, 10, height() - pos);
|
||||
}
|
30
meterwidget.h
Executable file
30
meterwidget.h
Executable file
@ -0,0 +1,30 @@
|
||||
#ifndef METERWIDGET_H
|
||||
#define METERWIDGET_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QtGui>
|
||||
#include <QQueue>
|
||||
|
||||
class MeterWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit MeterWidget(QWidget *parent = 0);
|
||||
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
void setValue(int value);
|
||||
|
||||
private:
|
||||
QQueue<int> signalQueue;
|
||||
|
||||
int m_signal;
|
||||
int m_sigPeak;
|
||||
|
||||
protected:
|
||||
void paintEvent( QPaintEvent * );
|
||||
|
||||
};
|
||||
|
||||
#endif // METERWIDGET_H
|
1123
portaudio.h
Executable file
1123
portaudio.h
Executable file
File diff suppressed because it is too large
Load Diff
53
signalmeter.cpp
Executable file
53
signalmeter.cpp
Executable file
@ -0,0 +1,53 @@
|
||||
// Simple bargraph dB meter
|
||||
// Implemented by Edson Pereira PY2SDR
|
||||
//
|
||||
// Limits and geometry are hardcded for now.
|
||||
|
||||
#include "signalmeter.h"
|
||||
|
||||
SignalMeter::SignalMeter(QWidget *parent) :
|
||||
QWidget(parent)
|
||||
{
|
||||
resize(parent->size());
|
||||
|
||||
m_meter = new MeterWidget(this);
|
||||
m_meter->setGeometry(10, 10, 10, 120);
|
||||
|
||||
m_label = new QLabel(this);
|
||||
m_label->setGeometry(10, 135, 20, 20);
|
||||
|
||||
QLabel *dbLabel = new QLabel(this);
|
||||
dbLabel->setText("dB");
|
||||
dbLabel->setGeometry(30, 135, 20, 20);
|
||||
}
|
||||
|
||||
SignalMeter::~SignalMeter()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void SignalMeter::paintEvent( QPaintEvent * )
|
||||
{
|
||||
QPainter p;
|
||||
p.begin(this);
|
||||
p.drawLine(22, 10, 22, 130);
|
||||
|
||||
for ( int i = 0; i <= 60; i += 10 ) {
|
||||
p.drawLine(22, i*2 + 10, 25, i*2 + 10);
|
||||
}
|
||||
|
||||
for ( int i = 10; i < 60; i += 10 ) {
|
||||
p.drawText(30, i*2 + 15, QString::number(60 - i));
|
||||
}
|
||||
}
|
||||
|
||||
void SignalMeter::setValue(int value)
|
||||
{
|
||||
m_meter->setValue(value);
|
||||
m_label->setText(QString::number(value));
|
||||
}
|
||||
|
||||
void SignalMeter::resizeEvent(QResizeEvent *s)
|
||||
{
|
||||
resize(s->size());
|
||||
}
|
32
signalmeter.h
Executable file
32
signalmeter.h
Executable file
@ -0,0 +1,32 @@
|
||||
#ifndef SIGNALMETER_H
|
||||
#define SIGNALMETER_H
|
||||
|
||||
#include <QtGui>
|
||||
#include <QLabel>
|
||||
#include <meterwidget.h>
|
||||
|
||||
class SignalMeter : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SignalMeter(QWidget *parent = 0);
|
||||
~SignalMeter();
|
||||
|
||||
public slots:
|
||||
void setValue(int value);
|
||||
|
||||
private:
|
||||
MeterWidget *m_meter;
|
||||
|
||||
QLabel *m_label;
|
||||
|
||||
int m_signal;
|
||||
int m_sigPeak;
|
||||
|
||||
protected:
|
||||
void paintEvent( QPaintEvent * );
|
||||
void resizeEvent(QResizeEvent *s);
|
||||
};
|
||||
|
||||
#endif // SIGNALMETER_H
|
Loading…
Reference in New Issue
Block a user