mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-27 22:58:40 -05:00
Updates to support Qt v5.13
Replacement of deprecated Qt functions and member functions.
This commit is contained in:
parent
0c49f6f872
commit
01aaa852e3
@ -1379,8 +1379,8 @@ void Configuration::impl::read_settings ()
|
|||||||
txDelay_ = settings_->value ("TxDelay",0.2).toDouble();
|
txDelay_ = settings_->value ("TxDelay",0.2).toDouble();
|
||||||
aggressive_ = settings_->value ("Aggressive", 0).toInt ();
|
aggressive_ = settings_->value ("Aggressive", 0).toInt ();
|
||||||
RxBandwidth_ = settings_->value ("RxBandwidth", 2500).toInt ();
|
RxBandwidth_ = settings_->value ("RxBandwidth", 2500).toInt ();
|
||||||
save_directory_ = settings_->value ("SaveDir", default_save_directory_.absolutePath ()).toString ();
|
save_directory_.setPath (settings_->value ("SaveDir", default_save_directory_.absolutePath ()).toString ());
|
||||||
azel_directory_ = settings_->value ("AzElDir", default_azel_directory_.absolutePath ()).toString ();
|
azel_directory_.setPath (settings_->value ("AzElDir", default_azel_directory_.absolutePath ()).toString ());
|
||||||
|
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
@ -2063,8 +2063,8 @@ void Configuration::impl::accept ()
|
|||||||
TX_messages_ = ui_->TX_messages_check_box->isChecked ();
|
TX_messages_ = ui_->TX_messages_check_box->isChecked ();
|
||||||
data_mode_ = static_cast<DataMode> (ui_->TX_mode_button_group->checkedId ());
|
data_mode_ = static_cast<DataMode> (ui_->TX_mode_button_group->checkedId ());
|
||||||
bLowSidelobes_ = ui_->rbLowSidelobes->isChecked();
|
bLowSidelobes_ = ui_->rbLowSidelobes->isChecked();
|
||||||
save_directory_ = ui_->save_path_display_label->text ();
|
save_directory_.setPath (ui_->save_path_display_label->text ());
|
||||||
azel_directory_ = ui_->azel_path_display_label->text ();
|
azel_directory_.setPath (ui_->azel_path_display_label->text ());
|
||||||
enable_VHF_features_ = ui_->enable_VHF_features_check_box->isChecked ();
|
enable_VHF_features_ = ui_->enable_VHF_features_check_box->isChecked ();
|
||||||
decode_at_52s_ = ui_->decode_at_52s_check_box->isChecked ();
|
decode_at_52s_ = ui_->decode_at_52s_check_box->isChecked ();
|
||||||
single_decode_ = ui_->single_decode_check_box->isChecked ();
|
single_decode_ = ui_->single_decode_check_box->isChecked ();
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#include "HRDTransceiver.hpp"
|
#include "HRDTransceiver.hpp"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
#include <QHostAddress>
|
#include <QHostAddress>
|
||||||
#include <QByteArray>
|
#include <QByteArray>
|
||||||
#include <QRegExp>
|
#include <QRegExp>
|
||||||
@ -36,7 +37,7 @@ struct HRDMessage
|
|||||||
HRDMessage * storage (reinterpret_cast<HRDMessage *> (new char[size]));
|
HRDMessage * storage (reinterpret_cast<HRDMessage *> (new char[size]));
|
||||||
storage->size_ = size ;
|
storage->size_ = size ;
|
||||||
ushort const * pl (payload.utf16 ());
|
ushort const * pl (payload.utf16 ());
|
||||||
qCopy (pl, pl + payload.size () + 1, storage->payload_); // copy terminator too
|
std::copy (pl, pl + payload.size () + 1, storage->payload_); // copy terminator too
|
||||||
storage->magic_1_ = magic_1_value_;
|
storage->magic_1_ = magic_1_value_;
|
||||||
storage->magic_2_ = magic_2_value_;
|
storage->magic_2_ = magic_2_value_;
|
||||||
storage->checksum_ = 0;
|
storage->checksum_ = 0;
|
||||||
|
@ -55,8 +55,7 @@ QSize ForeignKeyDelegate::sizeHint (QStyleOptionViewItem const& option, QModelIn
|
|||||||
{
|
{
|
||||||
size_hint = size_hint.expandedTo (qApp->style ()->sizeFromContents (QStyle::CT_ComboBox
|
size_hint = size_hint.expandedTo (qApp->style ()->sizeFromContents (QStyle::CT_ComboBox
|
||||||
, &combo_box_option
|
, &combo_box_option
|
||||||
, {metrics.width (candidate_key_filter_->data (candidate_key_filter_->index (row, 0)).toString ())
|
, metrics.boundingRect (candidate_key_filter_->data (candidate_key_filter_->index (row, 0)).toString ()).size ()));
|
||||||
, metrics.height ()}));
|
|
||||||
}
|
}
|
||||||
return size_hint;
|
return size_hint;
|
||||||
}
|
}
|
||||||
|
@ -161,7 +161,7 @@ void EPlotter::DrawOverlay() //DrawOverlay()
|
|||||||
int x,y;
|
int x,y;
|
||||||
|
|
||||||
QPainter painter(&m_OverlayPixmap);
|
QPainter painter(&m_OverlayPixmap);
|
||||||
painter.initFrom(this);
|
painter.setBackground (palette ().brush (backgroundRole ()));
|
||||||
QLinearGradient gradient(0, 0, 0 ,m_h2); //fill background with gradient
|
QLinearGradient gradient(0, 0, 0 ,m_h2); //fill background with gradient
|
||||||
gradient.setColorAt(1, Qt::black);
|
gradient.setColorAt(1, Qt::black);
|
||||||
gradient.setColorAt(0, Qt::darkBlue);
|
gradient.setColorAt(0, Qt::darkBlue);
|
||||||
@ -199,7 +199,7 @@ void EPlotter::DrawOverlay() //DrawOverlay()
|
|||||||
|
|
||||||
QRect rect0;
|
QRect rect0;
|
||||||
QPainter painter0(&m_ScalePixmap);
|
QPainter painter0(&m_ScalePixmap);
|
||||||
painter0.initFrom(this);
|
painter0.setBackground (palette ().brush (backgroundRole ()));
|
||||||
|
|
||||||
//create Font to use for scales
|
//create Font to use for scales
|
||||||
QFont Font("Arial");
|
QFont Font("Arial");
|
||||||
|
@ -58,7 +58,7 @@ void FPlotter::drawScale() //drawScale()
|
|||||||
|
|
||||||
QRect rect0;
|
QRect rect0;
|
||||||
QPainter painter0(&m_ScalePixmap);
|
QPainter painter0(&m_ScalePixmap);
|
||||||
painter0.initFrom(this);
|
painter0.setBackground (palette ().brush (backgroundRole ()));
|
||||||
|
|
||||||
//create Font to use for scales
|
//create Font to use for scales
|
||||||
QFont Font("Arial");
|
QFont Font("Arial");
|
||||||
|
@ -331,7 +331,7 @@ void CPlotter::DrawOverlay() //DrawOverlay()
|
|||||||
QPen penGreen(Qt::green, 3); //Mark Tol range with green line
|
QPen penGreen(Qt::green, 3); //Mark Tol range with green line
|
||||||
QPen penRed(Qt::red, 3); //Mark Tx freq with red
|
QPen penRed(Qt::red, 3); //Mark Tx freq with red
|
||||||
QPainter painter(&m_OverlayPixmap);
|
QPainter painter(&m_OverlayPixmap);
|
||||||
painter.initFrom(this);
|
painter.setBackground (palette ().brush (backgroundRole ()));
|
||||||
QLinearGradient gradient(0, 0, 0 ,m_h2); //fill background with gradient
|
QLinearGradient gradient(0, 0, 0 ,m_h2); //fill background with gradient
|
||||||
gradient.setColorAt(1, Qt::black);
|
gradient.setColorAt(1, Qt::black);
|
||||||
gradient.setColorAt(0, Qt::darkBlue);
|
gradient.setColorAt(0, Qt::darkBlue);
|
||||||
@ -371,7 +371,7 @@ void CPlotter::DrawOverlay() //DrawOverlay()
|
|||||||
|
|
||||||
QRect rect0;
|
QRect rect0;
|
||||||
QPainter painter0(&m_ScalePixmap);
|
QPainter painter0(&m_ScalePixmap);
|
||||||
painter0.initFrom(this);
|
painter0.setBackground (palette ().brush (backgroundRole ()));
|
||||||
|
|
||||||
//create Font to use for scales
|
//create Font to use for scales
|
||||||
QFont Font("Arial");
|
QFont Font("Arial");
|
||||||
|
@ -35,7 +35,7 @@ public:
|
|||||||
QSize minimumSizeHint () const override
|
QSize minimumSizeHint () const override
|
||||||
{
|
{
|
||||||
QFontMetrics font_metrics {font (), nullptr};
|
QFontMetrics font_metrics {font (), nullptr};
|
||||||
return {tick_length + text_indent + font_metrics.width ("00+"), (font_metrics.height () + line_spacing) * range};
|
return {tick_length + text_indent + font_metrics.boundingRect ("00+").width (), (font_metrics.height () + line_spacing) * range};
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
Loading…
Reference in New Issue
Block a user