修复转码模块缺失问题
This commit is contained in:
@@ -117,7 +117,8 @@ void BatchConvertPage::initUI()
|
||||
layout->addWidget(progressBox);
|
||||
|
||||
QHBoxLayout *btnLayout = new QHBoxLayout;
|
||||
m_startBtn = new ElaPushButton("开始转换");
|
||||
m_startBtn = new QPushButton("开始转换");
|
||||
m_startBtn->setStyleSheet("background-color: #1abc9c; color: white; padding: 10px 30px; font-size: 14px; border: none; border-radius: 4px;");
|
||||
connect(m_startBtn, &QPushButton::clicked, this, &BatchConvertPage::onStartConvert);
|
||||
btnLayout->addStretch();
|
||||
btnLayout->addWidget(m_startBtn);
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
#include <QWidget>
|
||||
#include <QStandardItemModel>
|
||||
#include <QPushButton>
|
||||
#include "ElaLineEdit.h"
|
||||
#include "ElaPushButton.h"
|
||||
#include "ElaTableView.h"
|
||||
#include "ElaProgressBar.h"
|
||||
#include "ElaText.h"
|
||||
@@ -50,7 +50,7 @@ private:
|
||||
QStringList m_funcList;
|
||||
ElaProgressBar *m_progressBar;
|
||||
ElaText *m_progressLabel;
|
||||
ElaPushButton *m_startBtn;
|
||||
QPushButton *m_startBtn;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <QHeaderView>
|
||||
#include <QMessageBox>
|
||||
#include <QStandardItem>
|
||||
#include <QLineEdit>
|
||||
#include "ElaComboBox.h"
|
||||
#include "ElaLineEdit.h"
|
||||
#include "ElaPushButton.h"
|
||||
@@ -38,6 +39,7 @@ void UF20FunctionSearchPage::initUI()
|
||||
m_searchEdit = new ElaLineEdit;
|
||||
m_searchEdit->setPlaceholderText("输入查询内容");
|
||||
m_searchEdit->setMinimumWidth(300);
|
||||
connect(m_searchEdit, &QLineEdit::returnPressed, this, &UF20FunctionSearchPage::onSearch);
|
||||
searchLayout->addWidget(m_searchEdit);
|
||||
|
||||
ElaPushButton *searchBtn = new ElaPushButton("搜索");
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <QHeaderView>
|
||||
#include <QMessageBox>
|
||||
#include <QStandardItem>
|
||||
#include <QLineEdit>
|
||||
#include "ElaComboBox.h"
|
||||
#include "ElaLineEdit.h"
|
||||
#include "ElaPushButton.h"
|
||||
@@ -37,6 +38,7 @@ void UFT3FunctionSearchPage::initUI()
|
||||
m_searchEdit = new ElaLineEdit;
|
||||
m_searchEdit->setPlaceholderText("输入查询内容");
|
||||
m_searchEdit->setMinimumWidth(300);
|
||||
connect(m_searchEdit, &QLineEdit::returnPressed, this, &UFT3FunctionSearchPage::onSearch);
|
||||
searchLayout->addWidget(m_searchEdit);
|
||||
|
||||
ElaPushButton *searchBtn = new ElaPushButton("搜索");
|
||||
@@ -48,7 +50,7 @@ void UFT3FunctionSearchPage::initUI()
|
||||
|
||||
m_tableModel = new QStandardItemModel(this);
|
||||
m_tableModel->setColumnCount(3);
|
||||
m_tableModel->setHorizontalHeaderLabels({"英文名", "功能编号", "功能名称"});
|
||||
m_tableModel->setHorizontalHeaderLabels({"功能名称", "英文名", "功能编号"});
|
||||
|
||||
m_resultTable = new ElaTableView;
|
||||
m_resultTable->setModel(m_tableModel);
|
||||
|
||||
@@ -245,12 +245,14 @@ void MetadataUpdatePage::onUpdateUFT3()
|
||||
void MetadataUpdatePage::updateUf2Interfaces(const QStringList& items)
|
||||
{
|
||||
int itemCount = items.size();
|
||||
bool interfaceUpdated = false;
|
||||
|
||||
foreach (const QString& item, items) {
|
||||
_processLabel->setText(QString("正在更新UF20 - %1").arg(item));
|
||||
int currentIndex = items.indexOf(item);
|
||||
int progress = (itemCount == 1) ? 0 : (currentIndex * 100 / itemCount);
|
||||
_progressBar->setValue(progress);
|
||||
QCoreApplication::processEvents();
|
||||
|
||||
if (item == "标准字段") {
|
||||
processUf2StdFields();
|
||||
@@ -261,9 +263,14 @@ void MetadataUpdatePage::updateUf2Interfaces(const QStringList& items)
|
||||
} else if (item == "接口数据") {
|
||||
QString basePath = QCoreApplication::applicationDirPath();
|
||||
processUf2Interface(basePath);
|
||||
interfaceUpdated = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (interfaceUpdated) {
|
||||
_processLabel->setText("正在更新数据缓存...");
|
||||
QCoreApplication::processEvents();
|
||||
UF2ConfigReader::reloadUF20Config();
|
||||
}
|
||||
|
||||
_progressBar->setValue(100);
|
||||
@@ -275,12 +282,14 @@ void MetadataUpdatePage::updateUf2Interfaces(const QStringList& items)
|
||||
void MetadataUpdatePage::updateUft3Interfaces(const QStringList& items)
|
||||
{
|
||||
int itemCount = items.size();
|
||||
bool interfaceUpdated = false;
|
||||
|
||||
foreach (const QString& item, items) {
|
||||
_processLabel->setText(QString("正在更新UFT30 - %1").arg(item));
|
||||
int currentIndex = items.indexOf(item);
|
||||
int progress = (itemCount == 1) ? 0 : (currentIndex * 100 / itemCount);
|
||||
_progressBar->setValue(progress);
|
||||
QCoreApplication::processEvents();
|
||||
|
||||
if (item == "标准字段") {
|
||||
processUft3StdFields();
|
||||
@@ -291,9 +300,14 @@ void MetadataUpdatePage::updateUft3Interfaces(const QStringList& items)
|
||||
} else if (item == "接口数据") {
|
||||
QString basePath = QCoreApplication::applicationDirPath();
|
||||
processUft3Interface(basePath);
|
||||
interfaceUpdated = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (interfaceUpdated) {
|
||||
_processLabel->setText("正在更新数据缓存...");
|
||||
QCoreApplication::processEvents();
|
||||
UFT3ConfigReader::reloadUFT3Config();
|
||||
}
|
||||
|
||||
_progressBar->setValue(100);
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#include "ElaProgressBar.h"
|
||||
#include "ElaCheckBox.h"
|
||||
#include "metadataupdate/metadataprocessor.h"
|
||||
#include "utils/uf2configreader.h"
|
||||
#include "utils/uft3configreader.h"
|
||||
#include <QGridLayout>
|
||||
#include <QMessageBox>
|
||||
#include <QThread>
|
||||
|
||||
Reference in New Issue
Block a user