Merge branch 'release-2.5.0' of bitbucket.org:k1jt/wsjtx into release-2.5.0

This commit is contained in:
Joe Taylor 2021-06-25 14:58:32 -04:00
commit 73b5c81017
6 changed files with 55 additions and 7 deletions

View File

@ -238,6 +238,7 @@ set (wsjt_qt_CXXSRCS
Network/NetworkAccessManager.cpp
widgets/LazyFillComboBox.cpp
widgets/CheckableItemComboBox.cpp
widgets/BandComboBox.cpp
)
set (wsjt_qtmm_CXXSRCS

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>635</width>
<height>512</height>
<height>523</height>
</rect>
</property>
<property name="sizePolicy">
@ -1704,7 +1704,7 @@ p, li { white-space: pre-wrap; }
<customwidget>
<class>DisplayText</class>
<extends>QTextBrowser</extends>
<header>displaytext.h</header>
<header>widgets/displaytext.h</header>
</customwidget>
</customwidgets>
<resources/>

27
widgets/BandComboBox.cpp Normal file
View File

@ -0,0 +1,27 @@
#include "BandComboBox.hpp"
#include <QAbstractItemView>
#include <QScrollBar>
#include <QDebug>
#include "models/FrequencyList.hpp"
BandComboBox::BandComboBox (QWidget * parent)
: QComboBox {parent}
{
}
// Fix up broken QComboBox item view rendering which doesn't allow for
// a vertical scroll bar in width calculations and ends up eliding the
// item text.
void BandComboBox::showPopup ()
{
auto minimum_width = view ()->sizeHintForColumn (FrequencyList_v2::frequency_mhz_column);
if (count () > maxVisibleItems ())
{
// for some as yet unknown reason, in FT8 mode the scrollbar
// width is oversize on the first call here
minimum_width += view ()->verticalScrollBar ()->width ();
}
view ()->setMinimumWidth (minimum_width);
QComboBox::showPopup ();
}

16
widgets/BandComboBox.hpp Normal file
View File

@ -0,0 +1,16 @@
#ifndef BAND_COMBO_BOX_HPP__
#define BAND_COMBO_BOX_HPP__
#include <QComboBox>
class BandComboBox
: public QComboBox
{
public:
explicit BandComboBox (QWidget * = nullptr);
private:
void showPopup () override;
};
#endif

View File

@ -5534,8 +5534,7 @@ void MainWindow::genStdMsgs(QString rpt, bool unconditional)
msgtype(t, ui->tx5->lineEdit ());
}
} else {
if (hisCall != hisBase && hisCall != (hisBase+"/P") && hisCall != (hisBase+"/R")
&& SpecOp::HOUND != m_config.special_op_id()) {
if (hisCall != hisBase and SpecOp::HOUND != m_config.special_op_id()) {
if (shortList(hisCall)) {
// cfm we know his full call with a type 1 tx1 message
t = hisCall + " " + my_callsign;

View File

@ -644,7 +644,7 @@ QPushButton[state=&quot;ok&quot;] {
</widget>
</item>
<item row="0" column="0">
<widget class="QComboBox" name="bandComboBox">
<widget class="BandComboBox" name="bandComboBox">
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select operating band or enter frequency in MHz or enter kHz increment followed by k.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
@ -661,7 +661,7 @@ QPushButton[state=&quot;ok&quot;] {
<enum>QComboBox::NoInsert</enum>
</property>
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToMinimumContentsLength</enum>
<enum>QComboBox::AdjustToMinimumContentsLengthWithIcon</enum>
</property>
</widget>
</item>
@ -3434,7 +3434,7 @@ Double-click to reset to the standard 73 message</string>
<customwidgets>
<customwidget>
<class>DisplayText</class>
<extends>QTextEdit</extends>
<extends>QTextBrowser</extends>
<header>widgets/displaytext.h</header>
</customwidget>
<customwidget>
@ -3468,6 +3468,11 @@ Double-click to reset to the standard 73 message</string>
<extends>QPushButton</extends>
<header>widgets/DoubleClickablePushButton.hpp</header>
</customwidget>
<customwidget>
<class>BandComboBox</class>
<extends>QComboBox</extends>
<header>widgets/BandComboBox.hpp</header>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>decodedTextBrowser</tabstop>