调整登录界面
This commit is contained in:
parent
3acb2e7960
commit
a467f07dbd
|
@ -26,6 +26,13 @@ Dialog_logIn::Dialog_logIn(QWidget *parent) :
|
||||||
ui->label_title->setText(tr("LogIn"));
|
ui->label_title->setText(tr("LogIn"));
|
||||||
ui->lineEdit_password->setEchoMode(QLineEdit::EchoMode::Password);
|
ui->lineEdit_password->setEchoMode(QLineEdit::EchoMode::Password);
|
||||||
|
|
||||||
|
QString ipStr = "\\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\b";
|
||||||
|
QString portStr = "[0-9]+$";
|
||||||
|
ui->lineEdit_dbHost->setValidator(new QRegExpValidator(QRegExp(ipStr)));
|
||||||
|
ui->lineEdit_ftpHost->setValidator(new QRegExpValidator(QRegExp(ipStr)));
|
||||||
|
ui->lineEdit_dbPort->setValidator(new QRegExpValidator(QRegExp(portStr)));
|
||||||
|
ui->lineEdit_ftpPort->setValidator(new QRegExpValidator(QRegExp(portStr)));
|
||||||
|
|
||||||
QString account("root");
|
QString account("root");
|
||||||
QString dbHost("192.168.1.70");
|
QString dbHost("192.168.1.70");
|
||||||
QString dbPort("3306");
|
QString dbPort("3306");
|
||||||
|
@ -33,7 +40,6 @@ Dialog_logIn::Dialog_logIn(QWidget *parent) :
|
||||||
QString ftpPort("21");
|
QString ftpPort("21");
|
||||||
|
|
||||||
ui->lineEdit_account->setText(getCfgValue("login", "account", account));
|
ui->lineEdit_account->setText(getCfgValue("login", "account", account));
|
||||||
|
|
||||||
ui->lineEdit_dbHost->setText(getCfgValue("login", "dbHost", dbHost));
|
ui->lineEdit_dbHost->setText(getCfgValue("login", "dbHost", dbHost));
|
||||||
ui->lineEdit_dbPort->setText(getCfgValue("login", "dbPort", dbPort));
|
ui->lineEdit_dbPort->setText(getCfgValue("login", "dbPort", dbPort));
|
||||||
ui->lineEdit_ftpHost->setText(getCfgValue("login", "ftpHost", ftpHost));
|
ui->lineEdit_ftpHost->setText(getCfgValue("login", "ftpHost", ftpHost));
|
||||||
|
@ -161,7 +167,8 @@ QString Dialog_logIn::getCfgValue(const char *appName, const char *key, const QS
|
||||||
HGBase_GetConfigPath(cfgPath, 512);
|
HGBase_GetConfigPath(cfgPath, 512);
|
||||||
strcat(cfgPath, "config.ini");
|
strcat(cfgPath, "config.ini");
|
||||||
|
|
||||||
|
std::string def2 = getStdString(def);
|
||||||
HGChar value[512] = {0};
|
HGChar value[512] = {0};
|
||||||
HGBase_GetProfileString(cfgPath, appName, key, getStdString(def).c_str(), value, 512);
|
HGBase_GetProfileString(cfgPath, appName, key, def2.c_str(), value, 512);
|
||||||
return StdStringToUtf8(value).c_str();
|
return StdStringToUtf8(value).c_str();
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>455</width>
|
<width>473</width>
|
||||||
<height>278</height>
|
<height>278</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
@ -146,7 +146,7 @@ QPushButton#pbtn_close::hover
|
||||||
<rect>
|
<rect>
|
||||||
<x>40</x>
|
<x>40</x>
|
||||||
<y>40</y>
|
<y>40</y>
|
||||||
<width>381</width>
|
<width>411</width>
|
||||||
<height>141</height>
|
<height>141</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
@ -220,7 +220,7 @@ QPushButton#pbtn_close::hover
|
||||||
<rect>
|
<rect>
|
||||||
<x>150</x>
|
<x>150</x>
|
||||||
<y>20</y>
|
<y>20</y>
|
||||||
<width>151</width>
|
<width>171</width>
|
||||||
<height>20</height>
|
<height>20</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
@ -243,7 +243,7 @@ QPushButton#pbtn_close::hover
|
||||||
<rect>
|
<rect>
|
||||||
<x>150</x>
|
<x>150</x>
|
||||||
<y>50</y>
|
<y>50</y>
|
||||||
<width>151</width>
|
<width>171</width>
|
||||||
<height>20</height>
|
<height>20</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
@ -266,7 +266,7 @@ QPushButton#pbtn_close::hover
|
||||||
<rect>
|
<rect>
|
||||||
<x>150</x>
|
<x>150</x>
|
||||||
<y>80</y>
|
<y>80</y>
|
||||||
<width>151</width>
|
<width>171</width>
|
||||||
<height>20</height>
|
<height>20</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
@ -289,7 +289,7 @@ QPushButton#pbtn_close::hover
|
||||||
<rect>
|
<rect>
|
||||||
<x>150</x>
|
<x>150</x>
|
||||||
<y>110</y>
|
<y>110</y>
|
||||||
<width>151</width>
|
<width>171</width>
|
||||||
<height>20</height>
|
<height>20</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
|
Loading…
Reference in New Issue