kopia lustrzana https://gitlab.com/eliggett/wfview
Merge branch 'ui-enhance'
commit
dd84be71c5
|
@ -12,7 +12,7 @@ aboutbox::aboutbox(QWidget *parent) :
|
||||||
ui->logoBtn->setIcon(QIcon(":resources/wfview.png"));
|
ui->logoBtn->setIcon(QIcon(":resources/wfview.png"));
|
||||||
ui->logoBtn->setStyleSheet("Text-align:left");
|
ui->logoBtn->setStyleSheet("Text-align:left");
|
||||||
|
|
||||||
ui->topText->setText("wfview version 1.1a");
|
ui->topText->setText("wfview version 1.1");
|
||||||
|
|
||||||
QString head = QString("<html><head></head><body>");
|
QString head = QString("<html><head></head><body>");
|
||||||
QString copyright = QString("Copyright 2017-2021 Elliott H. Liggett, W6EL. All rights reserved. wfview source code is <a href=\"https://gitlab.com/eliggett/wfview/-/blob/master/LICENSE\">licensed</a> under the GNU GPLv3.");
|
QString copyright = QString("Copyright 2017-2021 Elliott H. Liggett, W6EL. All rights reserved. wfview source code is <a href=\"https://gitlab.com/eliggett/wfview/-/blob/master/LICENSE\">licensed</a> under the GNU GPLv3.");
|
||||||
|
|
23
meter.cpp
23
meter.cpp
|
@ -93,8 +93,12 @@ void meter::paintEvent(QPaintEvent *)
|
||||||
// Clamp down on stretching fonts.
|
// Clamp down on stretching fonts.
|
||||||
// TODO: Make this more elegant
|
// TODO: Make this more elegant
|
||||||
painter.setFont(QFont(this->fontInfo().family(), widgetWindowHeight/3.5));
|
painter.setFont(QFont(this->fontInfo().family(), widgetWindowHeight/3.5));
|
||||||
} else {
|
widgetWindowHeight = this->height();
|
||||||
painter.setFont(QFont(this->fontInfo().family(), widgetWindowHeight/2.5));
|
painter.setWindow(QRect(0, 0, 255+mXstart, widgetWindowHeight));
|
||||||
|
barHeight = widgetWindowHeight / 2;
|
||||||
|
|
||||||
|
|
||||||
|
//painter.setFont(QFont(this->fontInfo().family(), widgetWindowHeight/2.5));
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(meterType)
|
switch(meterType)
|
||||||
|
@ -327,13 +331,16 @@ void meter::drawScalePo(QPainter *qp)
|
||||||
// Here, P is now 60 watts:
|
// Here, P is now 60 watts:
|
||||||
// Higher scale:
|
// Higher scale:
|
||||||
i = i - (int)(10*dnPerWatt); // back one tick first. Otherwise i starts at 178.
|
i = i - (int)(10*dnPerWatt); // back one tick first. Otherwise i starts at 178.
|
||||||
qDebug() << "meter i: " << i;
|
//qDebug() << "meter i: " << i;
|
||||||
dnPerWatt = (213-143.0) / 50.0; // 1.4 dn per watt
|
dnPerWatt = (213-143.0) / 50.0; // 1.4 dn per watt
|
||||||
|
// P=5 here.
|
||||||
qp->setPen(Qt::yellow);
|
qp->setPen(Qt::yellow);
|
||||||
for(i=mXstart+143; i<mXstart+213; i+=(10*dnPerWatt))
|
int k=0;
|
||||||
|
for(i=mXstart+143; i<mXstart+213; i+=(5*dnPerWatt))
|
||||||
{
|
{
|
||||||
qp->drawText(i,scaleTextYstart, QString("%1").arg(10*(p++)) );
|
k = 50+(( i-mXstart-143 ) / dnPerWatt);
|
||||||
|
if(k==40||k==50||k==65||k==80)
|
||||||
|
qp->drawText(i,scaleTextYstart, QString("%1").arg(k) );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now we're out past 100:
|
// Now we're out past 100:
|
||||||
|
@ -341,7 +348,9 @@ void meter::drawScalePo(QPainter *qp)
|
||||||
|
|
||||||
for(i=mXstart+213; i<mXstart+255; i+=(10*dnPerWatt))
|
for(i=mXstart+213; i<mXstart+255; i+=(10*dnPerWatt))
|
||||||
{
|
{
|
||||||
qp->drawText(i,scaleTextYstart, QString("%1").arg(10*(p++)) );
|
k = 50+(( i-mXstart-143 ) / dnPerWatt);
|
||||||
|
if(k==100)
|
||||||
|
qp->drawText(i,scaleTextYstart, QString("%1").arg(k) );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now the lines:
|
// Now the lines:
|
||||||
|
|
35
wfmain.cpp
35
wfmain.cpp
|
@ -207,9 +207,9 @@ void wfmain::openRig()
|
||||||
}
|
}
|
||||||
usingLAN = false;
|
usingLAN = false;
|
||||||
emit sendCommSetup(prefs.radioCIVAddr, serialPortRig, prefs.serialPortBaud,prefs.virtualSerialPort);
|
emit sendCommSetup(prefs.radioCIVAddr, serialPortRig, prefs.serialPortBaud,prefs.virtualSerialPort);
|
||||||
|
ui->statusBar->showMessage(QString("Connecting to rig using serial port ").append(serialPortRig), 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
ui->statusBar->showMessage(QString("Connecting to rig using serial port ").append(serialPortRig), 1000);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -670,6 +670,15 @@ void wfmain::setupMainUI()
|
||||||
ui->meter2selectionCombo->addItem("Center", meterCenter);
|
ui->meter2selectionCombo->addItem("Center", meterCenter);
|
||||||
ui->meter2Widget->hide();
|
ui->meter2Widget->hide();
|
||||||
|
|
||||||
|
#ifdef QT_DEBUG
|
||||||
|
// Experimental feature:
|
||||||
|
ui->meter2selectionCombo->show();
|
||||||
|
ui->secondaryMeterSelectionLabel->show();
|
||||||
|
#else
|
||||||
|
ui->meter2selectionCombo->hide();
|
||||||
|
ui->secondaryMeterSelectionLabel->hide();
|
||||||
|
#endif
|
||||||
|
|
||||||
// Future ideas:
|
// Future ideas:
|
||||||
//ui->meter2selectionCombo->addItem("Transmit Audio", meterTxMod);
|
//ui->meter2selectionCombo->addItem("Transmit Audio", meterTxMod);
|
||||||
//ui->meter2selectionCombo->addItem("Receive Audio", meterRxAudio);
|
//ui->meter2selectionCombo->addItem("Receive Audio", meterRxAudio);
|
||||||
|
@ -4152,7 +4161,7 @@ void wfmain::on_lanEnableBtn_clicked(bool checked)
|
||||||
//ui->udpServerSetupBtn->setEnabled(false);
|
//ui->udpServerSetupBtn->setEnabled(false);
|
||||||
if(checked)
|
if(checked)
|
||||||
{
|
{
|
||||||
showStatusBarText("After filling in values, press Save Settings and re-start wfview.");
|
showStatusBarText("After filling in values, press Save Settings.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5247,26 +5256,4 @@ void wfmain::on_debugBtn_clicked()
|
||||||
//wf->setInteraction(QCP::iRangeZoom, true);
|
//wf->setInteraction(QCP::iRangeZoom, true);
|
||||||
//wf->setInteraction(QCP::iRangeDrag, true);
|
//wf->setInteraction(QCP::iRangeDrag, true);
|
||||||
|
|
||||||
// debug the fast queue:
|
|
||||||
qDebug(logSystem()) << "Size of fast command queue: " << periodicCmdQueue.size();
|
|
||||||
|
|
||||||
for (auto it = periodicCmdQueue.cbegin(); it != periodicCmdQueue.cend(); ++it) {
|
|
||||||
qDebug(logSystem()) << *it ;
|
|
||||||
}
|
|
||||||
|
|
||||||
// bool ok = false;
|
|
||||||
// unsigned char level = (unsigned char) QInputDialog::getInt(this, "wfview simulated radio level", "Raw level (0-255)", 128, 1, 255, 1, &ok );
|
|
||||||
// if(ok)
|
|
||||||
// {
|
|
||||||
// int peak = level*1.5;
|
|
||||||
// if(peak > 255)
|
|
||||||
// peak = 255;
|
|
||||||
// int average = peak / 2;
|
|
||||||
|
|
||||||
// ui->meterSPoWidget->setMeterType(meterALC);
|
|
||||||
// ui->meterSPoWidget->setLevels(level, peak, average);
|
|
||||||
// ui->meterSPoWidget->update();
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTabWidget" name="tabWidget">
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>1</number>
|
<number>3</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="mainTab">
|
<widget class="QWidget" name="mainTab">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
|
|
Ładowanie…
Reference in New Issue