mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-03-31 16:38:35 -04:00
Merge branch 'develop' into map65
This commit is contained in:
commit
f024605d5a
@ -19,6 +19,7 @@
|
|||||||
#include "Network/LotWUsers.hpp"
|
#include "Network/LotWUsers.hpp"
|
||||||
#include "models/DecodeHighlightingModel.hpp"
|
#include "models/DecodeHighlightingModel.hpp"
|
||||||
#include "logbook/logbook.h"
|
#include "logbook/logbook.h"
|
||||||
|
#include "Logger.hpp"
|
||||||
|
|
||||||
#include "qt_helpers.hpp"
|
#include "qt_helpers.hpp"
|
||||||
#include "moc_displaytext.cpp"
|
#include "moc_displaytext.cpp"
|
||||||
@ -212,9 +213,25 @@ void DisplayText::insertText(QString const& text, QColor bg, QColor fg
|
|||||||
|
|
||||||
void DisplayText::extend_vertical_scrollbar (int min, int max)
|
void DisplayText::extend_vertical_scrollbar (int min, int max)
|
||||||
{
|
{
|
||||||
if (high_volume_
|
static int mod_last;
|
||||||
&& m_config && m_config->decodes_from_top ())
|
static int height;
|
||||||
|
if (high_volume_ && m_config && m_config->decodes_from_top ())
|
||||||
{
|
{
|
||||||
|
auto m = modified_vertical_scrollbar_max_;
|
||||||
|
if (m != mod_last) { height = m - mod_last;mod_last = m; }
|
||||||
|
//auto vp_margins2 = viewportMargins ();
|
||||||
|
if (height == 0 && m > viewport()->height()) height = abs( - viewport()->height());
|
||||||
|
//LOG_INFO ("scrollbar min=" << min << " max=" << max << " mod=" << modified_vertical_scrollbar_max_ << " height=" << viewport()->height() << " top=" << vp_margins2.top() << " bottom=" << vp_margins2.bottom()) << " height=" << height << " mod_last=" << mod_last;
|
||||||
|
if (max > 60000)
|
||||||
|
{
|
||||||
|
QString tmp = toPlainText();
|
||||||
|
while (tmp != NULL && tmp.length() > 100 && max > 50000)
|
||||||
|
{
|
||||||
|
tmp.remove(0, tmp.indexOf("\n")+1);
|
||||||
|
max -= height;
|
||||||
|
}
|
||||||
|
setPlainText(tmp);
|
||||||
|
}
|
||||||
if (max && max != modified_vertical_scrollbar_max_)
|
if (max && max != modified_vertical_scrollbar_max_)
|
||||||
{
|
{
|
||||||
auto vp_margins = viewportMargins ();
|
auto vp_margins = viewportMargins ();
|
||||||
|
@ -66,7 +66,7 @@ private:
|
|||||||
QHash<QString, QPair<QColor, QColor>> highlighted_calls_;
|
QHash<QString, QPair<QColor, QColor>> highlighted_calls_;
|
||||||
bool high_volume_;
|
bool high_volume_;
|
||||||
QMetaObject::Connection vertical_scroll_connection_;
|
QMetaObject::Connection vertical_scroll_connection_;
|
||||||
int modified_vertical_scrollbar_max_;
|
long long modified_vertical_scrollbar_max_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DISPLAYTEXT_H
|
#endif // DISPLAYTEXT_H
|
||||||
|
@ -3907,12 +3907,11 @@ void MainWindow::readFromStdout() //readFromStdout
|
|||||||
bool bProcessMsgNormally=ui->respondComboBox->currentText()=="CQ: First" or
|
bool bProcessMsgNormally=ui->respondComboBox->currentText()=="CQ: First" or
|
||||||
(ui->respondComboBox->currentText()=="CQ: Max Dist" and m_ActiveStationsWidget==NULL) or
|
(ui->respondComboBox->currentText()=="CQ: Max Dist" and m_ActiveStationsWidget==NULL) or
|
||||||
(m_ActiveStationsWidget!=NULL and !m_ActiveStationsWidget->isVisible());
|
(m_ActiveStationsWidget!=NULL and !m_ActiveStationsWidget->isVisible());
|
||||||
if (decodedtext.messageWords().length() >= 2) {
|
if (decodedtext.messageWords().length() >= 3) {
|
||||||
QString t=decodedtext.messageWords()[2];
|
QString t=decodedtext.messageWords()[2];
|
||||||
if(t.contains("R+") or t.contains("R-") or t=="R" or t=="RRR" or t=="RR73") bProcessMsgNormally=true;
|
if(t.contains("R+") or t.contains("R-") or t=="R" or t=="RRR" or t=="RR73") bProcessMsgNormally=true;
|
||||||
}
|
} else {
|
||||||
else {
|
bProcessMsgNormally=true;
|
||||||
bProcessMsgNormally=true;
|
|
||||||
}
|
}
|
||||||
if(bProcessMsgNormally) {
|
if(bProcessMsgNormally) {
|
||||||
m_bDoubleClicked=true;
|
m_bDoubleClicked=true;
|
||||||
@ -4602,7 +4601,7 @@ void MainWindow::guiUpdate()
|
|||||||
if(m_ntx==2 or m_ntx==3) {
|
if(m_ntx==2 or m_ntx==3) {
|
||||||
QStringList t=ui->tx2->text().split(' ', SkipEmptyParts);
|
QStringList t=ui->tx2->text().split(' ', SkipEmptyParts);
|
||||||
int n=t.size();
|
int n=t.size();
|
||||||
m_xSent=t.at(n-2) + " " + t.at(n-1);
|
if (n > 3) m_xSent=t.at(n-2) + " " + t.at(n-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5394,6 +5393,10 @@ void MainWindow::processMessage (DecodedText const& message, Qt::KeyboardModifie
|
|||||||
MessageBox::information_message (this, tr ("Should you switch to RTTY contest mode?"));
|
MessageBox::information_message (this, tr ("Should you switch to RTTY contest mode?"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This is necessary to prevent crashes caused by double-clicking messages with <...> in certain QSO situations.
|
||||||
|
if((SpecOp::EU_VHF==m_specOp or SpecOp::RTTY==m_specOp or SpecOp::FIELD_DAY==m_specOp)
|
||||||
|
and message.string().contains("<...>")) return;
|
||||||
|
|
||||||
if(SpecOp::EU_VHF==m_specOp and message_words.at(2).contains(m_baseCall) and
|
if(SpecOp::EU_VHF==m_specOp and message_words.at(2).contains(m_baseCall) and
|
||||||
(!message_words.at(3).contains(qso_partner_base_call)) and (!m_bDoubleClicked)) {
|
(!message_words.at(3).contains(qso_partner_base_call)) and (!m_bDoubleClicked)) {
|
||||||
return;
|
return;
|
||||||
@ -9652,15 +9655,23 @@ list1Done:
|
|||||||
m_foxQSO[hc].tFoxRrpt = -1; //Have not received R+rpt
|
m_foxQSO[hc].tFoxRrpt = -1; //Have not received R+rpt
|
||||||
m_foxQSO[hc].tFoxTxRR73 = -1; //Have not sent RR73
|
m_foxQSO[hc].tFoxTxRR73 = -1; //Have not sent RR73
|
||||||
rm_tb4(hc); //Remove this Hound from tb4
|
rm_tb4(hc); //Remove this Hound from tb4
|
||||||
if(list2.size()==m_Nslots) goto list2Done;
|
|
||||||
if(m_foxQSO.count()>=2*m_Nslots) goto list2Done;
|
if(list2.size()==m_Nslots) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(m_foxQSO.count()>=5*3 /* could have 5 slots * 3 states ([0-2],4,5) */) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
list2Done:
|
list2Done:
|
||||||
|
|
||||||
n1=list1.size();
|
n1=list1.size();
|
||||||
n2=list2.size();
|
n2=list2.size();
|
||||||
n3=qMax(n1,n2);
|
n3=qMax(n1,n2);
|
||||||
if(n3>m_Nslots) n3=m_Nslots;
|
if(n3>m_Nslots) n3=m_Nslots;
|
||||||
|
|
||||||
for(int i=0; i<n3; i++) {
|
for(int i=0; i<n3; i++) {
|
||||||
hc1="";
|
hc1="";
|
||||||
fm="";
|
fm="";
|
||||||
|
@ -772,14 +772,18 @@ int CPlotter::rxFreq() {return m_rxFreq;} //rxFreq
|
|||||||
void CPlotter::mouseMoveEvent (QMouseEvent * event)
|
void CPlotter::mouseMoveEvent (QMouseEvent * event)
|
||||||
{
|
{
|
||||||
int x=event->x();
|
int x=event->x();
|
||||||
int y=event->y();
|
if (!m_bTotalPower){
|
||||||
float pdB=10.0*(m_h-y)/m_vpixperdiv + 20.0;
|
QToolTip::showText(event->globalPos(),QString::number(int(FreqfromX(x))));
|
||||||
if(y<(m_h-m_h2)) {
|
|
||||||
QToolTip::showText(event->globalPos(),QString::number(int(FreqfromX(x))));
|
|
||||||
} else {
|
} else {
|
||||||
QString t;
|
int y=event->y();
|
||||||
t=t.asprintf("%4.1f dB",pdB);
|
float pdB=10.0*(m_h-y)/m_vpixperdiv + 20.0;
|
||||||
QToolTip::showText(event->globalPos(),t);
|
if(y<(m_h-m_h2)) {
|
||||||
|
QToolTip::showText(event->globalPos(),QString::number(int(FreqfromX(x))));
|
||||||
|
} else {
|
||||||
|
QString t;
|
||||||
|
t=t.asprintf("%4.1f dB",pdB);
|
||||||
|
QToolTip::showText(event->globalPos(),t);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
QWidget::mouseMoveEvent(event);
|
QWidget::mouseMoveEvent(event);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user