Merge branch 'ui-enhance'

merge-requests/4/merge
Roeland Jansen 2021-07-25 11:11:31 +02:00
commit dd84be71c5
4 zmienionych plików z 29 dodań i 33 usunięć

Wyświetl plik

@ -12,7 +12,7 @@ aboutbox::aboutbox(QWidget *parent) :
ui->logoBtn->setIcon(QIcon(":resources/wfview.png"));
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 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.");

Wyświetl plik

@ -93,8 +93,12 @@ void meter::paintEvent(QPaintEvent *)
// Clamp down on stretching fonts.
// TODO: Make this more elegant
painter.setFont(QFont(this->fontInfo().family(), widgetWindowHeight/3.5));
} else {
painter.setFont(QFont(this->fontInfo().family(), widgetWindowHeight/2.5));
widgetWindowHeight = this->height();
painter.setWindow(QRect(0, 0, 255+mXstart, widgetWindowHeight));
barHeight = widgetWindowHeight / 2;
//painter.setFont(QFont(this->fontInfo().family(), widgetWindowHeight/2.5));
}
switch(meterType)
@ -327,13 +331,16 @@ void meter::drawScalePo(QPainter *qp)
// Here, P is now 60 watts:
// Higher scale:
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
// P=5 here.
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:
@ -341,7 +348,9 @@ void meter::drawScalePo(QPainter *qp)
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:

Wyświetl plik

@ -207,9 +207,9 @@ void wfmain::openRig()
}
usingLAN = false;
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->meter2Widget->hide();
#ifdef QT_DEBUG
// Experimental feature:
ui->meter2selectionCombo->show();
ui->secondaryMeterSelectionLabel->show();
#else
ui->meter2selectionCombo->hide();
ui->secondaryMeterSelectionLabel->hide();
#endif
// Future ideas:
//ui->meter2selectionCombo->addItem("Transmit Audio", meterTxMod);
//ui->meter2selectionCombo->addItem("Receive Audio", meterRxAudio);
@ -4152,7 +4161,7 @@ void wfmain::on_lanEnableBtn_clicked(bool checked)
//ui->udpServerSetupBtn->setEnabled(false);
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::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();
// }
}

Wyświetl plik

@ -18,7 +18,7 @@
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>1</number>
<number>3</number>
</property>
<widget class="QWidget" name="mainTab">
<attribute name="title">