#include "surewindow.h"
#include "ui_surewindow.h"
#include <QDebug>
SureWindow::SureWindow(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::SureWindow)
{
    ui->setupUi(this);
    ui->tipLabel->setText(tr("Multiple users are logged in at the same time.Are you sure "
                            "you want to reboot this system?"));
    ui->tipLabel->setStyleSheet("color:white;font:14pt;");
    ui->cancelBtn->setStyleSheet("QPushButton{background: rgba(255, 255, 255, 0.2);border-radius: 8px;}"
                                 "QPushButton:hover{background: rgba(255, 255, 255, 0.4);border-radius: 8px;}"
                                 "QPushButton:pressed {background: rgba(255, 255, 255, 0.3);border-radius: 8px;}");
    ui->confirmBtn->setStyleSheet("QPushButton{background: rgba(255, 255, 255, 0.2);border-radius: 8px;}"
                                 "QPushButton:hover{background: rgba(255, 255, 255, 0.25);border-radius: 8px;}"
                                 "QPushButton:pressed {background: rgba(255, 255, 255, 0.3);border-radius: 8px;}");
    connect(ui->cancelBtn, &QPushButton::clicked, this, [&]() { emit cantelButtonclicked(); });
    connect(ui->confirmBtn, &QPushButton::clicked, this, [&]() { emit confirmButtonclicked(); });
}

SureWindow::~SureWindow()
{
    delete ui;


}

void SureWindow::setText(const QString tips)
{
    ui->tipLabel->setText(tips);
}
