mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-22 04:11:16 -05:00
Make the LogQSO dialog non-modal.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3236 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
979e400c6d
commit
f1795eea6d
@ -124,5 +124,6 @@ void LogQSO::accept()
|
||||
out << t << endl;
|
||||
f2.close();
|
||||
}
|
||||
emit(acceptQSO(true));
|
||||
QDialog::accept();
|
||||
}
|
||||
|
3
logqso.h
3
logqso.h
@ -28,6 +28,9 @@ public:
|
||||
public slots:
|
||||
void accept();
|
||||
|
||||
signals:
|
||||
void acceptQSO(bool accepted);
|
||||
|
||||
private:
|
||||
Ui::LogQSO *ui;
|
||||
};
|
||||
|
@ -2205,27 +2205,33 @@ void MainWindow::on_genStdMsgsPushButton_clicked() //genStdMsgs button
|
||||
void MainWindow::on_logQSOButton_clicked() //Log QSO button
|
||||
{
|
||||
if(m_hisCall=="") return;
|
||||
QDateTime t = QDateTime::currentDateTimeUtc();
|
||||
QString date=t.toString("yyyyMMdd");
|
||||
dateTimeQSO = QDateTime::currentDateTimeUtc();
|
||||
QString date=dateTimeQSO.toString("yyyyMMdd");
|
||||
|
||||
LogQSO* logDlg;
|
||||
logDlg = new LogQSO(0);
|
||||
logDlg->initLogQSO(m_hisCall,m_hisGrid,m_mode,m_rptSent,m_rptRcvd,date,
|
||||
m_qsoStart,m_qsoStop,m_dialFreq,m_myCall,m_myGrid,
|
||||
m_noSuffix,m_toRTTY,m_dBtoComments);
|
||||
connect(logDlg, SIGNAL(acceptQSO(bool)),this,SLOT(acceptQSO2(bool)));
|
||||
logDlg->show();
|
||||
}
|
||||
|
||||
void MainWindow::acceptQSO2(bool accepted)
|
||||
{
|
||||
QString date=dateTimeQSO.toString("yyyyMMdd");
|
||||
QFile f("wsjtx.log");
|
||||
if(!f.open(QIODevice::Text | QIODevice::Append)) {
|
||||
msgBox("Cannot open file \"wsjtx.log\".");
|
||||
} else {
|
||||
QString logEntry=t.date().toString("yyyy-MMM-dd,") +
|
||||
t.time().toString("hh:mm,") + m_hisCall + "," + m_hisGrid + "," +
|
||||
QString::number(m_dialFreq) + "," + m_mode + "," +
|
||||
m_rptSent + "," + m_rptRcvd;
|
||||
QString logEntry=dateTimeQSO.date().toString("yyyy-MMM-dd,") +
|
||||
dateTimeQSO.time().toString("hh:mm,") + m_hisCall + "," +
|
||||
m_hisGrid + "," + QString::number(m_dialFreq) + "," + m_mode +
|
||||
"," + m_rptSent + "," + m_rptRcvd;
|
||||
QTextStream out(&f);
|
||||
out << logEntry << endl;
|
||||
f.close();
|
||||
}
|
||||
|
||||
LogQSO logDlg(this);
|
||||
logDlg.initLogQSO(m_hisCall,m_hisGrid,m_mode,m_rptSent,m_rptRcvd,date,
|
||||
m_qsoStart,m_qsoStop,m_dialFreq,m_myCall,m_myGrid,
|
||||
m_noSuffix,m_toRTTY,m_dBtoComments);
|
||||
if(logDlg.exec() == QDialog::Accepted) {
|
||||
}
|
||||
if(m_clearCallGrid) {
|
||||
m_hisCall="";
|
||||
ui->dxCallEntry->setText("");
|
||||
|
@ -150,12 +150,10 @@ private slots:
|
||||
void on_actionTx2QSO_triggered(bool checked);
|
||||
void killFile();
|
||||
void on_tuneButton_clicked();
|
||||
|
||||
void on_actionAllow_multiple_instances_triggered(bool checked);
|
||||
|
||||
void on_pbR2T_clicked();
|
||||
|
||||
void on_pbT2R_clicked();
|
||||
void acceptQSO2(bool accepted);
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
@ -317,6 +315,8 @@ private:
|
||||
QStringList m_macro;
|
||||
QStringList m_dFreq;
|
||||
|
||||
QDateTime dateTimeQSO;
|
||||
|
||||
SoundInThread soundInThread; //Instantiate the audio threads
|
||||
SoundOutThread soundOutThread;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user