Added ability to open settings to a specific tab to make editing macros easier
This commit is contained in:
parent
8b9042e2d6
commit
5a18b3f9fb
@ -2274,8 +2274,13 @@ void MainWindow::on_actionReset_Window_Sizes_triggered(){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_actionSettings_triggered() //Setup Dialog
|
void MainWindow::on_actionSettings_triggered(){
|
||||||
{
|
openSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::openSettings(int tab){
|
||||||
|
m_config.select_tab(tab);
|
||||||
|
|
||||||
// things that might change that we need know about
|
// things that might change that we need know about
|
||||||
auto callsign = m_config.my_callsign ();
|
auto callsign = m_config.my_callsign ();
|
||||||
auto my_grid = m_config.my_grid ();
|
auto my_grid = m_config.my_grid ();
|
||||||
@ -2288,6 +2293,7 @@ void MainWindow::on_actionSettings_triggered() //Setup Dialog
|
|||||||
if (m_config.my_callsign () != callsign || m_config.my_grid () != my_grid) {
|
if (m_config.my_callsign () != callsign || m_config.my_grid () != my_grid) {
|
||||||
statusUpdate ();
|
statusUpdate ();
|
||||||
}
|
}
|
||||||
|
|
||||||
on_dxGridEntry_textChanged (m_hisGrid); // recalculate distances in case of units change
|
on_dxGridEntry_textChanged (m_hisGrid); // recalculate distances in case of units change
|
||||||
enable_DXCC_entity (m_config.DXCC ()); // sets text window proportions and (re)inits the logbook
|
enable_DXCC_entity (m_config.DXCC ()); // sets text window proportions and (re)inits the logbook
|
||||||
|
|
||||||
@ -6077,13 +6083,13 @@ void MainWindow::resetMessageUI(){
|
|||||||
bool MainWindow::ensureCallsignSet(bool alert){
|
bool MainWindow::ensureCallsignSet(bool alert){
|
||||||
if(m_config.my_callsign().trimmed().isEmpty()){
|
if(m_config.my_callsign().trimmed().isEmpty()){
|
||||||
if(alert) MessageBox::warning_message(this, tr ("Please enter your callsign in the settings."));
|
if(alert) MessageBox::warning_message(this, tr ("Please enter your callsign in the settings."));
|
||||||
on_actionSettings_triggered();
|
openSettings();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(m_config.my_grid().trimmed().isEmpty()){
|
if(m_config.my_grid().trimmed().isEmpty()){
|
||||||
if(alert) MessageBox::warning_message(this, tr ("Please enter your grid locator in the settings."));
|
if(alert) MessageBox::warning_message(this, tr ("Please enter your grid locator in the settings."));
|
||||||
on_actionSettings_triggered();
|
openSettings();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7870,7 +7876,7 @@ void MainWindow::on_queryButton_pressed(){
|
|||||||
|
|
||||||
void MainWindow::on_macrosMacroButton_pressed(){
|
void MainWindow::on_macrosMacroButton_pressed(){
|
||||||
if(m_config.macros()->stringList().isEmpty()){
|
if(m_config.macros()->stringList().isEmpty()){
|
||||||
on_actionSettings_triggered();
|
openSettings(3);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7888,7 +7894,9 @@ void MainWindow::on_macrosMacroButton_pressed(){
|
|||||||
menu->addSeparator();
|
menu->addSeparator();
|
||||||
auto action = new QAction(QIcon::fromTheme("edit-edit"), QString("Edit"), menu);
|
auto action = new QAction(QIcon::fromTheme("edit-edit"), QString("Edit"), menu);
|
||||||
menu->addAction(action);
|
menu->addAction(action);
|
||||||
connect(action, &QAction::triggered, this, &MainWindow::on_actionSettings_triggered);
|
connect(action, &QAction::triggered, this, [this](){
|
||||||
|
openSettings(3);
|
||||||
|
});
|
||||||
|
|
||||||
ui->macrosMacroButton->setMenu(menu);
|
ui->macrosMacroButton->setMenu(menu);
|
||||||
ui->macrosMacroButton->showMenu();
|
ui->macrosMacroButton->showMenu();
|
||||||
|
@ -173,6 +173,7 @@ private slots:
|
|||||||
void on_actionShow_Waterfall_Controls_triggered(bool checked);
|
void on_actionShow_Waterfall_Controls_triggered(bool checked);
|
||||||
void on_actionReset_Window_Sizes_triggered();
|
void on_actionReset_Window_Sizes_triggered();
|
||||||
void on_actionSettings_triggered();
|
void on_actionSettings_triggered();
|
||||||
|
void openSettings(int tab=0);
|
||||||
void prepareSpotting();
|
void prepareSpotting();
|
||||||
void on_spotButton_clicked(bool checked);
|
void on_spotButton_clicked(bool checked);
|
||||||
void on_monitorButton_clicked (bool);
|
void on_monitorButton_clicked (bool);
|
||||||
|
Loading…
Reference in New Issue
Block a user