diff --git a/HPPA/CaptureCoordinator.cpp b/HPPA/CaptureCoordinator.cpp index 9679c23..9ba3778 100644 --- a/HPPA/CaptureCoordinator.cpp +++ b/HPPA/CaptureCoordinator.cpp @@ -498,7 +498,8 @@ void OneMotionCaptureCoordinator::stopStepMotion() m_cameraCtrl->stop_record(); } - emit stopMotorSignal(0); + //emit stopMotorSignal(0); + move2LocBeforeStart(); } void OneMotionCaptureCoordinator::handleCaptureCompleteWhenFrameNumberMeet() @@ -528,6 +529,10 @@ void OneMotionCaptureCoordinator::getLocBeforeStart() loop.exec(); disconnect(conn); + + std::vector pos; + pos.push_back(0); + m_locBeforeStart = pos; } void OneMotionCaptureCoordinator::move2LocBeforeStart() diff --git a/HPPA/GonggaShanRecordCtl.cpp b/HPPA/GonggaShanRecordCtl.cpp new file mode 100644 index 0000000..4752cfc --- /dev/null +++ b/HPPA/GonggaShanRecordCtl.cpp @@ -0,0 +1,25 @@ +#include "GonggaShanRecordCtl.h" + +GonggaShanRecordCtl::GonggaShanRecordCtl(QWidget* parent) + : QDialog(parent) +{ + ui.setupUi(this); + + connect(ui.btnListen, &QPushButton::clicked, this, &GonggaShanRecordCtl::startListen); + connect(ui.btnDisListen, &QPushButton::clicked, this, &GonggaShanRecordCtl::stopListen); +} + +GonggaShanRecordCtl::~GonggaShanRecordCtl() +{ + +} + +void GonggaShanRecordCtl::startListen() +{ + +} + +void GonggaShanRecordCtl::stopListen() +{ + +} diff --git a/HPPA/GonggaShanRecordCtl.h b/HPPA/GonggaShanRecordCtl.h new file mode 100644 index 0000000..52d3398 --- /dev/null +++ b/HPPA/GonggaShanRecordCtl.h @@ -0,0 +1,34 @@ +#pragma once +#include +#include +#include +#include +#include + +#include "ui_gonggashanCtl.h" + +class GonggaShanRecordCtl : public QDialog +{ + Q_OBJECT + +public: + GonggaShanRecordCtl(QWidget* parent = nullptr); + ~GonggaShanRecordCtl(); + + +public Q_SLOTS: + +Q_SIGNALS: + // Emitted when user changes any of the R/G/B wavelength values + void startRcordHsiSignal(); + void stopRcordHsiSignal(); + + void startRcordFodisSignal(); + +private Q_SLOTS: + void startListen(); + void stopListen(); + +private: + Ui::gongga_control ui; +}; diff --git a/HPPA/HPPA.cpp b/HPPA/HPPA.cpp index 5b06c06..57f59b4 100644 --- a/HPPA/HPPA.cpp +++ b/HPPA/HPPA.cpp @@ -1063,6 +1063,12 @@ void HPPA::initControlTabwidget() m_fodisWindow->setWindowFlags(Qt::Widget); ui.controlTabWidget->addTab(m_fodisWindow, QString::fromLocal8Bit("FODIS")); + // + m_gonggaShanRecordCtl = new GonggaShanRecordCtl(this); + m_gonggaShanRecordCtl->setWindowFlags(Qt::Widget); + ui.controlTabWidget->addTab(m_gonggaShanRecordCtl, QString::fromLocal8Bit("触发采集")); + + // Connect ImageControl band change to re-render (m_ic created in initControlTabwidget) //connect(m_ic, SIGNAL(bandSelectionChanged(double, double, double)), // this, SLOT(onBandSelectionChanged(double, double, double))); @@ -1569,6 +1575,7 @@ void HPPA::createGonggaRotatingPlatformScenario() m_tabManager->showTab(m_ic); m_tabManager->showTab(m_fodisWindow); m_tabManager->showTab(m_omc); + m_tabManager->showTab(m_gonggaShanRecordCtl); m_view3DModelManager->switchScenario(View3DModelManager::ScenarioType::OneMotor); } diff --git a/HPPA/HPPA.h b/HPPA/HPPA.h index 059d567..0b3ed46 100644 --- a/HPPA/HPPA.h +++ b/HPPA/HPPA.h @@ -89,6 +89,8 @@ #include "PowerControl3D.h" #include "FodisWindow.h" +#include "GonggaShanRecordCtl.h" + #include #define PI 3.1415926 @@ -321,6 +323,7 @@ private: OneMotorControl* m_omc; TwoMotorControl* m_tmc; FodisWindow* m_fodisWindow; + GonggaShanRecordCtl* m_gonggaShanRecordCtl; QPointer m_tdc; View3DModelManager* m_view3DModelManager; diff --git a/HPPA/HPPA.vcxproj b/HPPA/HPPA.vcxproj index 1f60ef8..ec7084a 100644 --- a/HPPA/HPPA.vcxproj +++ b/HPPA/HPPA.vcxproj @@ -119,6 +119,7 @@ + @@ -181,6 +182,7 @@ + @@ -237,6 +239,7 @@ + diff --git a/HPPA/HPPA.vcxproj.filters b/HPPA/HPPA.vcxproj.filters index f4c4a53..a8980ad 100644 --- a/HPPA/HPPA.vcxproj.filters +++ b/HPPA/HPPA.vcxproj.filters @@ -259,6 +259,12 @@ Source Files + + Source Files + + + Source Files + @@ -426,6 +432,9 @@ Header Files + + Header Files + @@ -547,6 +556,9 @@ Form Files + + Form Files + diff --git a/HPPA/gonggashanCtl.ui b/HPPA/gonggashanCtl.ui new file mode 100644 index 0000000..32999b8 --- /dev/null +++ b/HPPA/gonggashanCtl.ui @@ -0,0 +1,287 @@ + + + gongga_control + + + + 0 + 0 + 535 + 229 + + + + 贡嘎山触发采集 + + + QGroupBox +{ + border: 12px solid transparent; + /*border-top: 12px solid transparent; + border-right: 0px solid transparent; + border-bottom: 0px solid transparent; + border-left: 0px solid transparent;*/ + color: #ACCDFF; +} + +QPushButton +{ + /*width: 172px; + height: 56px;*/ + font: 10pt "新宋体"; + background-color: qlineargradient( + spread:pad, + x1:0.5, y1:0, x2:0.5, y2:1, + stop:0 #283D86, + stop:1 #0F1A40 + ); + color: white; + border: none; + padding: 8px 8px; + border-radius: 4px; +} +QPushButton:hover +{ + background-color: qlineargradient( + spread:pad, + x1:0, y1:0, x2:1, y2:0, + stop:0 #3A4875, + stop:1 #5F6B91 + ); +} +/* 按下时的效果 */ +QPushButton:pressed +{ + background-color: qlineargradient( + spread:pad, + x1:0, y1:0, x2:1, y2:0, + stop:0 #1A254F, + stop:1 #3A466B + ); + /* 可选:添加下压效果 */ + padding-top: 9px; + padding-bottom: 7px; +} + +QLabel { + color: rgb(255, 255, 255); +} + +QSlider::groove:horizontal { + height: 10px; + background: #1e2a44; + border-radius: 3px; +} + +/* 已滑过:渐变蓝 */ +QSlider::sub-page:horizontal { + background: qlineargradient( + x1:0, y1:0, x2:1, y2:0, + stop:0 #1f4fff, + stop:0.5 #2f6bff, + stop:1 #5fa0ff + ); + border-radius: 3px; +} + +/* 未滑过 */ +QSlider::add-page:horizontal { + height: 10px; + background: #2a3550; + border-radius: 3px; +} + +/* ===== 滑块按钮 ===== */ +QSlider::handle:horizontal { + width: 15px; + height: 10px; + + /* 蓝色实心 */ + background: #2f6bff; + + /* 白色外圈 */ + border: 2px solid #ffffff; + border-radius: 5px; + + /* 垂直居中 */ + margin: -5px 0; +} + +/* 悬停 */ +QSlider::handle:horizontal:hover { + background: #4d8dff; +} + +/* 按下 */ +QSlider::handle:horizontal:pressed { + background: #1f4fff; +} + + + + + + QLabel +{ + color: #ACCDFF; + font-size: 14px; + font: 9pt "Adobe Devanagari"; +} + + + 通讯参数 + + + + 16 + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 192.168.1.2 + + + Qt::AlignCenter + + + + + + + ip + + + Qt::AlignCenter + + + + + + + 端口 + + + Qt::AlignCenter + + + + + + + Qt::AlignCenter + + + 65535 + + + 666 + + + + + + + + + + 采集 + + + + + + + 0 + 0 + + + + + 0 + 43 + + + + + 16777215 + 43 + + + + 开始监听 + + + + + + + + 0 + 43 + + + + 停止监听 + + + + + + + + + + +