更新日期选择样式,支持保存清空

This commit is contained in:
work-zym\zhangyiming 2024-12-24 11:04:56 +08:00
parent 7e993e2a77
commit 8ab2ba82c0
9 changed files with 63 additions and 29 deletions

View File

@ -26,15 +26,12 @@ QLabel#labCheckNum{font-family: Source Han Sans;font-size: 28px;font-weight: nor
QRadioButton#labCheckNum{font-family: Source Han Sans;font-size: 28px;font-weight: normal;color: #555555;}
QLineEdit
{
border: 1px solid #ABCDA0;
border-radius: 3px;
padding-left: 5px;
background-color: #F2F2F2;
color: #A0A0A0;
selection-background-color: #A0A0A0;
selection-color: #F2F2F2;
font-family: "Microsoft YaHei";
font-size: 10pt;
border:1px solid #cccccc;
background: #F5F7F9;
border-radius: 12px;
width: 400px;
font-family: Source Han Sans;font-size: 28px;font-weight: normal;color: #999999;
height: 60px;padding: 5px 20px;
}
/*病历管理*/
QHeaderView::section{font-family: 思源黑体;font-size: 28px;font-weight: 500;color: #054578;}
@ -86,11 +83,6 @@ color: rgb(13,157,219);
border-radius: 5px;
margin-top: 2ex;
}
QDateEdit
{
border: 1px solid rgb(22,63,23);
color: black;
}
QPushButton#ok,#cancel
{

Binary file not shown.

View File

@ -48,7 +48,7 @@ void HospitalInfo::init()
m_labUserNum.setObjectName("labUserNum");
//数据名称
m_labDataBaseName.setText(" 数据名称:");;
m_labDataBaseName.setText("数据名称:");;
m_labDataBaseName.setObjectName("labDataBaseName");
//用户名称

View File

@ -17,6 +17,7 @@ public:
void init();
void initLay();
bool initConnect();
private slots:
void slotSave();
void slotCancel();

View File

@ -408,6 +408,7 @@ void LeadScheme::slotUpdateCurScheme()
{
m_CurScheme = btn->text();
}
m_editShecName.setText(m_CurScheme);
//2检查对应的方案名称是否存在
//2.1)存在就加载原来的
QString sFileName = QApplication::applicationDirPath()+"/Scheme/"+m_CurScheme+".json";

View File

@ -27,7 +27,6 @@
qss.close();
}
#include "cdateedit.h"
#include "test.h"
#include<QDateEdit>
int main(int argc, char *argv[])
{

View File

@ -41,17 +41,21 @@ void MedicalRecordWidget::init()
QString formattedDateTime = currentDateTime.toString("yyyy-MM-dd");
m_dateInspection.setDateTime(QDateTime::fromString(formattedDateTime, "yyyy-MM-dd"));
m_dateBirthDay.setDateTime(QDateTime::fromString(formattedDateTime, "yyyy-MM-dd"));
m_dateBirthDay.setStyleSheet("QDateEdit::drop-down {\
width: 80px; \
border-left-width: 1px; \
border-image:url(:/image/dateEdit.png);\
border-left-color: gray; \
}");
m_dateInspection.setStyleSheet("QDateEdit::drop-down {\
#if 1
m_dateBirthDay.setStyleSheet("QDateEdit{ border:1px solid #cccccc;background: #F5F7F9;border-radius: 12px;width: 400px;\
font-family: Source Han Sans;font-size: 28px;font-weight: normal;color: #999999;\
height: 60px;padding: 5px 20px;} QDateEdit::drop-down {\
width: 80px; \
border-left-width: 1px; \
border-image:url(:/image/dateEdit.png);\
}");
#endif
m_dateInspection.setStyleSheet("QDateEdit{ border:1px solid #cccccc;background: #F5F7F9;border-radius: 12px;width: 400px;\
font-family: Source Han Sans;font-size: 28px;font-weight: normal;color: #999999;\
height: 60px;padding: 5px 20px;} QDateEdit::drop-down {\
width: 80px; \
border-left-width: 1px; \
border-image:url(:/image/dateEdit.png);\
border-left-color: gray; \
}");
#if 0
@ -294,6 +298,11 @@ void MedicalRecordWidget::initLay()
m_btnOk.setStyleSheet("QPushButton{width: 180px;height: 64px;\
background: white;\
border-radius:12px;padding:7px 10px;\
background: #F5F7F9;\
border-radius: 12px;\
width: 400px;\
font-family: Source Han Sans;font-size: 28px;font-weight: normal;color: #999999;\
height: 60px;padding: 5px 20px;\
}\
QPushButton:hover{width: 180px;height: 64px;\
background: #0d9ddb;\
@ -308,8 +317,13 @@ void MedicalRecordWidget::initLay()
border-radius:12px;padding:7px 10px;\
}");
m_btnCancel.setStyleSheet("QPushButton{width: 180px;height: 64px;\
background: white;\
border-radius:12px;padding:7px 10px;\
background: white;\
border-radius:12px;padding:7px 10px;\
background: #F5F7F9;\
border-radius: 12px;\
width: 400px;\
font-family: Source Han Sans;font-size: 28px;font-weight: normal;color: #999999;\
height: 60px;padding: 5px 20px;\
}\
QPushButton:hover{width: 180px;height: 64px;\
background: #0d9ddb;\
@ -403,9 +417,37 @@ void MedicalRecordWidget::slotSave()
inspectDate,
Other);
initclear();
}
void MedicalRecordWidget::slotCancel()
{
}
void MedicalRecordWidget::initclear()
{
//检查号
m_editCheckNum.clear();
//住院 hospitalized
m_chHospitalized.setChecked(true);
//姓名
m_editName.clear();
//性别
m_chMan.setChecked(true);
//年龄
m_editAge.clear();
//左右利
m_chLeft.setChecked(true);
//出生日期
m_dateBirthDay.clear();
//检查日期
m_dateInspection.clear();
//诊断病历
m_textDiagnosticRecord.clear();
}

View File

@ -26,6 +26,7 @@ public:
void init();
void initLay();
bool initConnect();
void initclear();
private slots:
void slotSave();
void slotCancel();

View File

@ -54,7 +54,6 @@ SOURCES += \
parametersettingswidget.cpp \
regwidget.cpp \
systemsettingwidget.cpp \
test.cpp \
titlewidget.cpp \
widget.cpp
@ -86,7 +85,6 @@ HEADERS += \
parametersettingswidget.h \
regwidget.h \
systemsettingwidget.h \
test.h \
titlewidget.h \
widget.h