mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-08-01 05:32:31 -04:00
Add "Save decoded" to the QMAP Save menu.
This commit is contained in:
parent
fbfc157e79
commit
6dc971d304
@ -60,8 +60,9 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
ui->actionQ65E->setActionGroup(modeGroup2);
|
ui->actionQ65E->setActionGroup(modeGroup2);
|
||||||
|
|
||||||
QActionGroup* saveGroup = new QActionGroup(this);
|
QActionGroup* saveGroup = new QActionGroup(this);
|
||||||
ui->actionSave_all->setActionGroup(saveGroup);
|
|
||||||
ui->actionNone->setActionGroup(saveGroup);
|
ui->actionNone->setActionGroup(saveGroup);
|
||||||
|
ui->actionSave_all->setActionGroup(saveGroup);
|
||||||
|
ui->actionSave_decoded->setActionGroup(saveGroup);
|
||||||
|
|
||||||
setWindowTitle (program_title ());
|
setWindowTitle (program_title ());
|
||||||
|
|
||||||
@ -82,6 +83,7 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
m_loopall=false;
|
m_loopall=false;
|
||||||
m_startAnother=false;
|
m_startAnother=false;
|
||||||
m_saveAll=false;
|
m_saveAll=false;
|
||||||
|
m_saveDecoded=false;
|
||||||
m_sec0=-1;
|
m_sec0=-1;
|
||||||
m_hsym0=-1;
|
m_hsym0=-1;
|
||||||
m_palette="CuteSDR";
|
m_palette="CuteSDR";
|
||||||
@ -232,6 +234,7 @@ void MainWindow::writeSettings()
|
|||||||
settings.setValue("nModeQ65",m_modeQ65);
|
settings.setValue("nModeQ65",m_modeQ65);
|
||||||
settings.setValue("SaveNone",ui->actionNone->isChecked());
|
settings.setValue("SaveNone",ui->actionNone->isChecked());
|
||||||
settings.setValue("SaveAll",ui->actionSave_all->isChecked());
|
settings.setValue("SaveAll",ui->actionSave_all->isChecked());
|
||||||
|
settings.setValue("SaveDecoded",ui->actionSave_decoded->isChecked());
|
||||||
settings.setValue("ContinuousWaterfall",ui->continuous_waterfall->isChecked());
|
settings.setValue("ContinuousWaterfall",ui->continuous_waterfall->isChecked());
|
||||||
settings.setValue("NB",m_NB);
|
settings.setValue("NB",m_NB);
|
||||||
settings.setValue("NBslider",m_NBslider);
|
settings.setValue("NBslider",m_NBslider);
|
||||||
@ -279,11 +282,16 @@ void MainWindow::readSettings()
|
|||||||
|
|
||||||
ui->actionNone->setChecked(settings.value("SaveNone",true).toBool());
|
ui->actionNone->setChecked(settings.value("SaveNone",true).toBool());
|
||||||
ui->actionSave_all->setChecked(settings.value("SaveAll",false).toBool());
|
ui->actionSave_all->setChecked(settings.value("SaveAll",false).toBool());
|
||||||
|
ui->actionSave_decoded->setChecked(settings.value("SaveDecoded",false).toBool());
|
||||||
ui->continuous_waterfall->setChecked(settings.value("ContinuousWaterfall",false).toBool());
|
ui->continuous_waterfall->setChecked(settings.value("ContinuousWaterfall",false).toBool());
|
||||||
m_saveAll=ui->actionSave_all->isChecked();
|
m_saveAll=ui->actionSave_all->isChecked();
|
||||||
|
m_saveDecoded=ui->actionSave_decoded->isChecked();
|
||||||
if(m_saveAll) {
|
if(m_saveAll) {
|
||||||
lab5->setStyleSheet("QLabel{background-color: #ffff00}");
|
lab5->setStyleSheet("QLabel{background-color: #ffff00}");
|
||||||
lab5->setText("Saving .iq files");
|
lab5->setText("Save all");
|
||||||
|
} else if(m_saveDecoded) {
|
||||||
|
lab5->setStyleSheet("QLabel{background-color: #ffff00}");
|
||||||
|
lab5->setText("Save decoded");
|
||||||
} else {
|
} else {
|
||||||
lab5->setStyleSheet("");
|
lab5->setStyleSheet("");
|
||||||
lab5->setText("");
|
lab5->setText("");
|
||||||
@ -410,7 +418,8 @@ void MainWindow::dataSink(int k)
|
|||||||
QDateTime t = QDateTime::currentDateTimeUtc();
|
QDateTime t = QDateTime::currentDateTimeUtc();
|
||||||
m_dateTime=t.toString("yyMMdd_hhmm");
|
m_dateTime=t.toString("yyMMdd_hhmm");
|
||||||
decode(); //Start the decoder
|
decode(); //Start the decoder
|
||||||
if(m_saveAll and !m_diskData and m_nTx60<10 and ihsym==m_hsymStop) {
|
if((m_saveAll or (m_saveDecoded and decodes_.ndecodes>0)) and !m_diskData and
|
||||||
|
m_nTx60<10 and ihsym==m_hsymStop) {
|
||||||
QDir dir(m_saveDir);
|
QDir dir(m_saveDir);
|
||||||
if (!dir.exists()) dir.mkpath(".");
|
if (!dir.exists()) dir.mkpath(".");
|
||||||
QString fname=m_saveDir + "/" + t.date().toString("yyMMdd") + "_" +
|
QString fname=m_saveDir + "/" + t.date().toString("yyMMdd") + "_" +
|
||||||
@ -419,8 +428,6 @@ void MainWindow::dataSink(int k)
|
|||||||
*future2 = QtConcurrent::run(save_iq, fname);
|
*future2 = QtConcurrent::run(save_iq, fname);
|
||||||
watcher2->setFuture(*future2);
|
watcher2->setFuture(*future2);
|
||||||
QString t{"QMAP v" + QCoreApplication::applicationVersion() + " " + revision()};
|
QString t{"QMAP v" + QCoreApplication::applicationVersion() + " " + revision()};
|
||||||
// qDebug() << "aa" << t.simplified() << m_myCall << m_myGrid << datcom_.fcenter
|
|
||||||
// << m_nTx30a << m_nTx30b << datcom2_.ntx30a << datcom2_.ntx30b;
|
|
||||||
save_qm_(fname.toLatin1(), t.toLatin1(), m_myCall.toLatin1(), m_myGrid.toLatin1(),
|
save_qm_(fname.toLatin1(), t.toLatin1(), m_myCall.toLatin1(), m_myGrid.toLatin1(),
|
||||||
datcom2_.d4, &datcom2_.ntx30a, &datcom2_.ntx30b, &datcom2_.fcenter,
|
datcom2_.d4, &datcom2_.ntx30a, &datcom2_.ntx30b, &datcom2_.fcenter,
|
||||||
&datcom2_.nutc, &m_dop00, &m_dop58,
|
&datcom2_.nutc, &m_dop00, &m_dop58,
|
||||||
@ -799,15 +806,25 @@ void MainWindow::on_actionDelete_all_iq_files_in_SaveDir_triggered()
|
|||||||
void MainWindow::on_actionNone_triggered() //Save None
|
void MainWindow::on_actionNone_triggered() //Save None
|
||||||
{
|
{
|
||||||
m_saveAll=false;
|
m_saveAll=false;
|
||||||
|
m_saveDecoded=false;
|
||||||
lab5->setStyleSheet("");
|
lab5->setStyleSheet("");
|
||||||
lab5->setText("");
|
lab5->setText("");
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_actionSave_all_triggered() //Save All
|
void MainWindow::on_actionSave_decoded_triggered()
|
||||||
|
{
|
||||||
|
m_saveDecoded=true;
|
||||||
|
m_saveAll=false;
|
||||||
|
lab5->setStyleSheet("QLabel{background-color: #ffff00}");
|
||||||
|
lab5->setText("Save decoded");
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_actionSave_all_triggered()
|
||||||
{
|
{
|
||||||
m_saveAll=true;
|
m_saveAll=true;
|
||||||
|
m_saveDecoded=false;
|
||||||
lab5->setStyleSheet("QLabel{background-color: #ffff00}");
|
lab5->setStyleSheet("QLabel{background-color: #ffff00}");
|
||||||
lab5->setText("Saving files");
|
lab5->setText("Save all");
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_DecodeButton_clicked() //Decode request
|
void MainWindow::on_DecodeButton_clicked() //Decode request
|
||||||
|
@ -85,6 +85,8 @@ private slots:
|
|||||||
void on_actionAlso_Q65_30x_toggled(bool b);
|
void on_actionAlso_Q65_30x_toggled(bool b);
|
||||||
void on_sbMaxDrift_valueChanged(int arg1);
|
void on_sbMaxDrift_valueChanged(int arg1);
|
||||||
|
|
||||||
|
void on_actionSave_decoded_triggered();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::MainWindow *ui;
|
Ui::MainWindow *ui;
|
||||||
QString m_appDir;
|
QString m_appDir;
|
||||||
@ -130,6 +132,7 @@ private:
|
|||||||
bool m_restart;
|
bool m_restart;
|
||||||
bool m_startAnother;
|
bool m_startAnother;
|
||||||
bool m_saveAll;
|
bool m_saveAll;
|
||||||
|
bool m_saveDecoded;
|
||||||
bool m_NB;
|
bool m_NB;
|
||||||
bool m_decode_called=false;
|
bool m_decode_called=false;
|
||||||
bool m_bAlso30=false;
|
bool m_bAlso30=false;
|
||||||
|
@ -461,6 +461,7 @@ p, li { white-space: pre-wrap; }
|
|||||||
<string>Save</string>
|
<string>Save</string>
|
||||||
</property>
|
</property>
|
||||||
<addaction name="actionNone"/>
|
<addaction name="actionNone"/>
|
||||||
|
<addaction name="actionSave_decoded"/>
|
||||||
<addaction name="actionSave_all"/>
|
<addaction name="actionSave_all"/>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenu" name="menuHelp">
|
<widget class="QMenu" name="menuHelp">
|
||||||
@ -846,6 +847,14 @@ p, li { white-space: pre-wrap; }
|
|||||||
<string>Also Q65-30x</string>
|
<string>Also Q65-30x</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="actionSave_decoded">
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Save decoded</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<layoutdefault spacing="6" margin="11"/>
|
<layoutdefault spacing="6" margin="11"/>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user