Compare commits
5 Commits
d358989579
...
3.0.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 7e119fbf91 | |||
| e3f882d77b | |||
| dac922eb29 | |||
| ae07b9c19e | |||
| 2cf86df608 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,6 +7,7 @@ HPPA类图.drawio
|
|||||||
HPPA - 副本.ui
|
HPPA - 副本.ui
|
||||||
icon
|
icon
|
||||||
ignore_*
|
ignore_*
|
||||||
|
resources
|
||||||
|
|
||||||
## Ignore Visual Studio temporary files, build results, and
|
## Ignore Visual Studio temporary files, build results, and
|
||||||
## files generated by popular Visual Studio add-ons.
|
## files generated by popular Visual Studio add-ons.
|
||||||
|
|||||||
@ -13,10 +13,6 @@
|
|||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>调焦</string>
|
<string>调焦</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowIcon">
|
|
||||||
<iconset resource="HPPA.qrc">
|
|
||||||
<normaloff>:/HPPA/HPPA.ico</normaloff>:/HPPA/HPPA.ico</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">QLineEdit {
|
<string notr="true">QLineEdit {
|
||||||
background-color: #142D7F;
|
background-color: #142D7F;
|
||||||
@ -236,8 +232,8 @@ QSlider::handle:horizontal:pressed {
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset>
|
<iconset resource="HPPA.qrc">
|
||||||
<normaloff>icon/all/close.svg</normaloff>icon/all/close.svg</iconset>
|
<normaloff>:/svg/resources/icons/svg/close.svg</normaloff>:/svg/resources/icons/svg/close.svg</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
165
HPPA/HPPA.cpp
165
HPPA/HPPA.cpp
@ -82,6 +82,8 @@ HPPA::HPPA(QWidget* parent)
|
|||||||
//ui.statusBar->addPermanentWidget(xmotor_state_label1);
|
//ui.statusBar->addPermanentWidget(xmotor_state_label1);
|
||||||
//ui.statusBar->addPermanentWidget(ymotor_state_label1);
|
//ui.statusBar->addPermanentWidget(ymotor_state_label1);
|
||||||
|
|
||||||
|
m_recordFrameCounter = new recordFrameCounter(this);
|
||||||
|
ui.statusBar->addWidget(m_recordFrameCounter);
|
||||||
|
|
||||||
connect(this->ui.action_exit, SIGNAL(triggered()), this, SLOT(onExit()));
|
connect(this->ui.action_exit, SIGNAL(triggered()), this, SLOT(onExit()));
|
||||||
connect(this->ui.mActionOpenImg, SIGNAL(triggered()), this, SLOT(onOpenImg()));
|
connect(this->ui.mActionOpenImg, SIGNAL(triggered()), this, SLOT(onOpenImg()));
|
||||||
@ -153,56 +155,6 @@ sizePolicy1.setHeightForWidth(graphicsView_delete->sizePolicy().hasHeightForWidt
|
|||||||
graphicsView_delete->setFrameShadow(QFrame::Raised);
|
graphicsView_delete->setFrameShadow(QFrame::Raised);
|
||||||
//gridLayout_toc->addWidget(graphicsView_delete, 0, 0, 1, 1);
|
//gridLayout_toc->addWidget(graphicsView_delete, 0, 0, 1, 1);
|
||||||
|
|
||||||
//2、没用,仅仅使用QTreeWidget实现的简略ui
|
|
||||||
QTreeWidget* treeWidget = new QTreeWidget();
|
|
||||||
treeWidget->setColumnCount(1);
|
|
||||||
treeWidget->setIndentation(18);
|
|
||||||
treeWidget->setRootIsDecorated(true);
|
|
||||||
treeWidget->header()->hide();
|
|
||||||
treeWidget->setStyleSheet(R"(
|
|
||||||
QTreeWidget
|
|
||||||
{
|
|
||||||
color: #ACCDFF;
|
|
||||||
}
|
|
||||||
QTreeWidget::branch {
|
|
||||||
background: transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
QTreeWidget::branch:has-children:!has-siblings:closed,
|
|
||||||
QTreeWidget::branch:closed:has-children:has-siblings
|
|
||||||
{
|
|
||||||
border-image: none;
|
|
||||||
image: url(D:/cpp_project_vs2022/HPPA/x64/Debug/3DModel/tree_tri_right.svg);
|
|
||||||
}
|
|
||||||
QTreeWidget::branch:open:has-children:!has-siblings,
|
|
||||||
QTreeWidget::branch:open:has-children:has-siblings
|
|
||||||
{
|
|
||||||
border-image: none;
|
|
||||||
image: url(D:/cpp_project_vs2022/HPPA/x64/Debug/3DModel/tree_tri_down.svg);
|
|
||||||
}
|
|
||||||
)");
|
|
||||||
|
|
||||||
//QList<QTreeWidgetItem*> items;
|
|
||||||
//for (int i = 0; i < 3; ++i)
|
|
||||||
// items.append(new QTreeWidgetItem((QTreeWidget*)0, QStringList(QString("tmp_image_%1").arg(i))));
|
|
||||||
//treeWidget->insertTopLevelItems(0, items);
|
|
||||||
|
|
||||||
QTreeWidgetItem* group1 = new QTreeWidgetItem(treeWidget);
|
|
||||||
group1->setText(0, "Raster");
|
|
||||||
group1->setExpanded(true); // 默认展开
|
|
||||||
|
|
||||||
QTreeWidgetItem* group2 = new QTreeWidgetItem(treeWidget);
|
|
||||||
group2->setText(0, "Vector");
|
|
||||||
group2->setExpanded(true);
|
|
||||||
|
|
||||||
QTreeWidgetItem* layerA = new QTreeWidgetItem(group1);
|
|
||||||
layerA->setText(0, "tmp_image_1");
|
|
||||||
|
|
||||||
QTreeWidgetItem* layerB = new QTreeWidgetItem(group1);
|
|
||||||
layerB->setText(0, "tmp_image_2");
|
|
||||||
|
|
||||||
//gridLayout_toc->addWidget(treeWidget, 0, 0, 1, 1);
|
|
||||||
|
|
||||||
//3、正经TOC
|
//3、正经TOC
|
||||||
m_LayerTree = new LayerTree();
|
m_LayerTree = new LayerTree();
|
||||||
m_LayerTreeModel = new LayerTreeModel(m_LayerTree, this, true);
|
m_LayerTreeModel = new LayerTreeModel(m_LayerTree, this, true);
|
||||||
@ -239,13 +191,13 @@ sizePolicy1.setHeightForWidth(graphicsView_delete->sizePolicy().hasHeightForWidt
|
|||||||
QTreeView::branch:closed:has-children:has-siblings
|
QTreeView::branch:closed:has-children:has-siblings
|
||||||
{
|
{
|
||||||
border-image: none;
|
border-image: none;
|
||||||
image: url(D:/cpp_project_vs2022/HPPA/x64/Debug/3DModel/tree_tri_right.svg);
|
image: url(:/svg/resources/icons/svg/tree_tri_right.svg);
|
||||||
}
|
}
|
||||||
QTreeView::branch:open:has-children:!has-siblings,
|
QTreeView::branch:open:has-children:!has-siblings,
|
||||||
QTreeView::branch:open:has-children:has-siblings
|
QTreeView::branch:open:has-children:has-siblings
|
||||||
{
|
{
|
||||||
border-image: none;
|
border-image: none;
|
||||||
image: url(D:/cpp_project_vs2022/HPPA/x64/Debug/3DModel/tree_tri_down.svg);
|
image: url(:/svg/resources/icons/svg/tree_tri_down.svg);
|
||||||
}
|
}
|
||||||
)");
|
)");
|
||||||
|
|
||||||
@ -715,29 +667,29 @@ void HPPA::initMenubarToolbar()
|
|||||||
sepWidget->setStyleSheet("background-color: #2C586C;"); // 调整颜色
|
sepWidget->setStyleSheet("background-color: #2C586C;"); // 调整颜色
|
||||||
}
|
}
|
||||||
|
|
||||||
ui.action_connect_imager->setIcon(QIcon(".//icon//all//connect_imager.svg"));
|
ui.action_connect_imager->setIcon(QIcon(":/svg/resources/icons/svg/connect_imager.svg"));
|
||||||
ui.action_auto_exposure->setIcon(QIcon(".//icon//all//exposure.svg"));
|
ui.action_auto_exposure->setIcon(QIcon(":/svg/resources/icons/svg/exposure.svg"));
|
||||||
ui.action_focus->setIcon(QIcon(".//icon//all//focus.svg"));
|
ui.action_focus->setIcon(QIcon(":/svg/resources/icons/svg/focus.svg"));
|
||||||
ui.action_dark->setIcon(QIcon(".//icon//all//dark.svg"));
|
ui.action_dark->setIcon(QIcon(":/svg/resources/icons/svg/dark.svg"));
|
||||||
ui.action_reference->setIcon(QIcon(".//icon//all//reference.svg"));
|
ui.action_reference->setIcon(QIcon(":/svg/resources/icons/svg/reference.svg"));
|
||||||
ui.action_start_recording->setIcon(QIcon(".//icon//all//record.svg"));
|
ui.action_start_recording->setIcon(QIcon(":/svg/resources/icons/svg/record.svg"));
|
||||||
ui.actionOpenDirectory->setIcon(QIcon(".//icon//all//openDirectory.svg"));
|
ui.actionOpenDirectory->setIcon(QIcon(":/svg/resources/icons/svg/openDirectory.svg"));
|
||||||
|
|
||||||
ui.mActionPan->setIcon(QIcon(".//icon//all//pan.svg"));
|
ui.mActionPan->setIcon(QIcon(":/svg/resources/icons/svg/pan.svg"));
|
||||||
ui.mActionSpectral->setIcon(QIcon(".//icon//all//spectral.svg"));
|
ui.mActionSpectral->setIcon(QIcon(":/svg/resources/icons/svg/spectral.svg"));
|
||||||
|
|
||||||
connect(ui.mActionPan, &QAction::toggled, this, [=](bool checked) {
|
connect(ui.mActionPan, &QAction::toggled, this, [=](bool checked) {
|
||||||
if (checked)
|
if (checked)
|
||||||
ui.mActionPan->setIcon(QIcon(".//icon//all//pan_done.svg"));
|
ui.mActionPan->setIcon(QIcon(":/svg/resources/icons/svg/pan_done.svg"));
|
||||||
else
|
else
|
||||||
ui.mActionPan->setIcon(QIcon(".//icon//all//pan.svg"));
|
ui.mActionPan->setIcon(QIcon(":/svg/resources/icons/svg/pan.svg"));
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(ui.mActionSpectral, &QAction::toggled, this, [=](bool checked) {
|
connect(ui.mActionSpectral, &QAction::toggled, this, [=](bool checked) {
|
||||||
if (checked)
|
if (checked)
|
||||||
ui.mActionSpectral->setIcon(QIcon(".//icon//all//spectral_done.svg"));
|
ui.mActionSpectral->setIcon(QIcon(":/svg/resources/icons/svg/spectral_done.svg"));
|
||||||
else
|
else
|
||||||
ui.mActionSpectral->setIcon(QIcon(".//icon//all//spectral.svg"));
|
ui.mActionSpectral->setIcon(QIcon(":/svg/resources/icons/svg/spectral.svg"));
|
||||||
});
|
});
|
||||||
|
|
||||||
// 使用样式表设置透明背景
|
// 使用样式表设置透明背景
|
||||||
@ -785,8 +737,10 @@ QWidget* HPPA::tmp(QWidget* a)
|
|||||||
void HPPA::initControlTabwidget()
|
void HPPA::initControlTabwidget()
|
||||||
{
|
{
|
||||||
m_hic = new HyperImagerControl();
|
m_hic = new HyperImagerControl();
|
||||||
ui.controlTabWidget->addTab(m_hic, QString::fromLocal8Bit("光谱仪"));
|
//ui.controlTabWidget->addTab(m_hic, QString::fromLocal8Bit("光谱仪"));
|
||||||
|
ui.controlTabWidget->insertTab(0, m_hic, QString::fromLocal8Bit("光谱仪"));
|
||||||
m_hic->setDisabled(true);
|
m_hic->setDisabled(true);
|
||||||
|
ui.controlTabWidget->setCurrentIndex(0);
|
||||||
|
|
||||||
//rgb相机
|
//rgb相机
|
||||||
m_RgbCameraThread = new QThread();
|
m_RgbCameraThread = new QThread();
|
||||||
@ -853,7 +807,7 @@ void HPPA::recordFromRobotArm(int fileCounter)
|
|||||||
m_Imager->setRecordControlState(false);
|
m_Imager->setRecordControlState(false);
|
||||||
|
|
||||||
ui.action_start_recording->setText(QString::fromLocal8Bit("采集"));
|
ui.action_start_recording->setText(QString::fromLocal8Bit("采集"));
|
||||||
ui.action_start_recording->setIcon(QIcon(".//icon//all//record_done.svg"));
|
ui.action_start_recording->setIcon(QIcon(":/svg/resources/icons/svg/record_done.svg"));
|
||||||
//ui.mainToolBar->widgetForAction(ui.action_start_recording)->setStyleSheet("QWidget{background-color:rgb(0,255,0);}");
|
//ui.mainToolBar->widgetForAction(ui.action_start_recording)->setStyleSheet("QWidget{background-color:rgb(0,255,0);}");
|
||||||
//qDebug() << "recordFromRobotArm: 1111111111111111111111";
|
//qDebug() << "recordFromRobotArm: 1111111111111111111111";
|
||||||
|
|
||||||
@ -870,7 +824,7 @@ void HPPA::recordFromRobotArm(int fileCounter)
|
|||||||
emit StartRecordSignal();
|
emit StartRecordSignal();
|
||||||
|
|
||||||
ui.action_start_recording->setText(QString::fromLocal8Bit("采集中"));
|
ui.action_start_recording->setText(QString::fromLocal8Bit("采集中"));
|
||||||
ui.action_start_recording->setIcon(QIcon(".//icon//all//record_ing.svg"));
|
ui.action_start_recording->setIcon(QIcon(":/svg/resources/icons/svg/record_ing.svg"));
|
||||||
//ui.mainToolBar->widgetForAction(ui.action_start_recording)->setStyleSheet("QWidget{background-color:rgb(255,0,0);}");
|
//ui.mainToolBar->widgetForAction(ui.action_start_recording)->setStyleSheet("QWidget{background-color:rgb(255,0,0);}");
|
||||||
//qDebug() << "recordFromRobotArm: 2222222222222222222222";
|
//qDebug() << "recordFromRobotArm: 2222222222222222222222";
|
||||||
}
|
}
|
||||||
@ -923,13 +877,13 @@ void HPPA::updateImagerPicture(const QString& actionName)
|
|||||||
{
|
{
|
||||||
QString picPath;
|
QString picPath;
|
||||||
if (actionName == "mActionPica_L")
|
if (actionName == "mActionPica_L")
|
||||||
picPath = ".//icon//imagerPicture//L.png";
|
picPath = ":/imagerPicture/resources/icons/imagerPicture/L.png";
|
||||||
else if (actionName == "mActionPica_NIR")
|
else if (actionName == "mActionPica_NIR")
|
||||||
picPath = ".//icon//imagerPicture//IR.png";
|
picPath = ":/imagerPicture/resources/icons/imagerPicture/IR.png";
|
||||||
else if (actionName == "mActionPika_XC2")
|
else if (actionName == "mActionPika_XC2")
|
||||||
picPath = ".//icon//imagerPicture//XC2.png";
|
picPath = ":/imagerPicture/resources/icons/imagerPicture/XC2.png";
|
||||||
else if (actionName == "mActionCorning_410")
|
else if (actionName == "mActionCorning_410")
|
||||||
picPath = ".//icon//imagerPicture//corning410.png";
|
picPath = ":/imagerPicture/resources/icons/imagerPicture/corning410.png";
|
||||||
|
|
||||||
if (!picPath.isEmpty())
|
if (!picPath.isEmpty())
|
||||||
{
|
{
|
||||||
@ -937,7 +891,7 @@ void HPPA::updateImagerPicture(const QString& actionName)
|
|||||||
if (!pixmap.isNull())
|
if (!pixmap.isNull())
|
||||||
{
|
{
|
||||||
QImage img = pixmap.toImage().convertToFormat(QImage::Format_ARGB32);
|
QImage img = pixmap.toImage().convertToFormat(QImage::Format_ARGB32);
|
||||||
const int threshold = 220;
|
const int threshold = 240;
|
||||||
for (int y = 0; y < img.height(); ++y)
|
for (int y = 0; y < img.height(); ++y)
|
||||||
{
|
{
|
||||||
QRgb* line = reinterpret_cast<QRgb*>(img.scanLine(y));
|
QRgb* line = reinterpret_cast<QRgb*>(img.scanLine(y));
|
||||||
@ -1043,6 +997,10 @@ void HPPA::removeLayerByTreeIndex()
|
|||||||
const int tabIndex = m_imageViewerTabWidget->indexOf(layerWidget);
|
const int tabIndex = m_imageViewerTabWidget->indexOf(layerWidget);
|
||||||
if (tabIndex >= 0)
|
if (tabIndex >= 0)
|
||||||
{
|
{
|
||||||
|
if (m_recordFrameCounter)
|
||||||
|
{
|
||||||
|
m_recordFrameCounter->removeCounter(layerWidget);
|
||||||
|
}
|
||||||
m_imageViewerTabWidget->removeTab(tabIndex);
|
m_imageViewerTabWidget->removeTab(tabIndex);
|
||||||
}
|
}
|
||||||
layerWidget->deleteLater();
|
layerWidget->deleteLater();
|
||||||
@ -1095,6 +1053,10 @@ void HPPA::removeAllLayersInRasterGroup()
|
|||||||
const int tabIndex = m_imageViewerTabWidget->indexOf(layerWidget);
|
const int tabIndex = m_imageViewerTabWidget->indexOf(layerWidget);
|
||||||
if (tabIndex >= 0)
|
if (tabIndex >= 0)
|
||||||
{
|
{
|
||||||
|
if (m_recordFrameCounter)
|
||||||
|
{
|
||||||
|
m_recordFrameCounter->removeCounter(layerWidget);
|
||||||
|
}
|
||||||
m_imageViewerTabWidget->removeTab(tabIndex);
|
m_imageViewerTabWidget->removeTab(tabIndex);
|
||||||
}
|
}
|
||||||
layerWidget->deleteLater();
|
layerWidget->deleteLater();
|
||||||
@ -1351,7 +1313,7 @@ void HPPA::onStartRecordStep1()
|
|||||||
emit StartRecordSignal();//发射开始采集信号
|
emit StartRecordSignal();//发射开始采集信号
|
||||||
|
|
||||||
ui.action_start_recording->setText(QString::fromLocal8Bit("停止采集"));
|
ui.action_start_recording->setText(QString::fromLocal8Bit("停止采集"));
|
||||||
ui.action_start_recording->setIcon(QIcon(".//icon//all//record_ing.svg"));
|
ui.action_start_recording->setIcon(QIcon(":/svg/resources/icons/svg/record_ing.svg"));
|
||||||
//ui.mainToolBar->widgetForAction(ui.action_start_recording)->setStyleSheet("QWidget{background-color:rgb(255,0,0);}");
|
//ui.mainToolBar->widgetForAction(ui.action_start_recording)->setStyleSheet("QWidget{background-color:rgb(255,0,0);}");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1360,7 +1322,7 @@ void HPPA::onStartRecordStep1()
|
|||||||
m_RecordState -= 1;
|
m_RecordState -= 1;
|
||||||
|
|
||||||
ui.action_start_recording->setText(QString::fromLocal8Bit("采集"));
|
ui.action_start_recording->setText(QString::fromLocal8Bit("采集"));
|
||||||
ui.action_start_recording->setIcon(QIcon(".//icon//all//record_done.svg"));
|
ui.action_start_recording->setIcon(QIcon(":/svg/resources/icons/svg/record_done.svg"));
|
||||||
//ui.mainToolBar->widgetForAction(ui.action_start_recording)->setStyleSheet("QWidget{background-color:rgb(0,255,0);}");
|
//ui.mainToolBar->widgetForAction(ui.action_start_recording)->setStyleSheet("QWidget{background-color:rgb(0,255,0);}");
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@ -1375,7 +1337,7 @@ void HPPA::onStartRecordStep1()
|
|||||||
removeAllLayersInRasterGroup();
|
removeAllLayersInRasterGroup();
|
||||||
|
|
||||||
ui.action_start_recording->setText(QString::fromLocal8Bit("停止采集"));
|
ui.action_start_recording->setText(QString::fromLocal8Bit("停止采集"));
|
||||||
ui.action_start_recording->setIcon(QIcon(".//icon//all//record_ing.svg"));
|
ui.action_start_recording->setIcon(QIcon(":/svg/resources/icons/svg/record_ing.svg"));
|
||||||
//ui.mainToolBar->widgetForAction(ui.action_start_recording)->setStyleSheet("QWidget{background-color:rgb(255,0,0);}");
|
//ui.mainToolBar->widgetForAction(ui.action_start_recording)->setStyleSheet("QWidget{background-color:rgb(255,0,0);}");
|
||||||
|
|
||||||
//应该先控制马达运动,当马达运动后,再开始光谱仪采集(发射开始采集信号)
|
//应该先控制马达运动,当马达运动后,再开始光谱仪采集(发射开始采集信号)
|
||||||
@ -1390,7 +1352,7 @@ void HPPA::onStartRecordStep1()
|
|||||||
m_RecordState -= 1;
|
m_RecordState -= 1;
|
||||||
|
|
||||||
ui.action_start_recording->setText(QString::fromLocal8Bit("采集"));
|
ui.action_start_recording->setText(QString::fromLocal8Bit("采集"));
|
||||||
ui.action_start_recording->setIcon(QIcon(".//icon//all//record_done.svg"));
|
ui.action_start_recording->setIcon(QIcon(":/svg/resources/icons/svg/record_done.svg"));
|
||||||
//ui.mainToolBar->widgetForAction(ui.action_start_recording)->setStyleSheet("QWidget{background-color:rgb(0,255,0);}");
|
//ui.mainToolBar->widgetForAction(ui.action_start_recording)->setStyleSheet("QWidget{background-color:rgb(0,255,0);}");
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@ -1411,7 +1373,7 @@ void HPPA::onStartRecordStep1()
|
|||||||
m_tmc->run();
|
m_tmc->run();
|
||||||
|
|
||||||
ui.action_start_recording->setText(QString::fromLocal8Bit("停止采集"));
|
ui.action_start_recording->setText(QString::fromLocal8Bit("停止采集"));
|
||||||
ui.action_start_recording->setIcon(QIcon(".//icon//all//record_ing.svg"));
|
ui.action_start_recording->setIcon(QIcon(":/svg/resources/icons/svg/record_ing.svg"));
|
||||||
//ui.mainToolBar->widgetForAction(ui.action_start_recording)->setStyleSheet("QWidget{background-color:rgb(255,0,0);}");
|
//ui.mainToolBar->widgetForAction(ui.action_start_recording)->setStyleSheet("QWidget{background-color:rgb(255,0,0);}");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1421,7 +1383,7 @@ void HPPA::onStartRecordStep1()
|
|||||||
m_RecordState--;
|
m_RecordState--;
|
||||||
|
|
||||||
ui.action_start_recording->setText(QString::fromLocal8Bit("采集"));
|
ui.action_start_recording->setText(QString::fromLocal8Bit("采集"));
|
||||||
ui.action_start_recording->setIcon(QIcon(".//icon//all//record_done.svg"));
|
ui.action_start_recording->setIcon(QIcon(":/svg/resources/icons/svg/record_done.svg"));
|
||||||
//ui.mainToolBar->widgetForAction(ui.action_start_recording)->setStyleSheet("QWidget{background-color:rgb(0,255,0);}");
|
//ui.mainToolBar->widgetForAction(ui.action_start_recording)->setStyleSheet("QWidget{background-color:rgb(0,255,0);}");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1451,6 +1413,11 @@ QWidget* HPPA::onCreateTab(QString tabName)
|
|||||||
|
|
||||||
m_imageViewerTabWidget->setCurrentIndex(m_imageViewerTabWidget->count() - 1);
|
m_imageViewerTabWidget->setCurrentIndex(m_imageViewerTabWidget->count() - 1);
|
||||||
|
|
||||||
|
if (m_recordFrameCounter)
|
||||||
|
{
|
||||||
|
m_recordFrameCounter->addCounter(tabTmp);
|
||||||
|
}
|
||||||
|
|
||||||
return tabTmp;
|
return tabTmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1464,6 +1431,12 @@ void HPPA::onTabWidgetCurrentChanged(int index)//代码新建一个tab,会调
|
|||||||
//记录当前
|
//记录当前
|
||||||
m_TabWidgetCurrentIndex = index;
|
m_TabWidgetCurrentIndex = index;
|
||||||
|
|
||||||
|
if (m_recordFrameCounter)
|
||||||
|
{
|
||||||
|
QWidget* currentWidget = m_imageViewerTabWidget->widget(index);
|
||||||
|
m_recordFrameCounter->switchTo(currentWidget);
|
||||||
|
}
|
||||||
|
|
||||||
//获取绘图控件
|
//获取绘图控件
|
||||||
QWidget* currentWidget = m_imageViewerTabWidget->widget(index);
|
QWidget* currentWidget = m_imageViewerTabWidget->widget(index);
|
||||||
QList<Mapcavas*> currentImageViewer = currentWidget->findChildren<Mapcavas*>();
|
QList<Mapcavas*> currentImageViewer = currentWidget->findChildren<Mapcavas*>();
|
||||||
@ -1808,7 +1781,7 @@ void HPPA::onconnect()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ui.action_connect_imager->setIcon(QIcon(".//icon//all//connect_imager_ing.svg"));
|
ui.action_connect_imager->setIcon(QIcon(":/svg/resources/icons/svg/connect_imager_ing.svg"));
|
||||||
|
|
||||||
m_Imager->moveToThread(m_RecordThread);
|
m_Imager->moveToThread(m_RecordThread);
|
||||||
m_RecordThread->start();
|
m_RecordThread->start();
|
||||||
@ -1877,7 +1850,7 @@ void HPPA::onconnect()
|
|||||||
}
|
}
|
||||||
catch (std::exception const& e)
|
catch (std::exception const& e)
|
||||||
{
|
{
|
||||||
ui.action_connect_imager->setIcon(QIcon(".//icon//all//connect_imager.svg"));
|
ui.action_connect_imager->setIcon(QIcon(":/svg/resources/icons/svg/connect_imager.svg"));
|
||||||
|
|
||||||
std::cerr << "Error: " << e.what() << std::endl;
|
std::cerr << "Error: " << e.what() << std::endl;
|
||||||
|
|
||||||
@ -1895,18 +1868,18 @@ void HPPA::onconnect()
|
|||||||
|
|
||||||
void HPPA::testImagerStatus()
|
void HPPA::testImagerStatus()
|
||||||
{
|
{
|
||||||
ui.action_connect_imager->setIcon(QIcon(".//icon//all//connect_imager_done.svg"));
|
ui.action_connect_imager->setIcon(QIcon(":/svg/resources/icons/svg/connect_imager_done.svg"));
|
||||||
//m_TestImagerStausThread->start();
|
//m_TestImagerStausThread->start();
|
||||||
}
|
}
|
||||||
|
|
||||||
void HPPA::autoExposureFinished()
|
void HPPA::autoExposureFinished()
|
||||||
{
|
{
|
||||||
ui.action_auto_exposure->setIcon(QIcon(".//icon//all//exposure_done.svg"));
|
ui.action_auto_exposure->setIcon(QIcon(":/svg/resources/icons/svg/exposure_done.svg"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void HPPA::onAutoExposure()
|
void HPPA::onAutoExposure()
|
||||||
{
|
{
|
||||||
ui.action_auto_exposure->setIcon(QIcon(".//icon//all//exposure_ing.svg"));
|
ui.action_auto_exposure->setIcon(QIcon(":/svg/resources/icons/svg/exposure_ing.svg"));
|
||||||
|
|
||||||
double ReturnedExposureTime = m_Imager->auto_exposure();
|
double ReturnedExposureTime = m_Imager->auto_exposure();
|
||||||
|
|
||||||
@ -1987,7 +1960,7 @@ void HPPA::onDark()
|
|||||||
msgBox.setText(QString::fromLocal8Bit("采集暗电流,请确保镜头盖盖上!"));
|
msgBox.setText(QString::fromLocal8Bit("采集暗电流,请确保镜头盖盖上!"));
|
||||||
msgBox.exec();
|
msgBox.exec();
|
||||||
|
|
||||||
ui.action_dark->setIcon(QIcon(".//icon//all//dark_ing.svg"));
|
ui.action_dark->setIcon(QIcon(":/svg/resources/icons/svg/dark_ing.svg"));
|
||||||
|
|
||||||
QAction* checked = moveplatformActionGroup->checkedAction();
|
QAction* checked = moveplatformActionGroup->checkedAction();
|
||||||
QString checkedName = checked->objectName();
|
QString checkedName = checked->objectName();
|
||||||
@ -2010,7 +1983,7 @@ void HPPA::onDark()
|
|||||||
|
|
||||||
void HPPA::recordDarkFinish()
|
void HPPA::recordDarkFinish()
|
||||||
{
|
{
|
||||||
ui.action_dark->setIcon(QIcon(".//icon//all//dark_done.svg"));
|
ui.action_dark->setIcon(QIcon(":/svg/resources/icons/svg/dark_done.svg"));
|
||||||
//ui.mainToolBar->widgetForAction(ui.action_dark)->setStyleSheet("QWidget{background-color:rgb(0,255,0);}");
|
//ui.mainToolBar->widgetForAction(ui.action_dark)->setStyleSheet("QWidget{background-color:rgb(0,255,0);}");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2020,7 +1993,7 @@ void HPPA::onReference()
|
|||||||
msgBox.setText(QString::fromLocal8Bit("请确保白板放置正确!"));
|
msgBox.setText(QString::fromLocal8Bit("请确保白板放置正确!"));
|
||||||
msgBox.exec();
|
msgBox.exec();
|
||||||
|
|
||||||
ui.action_reference->setIcon(QIcon(".//icon//all//reference_ing.svg"));
|
ui.action_reference->setIcon(QIcon(":/svg/resources/icons/svg/reference_ing.svg"));
|
||||||
|
|
||||||
QAction* checked = moveplatformActionGroup->checkedAction();
|
QAction* checked = moveplatformActionGroup->checkedAction();
|
||||||
QString checkedName = checked->objectName();
|
QString checkedName = checked->objectName();
|
||||||
@ -2043,7 +2016,7 @@ void HPPA::onReference()
|
|||||||
|
|
||||||
void HPPA::recordWhiteFinish()
|
void HPPA::recordWhiteFinish()
|
||||||
{
|
{
|
||||||
ui.action_reference->setIcon(QIcon(".//icon//all//reference_done.svg"));
|
ui.action_reference->setIcon(QIcon(":/svg/resources/icons/svg/reference_done.svg"));
|
||||||
//ui.mainToolBar->widgetForAction(ui.action_reference)->setStyleSheet("QWidget{background-color:rgb(0,255,0);}");
|
//ui.mainToolBar->widgetForAction(ui.action_reference)->setStyleSheet("QWidget{background-color:rgb(0,255,0);}");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2065,6 +2038,11 @@ void HPPA::onPlotHyperspectralImageRgbImage(int fileNumber, int frameNumber, QSt
|
|||||||
QList<Mapcavas*> currentImageViewer = currentWidget->findChildren<Mapcavas*>();
|
QList<Mapcavas*> currentImageViewer = currentWidget->findChildren<Mapcavas*>();
|
||||||
currentImageViewer[0]->DisplayFrameNumber(m_Imager->getFrameCounter());//界面中显示已经采集的帧数
|
currentImageViewer[0]->DisplayFrameNumber(m_Imager->getFrameCounter());//界面中显示已经采集的帧数
|
||||||
|
|
||||||
|
if (m_recordFrameCounter)
|
||||||
|
{
|
||||||
|
m_recordFrameCounter->updateFrameCount(currentWidget, m_Imager->getFrameCounter());
|
||||||
|
}
|
||||||
|
|
||||||
//创建需要显示的图像--opencv版本
|
//创建需要显示的图像--opencv版本
|
||||||
ImageProcessor imageProcessor;
|
ImageProcessor imageProcessor;
|
||||||
//cv::Mat rgbImage(*m_Imager->getRgbImage()->m_matRgbImage, cv::Range(0, m_Imager->getFrameCounter()), cv::Range::all());//2022.3.18重构的
|
//cv::Mat rgbImage(*m_Imager->getRgbImage()->m_matRgbImage, cv::Range(0, m_Imager->getFrameCounter()), cv::Range::all());//2022.3.18重构的
|
||||||
@ -2181,10 +2159,15 @@ void HPPA::onRecordFinishedSignal_WhenFrameNumberMeet()
|
|||||||
QAction* checked = moveplatformActionGroup->checkedAction();
|
QAction* checked = moveplatformActionGroup->checkedAction();
|
||||||
QString checkedName = checked->objectName();
|
QString checkedName = checked->objectName();
|
||||||
|
|
||||||
|
if (checkedName == "mAction_2AxisMotor_new")//会有多条采集线,中间的某条采集线完成后不代表整个采集过程完成
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
std::cout << "停止采集原因:帧数采集完了。" << std::endl;
|
std::cout << "停止采集原因:帧数采集完了。" << std::endl;
|
||||||
|
|
||||||
ui.action_start_recording->setText(QString::fromLocal8Bit("采集"));
|
ui.action_start_recording->setText(QString::fromLocal8Bit("采集"));
|
||||||
ui.action_start_recording->setIcon(QIcon(".//icon//all//record_done.svg"));
|
ui.action_start_recording->setIcon(QIcon(":/svg/resources/icons/svg/record_done.svg"));
|
||||||
//ui.mainToolBar->widgetForAction(ui.action_start_recording)->setStyleSheet("QWidget{background-color:rgb(0,255,0);}");
|
//ui.mainToolBar->widgetForAction(ui.action_start_recording)->setStyleSheet("QWidget{background-color:rgb(0,255,0);}");
|
||||||
|
|
||||||
m_RecordState++;//当自动停止采集
|
m_RecordState++;//当自动停止采集
|
||||||
@ -2208,7 +2191,7 @@ void HPPA::onRecordFinishedSignal_WhenFrameNumberNotMeet()
|
|||||||
std::cout << "停止采集原因:(1)帧数没有采集够时,马达到达最大位置;(2)手动停止采集。" << std::endl;
|
std::cout << "停止采集原因:(1)帧数没有采集够时,马达到达最大位置;(2)手动停止采集。" << std::endl;
|
||||||
|
|
||||||
ui.action_start_recording->setText(QString::fromLocal8Bit("采集"));
|
ui.action_start_recording->setText(QString::fromLocal8Bit("采集"));
|
||||||
ui.action_start_recording->setIcon(QIcon(".//icon//all//record_done.svg"));
|
ui.action_start_recording->setIcon(QIcon(":/svg/resources/icons/svg/record_done.svg"));
|
||||||
//ui.mainToolBar->widgetForAction(ui.action_start_recording)->setStyleSheet("QWidget{background-color:rgb(0,255,0);}");
|
//ui.mainToolBar->widgetForAction(ui.action_start_recording)->setStyleSheet("QWidget{background-color:rgb(0,255,0);}");
|
||||||
|
|
||||||
m_RecordState++;
|
m_RecordState++;
|
||||||
@ -2217,7 +2200,7 @@ void HPPA::onRecordFinishedSignal_WhenFrameNumberNotMeet()
|
|||||||
void HPPA::onsequenceComplete()
|
void HPPA::onsequenceComplete()
|
||||||
{
|
{
|
||||||
ui.action_start_recording->setText(QString::fromLocal8Bit("采集"));
|
ui.action_start_recording->setText(QString::fromLocal8Bit("采集"));
|
||||||
ui.action_start_recording->setIcon(QIcon(".//icon//all//record_done.svg"));
|
ui.action_start_recording->setIcon(QIcon(":/svg/resources/icons/svg/record_done.svg"));
|
||||||
//ui.mainToolBar->widgetForAction(ui.action_start_recording)->setStyleSheet("QWidget{background-color:rgb(0,255,0);}");
|
//ui.mainToolBar->widgetForAction(ui.action_start_recording)->setStyleSheet("QWidget{background-color:rgb(0,255,0);}");
|
||||||
|
|
||||||
m_RecordState++;
|
m_RecordState++;
|
||||||
|
|||||||
@ -71,6 +71,8 @@
|
|||||||
|
|
||||||
#include "HyperImagerControl.h"
|
#include "HyperImagerControl.h"
|
||||||
|
|
||||||
|
#include "recordFrameCounter.h"
|
||||||
|
|
||||||
#define PI 3.1415926
|
#define PI 3.1415926
|
||||||
|
|
||||||
QT_CHARTS_USE_NAMESPACE//QChartView 使用 需要加宏, 否则无法使用
|
QT_CHARTS_USE_NAMESPACE//QChartView 使用 需要加宏, 否则无法使用
|
||||||
@ -159,7 +161,7 @@ class WidgetWithBackgroundPicture : public QWidget
|
|||||||
public:
|
public:
|
||||||
explicit WidgetWithBackgroundPicture(QWidget* parent = nullptr)
|
explicit WidgetWithBackgroundPicture(QWidget* parent = nullptr)
|
||||||
: QWidget(parent),
|
: QWidget(parent),
|
||||||
m_pixmap(".//icon//titile_bar_bgp.png") // 使用资源或绝对路径
|
m_pixmap(":/png/resources/icons/png/titile_bar_bgp.png") // 使用资源或绝对路径
|
||||||
{
|
{
|
||||||
// 可选:设置初始大小
|
// 可选:设置初始大小
|
||||||
resize(800, 600);
|
resize(800, 600);
|
||||||
@ -292,6 +294,8 @@ private:
|
|||||||
|
|
||||||
QWidget* m_focusTab=nullptr;
|
QWidget* m_focusTab=nullptr;
|
||||||
|
|
||||||
|
recordFrameCounter* m_recordFrameCounter = nullptr;
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
void onPlotHyperspectralImageRgbImage(int fileNumber, int frameNumber, QString filePath);
|
void onPlotHyperspectralImageRgbImage(int fileNumber, int frameNumber, QString filePath);
|
||||||
void PlotSpectral(int state);
|
void PlotSpectral(int state);
|
||||||
|
|||||||
BIN
HPPA/HPPA.ico
BIN
HPPA/HPPA.ico
Binary file not shown.
|
Before Width: | Height: | Size: 66 KiB |
@ -1,5 +1,53 @@
|
|||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/HPPA">
|
<qresource prefix="/svg">
|
||||||
<file>HPPA.ico</file>
|
<file>resources/icons/svg/arrow_down.svg</file>
|
||||||
|
<file>resources/icons/svg/arrow_up.svg</file>
|
||||||
|
<file>resources/icons/svg/close.svg</file>
|
||||||
|
<file>resources/icons/svg/connect_imager.svg</file>
|
||||||
|
<file>resources/icons/svg/connect_imager_done.svg</file>
|
||||||
|
<file>resources/icons/svg/connect_imager_ing.svg</file>
|
||||||
|
<file>resources/icons/svg/dark.svg</file>
|
||||||
|
<file>resources/icons/svg/dark_done.svg</file>
|
||||||
|
<file>resources/icons/svg/dark_ing.svg</file>
|
||||||
|
<file>resources/icons/svg/exposure.svg</file>
|
||||||
|
<file>resources/icons/svg/exposure_done.svg</file>
|
||||||
|
<file>resources/icons/svg/exposure_ing.svg</file>
|
||||||
|
<file>resources/icons/svg/focus.svg</file>
|
||||||
|
<file>resources/icons/svg/focus_done.svg</file>
|
||||||
|
<file>resources/icons/svg/focus_ing.svg</file>
|
||||||
|
<file>resources/icons/svg/openDirectory.svg</file>
|
||||||
|
<file>resources/icons/svg/openDirectory_done.svg</file>
|
||||||
|
<file>resources/icons/svg/pan.svg</file>
|
||||||
|
<file>resources/icons/svg/pan_done.svg</file>
|
||||||
|
<file>resources/icons/svg/record.svg</file>
|
||||||
|
<file>resources/icons/svg/record_done.svg</file>
|
||||||
|
<file>resources/icons/svg/record_ing.svg</file>
|
||||||
|
<file>resources/icons/svg/reference.svg</file>
|
||||||
|
<file>resources/icons/svg/reference_done.svg</file>
|
||||||
|
<file>resources/icons/svg/reference_ing.svg</file>
|
||||||
|
<file>resources/icons/svg/software_icon.svg</file>
|
||||||
|
<file>resources/icons/svg/software_icon_small.svg</file>
|
||||||
|
<file>resources/icons/svg/spectral.svg</file>
|
||||||
|
<file>resources/icons/svg/spectral_done.svg</file>
|
||||||
|
<file>resources/icons/svg/tree_tri_down.svg</file>
|
||||||
|
<file>resources/icons/svg/tree_tri_right.svg</file>
|
||||||
|
<file>resources/icons/svg/mIconRaster.svg</file>
|
||||||
|
</qresource>
|
||||||
|
<qresource prefix="/png">
|
||||||
|
<file>resources/icons/png/Spectral_Insight_27.png</file>
|
||||||
|
<file>resources/icons/png/Spectral_Insight_54.png</file>
|
||||||
|
<file>resources/icons/png/Spectral_Insight_170.png</file>
|
||||||
|
<file>resources/icons/png/Spectral_Insight_340.png</file>
|
||||||
|
<file>resources/icons/png/titile_bar_bgp.png</file>
|
||||||
|
<file>resources/icons/png/titile_bar_bgp2x.png</file>
|
||||||
|
</qresource>
|
||||||
|
<qresource prefix="/imagerPicture">
|
||||||
|
<file>resources/icons/imagerPicture/corning410.png</file>
|
||||||
|
<file>resources/icons/imagerPicture/IR.png</file>
|
||||||
|
<file>resources/icons/imagerPicture/L.png</file>
|
||||||
|
<file>resources/icons/imagerPicture/XC2.png</file>
|
||||||
|
</qresource>
|
||||||
|
<qresource prefix="/ico">
|
||||||
|
<file>resources/icons/ico/Spectral_Insight_128.ico</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
BIN
HPPA/HPPA.rc
BIN
HPPA/HPPA.rc
Binary file not shown.
14
HPPA/HPPA.ui
14
HPPA/HPPA.ui
@ -14,8 +14,8 @@
|
|||||||
<string>Spectral Insight</string>
|
<string>Spectral Insight</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowIcon">
|
<property name="windowIcon">
|
||||||
<iconset>
|
<iconset resource="HPPA.qrc">
|
||||||
<normaloff>icon/all/png/Group 356_slices/22.png</normaloff>icon/all/png/Group 356_slices/22.png</iconset>
|
<normaloff>:/ico/resources/icons/ico/Spectral_Insight_128.ico</normaloff>:/ico/resources/icons/ico/Spectral_Insight_128.ico</iconset>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true"/>
|
<string notr="true"/>
|
||||||
@ -202,10 +202,16 @@ QToolBar QToolButton:hover {
|
|||||||
</widget>
|
</widget>
|
||||||
<widget class="QStatusBar" name="statusBar">
|
<widget class="QStatusBar" name="statusBar">
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">QStatusBar {
|
<string notr="true">QStatusBar
|
||||||
|
{
|
||||||
background-color: #0D1233;
|
background-color: #0D1233;
|
||||||
|
color: white;
|
||||||
}
|
}
|
||||||
</string>
|
|
||||||
|
QStatusBar::item
|
||||||
|
{
|
||||||
|
border: none;
|
||||||
|
}</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="CustomDockWidgetBase" name="mDockWidgetSimulator">
|
<widget class="CustomDockWidgetBase" name="mDockWidgetSimulator">
|
||||||
|
|||||||
@ -36,8 +36,8 @@
|
|||||||
<QtBuildConfig>debug</QtBuildConfig>
|
<QtBuildConfig>debug</QtBuildConfig>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'" Label="QtSettings">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'" Label="QtSettings">
|
||||||
<QtInstall>5.9_msvc2017_64</QtInstall>
|
<QtInstall>5.13.2_msvc2017_64</QtInstall>
|
||||||
<QtModules>core;network;gui;widgets;serialport;websockets;charts</QtModules>
|
<QtModules>core;network;gui;svg;widgets;serialport;websockets;3dcore;3danimation;3dextras;3dinput;3dlogic;3drender;3dquick;charts</QtModules>
|
||||||
<QtBuildConfig>release</QtBuildConfig>
|
<QtBuildConfig>release</QtBuildConfig>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Target Name="QtMsBuildNotFound" BeforeTargets="CustomBuild;ClCompile" Condition="!Exists('$(QtMsBuild)\qt.targets') or !Exists('$(QtMsBuild)\qt.props')">
|
<Target Name="QtMsBuildNotFound" BeforeTargets="CustomBuild;ClCompile" Condition="!Exists('$(QtMsBuild)\qt.targets') or !Exists('$(QtMsBuild)\qt.props')">
|
||||||
@ -57,10 +57,12 @@
|
|||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||||
<IncludePath>D:\cpp_library\gdal2.2.3_vs2017\include;C:\Program Files\ResononAPI\include;D:\cpp_library\opencv3.4.11\opencv\build\include;D:\cpp_library\opencv3.4.11\opencv\build\include\opencv;D:\cpp_library\opencv3.4.11\opencv\build\include\opencv2;D:\cpp_project_vs2022\AutoFocus_InspireLinearMotor_DLL\AutoFocus_InspireLinearMotor_DLL\SDKs\PCOMM\Include;D:\cpp_project_vs2022\AutoFocus_InspireLinearMotor_DLL\AutoFocus_InspireLinearMotor_DLL\SDKs\PortControl;D:\cpp_project_vs2022\AutoFocus_InspireLinearMotor_DLL\AutoFocus_InspireLinearMotor_DLL;D:\cpp_project_vs2022\HPPA\HPPA;D:\cpp_library\libconfig-1.7.3\lib;D:\cpp_project_vs2022\HPPA\vincecontrol;D:\cpp_library\vincecontrol_vs2017;C:\XIMEA\API\xiAPI;D:\cpp_project_vs2022\HPPA\IrisMultiMotorController\IrisMultiMotorController;D:\cpp_library\eigen-3.4-rc1;$(IncludePath)</IncludePath>
|
<IncludePath>D:\cpp_library\gdal2.2.3_vs2017\include;C:\Program Files\ResononAPI\include;D:\cpp_library\opencv3.4.11\opencv\build\include;D:\cpp_library\opencv3.4.11\opencv\build\include\opencv;D:\cpp_library\opencv3.4.11\opencv\build\include\opencv2;D:\cpp_project_vs2022\AutoFocus_InspireLinearMotor_DLL\AutoFocus_InspireLinearMotor_DLL\SDKs\PCOMM\Include;D:\cpp_project_vs2022\AutoFocus_InspireLinearMotor_DLL\AutoFocus_InspireLinearMotor_DLL\SDKs\PortControl;D:\cpp_project_vs2022\AutoFocus_InspireLinearMotor_DLL\AutoFocus_InspireLinearMotor_DLL;D:\cpp_project_vs2022\HPPA\HPPA;D:\cpp_library\libconfig-1.7.3\lib;D:\cpp_project_vs2022\HPPA\vincecontrol;D:\cpp_library\vincecontrol_vs2017;C:\XIMEA\API\xiAPI;D:\cpp_project_vs2022\HPPA\IrisMultiMotorController\IrisMultiMotorController;D:\cpp_library\eigen-3.4-rc1;$(IncludePath)</IncludePath>
|
||||||
<LibraryPath>D:\cpp_library\opencv3.4.11\opencv\build\x64\vc15\lib;D:\cpp_library\gdal2.2.3_vs2017\lib;C:\Program Files\ResononAPI\lib64;D:\cpp_project_vs2022\AutoFocus_InspireLinearMotor_DLL\x64\Debug;D:\cpp_library\libconfig-1.7.3\build\x64;D:\cpp_project_vs2022\HPPA\x64\Debug;C:\XIMEA\API\xiAPI;D:\cpp_project_vs2022\HPPA\IrisMultiMotorController\x64\Debug;$(LibraryPath)</LibraryPath>
|
<LibraryPath>D:\cpp_library\opencv3.4.11\opencv\build\x64\vc15\lib;D:\cpp_library\gdal2.2.3_vs2017\lib;C:\Program Files\ResononAPI\lib64;D:\cpp_project_vs2022\AutoFocus_InspireLinearMotor_DLL\x64\Debug;D:\cpp_library\libconfig-1.7.3\build\x64;D:\cpp_project_vs2022\HPPA\x64\Debug;C:\XIMEA\API\xiAPI;D:\cpp_project_vs2022\HPPA\IrisMultiMotorController\x64\Debug;$(LibraryPath)</LibraryPath>
|
||||||
|
<TargetName>Spectral Insight</TargetName>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||||
<IncludePath>D:\cpp_library\gdal2.2.3_vs2017\include;C:\Program Files\ResononAPI\include;D:\cpp_library\opencv3.4.11\opencv\build\include;D:\cpp_library\opencv3.4.11\opencv\build\include\opencv;D:\cpp_library\opencv3.4.11\opencv\build\include\opencv2;D:\cpp_project_vs2022\AutoFocus_InspireLinearMotor_DLL\AutoFocus_InspireLinearMotor_DLL\SDKs\PCOMM\Include;D:\cpp_project_vs2022\AutoFocus_InspireLinearMotor_DLL\AutoFocus_InspireLinearMotor_DLL\SDKs\PortControl;D:\cpp_project_vs2022\AutoFocus_InspireLinearMotor_DLL\AutoFocus_InspireLinearMotor_DLL;D:\cpp_project_vs2022\HPPA\HPPA;D:\cpp_library\libconfig-1.7.3\lib;D:\cpp_project_vs2022\HPPA\vincecontrol;C:\XIMEA\API\xiAPI;D:\cpp_project_vs2022\HPPA\IrisMultiMotorController\IrisMultiMotorController;D:\cpp_library\eigen-3.4-rc1;$(IncludePath)</IncludePath>
|
<IncludePath>D:\cpp_library\gdal2.2.3_vs2017\include;C:\Program Files\ResononAPI\include;D:\cpp_library\opencv3.4.11\opencv\build\include;D:\cpp_library\opencv3.4.11\opencv\build\include\opencv;D:\cpp_library\opencv3.4.11\opencv\build\include\opencv2;D:\cpp_project_vs2022\AutoFocus_InspireLinearMotor_DLL\AutoFocus_InspireLinearMotor_DLL\SDKs\PCOMM\Include;D:\cpp_project_vs2022\AutoFocus_InspireLinearMotor_DLL\AutoFocus_InspireLinearMotor_DLL\SDKs\PortControl;D:\cpp_project_vs2022\AutoFocus_InspireLinearMotor_DLL\AutoFocus_InspireLinearMotor_DLL;D:\cpp_project_vs2022\HPPA\HPPA;D:\cpp_library\libconfig-1.7.3\lib;D:\cpp_project_vs2022\HPPA\vincecontrol;C:\XIMEA\API\xiAPI;D:\cpp_project_vs2022\HPPA\IrisMultiMotorController\IrisMultiMotorController;D:\cpp_library\eigen-3.4-rc1;$(IncludePath)</IncludePath>
|
||||||
<LibraryPath>D:\cpp_library\opencv3.4.11\opencv\build\x64\vc15\lib;D:\cpp_library\vincecontrol_vs2017_release;D:\cpp_library\gdal2.2.3_vs2017\lib;C:\Program Files\ResononAPI\lib64;D:\cpp_project_vs2022\AutoFocus_InspireLinearMotor_DLL\x64\Release;D:\cpp_library\libconfig-1.7.3\build\x64;D:\cpp_project_vs2022\IrisMultiMotorController\x64\Release;C:\XIMEA\API\xiAPI;$(LibraryPath)</LibraryPath>
|
<LibraryPath>D:\cpp_library\opencv3.4.11\opencv\build\x64\vc15\lib;D:\cpp_library\vincecontrol_vs2017_release;D:\cpp_library\gdal2.2.3_vs2017\lib;C:\Program Files\ResononAPI\lib64;D:\cpp_project_vs2022\AutoFocus_InspireLinearMotor_DLL\x64\Release;D:\cpp_library\libconfig-1.7.3\build\x64;D:\cpp_project_vs2022\IrisMultiMotorController\x64\Release;C:\XIMEA\API\xiAPI;$(LibraryPath)</LibraryPath>
|
||||||
|
<TargetName>Spectral Insight</TargetName>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
<Link>
|
<Link>
|
||||||
@ -138,6 +140,7 @@
|
|||||||
<ClCompile Include="RasterDataProvider.cpp" />
|
<ClCompile Include="RasterDataProvider.cpp" />
|
||||||
<ClCompile Include="RasterLayer.cpp" />
|
<ClCompile Include="RasterLayer.cpp" />
|
||||||
<ClCompile Include="RasterRenderer.cpp" />
|
<ClCompile Include="RasterRenderer.cpp" />
|
||||||
|
<ClCompile Include="recordFrameCounter.cpp" />
|
||||||
<ClCompile Include="resononImager.cpp" />
|
<ClCompile Include="resononImager.cpp" />
|
||||||
<ClCompile Include="ResononNirImager.cpp" />
|
<ClCompile Include="ResononNirImager.cpp" />
|
||||||
<ClCompile Include="RgbCameraOperation.cpp" />
|
<ClCompile Include="RgbCameraOperation.cpp" />
|
||||||
@ -220,6 +223,7 @@
|
|||||||
<QtMoc Include="MapTools.h" />
|
<QtMoc Include="MapTools.h" />
|
||||||
<ClInclude Include="RasterDataProvider.h" />
|
<ClInclude Include="RasterDataProvider.h" />
|
||||||
<ClInclude Include="RasterRenderer.h" />
|
<ClInclude Include="RasterRenderer.h" />
|
||||||
|
<QtMoc Include="recordFrameCounter.h" />
|
||||||
<ClInclude Include="utility_tc.h" />
|
<ClInclude Include="utility_tc.h" />
|
||||||
<QtMoc Include="aboutWindow.h" />
|
<QtMoc Include="aboutWindow.h" />
|
||||||
<ClInclude Include="hppaConfigFile.h" />
|
<ClInclude Include="hppaConfigFile.h" />
|
||||||
@ -245,7 +249,7 @@
|
|||||||
<ResourceCompile Include="HPPA.rc" />
|
<ResourceCompile Include="HPPA.rc" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Image Include="HPPA.ico" />
|
<Image Include="resources\icons\ico\Spectral_Insight_128.ico" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Condition="Exists('$(QtMsBuild)\qt.targets')">
|
<ImportGroup Condition="Exists('$(QtMsBuild)\qt.targets')">
|
||||||
|
|||||||
@ -196,6 +196,9 @@
|
|||||||
<ClCompile Include="HyperImagerControl.cpp">
|
<ClCompile Include="HyperImagerControl.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="recordFrameCounter.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<QtMoc Include="fileOperation.h">
|
<QtMoc Include="fileOperation.h">
|
||||||
@ -318,6 +321,9 @@
|
|||||||
<QtMoc Include="HyperImagerControl.h">
|
<QtMoc Include="HyperImagerControl.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</QtMoc>
|
</QtMoc>
|
||||||
|
<QtMoc Include="recordFrameCounter.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</QtMoc>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="imageProcessor.h">
|
<ClInclude Include="imageProcessor.h">
|
||||||
@ -407,7 +413,7 @@
|
|||||||
</ResourceCompile>
|
</ResourceCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Image Include="HPPA.ico">
|
<Image Include="resources\icons\ico\Spectral_Insight_128.ico">
|
||||||
<Filter>Resource Files</Filter>
|
<Filter>Resource Files</Filter>
|
||||||
</Image>
|
</Image>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#include "HyperImagerControl.h"
|
#include "HyperImagerControl.h"
|
||||||
|
|
||||||
HyperImagerControl::HyperImagerControl(QWidget* parent)
|
HyperImagerControl::HyperImagerControl(QWidget* parent)
|
||||||
: QDialog(parent)
|
: QDialog(parent)
|
||||||
@ -17,15 +17,60 @@ HyperImagerControl::HyperImagerControl(QWidget* parent)
|
|||||||
connect(ui.GainSlider, &QSlider::valueChanged, this, &HyperImagerControl::onGainSliderChanged);
|
connect(ui.GainSlider, &QSlider::valueChanged, this, &HyperImagerControl::onGainSliderChanged);
|
||||||
connect(ui.GainSlider, &QSlider::sliderReleased, this, &HyperImagerControl::onGainSliderReleased);
|
connect(ui.GainSlider, &QSlider::sliderReleased, this, &HyperImagerControl::onGainSliderReleased);
|
||||||
|
|
||||||
ui.framerate_spinBox->setMinimum(1);
|
|
||||||
ui.framerate_spinBox->setMaximum(250);
|
|
||||||
ui.FramerateSlider->setMinimum(1);
|
|
||||||
ui.FramerateSlider->setMaximum(250);
|
|
||||||
|
|
||||||
ui.gain_spinBox->setMinimum(0);
|
|
||||||
ui.gain_spinBox->setMaximum(12);
|
|
||||||
ui.GainSlider->setMinimum(0);
|
|
||||||
ui.GainSlider->setMaximum(12);
|
ui.GainSlider->setMaximum(12);
|
||||||
|
ui.GainSlider->setMinimum(0);
|
||||||
|
|
||||||
|
ui.gain_spinBox->setMaximum(12);
|
||||||
|
ui.gain_spinBox->setMinimum(0);
|
||||||
|
|
||||||
|
ui.widget_3->setStyleSheet(R"(
|
||||||
|
QDoubleSpinBox {
|
||||||
|
border: 1px solid #999;
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 2px 20px 2px 6px; /* 右侧留空间给按钮 */
|
||||||
|
background: #0e1c4c;
|
||||||
|
selection-background-color: #0078d7;
|
||||||
|
font-size: 12px;
|
||||||
|
color:#ACCDFF ;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDoubleSpinBox::up-button {
|
||||||
|
subcontrol-origin: border;
|
||||||
|
subcontrol-position: top right;
|
||||||
|
width: 16px;
|
||||||
|
border-left: 1px solid #ccc;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDoubleSpinBox::down-button {
|
||||||
|
subcontrol-origin: border;
|
||||||
|
subcontrol-position: bottom right;
|
||||||
|
width: 16px;
|
||||||
|
border-left: 1px solid #ccc;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDoubleSpinBox::up-arrow {
|
||||||
|
image: url(:/svg/resources/icons/svg/arrow_up.svg);
|
||||||
|
width: 10px;
|
||||||
|
height: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDoubleSpinBox::down-arrow {
|
||||||
|
image: url(:/svg/resources/icons/svg/arrow_down.svg);
|
||||||
|
width: 10px;
|
||||||
|
height: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDoubleSpinBox::up-button:hover,
|
||||||
|
QDoubleSpinBox::down-button:hover {
|
||||||
|
background: #e6f2ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDoubleSpinBox::up-button:pressed,
|
||||||
|
QDoubleSpinBox::down-button:pressed {
|
||||||
|
background: #cce4ff;
|
||||||
|
}
|
||||||
|
)");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HyperImagerControl::~HyperImagerControl()
|
HyperImagerControl::~HyperImagerControl()
|
||||||
@ -70,7 +115,7 @@ void HyperImagerControl::onFramerateSliderChanged(double framerate)
|
|||||||
|
|
||||||
void HyperImagerControl::onFramerateSliderReleased()
|
void HyperImagerControl::onFramerateSliderReleased()
|
||||||
{
|
{
|
||||||
double framerate = ui.framerate_spinBox->value();//<2F><><EFBFBD>ᴥ<EFBFBD><E1B4A5>QDoubleSpinBox::editingFinished<65>źţ<C5BA><C5A3>Ӷ<EFBFBD><D3B6><EFBFBD><EFBFBD><EFBFBD>onFramerateSpinBoxEditingFinished<65>ۺ<EFBFBD><DBBA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>շ<EFBFBD><D5B7><EFBFBD>framerateChanged<65>źš<C5BA>
|
double framerate = ui.framerate_spinBox->value();
|
||||||
emit framerateChanged(framerate);
|
emit framerateChanged(framerate);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -116,26 +161,35 @@ void HyperImagerControl::onGainSliderReleased()
|
|||||||
|
|
||||||
void HyperImagerControl::updateIntegrationTimeRange(double frameRate)
|
void HyperImagerControl::updateIntegrationTimeRange(double frameRate)
|
||||||
{
|
{
|
||||||
double maxIntegrationTime = 1.0 / frameRate * 1000.0; // <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
double maxIntegrationTime = 1.0 / frameRate * 1000.0; // 毫秒
|
||||||
|
|
||||||
ui.IntegratioinTimeSlider->blockSignals(true);
|
ui.IntegratioinTimeSlider->blockSignals(true);
|
||||||
ui.IntegratioinTimeSlider->setMaximum(maxIntegrationTime);
|
ui.IntegratioinTimeSlider->setMaximum(maxIntegrationTime);
|
||||||
|
ui.IntegratioinTimeSlider->setMinimum(1);
|
||||||
ui.IntegratioinTimeSlider->blockSignals(false);
|
ui.IntegratioinTimeSlider->blockSignals(false);
|
||||||
|
|
||||||
ui.integratioin_time_spinBox->blockSignals(true);
|
ui.integratioin_time_spinBox->blockSignals(true);
|
||||||
ui.integratioin_time_spinBox->setMaximum(maxIntegrationTime);
|
ui.integratioin_time_spinBox->setMaximum(maxIntegrationTime);
|
||||||
|
ui.integratioin_time_spinBox->setMinimum(1);
|
||||||
ui.integratioin_time_spinBox->blockSignals(false);
|
ui.integratioin_time_spinBox->blockSignals(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HyperImagerControl::updateFramerateRange(double integrationTime)
|
void HyperImagerControl::updateFramerateRange(double integrationTime)
|
||||||
{
|
{
|
||||||
double maxFramerate = 1.0 / (integrationTime / 1000.0); // <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ<EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD>)ת֡<D7AA><D6A1>
|
double maxFramerate = 1.0 / (integrationTime / 1000.0); // 积分时间(毫秒)转帧率
|
||||||
|
|
||||||
|
if(maxFramerate > m_frameRateLimit)
|
||||||
|
{
|
||||||
|
maxFramerate = m_frameRateLimit;
|
||||||
|
}
|
||||||
|
|
||||||
ui.FramerateSlider->blockSignals(true);
|
ui.FramerateSlider->blockSignals(true);
|
||||||
ui.FramerateSlider->setMaximum(maxFramerate);
|
ui.FramerateSlider->setMaximum(maxFramerate);
|
||||||
|
ui.FramerateSlider->setMinimum(1);
|
||||||
ui.FramerateSlider->blockSignals(false);
|
ui.FramerateSlider->blockSignals(false);
|
||||||
|
|
||||||
ui.framerate_spinBox->blockSignals(true);
|
ui.framerate_spinBox->blockSignals(true);
|
||||||
ui.framerate_spinBox->setMaximum(maxFramerate);
|
ui.framerate_spinBox->setMaximum(maxFramerate);
|
||||||
|
ui.framerate_spinBox->setMinimum(1);
|
||||||
ui.framerate_spinBox->blockSignals(false);
|
ui.framerate_spinBox->blockSignals(false);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
|
|
||||||
@ -41,6 +41,7 @@ private Q_SLOTS:
|
|||||||
private:
|
private:
|
||||||
void updateIntegrationTimeRange(double frameRate);
|
void updateIntegrationTimeRange(double frameRate);
|
||||||
void updateFramerateRange(double integrationTime);
|
void updateFramerateRange(double integrationTime);
|
||||||
|
double m_frameRateLimit = 150;//相机的最大帧率限制为250fps
|
||||||
|
|
||||||
Ui::HyperImagerControl ui;
|
Ui::HyperImagerControl ui;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -64,7 +64,7 @@ QVariant LayerTreeModel::data(const QModelIndex& index, int role) const
|
|||||||
else if (LayerTreeNode::isLayer(tmp))
|
else if (LayerTreeNode::isLayer(tmp))
|
||||||
{
|
{
|
||||||
QString basePath = QCoreApplication::applicationDirPath();
|
QString basePath = QCoreApplication::applicationDirPath();
|
||||||
return QIcon(basePath + "/icons/mIconRaster.svg");
|
return QIcon(":/svg/resources/icons/svg/mIconRaster.svg");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -7,6 +7,7 @@ m_Multiplier(100.0)
|
|||||||
connect(this, SIGNAL(valueChanged(int)), this, SLOT(notifyValueChanged(int)));
|
connect(this, SIGNAL(valueChanged(int)), this, SLOT(notifyValueChanged(int)));
|
||||||
|
|
||||||
setSingleStep(1);
|
setSingleStep(1);
|
||||||
|
setRange(1, 500);
|
||||||
|
|
||||||
setOrientation(Qt::Horizontal);
|
setOrientation(Qt::Horizontal);
|
||||||
setFocusPolicy(Qt::NoFocus);
|
setFocusPolicy(Qt::NoFocus);
|
||||||
|
|||||||
@ -16,10 +16,6 @@
|
|||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Dialog</string>
|
<string>Dialog</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowIcon">
|
|
||||||
<iconset>
|
|
||||||
<normaloff>C:/Users/73505/.designer/backup/HPPA.ico</normaloff>C:/Users/73505/.designer/backup/HPPA.ico</iconset>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
@ -96,7 +92,7 @@
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="pixmap">
|
<property name="pixmap">
|
||||||
<pixmap>icon/all/png/Group 356_slices/22.png</pixmap>
|
<pixmap resource="HPPA.qrc">:/png/resources/icons/png/Spectral_Insight_27.png</pixmap>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -173,8 +169,8 @@ QPushButton:pressed
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset>
|
<iconset resource="HPPA.qrc">
|
||||||
<normaloff>icon/all/close.svg</normaloff>icon/all/close.svg</iconset>
|
<normaloff>:/svg/resources/icons/svg/close.svg</normaloff>:/svg/resources/icons/svg/close.svg</iconset>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -196,7 +192,7 @@ QPushButton:pressed
|
|||||||
<string/>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="pixmap">
|
<property name="pixmap">
|
||||||
<pixmap>icon/all/png/Group 356_slices/Group 356@2x.png</pixmap>
|
<pixmap resource="HPPA.qrc">:/png/resources/icons/png/Spectral_Insight_170.png</pixmap>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="widget_2" native="true">
|
<widget class="QWidget" name="widget_2" native="true">
|
||||||
@ -292,7 +288,7 @@ QPushButton:pressed
|
|||||||
}</string>
|
}</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>版本:3.0</string>
|
<string>版本:3.0.0</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -305,6 +301,8 @@ QPushButton:pressed
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources/>
|
<resources>
|
||||||
|
<include location="HPPA.qrc"/>
|
||||||
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
|||||||
@ -10,7 +10,7 @@ focusWindow::focusWindow(QWidget *parent, ImagerOperationBase* imager)
|
|||||||
setWindowFlags(Qt::FramelessWindowHint);
|
setWindowFlags(Qt::FramelessWindowHint);
|
||||||
ui.titlebarWidget->installEventFilter(this);
|
ui.titlebarWidget->installEventFilter(this);
|
||||||
|
|
||||||
QSvgRenderer svgRenderer(QString(".//icon//all//focus.svg"));
|
QSvgRenderer svgRenderer(QString(":/svg/resources/icons/svg/focus.svg"));
|
||||||
QPixmap pixmap(24, 24);
|
QPixmap pixmap(24, 24);
|
||||||
pixmap.fill(Qt::transparent); // 背景透明
|
pixmap.fill(Qt::transparent); // 背景透明
|
||||||
QPainter painter(&pixmap);
|
QPainter painter(&pixmap);
|
||||||
|
|||||||
@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>462</width>
|
<width>437</width>
|
||||||
<height>385</height>
|
<height>372</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -117,7 +117,7 @@ QSlider::handle:horizontal:pressed {
|
|||||||
background: #1f4fff;
|
background: #1f4fff;
|
||||||
}</string>
|
}</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QGridLayout" name="gridLayout_2" rowstretch="3,2">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="AspectRatioLabel" name="imagerPictureLabel">
|
<widget class="AspectRatioLabel" name="imagerPictureLabel">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -131,61 +131,16 @@ QSlider::handle:horizontal:pressed {
|
|||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QWidget" name="widget_3" native="true">
|
<widget class="QWidget" name="widget_3" native="true">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<property name="leftMargin">
|
<property name="horizontalSpacing">
|
||||||
<number>0</number>
|
<number>16</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing">
|
|
||||||
<number>10</number>
|
|
||||||
</property>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">color: rgb(255, 255, 255);</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>帧率</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QDoubleSpinBox" name="framerate_spinBox">
|
<widget class="QDoubleSpinBox" name="framerate_spinBox">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
@ -198,7 +153,7 @@ QSlider::handle:horizontal:pressed {
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="0" column="2">
|
||||||
<widget class="QDoubleSlider" name="FramerateSlider">
|
<widget class="QDoubleSlider" name="FramerateSlider">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
@ -211,63 +166,6 @@ QSlider::handle:horizontal:pressed {
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="label_2">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">color: rgb(255, 255, 255);</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>积分时间</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
|
||||||
<item>
|
|
||||||
<widget class="QDoubleSpinBox" name="integratioin_time_spinBox">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="decimals">
|
|
||||||
<number>2</number>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QDoubleSlider" name="IntegratioinTimeSlider">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="label_3">
|
<widget class="QLabel" name="label_3">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -299,9 +197,32 @@ QSlider::handle:horizontal:pressed {
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">color: rgb(255, 255, 255);</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>积分时间</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="2" column="1">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
|
||||||
<item>
|
|
||||||
<widget class="QDoubleSpinBox" name="gain_spinBox">
|
<widget class="QDoubleSpinBox" name="gain_spinBox">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
@ -314,7 +235,7 @@ QSlider::handle:horizontal:pressed {
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="2" column="2">
|
||||||
<widget class="QSlider" name="GainSlider">
|
<widget class="QSlider" name="GainSlider">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
@ -327,7 +248,76 @@ QSlider::handle:horizontal:pressed {
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
<item row="1" column="1">
|
||||||
|
<widget class="QDoubleSpinBox" name="integratioin_time_spinBox">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="decimals">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="2">
|
||||||
|
<widget class="QDoubleSlider" name="IntegratioinTimeSlider">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">color: rgb(255, 255, 255);</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>帧率</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="3">
|
||||||
|
<widget class="QLabel" name="label_4">
|
||||||
|
<property name="text">
|
||||||
|
<string>hz</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="3">
|
||||||
|
<widget class="QLabel" name="label_5">
|
||||||
|
<property name="text">
|
||||||
|
<string>ms</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
|||||||
@ -64,13 +64,13 @@ ImageControl::ImageControl(QWidget* parent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
QDoubleSpinBox::up-arrow {
|
QDoubleSpinBox::up-arrow {
|
||||||
image: url(D:/cpp_project_vs2022/HPPA/HPPA/icon/all/arrow_up.svg);
|
image: url(:/svg/resources/icons/svg/arrow_up.svg);
|
||||||
width: 10px;
|
width: 10px;
|
||||||
height: 10px;
|
height: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
QDoubleSpinBox::down-arrow {
|
QDoubleSpinBox::down-arrow {
|
||||||
image: url(D:/cpp_project_vs2022/HPPA/HPPA/icon/all/arrow_down.svg);
|
image: url(:/svg/resources/icons/svg/arrow_down.svg);
|
||||||
width: 10px;
|
width: 10px;
|
||||||
height: 10px;
|
height: 10px;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -132,6 +132,9 @@ QSlider::handle:horizontal:pressed {
|
|||||||
<string>调整</string>
|
<string>调整</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<property name="horizontalSpacing">
|
||||||
|
<number>16</number>
|
||||||
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QLabel" name="labelRed">
|
<widget class="QLabel" name="labelRed">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
|||||||
57
HPPA/recordFrameCounter.cpp
Normal file
57
HPPA/recordFrameCounter.cpp
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
#include "stdafx.h"
|
||||||
|
#include "recordFrameCounter.h"
|
||||||
|
|
||||||
|
recordFrameCounter::recordFrameCounter(QWidget* parent)
|
||||||
|
: QWidget(parent)
|
||||||
|
{
|
||||||
|
m_stackedWidget = new QStackedWidget();
|
||||||
|
m_stackedWidget->setContentsMargins(0, 0, 0, 0);
|
||||||
|
|
||||||
|
QHBoxLayout* layout = new QHBoxLayout(this);
|
||||||
|
layout->setContentsMargins(0, 0, 0, 0);
|
||||||
|
|
||||||
|
QLabel* titleLabel = new QLabel(QString::fromLocal8Bit("帧数: "));
|
||||||
|
titleLabel->setStyleSheet("color: white;");
|
||||||
|
layout->addWidget(titleLabel);
|
||||||
|
layout->addWidget(m_stackedWidget);
|
||||||
|
}
|
||||||
|
|
||||||
|
void recordFrameCounter::addCounter(QWidget* tabWidget)
|
||||||
|
{
|
||||||
|
QLabel* label = new QLabel("0");
|
||||||
|
label->setStyleSheet("color: white;");
|
||||||
|
label->setAlignment(Qt::AlignVCenter | Qt::AlignLeft);
|
||||||
|
m_labelMap.insert(tabWidget, label);
|
||||||
|
m_stackedWidget->addWidget(label);
|
||||||
|
m_stackedWidget->setCurrentWidget(label);
|
||||||
|
}
|
||||||
|
|
||||||
|
void recordFrameCounter::removeCounter(QWidget* tabWidget)
|
||||||
|
{
|
||||||
|
auto it = m_labelMap.find(tabWidget);
|
||||||
|
if (it != m_labelMap.end())
|
||||||
|
{
|
||||||
|
QLabel* label = it.value();
|
||||||
|
m_stackedWidget->removeWidget(label);
|
||||||
|
delete label;
|
||||||
|
m_labelMap.erase(it);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void recordFrameCounter::switchTo(QWidget* tabWidget)
|
||||||
|
{
|
||||||
|
auto it = m_labelMap.find(tabWidget);
|
||||||
|
if (it != m_labelMap.end())
|
||||||
|
{
|
||||||
|
m_stackedWidget->setCurrentWidget(it.value());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void recordFrameCounter::updateFrameCount(QWidget* tabWidget, int frameCount)
|
||||||
|
{
|
||||||
|
auto it = m_labelMap.find(tabWidget);
|
||||||
|
if (it != m_labelMap.end())
|
||||||
|
{
|
||||||
|
it.value()->setText(QString::number(frameCount));
|
||||||
|
}
|
||||||
|
}
|
||||||
24
HPPA/recordFrameCounter.h
Normal file
24
HPPA/recordFrameCounter.h
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
#include <QStackedWidget>
|
||||||
|
#include <QLabel>
|
||||||
|
#include <QHBoxLayout>
|
||||||
|
#include <QMap>
|
||||||
|
|
||||||
|
class recordFrameCounter : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit recordFrameCounter(QWidget* parent = nullptr);
|
||||||
|
|
||||||
|
void addCounter(QWidget* tabWidget);
|
||||||
|
void removeCounter(QWidget* tabWidget);
|
||||||
|
void switchTo(QWidget* tabWidget);
|
||||||
|
void updateFrameCount(QWidget* tabWidget, int frameCount);
|
||||||
|
|
||||||
|
private:
|
||||||
|
QStackedWidget* m_stackedWidget = nullptr;
|
||||||
|
QMap<QWidget*, QLabel*> m_labelMap;
|
||||||
|
};
|
||||||
|
|
||||||
@ -2,13 +2,13 @@
|
|||||||
// Microsoft Visual C++ <20><><EFBFBD>ɵİ<C9B5><C4B0><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
|
// Microsoft Visual C++ <20><><EFBFBD>ɵİ<C9B5><C4B0><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
|
||||||
// <20><> HPPA.rc ʹ<><CAB9>
|
// <20><> HPPA.rc ʹ<><CAB9>
|
||||||
//
|
//
|
||||||
#define IDI_ICON1 101
|
#define IDI_ICON1 106
|
||||||
|
|
||||||
// Next default values for new objects
|
// Next default values for new objects
|
||||||
//
|
//
|
||||||
#ifdef APSTUDIO_INVOKED
|
#ifdef APSTUDIO_INVOKED
|
||||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||||
#define _APS_NEXT_RESOURCE_VALUE 102
|
#define _APS_NEXT_RESOURCE_VALUE 107
|
||||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||||
#define _APS_NEXT_CONTROL_VALUE 1001
|
#define _APS_NEXT_CONTROL_VALUE 1001
|
||||||
#define _APS_NEXT_SYMED_VALUE 101
|
#define _APS_NEXT_SYMED_VALUE 101
|
||||||
|
|||||||
Reference in New Issue
Block a user