mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-25 05:38:46 -05:00
Try adding a lineEdit to display number of QSOs in the contest log. Not quite right, yet.
This commit is contained in:
parent
fffc88de69
commit
e1fde92ea2
@ -258,6 +258,11 @@ bool CabrilloLog::dupe (Frequency frequency, QString const& call) const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int CabrilloLog::n_qso()
|
||||||
|
{
|
||||||
|
return m_->rowCount();
|
||||||
|
}
|
||||||
|
|
||||||
void CabrilloLog::reset ()
|
void CabrilloLog::reset ()
|
||||||
{
|
{
|
||||||
// synchronize model
|
// synchronize model
|
||||||
|
@ -31,6 +31,7 @@ public:
|
|||||||
bool add_QSO (Frequency, QString const& mode, QDateTime const&, QString const& call
|
bool add_QSO (Frequency, QString const& mode, QDateTime const&, QString const& call
|
||||||
, QString const& report_sent, QString const& report_received);
|
, QString const& report_sent, QString const& report_received);
|
||||||
bool dupe (Frequency, QString const& call) const;
|
bool dupe (Frequency, QString const& call) const;
|
||||||
|
int n_qso();
|
||||||
|
|
||||||
QSqlTableModel * model ();
|
QSqlTableModel * model ();
|
||||||
void reset ();
|
void reset ();
|
||||||
|
@ -89,3 +89,10 @@ void CabrilloLogWindow::log_model_changed (int row)
|
|||||||
m_->log_model_->select ();
|
m_->log_model_->select ();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CabrilloLogWindow::set_nQSO(int n)
|
||||||
|
{
|
||||||
|
QString t;
|
||||||
|
t=t.asprintf("%d QSOs",n);
|
||||||
|
m_->ui_.nQSO_lineEdit->setText(t);
|
||||||
|
}
|
||||||
|
@ -16,6 +16,7 @@ public:
|
|||||||
explicit CabrilloLogWindow (QSettings *, Configuration const *, QSqlTableModel * cabrillo_log_model
|
explicit CabrilloLogWindow (QSettings *, Configuration const *, QSqlTableModel * cabrillo_log_model
|
||||||
, QWidget * parent = nullptr);
|
, QWidget * parent = nullptr);
|
||||||
~CabrilloLogWindow ();
|
~CabrilloLogWindow ();
|
||||||
|
void set_nQSO(int n);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void log_model_changed (int row) override;
|
void log_model_changed (int row) override;
|
||||||
|
@ -27,6 +27,22 @@
|
|||||||
</attribute>
|
</attribute>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="nQSO_lineEdit">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>100</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>0 QSOs</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources/>
|
||||||
|
@ -1423,6 +1423,7 @@ void MainWindow::setDecodedTextFont (QFont const& font)
|
|||||||
}
|
}
|
||||||
if (m_contestLogWindow) {
|
if (m_contestLogWindow) {
|
||||||
m_contestLogWindow->set_log_view_font (font);
|
m_contestLogWindow->set_log_view_font (font);
|
||||||
|
m_contestLogWindow->set_nQSO(m_logBook.contest_log()->n_qso());
|
||||||
}
|
}
|
||||||
if(m_ActiveStationsWidget != NULL) {
|
if(m_ActiveStationsWidget != NULL) {
|
||||||
m_ActiveStationsWidget->changeFont(font);
|
m_ActiveStationsWidget->changeFont(font);
|
||||||
@ -2778,6 +2779,7 @@ void MainWindow::on_contest_log_action_triggered()
|
|||||||
m_contestLogWindow->showNormal ();
|
m_contestLogWindow->showNormal ();
|
||||||
m_contestLogWindow->raise ();
|
m_contestLogWindow->raise ();
|
||||||
m_contestLogWindow->activateWindow ();
|
m_contestLogWindow->activateWindow ();
|
||||||
|
m_contestLogWindow->set_nQSO(m_logBook.contest_log()->n_qso());
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_actionColors_triggered()
|
void MainWindow::on_actionColors_triggered()
|
||||||
@ -4676,6 +4678,7 @@ void MainWindow::guiUpdate()
|
|||||||
//Once per second (onesec)
|
//Once per second (onesec)
|
||||||
if(nsec != m_sec0) {
|
if(nsec != m_sec0) {
|
||||||
// qDebug() << "AAA" << nsec;
|
// qDebug() << "AAA" << nsec;
|
||||||
|
m_contestLogWindow->set_nQSO(m_logBook.contest_log()->n_qso());
|
||||||
|
|
||||||
if(m_mode=="FST4") chk_FST4_freq_range();
|
if(m_mode=="FST4") chk_FST4_freq_range();
|
||||||
m_currentBand=m_config.bands()->find(m_freqNominal);
|
m_currentBand=m_config.bands()->find(m_freqNominal);
|
||||||
@ -6374,6 +6377,9 @@ void MainWindow::acceptQSO (QDateTime const& QSO_date_off, QString const& call,
|
|||||||
|
|
||||||
m_xSent.clear ();
|
m_xSent.clear ();
|
||||||
m_xRcvd.clear ();
|
m_xRcvd.clear ();
|
||||||
|
if(m_contestLogWindow) {
|
||||||
|
m_contestLogWindow->set_nQSO(m_logBook.contest_log()->n_qso());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::updateRate()
|
void MainWindow::updateRate()
|
||||||
|
Loading…
Reference in New Issue
Block a user