From 6111634effef97c5ad0ced7b51b3483b597f6d99 Mon Sep 17 00:00:00 2001 From: tangchao0503 <735056338@qq.com> Date: Tue, 2 Jun 2026 14:38:56 +0800 Subject: [PATCH] =?UTF-8?q?add=EF=BC=8C=E8=AE=A1=E5=88=92=E9=87=87?= =?UTF-8?q?=E9=9B=861=EF=BC=9A=20=E6=B7=BB=E5=8A=A0=E7=AA=97=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HPPA/HPPA.cpp | 18 +- HPPA/HPPA.h | 2 + HPPA/HPPA.vcxproj | 3 + HPPA/HPPA.vcxproj.filters | 9 + HPPA/TimedDataCollection.cpp | 16 ++ HPPA/TimedDataCollection.h | 24 +++ HPPA/TimedDataCollection_ui.ui | 320 +++++++++++++++++++++++++++++++++ 7 files changed, 391 insertions(+), 1 deletion(-) create mode 100644 HPPA/TimedDataCollection.cpp create mode 100644 HPPA/TimedDataCollection.h create mode 100644 HPPA/TimedDataCollection_ui.ui diff --git a/HPPA/HPPA.cpp b/HPPA/HPPA.cpp index f93abcf..f4eff02 100644 --- a/HPPA/HPPA.cpp +++ b/HPPA/HPPA.cpp @@ -1523,6 +1523,22 @@ bool HPPA::showResultMessageBox(QString title, QString msg) void HPPA::onStartRecordStep1() { + QAction* checkedScenario = m_ScenarioActionGroup->checkedAction(); + QString checkedScenarioName = checkedScenario->objectName(); + if (checkedScenarioName == "mAction3DPlantPhenotypeScenario")//计划采集 + { + TimedDataCollection* tmp = new TimedDataCollection(); + /*m_ic->setWindowFlags(Qt::Widget);*/ + tmp->show(); + //tmp->exec(); + + return; + } + else if (checkedScenarioName == "mActionPlantPhenotypeScenario") + { + + } + //判断移动平台 QAction* checked = moveplatformActionGroup->checkedAction(); if (!checked) @@ -1556,7 +1572,7 @@ void HPPA::onStartRecordStep1() { } - + //判断光谱仪 if(!testImagerVality()) { diff --git a/HPPA/HPPA.h b/HPPA/HPPA.h index 0cfe0d0..b8bd82b 100644 --- a/HPPA/HPPA.h +++ b/HPPA/HPPA.h @@ -83,6 +83,8 @@ #include "LayerTreeImageNode.h" +#include "TimedDataCollection.h" + #define PI 3.1415926 QT_CHARTS_USE_NAMESPACE//QChartView 使用 需要加宏, 否则无法使用 diff --git a/HPPA/HPPA.vcxproj b/HPPA/HPPA.vcxproj index 744f6ac..5550b00 100644 --- a/HPPA/HPPA.vcxproj +++ b/HPPA/HPPA.vcxproj @@ -161,6 +161,7 @@ Create + @@ -193,6 +194,7 @@ + @@ -250,6 +252,7 @@ + diff --git a/HPPA/HPPA.vcxproj.filters b/HPPA/HPPA.vcxproj.filters index 8c56df8..5cbf913 100644 --- a/HPPA/HPPA.vcxproj.filters +++ b/HPPA/HPPA.vcxproj.filters @@ -232,6 +232,9 @@ Source Files + + Source Files + @@ -375,6 +378,9 @@ Header Files + + Header Files + @@ -481,6 +487,9 @@ Form Files + + Form Files + diff --git a/HPPA/TimedDataCollection.cpp b/HPPA/TimedDataCollection.cpp new file mode 100644 index 0000000..fe8eaac --- /dev/null +++ b/HPPA/TimedDataCollection.cpp @@ -0,0 +1,16 @@ +#include "TimedDataCollection.h" + +TimedDataCollection::TimedDataCollection(QWidget* parent) + : QDialog(parent) +{ + ui.setupUi(this); + + ui.treeWidget->setDragEnabled(true); // 启用拖拽 + ui.treeWidget->setAcceptDrops(true); // 接受拖放 + ui.treeWidget->setDropIndicatorShown(true); // 显示插入位置指示线 + ui.treeWidget->setDragDropMode(QAbstractItemView::InternalMove); // 内部移动 +} + +TimedDataCollection::~TimedDataCollection() +{ +} diff --git a/HPPA/TimedDataCollection.h b/HPPA/TimedDataCollection.h new file mode 100644 index 0000000..ca49d5a --- /dev/null +++ b/HPPA/TimedDataCollection.h @@ -0,0 +1,24 @@ +#pragma once + +#include +#include +#include +#include + +#include "ui_TimedDataCollection_ui.h" + +class TimedDataCollection : public QDialog +{ + Q_OBJECT + +public: + TimedDataCollection(QWidget* parent = nullptr); + ~TimedDataCollection(); + + +public Q_SLOTS: + +private: + Ui::TimedDataCollection_ui ui; + +}; diff --git a/HPPA/TimedDataCollection_ui.ui b/HPPA/TimedDataCollection_ui.ui new file mode 100644 index 0000000..546dca3 --- /dev/null +++ b/HPPA/TimedDataCollection_ui.ui @@ -0,0 +1,320 @@ + + + TimedDataCollection_ui + + + + 0 + 0 + 970 + 456 + + + + Dialog + + + + + 9 + 9 + 491 + 281 + + + + false + + + true + + + + 任务 + + + + + 计划时间 + + + + + 开始时间 + + + + + 结束时间 + + + + + 耗时 + + + + + 状态 + + + + + 1 + + + + + + + + + + + + + + + + + + + a + + + + + + + + + + + + + + + + + + + + b + + + + + + 2 + + + + + + + + + + + + + + + + + + + a + + + + + b + + + + + + 3 + + + + + + + + + + + + + + + + + + + a + + + + + b + + + + + + 4 + + + + + + + + + + + + + + + + + + + a + + + + + b + + + + + + 5 + + + + + + + + + + + + + + + + + + + a + + + + + b + + + + + + + + 40 + 310 + 101 + 23 + + + + 添加总计划任务 + + + + + + 40 + 370 + 101 + 23 + + + + 添加子任务 + + + + + + 170 + 370 + 69 + 22 + + + + + + + 40 + 410 + 101 + 23 + + + + 删除子任务 + + + + + + 40 + 340 + 101 + 23 + + + + 删除总计划任务 + + + + + + 520 + 20 + 381 + 261 + + + + 1 + + + + + + + + 850 + 420 + 101 + 23 + + + + 运行 + + + + + +