登录界面,将配置文件选择目录,改为下拉列表选择
This commit is contained in:
parent
dd4c67e144
commit
0caba95e05
Binary file not shown.
|
@ -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>
|
||||
|
|
|
@ -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)
|
||||
HGChar currentPath[256] = { 0 };
|
||||
HGBase_GetCurrentDir(currentPath, 256);
|
||||
strcat(currentPath, "production-tool");
|
||||
strcat(currentPath, "/");
|
||||
return getStdFileName(StdStringToUtf8(currentPath).c_str());
|
||||
}
|
||||
|
||||
void Dialog_logIn::updateProfileFileList()
|
||||
{
|
||||
m_leftMousePressed = true;
|
||||
m_startPos = event->globalPos();
|
||||
ui->comboBox_filenameList->clear();
|
||||
|
||||
QString currentExePath = getCurrentExePath();
|
||||
QDir dir(currentExePath);
|
||||
if (dir.exists())
|
||||
{
|
||||
QFileInfoList fileList = dir.entryInfoList(QDir::Files);
|
||||
for (int i = 0; i < fileList.size(); ++i)
|
||||
{
|
||||
QFileInfo file(fileList[i]);
|
||||
ui->comboBox_filenameList->addItem(file.baseName());
|
||||
}
|
||||
}
|
||||
|
||||
void Dialog_logIn::mouseMoveEvent(QMouseEvent *event)
|
||||
if (ui->comboBox_filenameList->count() > 0)
|
||||
{
|
||||
if(m_leftMousePressed)
|
||||
{
|
||||
this->window()->move(this->window()->geometry().topLeft() + event->globalPos() - m_startPos);
|
||||
m_startPos = event->globalPos();
|
||||
}
|
||||
}
|
||||
|
||||
void Dialog_logIn::mouseReleaseEvent(QMouseEvent *event)
|
||||
{
|
||||
if(event->button()==Qt::LeftButton)
|
||||
{
|
||||
m_leftMousePressed = false;
|
||||
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));
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -6,150 +6,28 @@
|
|||
<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">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<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>
|
||||
|
@ -430,38 +308,60 @@ QPushButton#pbtn_close::hover
|
|||
<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">
|
||||
<widget class="QComboBox" name="comboBox_filenameList">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>20</x>
|
||||
<y>60</y>
|
||||
<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>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue