//
// Created by Krad on 2021/12/8.
//

#include <QtWidgets/QVBoxLayout>
#include <QtWidgets/QLabel>
#include "AlertDialog.h"

AlertDialog::AlertDialog(QWidget *parent, Qt::WindowFlags f) : GUIFormBaseDialog(parent, f) {
    this->setFixedHeight(180);
    this->setFixedWidth(400);
    QVBoxLayout* layout = new QVBoxLayout(formWidget);
    layout->setSpacing(10);
    // add title
    lbl_title = new QLabel(this);
    lbl_title->setAlignment(Qt::AlignCenter);
    lbl_title->setText(tr("Warning"));
    lbl_title->setObjectName("title");
    layout->addWidget(lbl_title);
    lbl_msg = new QLabel(this);
    layout->addWidget(lbl_msg);
}

AlertDialog::~AlertDialog() {

}

void AlertDialog::setAlertMessage(const QString &msg) {
    this->lbl_msg->setText(msg);
}

void AlertDialog::setTitle(const QString &msg) {
    lbl_title->setText(msg);
}
