first commit
This commit is contained in:
@@ -0,0 +1,94 @@
|
||||
#include "SystemUpdate.h"
|
||||
#include "ui_SystemUpdate.h"
|
||||
#include "SystemManage.h"
|
||||
|
||||
SystemUpdate::SystemUpdate(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::SystemUpdate)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
connect(ui->closeBtn, &QPushButton::clicked, this, &SystemUpdate::on_closeBtn_clicked);
|
||||
applyStyleSheet();
|
||||
}
|
||||
|
||||
SystemUpdate::~SystemUpdate()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
/*关闭按键*/
|
||||
void SystemUpdate::on_closeBtn_clicked()
|
||||
{
|
||||
QPushButton* btn = qobject_cast<QPushButton*>(sender());
|
||||
if (btn == ui->closeBtn)
|
||||
{
|
||||
emit sendButtonClickedSignal(1);
|
||||
}
|
||||
}
|
||||
/*关闭按键样式*/
|
||||
void SystemUpdate::applyStyleSheet()
|
||||
{
|
||||
QString styleSheet = R"(
|
||||
|
||||
QPushButton#closeBtn {
|
||||
background-color: #E6F7FF;
|
||||
border: 1px solid #87CEEB;
|
||||
border-radius: 4px;
|
||||
font-size: 24px;
|
||||
color: #228B22;
|
||||
}
|
||||
QPushButton#closeBtn:hover{
|
||||
background-color: #D1E9FF;
|
||||
}
|
||||
|
||||
QPushButton#closeBtn:pressed{
|
||||
background-color: #BAE7FF;
|
||||
}
|
||||
|
||||
QPushButton {
|
||||
background-color: #5396C1;
|
||||
color: #ffffff;
|
||||
border: 1px solid #000000;
|
||||
border-radius: 3px;
|
||||
font-size: 18px;
|
||||
font-weight:500;
|
||||
width: 180px;
|
||||
height: 90px;
|
||||
}
|
||||
|
||||
QPushButton:hover {
|
||||
background-color: #5396C1;
|
||||
}
|
||||
|
||||
QPushButton:disabled {
|
||||
background-color: #7C828E;
|
||||
color: #606060;
|
||||
border-color: #808080;
|
||||
}
|
||||
)";
|
||||
|
||||
this->setStyleSheet(styleSheet);
|
||||
}
|
||||
|
||||
/*烧录FPGA的按键被按下*/
|
||||
void SystemUpdate::on_pushButtonProgramFPGA_clicked()
|
||||
{
|
||||
emit sendProgramFPGASignal();
|
||||
}
|
||||
/*烧录STM32的按键被按下*/
|
||||
void SystemUpdate::on_pushButtonProgramStm32_clicked()
|
||||
{
|
||||
emit sendProgramSTM32Signal();
|
||||
}
|
||||
/*更新软件的按钮被按下*/
|
||||
void SystemUpdate::on_pushButtonUpdateSoftware_clicked()
|
||||
{
|
||||
emit sendUpDateSOFTSignal();
|
||||
}
|
||||
/*更新字库的按键被按下*/
|
||||
void SystemUpdate::on_pushButtonUpdateCharLib_clicked()
|
||||
{
|
||||
emit sendUpDateChARLIBSignal();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user