新二维码/条形码编辑逻辑
This commit is contained in:
+134
-21
@@ -35,7 +35,7 @@ MainInstruction::MainInstruction(QWidget *parent) :
|
||||
connect(MTimeSetting,SIGNAL(accepted()),this,SLOT(onMTimeSettingAccepted()));
|
||||
|
||||
|
||||
// setStyleSheet(styleSheet);
|
||||
applyStyleSheet();
|
||||
}
|
||||
|
||||
MainInstruction::~MainInstruction()
|
||||
@@ -50,7 +50,7 @@ void MainInstruction::bindSysPara(SysPara *sysPara){
|
||||
|
||||
void MainInstruction::onGraphicsEditBtnClicked()
|
||||
{
|
||||
// 在arm主机上以全屏模式显示,而在x86上无所谓
|
||||
// 在arm主机上以全屏模式显示,而在x86上无所谓
|
||||
#if defined(ARCH_AARCH64_GNU)
|
||||
m_graphicsEditor->showFullScreen();
|
||||
#else
|
||||
@@ -70,30 +70,30 @@ void MainInstruction::on_createNewFileBtn_clicked()
|
||||
|
||||
void MainInstruction::on_maintenanceIntervalBtn_clicked()
|
||||
{
|
||||
// dialogMaintenanceTimeSettingAuth->clearAuth();
|
||||
// dialogMaintenanceTimeSettingAuth->show();
|
||||
// dialogMaintenanceTimeSettingAuth->clearAuth();
|
||||
// dialogMaintenanceTimeSettingAuth->show();
|
||||
|
||||
onDlgAuthMaintenanceTimeAccepted();
|
||||
}
|
||||
|
||||
|
||||
void MainInstruction::onDlgAuthMaintenanceTimeAccepted(){
|
||||
// QString authString= dialogMaintenanceTimeSettingAuth->getAuth();
|
||||
// if(dlgInputAddr->checWhJmDate(authString)) // 0xa001
|
||||
// {
|
||||
QDate curDate = QDate::currentDate();
|
||||
QString mtEndDatestr = "20" + QString::number(sysPara->RFIDPara.maintenanceEndDate);
|
||||
QDate mtEndDate = QDate::fromString(mtEndDatestr,"yyyyMMdd");
|
||||
int timeoutDay = curDate.daysTo(mtEndDate);
|
||||
MTimeSetting->updateMaintenanceTime(QString("%1 Days").arg(timeoutDay));
|
||||
MTimeSetting->updateMaintenanceIntervalToUI(sysPara->RFIDPara.maintenanceInterval);
|
||||
MTimeSetting->disableMaintenanceTimeSet(false);
|
||||
MTimeSetting->show();
|
||||
// }else
|
||||
// {
|
||||
// QMessageBox::about(this, tr("提示"), tr("密码不正确!"));
|
||||
// return;
|
||||
// }
|
||||
// QString authString= dialogMaintenanceTimeSettingAuth->getAuth();
|
||||
// if(dlgInputAddr->checWhJmDate(authString)) // 0xa001
|
||||
// {
|
||||
QDate curDate = QDate::currentDate();
|
||||
QString mtEndDatestr = "20" + QString::number(sysPara->RFIDPara.maintenanceEndDate);
|
||||
QDate mtEndDate = QDate::fromString(mtEndDatestr,"yyyyMMdd");
|
||||
int timeoutDay = curDate.daysTo(mtEndDate);
|
||||
MTimeSetting->updateMaintenanceTime(QString("%1 Days").arg(timeoutDay));
|
||||
MTimeSetting->updateMaintenanceIntervalToUI(sysPara->RFIDPara.maintenanceInterval);
|
||||
MTimeSetting->disableMaintenanceTimeSet(false);
|
||||
MTimeSetting->show();
|
||||
// }else
|
||||
// {
|
||||
// QMessageBox::about(this, tr("提示"), tr("密码不正确!"));
|
||||
// return;
|
||||
// }
|
||||
}
|
||||
|
||||
void MainInstruction::maintenanceDialogShow(){
|
||||
@@ -163,7 +163,7 @@ void MainInstruction::ondialogAuthorizationAccepted(){
|
||||
sysPara->status.WorkTimeOut=0;
|
||||
dlgInputAddr->ReadJm();
|
||||
dlgInputAddr->show();
|
||||
// ui->labMac->setText(QString("Mac:%1").arg(dlgInputAddr->jd.addr));
|
||||
// ui->labMac->setText(QString("Mac:%1").arg(dlgInputAddr->jd.addr));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -243,3 +243,116 @@ void MainInstruction::slt_timeSetting()
|
||||
|
||||
sysPara->devOp->stm32Wr(0xA1,(unsigned char *)m_datatime,8);
|
||||
}
|
||||
|
||||
void MainInstruction::applyStyleSheet()
|
||||
{
|
||||
QString styleSheet =
|
||||
R"(
|
||||
QWidget#buttonWidget {
|
||||
background-color: #95989D;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
QLabel {
|
||||
font-size: 18px;
|
||||
color: #000000;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
QCheckBox {
|
||||
font-size: 18px;
|
||||
color: #000000;
|
||||
font-weight:500;
|
||||
}
|
||||
|
||||
QCheckBox::indicator {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
border: 1px solid #96A0A9;
|
||||
border-radius: 10px;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
QCheckBox::indicator:checked {
|
||||
background-color: #95B2D4;
|
||||
border-color: #95B2D4;
|
||||
image: url(:/Demo/image/select.png);
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
QWidget#fileTab, QWidget#extraTab, QWidget#settingsTab, QWidget#serviceTab {
|
||||
background-color: #E3E7EC;
|
||||
}
|
||||
|
||||
QTabWidget::pane {
|
||||
border: 1px solid #dddddd;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
QTabWidget::tab-bar {
|
||||
top: -3px;
|
||||
left: 10px;
|
||||
}
|
||||
|
||||
QTabBar::tab {
|
||||
min-width: 90px;
|
||||
min-height: 45px;
|
||||
padding: 4px 10px;
|
||||
margin-right: 4px;
|
||||
border: 1px solid #dddddd;
|
||||
border-bottom: none;
|
||||
border-top-left-radius: 4px;
|
||||
border-top-right-radius: 4px;
|
||||
background-color: #5396C1;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
QTabBar::tab:selected {
|
||||
background-color: #6bb1e0;
|
||||
color: #ffffff;
|
||||
box-shadow: 0 -3px 8px rgba(44, 125, 232, 0.25);
|
||||
}
|
||||
|
||||
QTabBar::tab:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
)";
|
||||
|
||||
this->setStyleSheet(styleSheet);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user