Skip to content

Commit

Permalink
Merge pull request #184 from ruimaciel/183_slots
Browse files Browse the repository at this point in the history
Fixes No matching signal warnings
  • Loading branch information
bupticybee authored Oct 12, 2023
2 parents 1f223e2 + b652ba9 commit 900395a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
22 changes: 11 additions & 11 deletions mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ MainWindow::MainWindow(QWidget *parent) :
{
ui->setupUi(this);
MainWindow::s_textEdit = this->get_logwindow();
connect(this->ui->actionjson, SIGNAL(triggered()), this, SLOT(on_save_json()));
connect(this->ui->actionSettings, SIGNAL(triggered()), this, SLOT(on_settings()));
connect(this->ui->actionimport, SIGNAL(triggered()), this, SLOT(on_import_params()));
connect(this->ui->actionexport, SIGNAL(triggered()), this, SLOT(on_export_params()));
connect(this->ui->actionclear_all, SIGNAL(triggered()), this, SLOT(on_clear_all()));
connect(this->ui->actionjson, &QAction::triggered, this, &MainWindow::on_actionjson_triggered);
connect(this->ui->actionSettings, &QAction::triggered, this, &MainWindow::on_actionSettings_triggered);
connect(this->ui->actionimport, &QAction::triggered, this, &MainWindow::on_actionimport_triggered);
connect(this->ui->actionexport, &QAction::triggered, this, &MainWindow::on_actionexport_triggered);
connect(this->ui->actionclear_all, &QAction::triggered, this, &MainWindow::on_actionclear_all_triggered);
qSolverJob = new QSolverJob;
qSolverJob->setContext(this->getLogArea());
qSolverJob->current_mission = QSolverJob::MissionType::LOADING;
Expand Down Expand Up @@ -80,7 +80,7 @@ MainWindow::~MainWindow()
delete ui;
}

void MainWindow::on_save_json(){
void MainWindow::on_actionjson_triggered(){
QString fileName = QFileDialog::getSaveFileName(this, tr("Save File"),
"output_strategy.json",
tr("Json file (*.json)"));
Expand All @@ -98,7 +98,7 @@ QString getParams(QString input,QString key){
}
}

void MainWindow::on_clear_all(){
void MainWindow::on_actionclear_all_triggered(){
this->clear_all_params();
this->ui->IpRangeTableView->update();
this->ui->oopRangeTableView->update();
Expand Down Expand Up @@ -265,7 +265,7 @@ void MainWindow::import_from_file(QString fileName){
this->update();
}

void MainWindow::on_import_params(){
void MainWindow::on_actionimport_triggered(){
QString fileName = QFileDialog::getOpenFileName(
this,
tr("Open parameters file"),
Expand All @@ -278,7 +278,7 @@ void MainWindow::on_import_params(){
this->ui->oopRangeTableView->setFocus();
}

void MainWindow::on_export_params(){
void MainWindow::on_actionexport_triggered(){
QString fileName = QFileDialog::getSaveFileName(this, tr("Save Parameters"),
"parameters/output_parameters.txt",
tr("Text file (*.txt)"));
Expand Down Expand Up @@ -400,7 +400,7 @@ void MainWindow::on_export_params(){
msgBox.exec();
}

void MainWindow::on_settings(){
void MainWindow::on_actionSettings_triggered(){
this->settingEditor = new SettingEditor(this);
settingEditor->setAttribute(Qt::WA_DeleteOnClose);
settingEditor->show();
Expand Down Expand Up @@ -646,7 +646,7 @@ void MainWindow::item_clicked(const QModelIndex& index){

void MainWindow::on_exportCurrentParameterButton_clicked()
{
this->on_export_params();
this->on_actionexport_triggered();
}

void MainWindow::on_ipRangeText_textChanged()
Expand Down
10 changes: 5 additions & 5 deletions mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ private slots:
void on_buttomSolve_clicked();
void on_clearLogButtom_clicked();
void on_buildTreeButtom_clicked();
void on_save_json();
void on_import_params();
void on_actionjson_triggered();
void on_actionimport_triggered();
void import_from_file(QString from);
void on_export_params();
void on_settings();
void on_clear_all();
void on_actionexport_triggered();
void on_actionSettings_triggered();
void on_actionclear_all_triggered();
void on_ip_range(QString range_text);
void on_copyButtom_clicked();
void on_showResultButton_clicked();
Expand Down

0 comments on commit 900395a

Please sign in to comment.