|
@@ -129,6 +129,11 @@ login::login(QWidget *parent)
|
|
|
|
|
|
login::~login()
|
|
|
{
|
|
|
+ if(g_logPtr)
|
|
|
+ {
|
|
|
+ g_logPtr.reset();
|
|
|
+ }
|
|
|
+
|
|
|
awMsgBox::clear();
|
|
|
delete ui;
|
|
|
}
|
|
@@ -287,30 +292,34 @@ void login::initUI()
|
|
|
ui->widget_BG->setGeometry(0, 0, dekwiget->width(), dekwiget->height());
|
|
|
ui->btn_close->setGeometry(width() - g_appInfoPtr->m_fRate*24, 0,
|
|
|
g_appInfoPtr->m_fRate*24, g_appInfoPtr->m_fRate*24);
|
|
|
- ui->label_org_logo->setGeometry(g_appInfoPtr->m_fRate * 20, g_appInfoPtr->m_fRate * 20, g_appInfoPtr->m_fRate * 80, g_appInfoPtr->m_fRate * 80);
|
|
|
- ui->label_org_bg->setGeometry(0, g_appInfoPtr->m_fRate * (100+10), ui->widget_BG->width(), ui->widget_BG->height() - g_appInfoPtr->m_fRate*(100 + 10));
|
|
|
- ui->widget_loginBG->setGeometry((width() - g_appInfoPtr->m_fRate*800)/2, (height() - g_appInfoPtr->m_fRate*480)/2,
|
|
|
- g_appInfoPtr->m_fRate*800, g_appInfoPtr->m_fRate*480);
|
|
|
- ui->widget_orgInfo->setGeometry(0,0, g_appInfoPtr->m_fRate*300, ui->widget_loginBG->height());
|
|
|
- ui->label_orgTitle->adjustSize();
|
|
|
- ui->label_orgTitle->setGeometry((ui->widget_orgInfo->width() - ui->label_orgTitle->width())/2,
|
|
|
- g_appInfoPtr->m_fRate*42, ui->label_orgTitle->width(), ui->label_orgTitle->height());
|
|
|
-
|
|
|
- ui->widget_login->setGeometry(ui->widget_orgInfo->width(), 0, ui->widget_loginBG->width() - ui->widget_orgInfo->width(),
|
|
|
- ui->widget_loginBG->height());
|
|
|
- ui->label_complay->adjustSize();
|
|
|
- ui->label_complay->setGeometry(g_appInfoPtr->m_fRate*42, ui->widget_orgInfo->height() - g_appInfoPtr->m_fRate*42 - ui->label_complay->height(),
|
|
|
- ui->label_complay->width(), ui->label_complay->height());
|
|
|
+ ui->label_org_logo->setGeometry(g_appInfoPtr->m_fRate * 80, g_appInfoPtr->m_fRate *5, g_appInfoPtr->m_fRate * 400, g_appInfoPtr->m_fRate * 100);
|
|
|
+ ui->label_org_bg->setGeometry(0, g_appInfoPtr->m_fRate * (100+10), ui->widget_BG->width(), ui->widget_BG->height() - g_appInfoPtr->m_fRate*(100 + 10));
|
|
|
+// ui->widget_loginBG->setGeometry((width() - g_appInfoPtr->m_fRate*800)/2, (height() - g_appInfoPtr->m_fRate*480)/2,
|
|
|
+// g_appInfoPtr->m_fRate*800, g_appInfoPtr->m_fRate*480);
|
|
|
+// ui->widget_orgInfo->setGeometry(0,0, g_appInfoPtr->m_fRate*300, ui->widget_loginBG->height());
|
|
|
+// ui->label_orgTitle->adjustSize();
|
|
|
+// ui->label_orgTitle->setGeometry((ui->widget_orgInfo->width() - ui->label_orgTitle->width())/2,
|
|
|
+// g_appInfoPtr->m_fRate*42, ui->label_orgTitle->width(), ui->label_orgTitle->height());
|
|
|
+
|
|
|
+
|
|
|
+// ui->label_complay->adjustSize();
|
|
|
+// ui->label_complay->setGeometry(g_appInfoPtr->m_fRate*42, ui->widget_orgInfo->height() - g_appInfoPtr->m_fRate*42 - ui->label_complay->height(),
|
|
|
+// ui->label_complay->width(), ui->label_complay->height());
|
|
|
if(!g_appInfoPtr->m_sVersionCode.isEmpty())
|
|
|
{
|
|
|
- ui->label_version->setText(QString("V%1").arg(g_appInfoPtr->m_sVersionCode));
|
|
|
+ ui->label_login_version->setText(QString::fromLocal8Bit("系统版本号:V%1").arg(g_appInfoPtr->m_sVersionCode));
|
|
|
}
|
|
|
- ui->label_version->adjustSize();
|
|
|
- ui->label_version->setGeometry(ui->label_complay->x(), ui->label_complay->y() - g_appInfoPtr->m_fRate*5 - ui->label_version->height(),
|
|
|
- ui->label_version->width(), ui->label_version->height());
|
|
|
|
|
|
- ui->btn_studentCodeLogin->setGeometry(0, 0, ui->widget_login->width() / 2, g_appInfoPtr->m_fRate * 44);
|
|
|
- ui->btn_identityLogin->setGeometry(ui->btn_studentCodeLogin->width(), ui->btn_studentCodeLogin->y(),
|
|
|
+ ui->widget_login->setGeometry(width() - g_appInfoPtr->m_fRate*(120+498), ui->label_org_bg->y() + g_appInfoPtr->m_fRate*60,
|
|
|
+ g_appInfoPtr->m_fRate*400, g_appInfoPtr->m_fRate*454);
|
|
|
+ ui->label_loginTitle->adjustSize();
|
|
|
+ ui->label_loginTitle->setGeometry((ui->widget_login->width() - ui->label_loginTitle->width())/2,
|
|
|
+ 0,
|
|
|
+ ui->label_loginTitle->width(), ui->label_loginTitle->height());
|
|
|
+
|
|
|
+ ui->btn_studentCodeLogin->setGeometry(g_appInfoPtr->m_fRate*40, ui->label_loginTitle->y() + ui->label_loginTitle->height() + g_appInfoPtr->m_fRate*30,
|
|
|
+ (ui->widget_login->width() -g_appInfoPtr->m_fRate*40*2) / 2, g_appInfoPtr->m_fRate * 44);
|
|
|
+ ui->btn_identityLogin->setGeometry(ui->btn_studentCodeLogin->x() + ui->btn_studentCodeLogin->width(), ui->btn_studentCodeLogin->y(),
|
|
|
ui->btn_studentCodeLogin->width(), ui->btn_studentCodeLogin->height());
|
|
|
if (m_loginType == LOGIN_TYPE::lt_identity)
|
|
|
{
|
|
@@ -322,28 +331,32 @@ void login::initUI()
|
|
|
{
|
|
|
if(m_loginType == LOGIN_TYPE::lt_studentCode)
|
|
|
{
|
|
|
- ui->btn_studentCodeLogin->setGeometry(0, 0, ui->widget_login->width(), g_appInfoPtr->m_fRate * 44);
|
|
|
+ ui->btn_studentCodeLogin->setGeometry(g_appInfoPtr->m_fRate*40, ui->label_loginTitle->y() + ui->label_loginTitle->height() + g_appInfoPtr->m_fRate*30, ui->widget_login->width() - g_appInfoPtr->m_fRate*40*2, g_appInfoPtr->m_fRate * 44);
|
|
|
}
|
|
|
|
|
|
if(m_loginType == LOGIN_TYPE::lt_identity)
|
|
|
{
|
|
|
- ui->btn_identityLogin->setGeometry(0, 0, ui->widget_login->width(), g_appInfoPtr->m_fRate * 44);
|
|
|
+ ui->btn_identityLogin->setGeometry(g_appInfoPtr->m_fRate*40, ui->label_loginTitle->y() + ui->label_loginTitle->height() + g_appInfoPtr->m_fRate*30, ui->widget_login->width() - g_appInfoPtr->m_fRate*40*2, g_appInfoPtr->m_fRate * 44);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- ui->label_loginTitle->adjustSize();
|
|
|
- ui->label_loginTitle->setGeometry((ui->widget_login->width() - ui->label_loginTitle->width())/2,
|
|
|
- ui->btn_studentCodeLogin->y() + ui->btn_studentCodeLogin->height() + g_appInfoPtr->m_fRate*50,
|
|
|
- ui->label_loginTitle->width(), ui->label_loginTitle->height());
|
|
|
- ui->edt_account->setGeometry((ui->widget_login->width() - g_appInfoPtr->m_fRate*300)/2,
|
|
|
- ui->label_loginTitle->y() + ui->label_loginTitle->height() + g_appInfoPtr->m_fRate*50,
|
|
|
- g_appInfoPtr->m_fRate*300, g_appInfoPtr->m_fRate*40);
|
|
|
+ ui->widget_loginInfo->setGeometry(0, ui->btn_studentCodeLogin->y() + ui->btn_studentCodeLogin->height(),
|
|
|
+ ui->widget_login->width(), ui->widget_login->height() - ui->btn_studentCodeLogin->y() - ui->btn_studentCodeLogin->height());
|
|
|
+
|
|
|
+ ui->edt_account->setGeometry((ui->widget_loginInfo->width() - g_appInfoPtr->m_fRate*280)/2,
|
|
|
+ g_appInfoPtr->m_fRate*70,
|
|
|
+ g_appInfoPtr->m_fRate*280, g_appInfoPtr->m_fRate*50);
|
|
|
|
|
|
|
|
|
- ui->edt_password->setGeometry(ui->edt_account->x(), ui->edt_account->y() + ui->edt_account->height() + g_appInfoPtr->m_fRate*30,
|
|
|
+ ui->edt_password->setGeometry(ui->edt_account->x(), ui->edt_account->y() + ui->edt_account->height() + g_appInfoPtr->m_fRate*20,
|
|
|
ui->edt_account->width(), ui->edt_account->height());
|
|
|
ui->btn_login->setGeometry(ui->edt_account->x(), ui->edt_password->y() + ui->edt_password->height() + g_appInfoPtr->m_fRate*40,
|
|
|
- ui->edt_account->width(), g_appInfoPtr->m_fRate*44);
|
|
|
+ ui->edt_account->width(), g_appInfoPtr->m_fRate*56);
|
|
|
+ ui->label_login_version->adjustSize();
|
|
|
+ ui->label_login_version->setGeometry(ui->widget_login->x() + (ui->widget_login->width() - ui->label_login_version->width())/2,
|
|
|
+ ui->widget_BG->height() - g_appInfoPtr->m_fRate*40 - ui->label_login_version->height(),
|
|
|
+ ui->label_login_version->width(), ui->label_login_version->height());
|
|
|
+
|
|
|
ui->widget_BG->setVisible(true);
|
|
|
setBtnStyle();
|
|
|
|
|
@@ -352,53 +365,94 @@ void login::initUI()
|
|
|
|
|
|
void login::setBtnStyle()
|
|
|
{
|
|
|
- if(m_loginType == LOGIN_TYPE::lt_studentCode)
|
|
|
+ if(m_nloginTypeCount < 2)
|
|
|
{
|
|
|
- ui->btn_studentCodeLogin->setStyleSheet(QString(R"(QPushButton
|
|
|
- {
|
|
|
- outline:none;
|
|
|
- font-size:%1px;
|
|
|
- font-family:"Microsoft YaHei";
|
|
|
- font-weight:400;
|
|
|
- color:rgba(19,187,138,1);
|
|
|
- background:rgba(255,255,255,1);
|
|
|
- border:0px;
|
|
|
- })").arg((int)(g_appInfoPtr->m_fRate*14)));
|
|
|
- ui->btn_identityLogin->setStyleSheet(QString(R"(QPushButton
|
|
|
- {
|
|
|
- outline:none;
|
|
|
- font-size:%1px;
|
|
|
- font-family:"Microsoft YaHei";
|
|
|
- font-weight:400;
|
|
|
- color:rgba(153,153,153,1);
|
|
|
- background:rgba(239,240,245,1);
|
|
|
- border-top-right-radius:%2px;
|
|
|
- })").arg((int)(g_appInfoPtr->m_fRate*14)).arg((int)(g_appInfoPtr->m_fRate*20)));
|
|
|
+ if(m_loginType == LOGIN_TYPE::lt_studentCode)
|
|
|
+ {
|
|
|
+ ui->btn_studentCodeLogin->setStyleSheet(QString(R"(QPushButton
|
|
|
+ {
|
|
|
+ outline:none;
|
|
|
+ font-size:%1px;
|
|
|
+ font-family:"Microsoft YaHei";
|
|
|
+ font-weight:400;
|
|
|
+ color:rgba(19,187,138,1);
|
|
|
+ background:rgba(255,255,255,1);
|
|
|
+ border:0px;
|
|
|
+ border-top-left-radius:%2;
|
|
|
+ border-top-right-radius:%3px;
|
|
|
+ })").arg((int)(g_appInfoPtr->m_fRate*14)).arg((int)(g_appInfoPtr->m_fRate*8)).arg((int)(g_appInfoPtr->m_fRate*8)));
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ ui->btn_identityLogin->setStyleSheet(QString(R"(QPushButton
|
|
|
+ {
|
|
|
+ outline:none;
|
|
|
+ font-size:%1px;
|
|
|
+ font-family:"Microsoft YaHei";
|
|
|
+ font-weight:400;
|
|
|
+ color:rgba(19,187,138,1);
|
|
|
+ background:rgba(255,255,255,1);
|
|
|
+ border-top-left-radius:%2;
|
|
|
+ border-top-right-radius:%3px;
|
|
|
+ })").arg((int)(g_appInfoPtr->m_fRate*14))
|
|
|
+ .arg((int)(g_appInfoPtr->m_fRate*8))
|
|
|
+ .arg((int)( g_appInfoPtr->m_fRate*8 )));
|
|
|
+ }
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- ui->btn_studentCodeLogin->setStyleSheet(QString(R"(QPushButton
|
|
|
- {
|
|
|
- outline:none;
|
|
|
- font-size:%1px;
|
|
|
- font-family:"Microsoft YaHei";
|
|
|
- font-weight:400;
|
|
|
- color:rgba(153,153,153,1);
|
|
|
- background:rgba(239,240,245,1);
|
|
|
- border:0px;
|
|
|
- })").arg((int)(g_appInfoPtr->m_fRate*14)));
|
|
|
- ui->btn_identityLogin->setStyleSheet(QString(R"(QPushButton
|
|
|
- {
|
|
|
- outline:none;
|
|
|
- font-size:%1px;
|
|
|
- font-family:"Microsoft YaHei";
|
|
|
- font-weight:400;
|
|
|
- color:rgba(19,187,138,1);
|
|
|
- background:rgba(255,255,255,1);
|
|
|
- border-top-right-radius:%2px;
|
|
|
- })").arg((int)(g_appInfoPtr->m_fRate*14))
|
|
|
- .arg((int)(ui->btn_studentCodeLogin->isVisible() ? g_appInfoPtr->m_fRate*20 : 0)));
|
|
|
+ if(m_loginType == LOGIN_TYPE::lt_studentCode)
|
|
|
+ {
|
|
|
+ ui->btn_studentCodeLogin->setStyleSheet(QString(R"(QPushButton
|
|
|
+ {
|
|
|
+ outline:none;
|
|
|
+ font-size:%1px;
|
|
|
+ font-family:"Microsoft YaHei";
|
|
|
+ font-weight:400;
|
|
|
+ color:rgba(255,255,255,1);
|
|
|
+ background:rgba(19,187,138,1);
|
|
|
+ border:0px;
|
|
|
+ border-top-left-radius:%2px;
|
|
|
+ })").arg((int)(g_appInfoPtr->m_fRate*14)).arg((int)(g_appInfoPtr->m_fRate*8)));
|
|
|
+ ui->btn_identityLogin->setStyleSheet(QString(R"(QPushButton
|
|
|
+ {
|
|
|
+ outline:none;
|
|
|
+ font-size:%1px;
|
|
|
+ font-family:"Microsoft YaHei";
|
|
|
+ font-weight:400;
|
|
|
+ color:rgba(32,32,32,1);
|
|
|
+ background:rgba(239,240,245,1);
|
|
|
+ border-top-right-radius:%2px;
|
|
|
+ })").arg((int)(g_appInfoPtr->m_fRate*14)).arg((int)(g_appInfoPtr->m_fRate*8)));
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ ui->btn_studentCodeLogin->setStyleSheet(QString(R"(QPushButton
|
|
|
+ {
|
|
|
+ outline:none;
|
|
|
+ font-size:%1px;
|
|
|
+ font-family:"Microsoft YaHei";
|
|
|
+ font-weight:400;
|
|
|
+ color:rgba(153,153,153,1);
|
|
|
+ background:rgba(239,240,245,1);
|
|
|
+ border:0px;
|
|
|
+ border-top-left-radius:%2px;
|
|
|
+ })").arg((int)(g_appInfoPtr->m_fRate*14)).arg((int)(g_appInfoPtr->m_fRate*8)));
|
|
|
+ ui->btn_identityLogin->setStyleSheet(QString(R"(QPushButton
|
|
|
+ {
|
|
|
+ outline:none;
|
|
|
+ font-size:%1px;
|
|
|
+ font-family:"Microsoft YaHei";
|
|
|
+ font-weight:400;
|
|
|
+ color:rgba(255,255,255,1);
|
|
|
+ background:rgba(19,187,138,1);
|
|
|
+ border-top-right-radius:%2px;
|
|
|
+ })").arg((int)(g_appInfoPtr->m_fRate*14))
|
|
|
+ .arg((int)(ui->btn_studentCodeLogin->isVisible() ? g_appInfoPtr->m_fRate*8 : 0)));
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
void login::on_btn_close_clicked()
|