登录界面,将配置文件选择目录,改为下拉列表选择

This commit is contained in:
yangjiaxuan 2024-01-04 14:49:22 +08:00
parent dd4c67e144
commit 0caba95e05
6 changed files with 425 additions and 536 deletions

View File

@ -656,95 +656,104 @@
<context>
<name>Dialog_logIn</name>
<message>
<location filename="dialog_login.ui" line="14"/>
<location filename="dialog_login.ui" line="26"/>
<source>Dialog</source>
<translation></translation>
</message>
<message>
<location filename="dialog_login.ui" line="101"/>
<source>TextLabel</source>
<translation></translation>
</message>
<message>
<location filename="dialog_login.ui" line="158"/>
<location filename="dialog_login.ui" line="36"/>
<source>Login</source>
<translation></translation>
</message>
<message>
<location filename="dialog_login.ui" line="183"/>
<location filename="dialog_login.ui" line="61"/>
<source>account:</source>
<translation></translation>
</message>
<message>
<location filename="dialog_login.ui" line="206"/>
<location filename="dialog_login.ui" line="84"/>
<source>password:</source>
<translation></translation>
</message>
<message>
<location filename="dialog_login.ui" line="229"/>
<location filename="dialog_login.ui" line="107"/>
<source>remember password</source>
<oldsource>Show password</oldsource>
<translation></translation>
</message>
<message>
<location filename="dialog_login.ui" line="242"/>
<location filename="dialog_login.ui" line="120"/>
<source>show password</source>
<translation></translation>
</message>
<message>
<location filename="dialog_login.ui" line="257"/>
<location filename="dialog_login.ui" line="135"/>
<source>dbHost:</source>
<translation></translation>
</message>
<message>
<location filename="dialog_login.ui" line="280"/>
<location filename="dialog_login.ui" line="158"/>
<source>dbPort:</source>
<translation></translation>
</message>
<message>
<location filename="dialog_login.ui" line="303"/>
<location filename="dialog_login.ui" line="181"/>
<source>ftpHost:</source>
<translation>FTP地址</translation>
</message>
<message>
<location filename="dialog_login.ui" line="326"/>
<location filename="dialog_login.ui" line="204"/>
<source>ftpPort:</source>
<translation>FTP端口</translation>
</message>
<message>
<location filename="dialog_login.ui" line="364"/>
<location filename="dialog_login.ui" line="242"/>
<source>Burn</source>
<translation></translation>
</message>
<message>
<location filename="dialog_login.ui" line="380"/>
<location filename="dialog_login.ui" line="258"/>
<source>InitTest</source>
<translation></translation>
</message>
<message>
<location filename="dialog_login.ui" line="393"/>
<location filename="dialog_login.ui" line="271"/>
<source>ImageTest</source>
<translation></translation>
</message>
<message>
<location filename="dialog_login.ui" line="349"/>
<location filename="dialog_login.ui" line="331"/>
<source>Select config file:</source>
<translation></translation>
</message>
<message>
<location filename="dialog_login.ui" line="344"/>
<source>Update</source>
<translation></translation>
</message>
<message>
<location filename="dialog_login.ui" line="357"/>
<source>View directory</source>
<translation></translation>
</message>
<message>
<location filename="dialog_login.ui" line="227"/>
<source>PressureTest</source>
<translation></translation>
</message>
<message>
<location filename="dialog_login.ui" line="425"/>
<location filename="dialog_login.ui" line="303"/>
<source>Register</source>
<translation></translation>
</message>
<message>
<location filename="dialog_login.ui" line="431"/>
<location filename="dialog_login.ui" line="309"/>
<source>Select Profile</source>
<translation></translation>
</message>
<message>
<location filename="dialog_login.ui" line="443"/>
<source>Select config file</source>
<translation></translation>
<translation type="vanished"></translation>
</message>
<message>
<source>host:</source>
@ -755,7 +764,7 @@
<translation type="vanished"></translation>
</message>
<message>
<location filename="dialog_login.ui" line="406"/>
<location filename="dialog_login.ui" line="284"/>
<source>LOG IN</source>
<translation></translation>
</message>
@ -764,57 +773,52 @@
<translation type="vanished">退</translation>
</message>
<message>
<location filename="dialog_login.cpp" line="50"/>
<source>Set host and port</source>
<translation>IP与端口</translation>
<translation type="vanished">IP与端口</translation>
</message>
<message>
<location filename="dialog_login.cpp" line="51"/>
<source>Minimize</source>
<translation></translation>
<translation type="vanished"></translation>
</message>
<message>
<location filename="dialog_login.cpp" line="52"/>
<source>Close</source>
<translation></translation>
<translation type="vanished"></translation>
</message>
<message>
<location filename="dialog_login.cpp" line="53"/>
<source>LogIn</source>
<translation></translation>
<translation type="vanished"></translation>
</message>
<message>
<location filename="dialog_login.cpp" line="167"/>
<location filename="dialog_login.cpp" line="173"/>
<location filename="dialog_login.cpp" line="179"/>
<location filename="dialog_login.cpp" line="185"/>
<location filename="dialog_login.cpp" line="170"/>
<location filename="dialog_login.cpp" line="176"/>
<location filename="dialog_login.cpp" line="182"/>
<location filename="dialog_login.cpp" line="188"/>
<source>Prompt</source>
<translation></translation>
</message>
<message>
<location filename="dialog_login.cpp" line="167"/>
<location filename="dialog_login.cpp" line="170"/>
<source>Account dose not exist</source>
<translation></translation>
</message>
<message>
<location filename="dialog_login.cpp" line="173"/>
<location filename="dialog_login.cpp" line="176"/>
<source>Password can not be empty</source>
<translation></translation>
</message>
<message>
<location filename="dialog_login.cpp" line="179"/>
<location filename="dialog_login.cpp" line="182"/>
<source>Password error</source>
<translation></translation>
</message>
<message>
<location filename="dialog_login.cpp" line="185"/>
<location filename="dialog_login.cpp" line="188"/>
<source>Please select a profile first</source>
<translation></translation>
</message>
<message>
<location filename="dialog_login.cpp" line="264"/>
<source>Select profile</source>
<translation></translation>
<translation type="vanished"></translation>
</message>
<message>
<source>tips</source>

View File

@ -4,7 +4,9 @@
#include <QRegExpValidator>
#include <QMouseEvent>
#include <QFileDialog>
#include <QDesktopServices>
#include "base/HGUtility.h"
#include "HGString.h"
#include "HGUIGlobal.h"
#include "dialog_registeraccount.h"
#include "app_cfg.h"
@ -17,7 +19,7 @@ Dialog_logIn::Dialog_logIn(QWidget *parent) :
{
ui->setupUi(this);
setWindowFlags(Qt::FramelessWindowHint);
setWindowFlags(Qt::Dialog | Qt::WindowCloseButtonHint);
QFont ft;
ft.setPointSize(15);
@ -28,7 +30,6 @@ Dialog_logIn::Dialog_logIn(QWidget *parent) :
ui->lineEdit_password->setFont(ft2);
ui->pbtn_login->setDefault(true);
ui->pbtn_setting->setVisible(false);
ui->radioButton_pressureTest->setVisible(false);
saveCfgValue("admin", "password", getCfgValue("admin", "password", QString("huagaoadmin")));
@ -47,29 +48,24 @@ Dialog_logIn::Dialog_logIn(QWidget *parent) :
ui->radioButton_imageTest->setChecked(true);
}
ui->pbtn_setting->setToolTip(tr("Set host and port"));
ui->pbtn_minum->setToolTip(tr("Minimize"));
ui->pbtn_close->setToolTip(tr("Close"));
ui->label_title->setText(tr("LogIn"));
ui->lineEdit_password->setEchoMode(QLineEdit::EchoMode::Password);
ui->lineEdit_profilePath->setReadOnly(true);
updateProfileFileList();
m_profileName = getCfgValue("login", "profile", m_profileName);
ui->lineEdit_password->setEchoMode(QLineEdit::EchoMode::Password);
ui->lineEdit_account->setText(getCfgValue("login", "account", QString("")));
ui->lineEdit_profilePath->setText(m_profileName);
ui->checkBox_showPswd->setChecked(getCfgValue("login", "showPassword", false));
ui->checkBox_rememberPswd->setChecked(getCfgValue("login", "rememberPassword", false));
if (ui->lineEdit_account->text() == "admin")
ui->checkBox_rememberPswd->setChecked(false);
if (ui->checkBox_rememberPswd->isChecked())
{
QString account = ui->lineEdit_account->text();
QString cfgPassword = getCfgValue(account.toStdString().c_str(), "password", QString(""));
QString cfgPassword = getCfgValue(account.toLocal8Bit().toStdString().c_str(), "password", QString(""));
if (!cfgPassword.isEmpty())
{
ui->lineEdit_password->setText(getCfgValue(account.toStdString().c_str(), "password", QString("")));
ui->lineEdit_password->setText(cfgPassword);
}
}
@ -130,29 +126,36 @@ QString Dialog_logIn::GetProfileName()
return m_profileName;
}
void Dialog_logIn::mousePressEvent(QMouseEvent *event)
QString Dialog_logIn::getCurrentExePath()
{
if(event->button()==Qt::LeftButton)
{
m_leftMousePressed = true;
m_startPos = event->globalPos();
}
HGChar currentPath[256] = { 0 };
HGBase_GetCurrentDir(currentPath, 256);
strcat(currentPath, "production-tool");
strcat(currentPath, "/");
return getStdFileName(StdStringToUtf8(currentPath).c_str());
}
void Dialog_logIn::mouseMoveEvent(QMouseEvent *event)
void Dialog_logIn::updateProfileFileList()
{
if(m_leftMousePressed)
{
this->window()->move(this->window()->geometry().topLeft() + event->globalPos() - m_startPos);
m_startPos = event->globalPos();
}
}
ui->comboBox_filenameList->clear();
void Dialog_logIn::mouseReleaseEvent(QMouseEvent *event)
{
if(event->button()==Qt::LeftButton)
QString currentExePath = getCurrentExePath();
QDir dir(currentExePath);
if (dir.exists())
{
m_leftMousePressed = false;
QFileInfoList fileList = dir.entryInfoList(QDir::Files);
for (int i = 0; i < fileList.size(); ++i)
{
QFileInfo file(fileList[i]);
ui->comboBox_filenameList->addItem(file.baseName());
}
}
if (ui->comboBox_filenameList->count() > 0)
{
QString fileName = getCfgValue("login", "profile", QString(""));
QFileInfo file(fileName);
ui->comboBox_filenameList->setCurrentText(file.baseName());
}
}
@ -161,7 +164,7 @@ void Dialog_logIn::on_pbtn_login_clicked()
QString account = ui->lineEdit_account->text();
QString password = ui->lineEdit_password->text();
QString cfgPassword = getCfgValue(account.toStdString().c_str(), "password", QString(""));
QString cfgPassword = getCfgValue(account.toLocal8Bit().toStdString().c_str(), "password", QString(""));
if (cfgPassword.isEmpty())
{
QMessageBox::information(this, tr("Prompt"), tr("Account dose not exist"));
@ -180,7 +183,7 @@ void Dialog_logIn::on_pbtn_login_clicked()
return;
}
if (ui->lineEdit_profilePath->text().isEmpty() && !ui->radioButton_burn->isChecked())
if (ui->comboBox_filenameList->currentText().isEmpty() && !ui->radioButton_burn->isChecked())
{
QMessageBox::information(this, tr("Prompt"), tr("Please select a profile first"));
return;
@ -200,6 +203,9 @@ void Dialog_logIn::on_pbtn_login_clicked()
saveCfgValue("login", "rememberPassword", ui->checkBox_rememberPswd->isChecked());
saveCfgValue("login", "showPassword", ui->checkBox_showPswd->isChecked());
m_profileName = getCurrentExePath() + ui->comboBox_filenameList->currentText() + ".json";
saveCfgValue("login", "profile", m_profileName);
m_accountName = account;
accept();
@ -230,44 +236,27 @@ void Dialog_logIn::on_pbtn_login_clicked()
// }
}
void Dialog_logIn::on_pbtn_setting_clicked(bool checked)
{
if (checked)
{
ui->stackedWidget->setCurrentIndex(1);
}
else
{
ui->stackedWidget->setCurrentIndex(0);
}
}
void Dialog_logIn::on_pbtn_minum_clicked()
{
this->window()->showMinimized();
}
void Dialog_logIn::on_pbtn_close_clicked()
{
close();
}
void Dialog_logIn::on_pbtn_register_clicked()
{
Dialog_RegisterAccount dlg;
dlg.exec();
}
void Dialog_logIn::on_pbtn_selectCfgFile_clicked()
{
QString fileName = QFileDialog::getOpenFileName(nullptr, tr("Select profile"), "", "*.json");
ui->lineEdit_profilePath->setText(fileName);
m_profileName = getStdFileName(fileName);
saveCfgValue("login", "profile", m_profileName);
}
void Dialog_logIn::on_checkBox_showPswd_toggled(bool checked)
{
ui->lineEdit_password->setEchoMode(checked ? QLineEdit::Normal : QLineEdit::Password);
}
void Dialog_logIn::on_pushButton_updateFilename_clicked()
{
updateProfileFileList();
}
void Dialog_logIn::on_pushButton_viewDirectory_clicked()
{
QString fileName = getCfgValue("login", "profile", ui->comboBox_filenameList->currentText());
QFileInfo fileInfo(fileName);
auto pathDir = fileInfo.path();
QString strFilePath = "file:///" + pathDir;
QDesktopServices::openUrl(QUrl(strFilePath));
}

View File

@ -31,25 +31,21 @@ public:
QString GetAccountName();
QString GetProfileName();
void mousePressEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
void mouseReleaseEvent(QMouseEvent *event);
private:
QString getCurrentExePath();
void updateProfileFileList();
private slots:
void on_pbtn_login_clicked();
void on_pbtn_setting_clicked(bool checked);
void on_pbtn_minum_clicked();
void on_pbtn_close_clicked();
void on_pbtn_register_clicked();
void on_pbtn_selectCfgFile_clicked();
void on_checkBox_showPswd_toggled(bool checked);
void on_pushButton_updateFilename_clicked();
void on_pushButton_viewDirectory_clicked();
private:
Ui::Dialog_logIn *ui;

View File

@ -6,461 +6,361 @@
<rect>
<x>0</x>
<y>0</y>
<width>538</width>
<height>338</height>
<width>557</width>
<height>351</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>557</width>
<height>351</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>557</width>
<height>351</height>
</size>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<widget class="QWidget" name="widget" native="true">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>541</width>
<height>30</height>
</rect>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>31</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">QWidget#widget
{
background-color: rgb(245, 245, 245);
}
QLabel#label_icon
{
image:url(:image/image_rsc/icon/admin.png);
}
QPushButton#pbtn_setting
{
border-style: solid;
border-width: 0px;
border-radius: 0px;
background-color: rgba(223, 223, 223, 0);
image:url(:image/image_rsc/icon/setting.ico);
}
QPushButton#pbtn_minum
{
border-style: solid;
border-width: 0px;
border-radius: 0px;
background-color: rgba(223, 223, 223, 0);
image:url(:image/image_rsc/icon/minum.ico);
}
QPushButton#pbtn_close
{
border-style: solid;
border-width: 0px;
border-radius: 0px;
background-color: rgba(223, 223, 223, 0);
image:url(:image/image_rsc/icon/close.ico);
}
QPushButton::focus{outline: none;}
QPushButton#pbtn_setting::hover
{
border-style: solid;
border-width: 0px;
border-radius: 0px;
background-color: rgba(223, 223, 223, 150);
}
QPushButton#pbtn_minum::hover
{
border-style: solid;
border-width: 0px;
border-radius: 0px;
background-color: rgba(223, 223, 223, 150);
}
QPushButton#pbtn_close::hover
{
border-style: solid;
border-width: 0px;
border-radius: 0px;
background-color: rgba(223, 223, 223, 150);
}
</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_6">
<item>
<widget class="QLabel" name="label_title">
<property name="font">
<font>
<family>13 楷体</family>
<pointsize>9</pointsize>
<weight>50</weight>
<italic>false</italic>
<bold>false</bold>
</font>
</property>
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>112</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="pbtn_setting">
<property name="text">
<string/>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pbtn_minum">
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pbtn_close">
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QTabWidget" name="tabWidget">
<property name="geometry">
<rect>
<x>10</x>
<y>30</y>
<width>521</width>
<height>301</height>
</rect>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tab_login">
<attribute name="title">
<string>Login</string>
</attribute>
<widget class="QStackedWidget" name="stackedWidget">
<property name="geometry">
<rect>
<x>60</x>
<y>0</y>
<width>421</width>
<height>141</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="page">
<widget class="QLabel" name="label_user">
<widget class="QWidget" name="tab_login">
<attribute name="title">
<string>Login</string>
</attribute>
<widget class="QStackedWidget" name="stackedWidget">
<property name="geometry">
<rect>
<x>80</x>
<y>30</y>
<width>48</width>
<height>16</height>
<x>60</x>
<y>0</y>
<width>421</width>
<height>141</height>
</rect>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="page">
<widget class="QLabel" name="label_user">
<property name="geometry">
<rect>
<x>80</x>
<y>30</y>
<width>48</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>account:</string>
</property>
</widget>
<widget class="QLineEdit" name="lineEdit_account">
<property name="geometry">
<rect>
<x>140</x>
<y>30</y>
<width>161</width>
<height>22</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="label_password">
<property name="geometry">
<rect>
<x>80</x>
<y>90</y>
<width>54</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>password:</string>
</property>
</widget>
<widget class="QLineEdit" name="lineEdit_password">
<property name="geometry">
<rect>
<x>140</x>
<y>90</y>
<width>161</width>
<height>22</height>
</rect>
</property>
</widget>
<widget class="QCheckBox" name="checkBox_rememberPswd">
<property name="geometry">
<rect>
<x>310</x>
<y>80</y>
<width>141</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>remember password</string>
</property>
</widget>
<widget class="QCheckBox" name="checkBox_showPswd">
<property name="geometry">
<rect>
<x>310</x>
<y>100</y>
<width>141</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>show password</string>
</property>
</widget>
</widget>
<widget class="QWidget" name="page_2">
<widget class="QLabel" name="label_dbHost">
<property name="geometry">
<rect>
<x>20</x>
<y>20</y>
<width>111</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>dbHost:</string>
</property>
</widget>
<widget class="QLineEdit" name="lineEdit_dbHost">
<property name="geometry">
<rect>
<x>150</x>
<y>20</y>
<width>171</width>
<height>20</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="label_dbPort">
<property name="geometry">
<rect>
<x>20</x>
<y>50</y>
<width>111</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>dbPort:</string>
</property>
</widget>
<widget class="QLineEdit" name="lineEdit_dbPort">
<property name="geometry">
<rect>
<x>150</x>
<y>50</y>
<width>171</width>
<height>20</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="label_ftpHost">
<property name="geometry">
<rect>
<x>50</x>
<y>80</y>
<width>81</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>ftpHost:</string>
</property>
</widget>
<widget class="QLineEdit" name="lineEdit_ftpHost">
<property name="geometry">
<rect>
<x>150</x>
<y>80</y>
<width>171</width>
<height>20</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="label_ftpPort">
<property name="geometry">
<rect>
<x>50</x>
<y>110</y>
<width>81</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>ftpPort:</string>
</property>
</widget>
<widget class="QLineEdit" name="lineEdit_ftpPort">
<property name="geometry">
<rect>
<x>150</x>
<y>110</y>
<width>171</width>
<height>20</height>
</rect>
</property>
</widget>
<widget class="QRadioButton" name="radioButton_pressureTest">
<property name="geometry">
<rect>
<x>80</x>
<y>40</y>
<width>151</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>PressureTest</string>
</property>
</widget>
</widget>
</widget>
<widget class="QRadioButton" name="radioButton_burn">
<property name="geometry">
<rect>
<x>40</x>
<y>150</y>
<width>131</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>account:</string>
<string>Burn</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
<widget class="QLineEdit" name="lineEdit_account">
<widget class="QRadioButton" name="radioButton_initTest">
<property name="geometry">
<rect>
<x>140</x>
<y>30</y>
<width>161</width>
<height>22</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="label_password">
<property name="geometry">
<rect>
<x>80</x>
<y>90</y>
<width>54</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>password:</string>
</property>
</widget>
<widget class="QLineEdit" name="lineEdit_password">
<property name="geometry">
<rect>
<x>140</x>
<y>90</y>
<width>161</width>
<height>22</height>
</rect>
</property>
</widget>
<widget class="QCheckBox" name="checkBox_rememberPswd">
<property name="geometry">
<rect>
<x>310</x>
<y>80</y>
<x>190</x>
<y>150</y>
<width>141</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>remember password</string>
<string>InitTest</string>
</property>
</widget>
<widget class="QCheckBox" name="checkBox_showPswd">
<widget class="QRadioButton" name="radioButton_imageTest">
<property name="geometry">
<rect>
<x>310</x>
<y>100</y>
<width>141</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>show password</string>
</property>
</widget>
</widget>
<widget class="QWidget" name="page_2">
<widget class="QLabel" name="label_dbHost">
<property name="geometry">
<rect>
<x>20</x>
<y>20</y>
<width>111</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>dbHost:</string>
</property>
</widget>
<widget class="QLineEdit" name="lineEdit_dbHost">
<property name="geometry">
<rect>
<x>150</x>
<y>20</y>
<width>171</width>
<height>20</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="label_dbPort">
<property name="geometry">
<rect>
<x>20</x>
<y>50</y>
<width>111</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>dbPort:</string>
</property>
</widget>
<widget class="QLineEdit" name="lineEdit_dbPort">
<property name="geometry">
<rect>
<x>150</x>
<y>50</y>
<width>171</width>
<height>20</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="label_ftpHost">
<property name="geometry">
<rect>
<x>50</x>
<y>80</y>
<width>81</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>ftpHost:</string>
</property>
</widget>
<widget class="QLineEdit" name="lineEdit_ftpHost">
<property name="geometry">
<rect>
<x>150</x>
<y>80</y>
<width>171</width>
<height>20</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="label_ftpPort">
<property name="geometry">
<rect>
<x>50</x>
<y>110</y>
<width>81</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>ftpPort:</string>
</property>
</widget>
<widget class="QLineEdit" name="lineEdit_ftpPort">
<property name="geometry">
<rect>
<x>150</x>
<y>110</y>
<width>171</width>
<height>20</height>
</rect>
</property>
</widget>
<widget class="QRadioButton" name="radioButton_pressureTest">
<property name="geometry">
<rect>
<x>80</x>
<y>40</y>
<x>340</x>
<y>150</y>
<width>151</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>PressureTest</string>
<string>ImageTest</string>
</property>
</widget>
<widget class="QPushButton" name="pbtn_login">
<property name="geometry">
<rect>
<x>160</x>
<y>210</y>
<width>75</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>LOG IN</string>
</property>
<property name="autoDefault">
<bool>true</bool>
</property>
<property name="default">
<bool>true</bool>
</property>
</widget>
<widget class="QPushButton" name="pbtn_register">
<property name="geometry">
<rect>
<x>280</x>
<y>210</y>
<width>75</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>Register</string>
</property>
</widget>
</widget>
<widget class="QWidget" name="tab_selectProfile">
<attribute name="title">
<string>Select Profile</string>
</attribute>
<widget class="QComboBox" name="comboBox_filenameList">
<property name="geometry">
<rect>
<x>20</x>
<y>90</y>
<width>481</width>
<height>31</height>
</rect>
</property>
</widget>
<widget class="QLabel" name="label">
<property name="geometry">
<rect>
<x>20</x>
<y>40</y>
<width>251</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>Select config file:</string>
</property>
</widget>
<widget class="QPushButton" name="pushButton_updateFilename">
<property name="geometry">
<rect>
<x>280</x>
<y>160</y>
<width>121</width>
<height>41</height>
</rect>
</property>
<property name="text">
<string>Update</string>
</property>
</widget>
<widget class="QPushButton" name="pushButton_viewDirectory">
<property name="geometry">
<rect>
<x>60</x>
<y>160</y>
<width>171</width>
<height>41</height>
</rect>
</property>
<property name="text">
<string>View directory</string>
</property>
</widget>
</widget>
</widget>
<widget class="QRadioButton" name="radioButton_burn">
<property name="geometry">
<rect>
<x>40</x>
<y>150</y>
<width>131</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>Burn</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
<widget class="QRadioButton" name="radioButton_initTest">
<property name="geometry">
<rect>
<x>190</x>
<y>150</y>
<width>141</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>InitTest</string>
</property>
</widget>
<widget class="QRadioButton" name="radioButton_imageTest">
<property name="geometry">
<rect>
<x>340</x>
<y>150</y>
<width>151</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>ImageTest</string>
</property>
</widget>
<widget class="QPushButton" name="pbtn_login">
<property name="geometry">
<rect>
<x>160</x>
<y>210</y>
<width>75</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>LOG IN</string>
</property>
<property name="autoDefault">
<bool>true</bool>
</property>
<property name="default">
<bool>true</bool>
</property>
</widget>
<widget class="QPushButton" name="pbtn_register">
<property name="geometry">
<rect>
<x>280</x>
<y>210</y>
<width>75</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>Register</string>
</property>
</widget>
</widget>
<widget class="QWidget" name="tab_selectProfile">
<attribute name="title">
<string>Select Profile</string>
</attribute>
<widget class="QPushButton" name="pbtn_selectCfgFile">
<property name="geometry">
<rect>
<x>170</x>
<y>140</y>
<width>141</width>
<height>31</height>
</rect>
</property>
<property name="text">
<string>Select config file</string>
</property>
<property name="autoDefault">
<bool>true</bool>
</property>
<property name="default">
<bool>true</bool>
</property>
</widget>
<widget class="QLineEdit" name="lineEdit_profilePath">
<property name="geometry">
<rect>
<x>20</x>
<y>60</y>
<width>481</width>
<height>31</height>
</rect>
</property>
</widget>
</widget>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>

View File

@ -43,7 +43,7 @@ void Dialog_RegisterAccount::on_pushButton_register_clicked()
return;
}
saveCfgValue(ui->lineEdit_account->text().toStdString().c_str(), "password", ui->lineEdit_password->text());
saveCfgValue(ui->lineEdit_account->text().toLocal8Bit().toStdString().c_str(), "password", ui->lineEdit_password->text());
accept();
}