Added configuration options for controlling aging of the callsign and band activity windows
This commit is contained in:
parent
7b409a6ff4
commit
7a788c05c8
@ -533,6 +533,8 @@ private:
|
||||
QString my_grid_;
|
||||
QString my_station_;
|
||||
QString my_qth_;
|
||||
int callsign_aging_;
|
||||
int activity_aging_;
|
||||
QColor color_CQ_;
|
||||
QColor next_color_CQ_;
|
||||
QColor color_MyCall_;
|
||||
@ -831,6 +833,16 @@ QString Configuration::my_qth() const
|
||||
return m_->my_qth_;
|
||||
}
|
||||
|
||||
int Configuration::callsign_aging() const
|
||||
{
|
||||
return m_->callsign_aging_;
|
||||
}
|
||||
|
||||
int Configuration::activity_aging() const
|
||||
{
|
||||
return m_->activity_aging_;
|
||||
}
|
||||
|
||||
void Configuration::set_location (QString const& grid_descriptor)
|
||||
{
|
||||
// change the dynamic grid
|
||||
@ -1145,6 +1157,8 @@ void Configuration::impl::initialize_models ()
|
||||
ui_->grid_line_edit->setPalette (pal);
|
||||
ui_->callsign_line_edit->setText (my_callsign_);
|
||||
ui_->grid_line_edit->setText (my_grid_);
|
||||
ui_->callsign_aging_spin_box->setValue(callsign_aging_);
|
||||
ui_->activity_aging_spin_box->setValue(activity_aging_);
|
||||
ui_->station_message_line_edit->setText (my_station_.toUpper());
|
||||
ui_->qth_message_line_edit->setText (my_qth_.toUpper());
|
||||
ui_->use_dynamic_grid->setChecked(use_dynamic_grid_);
|
||||
@ -1266,6 +1280,8 @@ void Configuration::impl::read_settings ()
|
||||
my_callsign_ = settings_->value ("MyCall", QString {}).toString ();
|
||||
my_grid_ = settings_->value ("MyGrid", QString {}).toString ();
|
||||
my_station_ = settings_->value("MyStation", QString {}).toString();
|
||||
callsign_aging_ = settings_->value ("CallsignAging", 0).toInt ();
|
||||
activity_aging_ = settings_->value ("ActivityAging", 2).toInt ();
|
||||
my_qth_ = settings_->value("MyQTH", QString {}).toString();
|
||||
next_color_CQ_ = color_CQ_ = settings_->value("colorCQ","#66ff66").toString();
|
||||
next_color_MyCall_ = color_MyCall_ = settings_->value("colorMyCall","#ff6666").toString();
|
||||
@ -1455,6 +1471,8 @@ void Configuration::impl::write_settings ()
|
||||
settings_->setValue ("MyGrid", my_grid_);
|
||||
settings_->setValue ("MyStation", my_station_);
|
||||
settings_->setValue ("MyQTH", my_qth_);
|
||||
settings_->setValue ("CallsignAging", callsign_aging_);
|
||||
settings_->setValue ("ActivityAging", activity_aging_);
|
||||
settings_->setValue("colorCQ",color_CQ_);
|
||||
settings_->setValue("colorMyCall",color_MyCall_);
|
||||
settings_->setValue("colorTxMsg",color_TxMsg_);
|
||||
@ -1908,6 +1926,8 @@ void Configuration::impl::accept ()
|
||||
my_grid_ = ui_->grid_line_edit->text ();
|
||||
my_station_ = ui_->station_message_line_edit->text().toUpper();
|
||||
my_qth_ = ui_->qth_message_line_edit->text().toUpper();
|
||||
callsign_aging_ = ui_->callsign_aging_spin_box->value();
|
||||
activity_aging_ = ui_->activity_aging_spin_box->value();
|
||||
spot_to_psk_reporter_ = ui_->psk_reporter_check_box->isChecked ();
|
||||
id_interval_ = ui_->CW_id_interval_spin_box->value ();
|
||||
ntrials_ = ui_->sbNtrials->value ();
|
||||
|
@ -97,6 +97,8 @@ public:
|
||||
QString my_callsign () const;
|
||||
QString my_grid () const;
|
||||
QString my_station () const;
|
||||
int activity_aging() const;
|
||||
int callsign_aging() const;
|
||||
QString my_qth () const;
|
||||
QFont text_font () const;
|
||||
QFont decoded_text_font () const;
|
||||
|
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>825</width>
|
||||
<height>647</height>
|
||||
<height>688</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -176,6 +176,12 @@
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_14">
|
||||
<property name="text">
|
||||
@ -351,15 +357,99 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_155">
|
||||
<item>
|
||||
<widget class="QLabel" name="beacon_label_10">
|
||||
<property name="text">
|
||||
<string>Remove callsigns from heard list after:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>callsign_aging_spin_box</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="callsign_aging_spin_box">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Number of minutes between unattended beacons</p></body></html></string>
|
||||
</property>
|
||||
<property name="specialValueText">
|
||||
<string>Disabled</string>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string> minutes</string>
|
||||
</property>
|
||||
<property name="prefix">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>60</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_156">
|
||||
<item>
|
||||
<widget class="QLabel" name="beacon_label_10">
|
||||
<property name="text">
|
||||
<string>Remove messages from band activity after:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>callsign_aging_spin_box</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="activity_aging_spin_box">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Number of minutes between unattended beacons</p></body></html></string>
|
||||
</property>
|
||||
<property name="specialValueText">
|
||||
<string>Disabled</string>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string> minutes</string>
|
||||
</property>
|
||||
<property name="prefix">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>60</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>2</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_15">
|
||||
<item>
|
||||
<widget class="QLabel" name="beacon_label_10">
|
||||
<property name="text">
|
||||
<string>Beacon every:</string>
|
||||
<string>Beacon interval:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>beacon_spin_box</cstring>
|
||||
<cstring>callsign_aging_spin_box</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -8083,8 +8083,9 @@ void MainWindow::displayActivity(bool force){
|
||||
QStringList text;
|
||||
QString age;
|
||||
int snr = 0;
|
||||
int activityAging = m_config.activity_aging();
|
||||
foreach(ActivityDetail item, items){
|
||||
if(item.utcTimestamp.secsTo(now)/60 >= 2){
|
||||
if(activityAging && item.utcTimestamp.secsTo(now)/60 >= activityAging){
|
||||
continue;
|
||||
}
|
||||
if(item.text.isEmpty()){
|
||||
@ -8172,8 +8173,14 @@ void MainWindow::displayActivity(bool force){
|
||||
|
||||
QList<QString> calls = m_callActivity.keys();
|
||||
qSort(calls.begin(), calls.end());
|
||||
int callsignAging = m_config.callsign_aging();
|
||||
foreach(QString call, calls){
|
||||
CallDetail d = m_callActivity[call];
|
||||
|
||||
if(callsignAging && d.utcTimestamp.secsTo(now)/60 >= callsignAging){
|
||||
continue;
|
||||
}
|
||||
|
||||
ui->tableWidgetCalls->insertRow(ui->tableWidgetCalls->rowCount());
|
||||
ui->tableWidgetCalls->setItem(ui->tableWidgetCalls->rowCount() - 1, 0, new QTableWidgetItem(call));
|
||||
ui->tableWidgetCalls->setItem(ui->tableWidgetCalls->rowCount() - 1, 1, new QTableWidgetItem(QString("(%1)").arg(since(d.utcTimestamp))));
|
||||
|
Loading…
Reference in New Issue
Block a user