code cleanup
This commit is contained in:
parent
fb8bcc71e2
commit
fcf5f04539
2 changed files with 10 additions and 10 deletions
|
@ -30,10 +30,10 @@ MainWindow::MainWindow()
|
|||
|
||||
connect(ui_.actionQuit, &QAction::triggered, qApp, QApplication::quit);
|
||||
connect(ui_.actionEditSeller, &QAction::triggered, this,
|
||||
&MainWindow::on_actionEditSeller_triggered);
|
||||
&MainWindow::onActionEditSellerTriggered);
|
||||
connect(ui_.sellerNoEdit, &QLineEdit::returnPressed, this,
|
||||
&MainWindow::on_sellerNoEdit_checkSellerNo);
|
||||
connect(ui_.paidButton, &QPushButton::clicked, this, &MainWindow::on_paidButton_triggered);
|
||||
&MainWindow::onSellerNoEditCheckSellerNo);
|
||||
connect(ui_.paidButton, &QPushButton::clicked, this, &MainWindow::onPaidButtonTriggered);
|
||||
connect(ui_.basketView->selectionModel(), &QItemSelectionModel::selectionChanged, this,
|
||||
&MainWindow::onBasketViewSelectionChanged);
|
||||
connect(ui_.cancelArticleButton, &QPushButton::clicked, this,
|
||||
|
@ -44,7 +44,7 @@ MainWindow::MainWindow()
|
|||
static_cast<SaleModel*>(ui_.salesView->model()), &SaleModel::onBasketDataChanged);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionEditSeller_triggered()
|
||||
void MainWindow::onActionEditSellerTriggered()
|
||||
{
|
||||
auto dialog = std::make_unique<SellerDialog>(this);
|
||||
int retCode = dialog->exec();
|
||||
|
@ -71,7 +71,7 @@ void MainWindow::on_actionEditSeller_triggered()
|
|||
static_cast<SaleModel*>(ui_.salesView->model()), &SaleModel::onBasketDataChanged);
|
||||
}
|
||||
|
||||
void MainWindow::on_paidButton_triggered()
|
||||
void MainWindow::onPaidButtonTriggered()
|
||||
{
|
||||
if (marketplace_->basketSize() > 0) {
|
||||
QString lastPrice{marketplace_->getBasketSumAsString().c_str()};
|
||||
|
@ -82,14 +82,14 @@ void MainWindow::on_paidButton_triggered()
|
|||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_sellerNoEdit_checkSellerNo()
|
||||
void MainWindow::onSellerNoEditCheckSellerNo()
|
||||
{
|
||||
using std::regex, std::regex_match, std::smatch;
|
||||
|
||||
auto inputText = ui_.sellerNoEdit->text().toStdString();
|
||||
|
||||
if (inputText.empty()) {
|
||||
on_paidButton_triggered();
|
||||
onPaidButtonTriggered();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,9 +24,9 @@ class MainWindow : public QMainWindow
|
|||
void onCancelAllArticlesButtonClicked(bool checked);
|
||||
|
||||
private:
|
||||
void on_actionEditSeller_triggered();
|
||||
void on_sellerNoEdit_checkSellerNo();
|
||||
void on_paidButton_triggered();
|
||||
void onActionEditSellerTriggered();
|
||||
void onSellerNoEditCheckSellerNo();
|
||||
void onPaidButtonTriggered();
|
||||
|
||||
Ui::MainWindow ui_;
|
||||
std::unique_ptr<Marketplace> marketplace_;
|
||||
|
|
Loading…
Reference in a new issue