|
@@ -12,7 +12,7 @@ BlastOpePage::BlastOpePage(QWidget *parent) :
|
|
|
|
|
|
ui->setupUi(this);
|
|
|
initPagination();
|
|
|
-
|
|
|
+ //InitFace();
|
|
|
|
|
|
}
|
|
|
|
|
@@ -82,6 +82,7 @@ void BlastOpePage::InitFace()
|
|
|
|
|
|
void BlastOpePage::closeWebViewAndRestoreUI()
|
|
|
{
|
|
|
+ //TODO: crash
|
|
|
if (view) {
|
|
|
layout->removeWidget(view);
|
|
|
delete view;
|
|
@@ -98,7 +99,7 @@ void BlastOpePage::onUrlChanged(const QUrl &newUrl) {
|
|
|
if (newUrl.scheme() == "https" && newUrl.host() == "www.baidu.com") {
|
|
|
closeWebViewAndRestoreUI();
|
|
|
QNetworkAccessManager manager;
|
|
|
- QUrl requestUrl(QString("http://localhost:8000/api/v1/h-face-verify/certifyId/%1").arg(certifyId));
|
|
|
+ QUrl requestUrl(QString("http://192.168.0.255:8000/api/v1/h-face-verify/certifyId/%1").arg(certifyId));
|
|
|
QNetworkRequest request(requestUrl);
|
|
|
QNetworkReply *reply = manager.get(request);
|
|
|
QEventLoop loop;
|
|
@@ -198,7 +199,7 @@ void BlastOpePage::handleFeaturePermission(QWebEnginePage *page, const QUrl &sec
|
|
|
|
|
|
QJsonObject BlastOpePage::getMetaInfo() {
|
|
|
QJsonObject metaInfo;
|
|
|
- metaInfo["certName"] = "";
|
|
|
+ metaInfo["certName"] = "wangyao";
|
|
|
metaInfo["certNo"] = "";
|
|
|
return metaInfo;
|
|
|
}
|
|
@@ -265,6 +266,7 @@ void BlastOpePage::loadDataFromSource(int currentPage, int pageSize)
|
|
|
if (!prop.isEmpty()) {
|
|
|
QMetaProperty metaProp = HProject.metaObject()->property(HProject.metaObject()->indexOfProperty(prop.toUtf8()));
|
|
|
QVariant value = metaProp.read(&HProject);
|
|
|
+
|
|
|
if (prop == "blastStatus") {
|
|
|
QString statusText;
|
|
|
if (value.toString() == "1") {
|
|
@@ -298,10 +300,16 @@ void BlastOpePage::loadDataFromSource(int currentPage, int pageSize)
|
|
|
|
|
|
|
|
|
connectionItem = QObject::connect(model, &QStandardItemModel::itemChanged, this, &BlastOpePage::onItemChanged);
|
|
|
- ui->tableView->setColumnWidth(0, 20);
|
|
|
+ ui->tableView->setColumnWidth(0, 30);
|
|
|
for (int i = 1; i < headerCount; ++i) {
|
|
|
- ui->tableView->horizontalHeader()->setSectionResizeMode(i, QHeaderView::Stretch);
|
|
|
+ if (i == 8) { // Column: 进度
|
|
|
+ ui->tableView->horizontalHeader()->setSectionResizeMode(i, QHeaderView::Custom);
|
|
|
+ ui->tableView->setColumnWidth(i, 180);
|
|
|
+ } else {
|
|
|
+ ui->tableView->horizontalHeader()->setSectionResizeMode(i, QHeaderView::Stretch);
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
ui->tableView->setColumnHidden(headerCount, true);
|
|
|
|
|
|
ui->tableView->setAlternatingRowColors(true);
|
|
@@ -322,7 +330,7 @@ void BlastOpePage::loadDataFromSource(int currentPage, int pageSize)
|
|
|
QProgressBar *progressBar2 = new QProgressBar(ui->tableView);
|
|
|
progressBar2->setRange(0, 100); // 设置范围为0到100
|
|
|
progressBar2->setValue(0);
|
|
|
- progressBar2->setAlignment(Qt::AlignRight);
|
|
|
+ progressBar2->setAlignment(Qt::AlignCenter);
|
|
|
progressBar2->setStyleSheet("QProgressBar { border: 1px solid grey; border-radius: 5px; background-color: #EEEEEE; height: 20px; }"
|
|
|
"QProgressBar::chunk { background-color: #05B8CC; width: 20px; margin: 0.5px; border - radius: 10px; }");
|
|
|
progressBar2->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
|
@@ -330,7 +338,7 @@ void BlastOpePage::loadDataFromSource(int currentPage, int pageSize)
|
|
|
QProgressBar *progressBar3 = new QProgressBar(ui->tableView);
|
|
|
progressBar3->setRange(0, 100); // 设置范围为0到100
|
|
|
progressBar3->setValue(0);
|
|
|
- progressBar3->setAlignment(Qt::AlignRight);
|
|
|
+ progressBar3->setAlignment(Qt::AlignCenter);
|
|
|
progressBar3->setStyleSheet("QProgressBar { border: 1px solid grey; border-radius: 5px; background-color: #EEEEEE; height: 20px; }"
|
|
|
"QProgressBar::chunk { background-color: #05B8CC; width: 20px; margin: 0.5px; border - radius: 10px; }");
|
|
|
progressBar3->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
|
@@ -462,7 +470,7 @@ void BlastOpePage::updateProgressBar(int value, int row)
|
|
|
|
|
|
void BlastOpePage::onUpdateBlastStatus(int status ,int row)
|
|
|
{
|
|
|
- QModelIndex index = model->index(row, 9);
|
|
|
+ QModelIndex index = model->index(row, 7);
|
|
|
if (index.isValid()) {
|
|
|
QColor customColor;
|
|
|
QFont boldFont;
|
|
@@ -654,8 +662,8 @@ void BlastOpePage::on_btnSelect_clicked()
|
|
|
connect(widgetSelect, &firingWidget::updateButton, this, &BlastOpePage::changeButByMqtt);
|
|
|
connect(widgetSelect, &firingWidget::updateProjectStatus, this, &BlastOpePage::updateProject);
|
|
|
connect(widgetSelect, &firingWidget::closeFiring, this, &BlastOpePage::destroyFiringWidgetSelect);
|
|
|
- widget->show();
|
|
|
- widget->setAttribute(Qt::WA_DeleteOnClose);
|
|
|
+ widgetSelect->show();
|
|
|
+ widgetSelect->setAttribute(Qt::WA_DeleteOnClose);
|
|
|
uuidWidgetSMap.insert(uuid, widgetSelect);
|
|
|
}
|
|
|
|