diff --git a/bin/xyylMCWEACSystem.exe b/bin/xyylMCWEACSystem.exe index 8c1be4d..72599cb 100644 Binary files a/bin/xyylMCWEACSystem.exe and b/bin/xyylMCWEACSystem.exe differ diff --git a/xyylMCWEACSystem/hospitalinfo.cpp b/xyylMCWEACSystem/hospitalinfo.cpp index db80ea9..ab98bfd 100644 --- a/xyylMCWEACSystem/hospitalinfo.cpp +++ b/xyylMCWEACSystem/hospitalinfo.cpp @@ -16,33 +16,139 @@ HospitalInfo::~HospitalInfo() } void HospitalInfo::init() { + m_labHospitalInfo.setText("医院信息");; + m_labHospitalInfo.setStyleSheet("QLabel { font-size: 14px;\ + color: rgb(13,157,219); }\ + "); + + m_labStart1.setText("*"); + m_labStart2.setText("*"); + m_labStart1.setFixedWidth(10); + m_labStart2.setFixedWidth(10); + m_labStart1.setStyleSheet("color:red"); + m_labStart2.setStyleSheet("color:red"); + //医院名称 - m_labHospitalName.setText(tr("HospitalName")); + m_labHospitalName.setText("医院名称"); //科室 - m_labSection.setText(tr("Section")); + m_labSection.setText("科室");; - //用户数 - m_labUserNum.setText(tr("UserNum"));; + //用户人数 + m_labUserNum.setText("用户人数");; - //数据库 名称 - m_labDataBaseName.setText(tr("DataBaseName")); + //数据名称 + m_labDataBaseName.setText("数据名称");; - //用户名 - m_labUser.setText(tr("User")); - m_labpasswd.setText(tr("Passwd")); + //用户名称 + m_labUser.setText("用户名称"); + //用户名称 + m_labpasswd.setText("用户密码");; + + //确认密码 + m_labRepasswd.setText("确认密码");; //确认 - m_btnOK.setText(tr("Confirm")); + m_btnOK.setText("确认");; + m_btnCancel.setText("取消");; + int iwidth = QFontMetrics(this->font()).width("医院名称"); + + //医院名称 + m_labHospitalName.setFixedWidth(iwidth); + + //科室 + m_labSection.setFixedWidth(iwidth); + + //用户人数 + m_labUserNum.setFixedWidth(iwidth+10); + + + //数据名称 + m_labDataBaseName.setFixedWidth(iwidth+10); + + + //用户名称 + m_labUser.setFixedWidth(iwidth+10); + + //用户名称 + m_labpasswd.setFixedWidth(iwidth+10); + + //确认密码 + m_labRepasswd.setFixedWidth(iwidth+10); + + //确认 + m_btnOK.setText("确认");; + m_btnCancel.setText("取消");; } void HospitalInfo::initLay() { + + + QHBoxLayout * hlay0 = new QHBoxLayout; + hlay0->addWidget(&m_labHospitalInfo); + + QHBoxLayout * hlay = new QHBoxLayout; + hlay->addWidget(&m_labStart2); + hlay->addWidget(&m_labHospitalName); + hlay->addWidget(&m_editHospitalName); + hlay->addWidget(&m_labUser); + hlay->addWidget(&m_editUser); + + //科室 + QHBoxLayout * hlay1 = new QHBoxLayout; + hlay1->addWidget(&m_labStart1); + hlay1->addWidget(&m_labSection);// + hlay1->addWidget(&m_editSection); + hlay1->addWidget(&m_labpasswd); + hlay1->addWidget(&m_editPasswd); + + + //用户人数 + QHBoxLayout * hlay2 = new QHBoxLayout; + hlay2->addWidget(&m_labUserNum); + hlay2->addWidget(&m_editUserNum); + hlay2->addWidget(&m_labRepasswd); + hlay2->addWidget(&m_editRePasswd); + + + + + //数据名称 + QHBoxLayout * hlay3 = new QHBoxLayout; + hlay3->addWidget(&m_labDataBaseName); + hlay3->addWidget(&m_editDataBaseName); + + + QHBoxLayout * hlay4 = new QHBoxLayout; + hlay4->addStretch(); + hlay4->addWidget(&m_btnOK); + hlay4->addWidget(&m_btnCancel); + hlay4->addStretch(); + + + QVBoxLayout * vlay = new QVBoxLayout; + vlay->addLayout(hlay0); + vlay->addLayout(hlay); + vlay->addLayout(hlay1); + vlay->addLayout(hlay2); + vlay->addLayout(hlay3); + + hlay0->setSpacing(0); + hlay->setSpacing(0); + hlay1->setSpacing(0); + hlay2->setSpacing(0); + hlay3->setSpacing(0); + hlay4->setSpacing(0); + + + setLayout(vlay); +#if 0 QGridLayout * gridlaySearch = new QGridLayout; QHBoxLayout * hlay = new QHBoxLayout; QVBoxLayout * vlay = new QVBoxLayout; @@ -82,6 +188,7 @@ void HospitalInfo::initLay() hlay->addStretch(); hlay->addWidget(&m_btnOK); hlay->addStretch(); +#endif } bool HospitalInfo::initConnect() diff --git a/xyylMCWEACSystem/hospitalinfo.h b/xyylMCWEACSystem/hospitalinfo.h index cbd3300..90b4757 100644 --- a/xyylMCWEACSystem/hospitalinfo.h +++ b/xyylMCWEACSystem/hospitalinfo.h @@ -18,27 +18,36 @@ public: void initLay(); bool initConnect(); private: + //医院信息 + QLabel m_labHospitalInfo; + + QLabel m_labStart1; + QLabel m_labStart2; //医院名称 QLabel m_labHospitalName; QLineEdit m_editHospitalName; //科室 QLabel m_labSection; QLineEdit m_editSection; - //用户数 + //用户人数 QLabel m_labUserNum; QLineEdit m_editUserNum; - //数据库 名称 + //数据名称 QLabel m_labDataBaseName; QLineEdit m_editDataBaseName; - //用户名 + //用户名称 QLabel m_labUser; QLineEdit m_editUser; - + //用户密码 QLabel m_labpasswd; QLineEdit m_editPasswd; + //确认密码 + QLabel m_labRepasswd; + QLineEdit m_editRePasswd; //确认 QPushButton m_btnOK; + QPushButton m_btnCancel; }; #endif // HOSPITALINFO_H diff --git a/xyylMCWEACSystem/main.cpp b/xyylMCWEACSystem/main.cpp index 291bcf5..f880698 100644 --- a/xyylMCWEACSystem/main.cpp +++ b/xyylMCWEACSystem/main.cpp @@ -58,9 +58,9 @@ int main(int argc, char *argv[]) mekl.show(); - PerWidget kkss; - kkss.show(); -#if 0 + HospitalInfo ho; + ho.show(); +#if 1 CurChatWidget w; w.show(); @@ -70,8 +70,7 @@ int main(int argc, char *argv[]) DevConWidget de; de.show(); -HospitalInfo ho; -ho.show(); + LoginWidget log; log.show();