bugFixing 2

This commit is contained in:
2025-09-16 12:50:58 +03:00
parent b026bbe0d4
commit eaf5f0673a
12 changed files with 28 additions and 24 deletions

View File

@@ -10,31 +10,31 @@ SpecialMessageBox::SpecialMessageBox(QWidget *parent, TypeSpecMsgBox type, const
this->setWindowFlags(this->windowFlags() & ~Qt::WindowContextHelpButtonHint);
if(type == TypeSpecMsgBox::warning)
if(type == TypeSpecMsgBox::warningYesNo)
{
ui->lbl_icon->setPixmap(QPixmap(QStringLiteral(":/resources/icons/warning.png")));
this->setWindowTitle(tr("Attention!"));
}
else if(type == TypeSpecMsgBox::warningWithoutButtons)
else if(type == TypeSpecMsgBox::warningClose)
{
ui->lbl_icon->setPixmap(QPixmap(QStringLiteral(":/resources/icons/warning.png")));
this->setWindowTitle(tr("Attention!"));
ui->btnYes->setVisible(false);
ui->btnNo->setVisible(false);
ui->btnYes->setText(tr("Close"));
}
else if(type == TypeSpecMsgBox::critical)
{
ui->lbl_icon->setPixmap(QPixmap(QStringLiteral(":/resources/icons/critical.png")));
this->setWindowTitle(tr("Error!"));
ui->btnYes->setVisible(false);
ui->btnNo->setVisible(false);
ui->btnYes->setText(tr("Close"));
}
else if(type == TypeSpecMsgBox::info)
{
ui->lbl_icon->setPixmap(QPixmap(QStringLiteral(":/resources/icons/info.png")));
this->setWindowTitle(tr("Information"));
ui->btnYes->setVisible(false);
ui->btnNo->setVisible(false);
ui->btnYes->setText(tr("Ok"));
}
ui->lblText->setText(text);