Compare commits
8 Commits
master
...
36ad438608
| Author | SHA1 | Date | |
|---|---|---|---|
| 36ad438608 | |||
| bb1a01f402 | |||
| 797ff77f5f | |||
| 83ef26a1e2 | |||
| e7a73430d0 | |||
| fd5571712a | |||
| e14c5da80a | |||
| c2a3c28cdd |
1
.gitignore
vendored
1
.gitignore
vendored
@ -5,6 +5,7 @@ gdal202.dll
|
|||||||
*.rej
|
*.rej
|
||||||
HPPA类图.drawio
|
HPPA类图.drawio
|
||||||
HPPA - 副本.ui
|
HPPA - 副本.ui
|
||||||
|
icon
|
||||||
|
|
||||||
## 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.
|
||||||
|
|||||||
238
HPPA/Carousel.cpp
Normal file
238
HPPA/Carousel.cpp
Normal file
@ -0,0 +1,238 @@
|
|||||||
|
#include "Carousel.h"
|
||||||
|
#include <QContextMenuEvent>
|
||||||
|
#include <QDebug>
|
||||||
|
|
||||||
|
MyCarousel::MyCarousel(QWidget* parent)
|
||||||
|
: QWidget(parent),
|
||||||
|
m_stackedWidget(new QStackedWidget(this)),
|
||||||
|
m_bottomButtonOverlay(nullptr),
|
||||||
|
m_bottomButtonLayout(nullptr),
|
||||||
|
m_bottomButtonGroup(nullptr),
|
||||||
|
m_currentIndex(0),
|
||||||
|
m_isPlaying(false),
|
||||||
|
m_isLocked(false),
|
||||||
|
m_lockedIndex(-1),
|
||||||
|
m_playInterval(1000),
|
||||||
|
m_intervalButtonSize(40)
|
||||||
|
{
|
||||||
|
QVBoxLayout* layout = new QVBoxLayout(this);
|
||||||
|
layout->addWidget(m_stackedWidget);
|
||||||
|
|
||||||
|
m_autoPlayerTimer = new QTimer(this);
|
||||||
|
connect(m_autoPlayerTimer, &QTimer::timeout,
|
||||||
|
this, &MyCarousel::slideRight);
|
||||||
|
|
||||||
|
m_nomalQSS= R"(
|
||||||
|
QPushButton {
|
||||||
|
background-color: white;
|
||||||
|
border-radius: 5px;
|
||||||
|
border: 1px solid white;
|
||||||
|
}
|
||||||
|
QPushButton:hover {
|
||||||
|
background-color: yellow;
|
||||||
|
}
|
||||||
|
QPushButton:checked {
|
||||||
|
background-color: blue;
|
||||||
|
border-radius: 5px;
|
||||||
|
border: 1px solid blue;
|
||||||
|
}
|
||||||
|
)";
|
||||||
|
|
||||||
|
m_lockedQSS = R"(
|
||||||
|
QPushButton {
|
||||||
|
background-color: red;
|
||||||
|
border-radius: 5px;
|
||||||
|
border: 1px solid red;
|
||||||
|
}
|
||||||
|
QPushButton:hover {
|
||||||
|
background-color: yellow;
|
||||||
|
}
|
||||||
|
)";
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyCarousel::addWidget(QWidget* w)
|
||||||
|
{
|
||||||
|
m_widgets.append(w);
|
||||||
|
m_stackedWidget->addWidget(w);
|
||||||
|
updateStackedWidgetVisibility();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyCarousel::play()
|
||||||
|
{
|
||||||
|
if (m_widgets.isEmpty())
|
||||||
|
return;
|
||||||
|
|
||||||
|
m_isPlaying = true;
|
||||||
|
|
||||||
|
// 创建底部按钮
|
||||||
|
m_bottomButtonLayout = new QHBoxLayout();
|
||||||
|
m_bottomButtonGroup = new QButtonGroup(this);
|
||||||
|
m_bottomButtons.clear();
|
||||||
|
|
||||||
|
for (int i = 0; i < m_widgets.size(); ++i) {
|
||||||
|
QPushButton* btn = new QPushButton(this);
|
||||||
|
btn->setCheckable(true);
|
||||||
|
btn->setFixedSize(m_intervalButtonSize, 3);
|
||||||
|
btn->setStyleSheet(m_nomalQSS);
|
||||||
|
btn->setFixedHeight(10);
|
||||||
|
btn->setFixedWidth(10);
|
||||||
|
|
||||||
|
m_bottomButtonLayout->addWidget(btn);
|
||||||
|
m_bottomButtonGroup->addButton(btn, i);
|
||||||
|
m_bottomButtons.append(btn);
|
||||||
|
|
||||||
|
connect(btn, &QPushButton::clicked, this, [this, i]() {
|
||||||
|
onButtonClicked(i);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
m_bottomButtonOverlay = new QWidget(this);
|
||||||
|
m_bottomButtonOverlay->setLayout(m_bottomButtonLayout);
|
||||||
|
m_bottomButtonOverlay->setAttribute(Qt::WA_TranslucentBackground);
|
||||||
|
m_bottomButtonOverlay->show();
|
||||||
|
|
||||||
|
m_autoPlayerTimer->setInterval(m_playInterval);
|
||||||
|
m_autoPlayerTimer->start();
|
||||||
|
|
||||||
|
updateStackedWidgetVisibility();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyCarousel::contextMenuEvent(QContextMenuEvent* event)
|
||||||
|
{
|
||||||
|
showContextMenu(event->globalPos());
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyCarousel::showContextMenu(const QPoint& pos)
|
||||||
|
{
|
||||||
|
QMenu menu(this);
|
||||||
|
|
||||||
|
QAction* startAct = menu.addAction(QString::fromLocal8Bit("开始轮播"));
|
||||||
|
QAction* stopAct = menu.addAction(QString::fromLocal8Bit("停止轮播"));
|
||||||
|
|
||||||
|
if (!m_isLocked)
|
||||||
|
startAct->setEnabled(false);
|
||||||
|
|
||||||
|
if (m_isLocked)
|
||||||
|
stopAct->setEnabled(false);
|
||||||
|
|
||||||
|
QAction* act = menu.exec(pos);
|
||||||
|
|
||||||
|
if (act == startAct)
|
||||||
|
startAutoPlay();
|
||||||
|
else if (act == stopAct)
|
||||||
|
stopAutoPlay();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyCarousel::startAutoPlay()
|
||||||
|
{
|
||||||
|
updateButtonState(m_currentIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyCarousel::stopAutoPlay()
|
||||||
|
{
|
||||||
|
updateButtonState(m_currentIndex);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyCarousel::onButtonClicked(int index)
|
||||||
|
{
|
||||||
|
updateButtonState(index);
|
||||||
|
gotoWidget(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyCarousel::updateButtonState(int index)
|
||||||
|
{
|
||||||
|
if (m_isLocked)
|
||||||
|
{
|
||||||
|
if (index == m_lockedIndex) {
|
||||||
|
// 解锁
|
||||||
|
m_isLocked = false;
|
||||||
|
m_lockedIndex = -1;
|
||||||
|
|
||||||
|
if (m_isPlaying)
|
||||||
|
m_autoPlayerTimer->start();
|
||||||
|
|
||||||
|
restoreButtonStyle(index);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// 切换锁定
|
||||||
|
restoreButtonStyle(m_lockedIndex);
|
||||||
|
setButtonLocked(index);
|
||||||
|
m_lockedIndex = index;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// 初次锁定
|
||||||
|
m_isLocked = true;
|
||||||
|
m_lockedIndex = index;
|
||||||
|
m_autoPlayerTimer->stop();
|
||||||
|
setButtonLocked(index);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyCarousel::setButtonLocked(int index)
|
||||||
|
{
|
||||||
|
QPushButton* btn = m_bottomButtons[index];
|
||||||
|
btn->setText("");
|
||||||
|
btn->setStyleSheet(m_lockedQSS);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyCarousel::restoreButtonStyle(int index)
|
||||||
|
{
|
||||||
|
if (index < 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
QPushButton* btn = m_bottomButtons[index];
|
||||||
|
btn->setText("");
|
||||||
|
btn->setStyleSheet(m_nomalQSS);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyCarousel::slideLeft()
|
||||||
|
{
|
||||||
|
if (m_widgets.isEmpty() || m_isLocked || !m_isPlaying)
|
||||||
|
return;
|
||||||
|
|
||||||
|
m_currentIndex = (m_currentIndex - 1 + m_widgets.size()) % m_widgets.size();
|
||||||
|
updateStackedWidgetVisibility();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyCarousel::slideRight()
|
||||||
|
{
|
||||||
|
if (m_widgets.isEmpty() || m_isLocked || !m_isPlaying)
|
||||||
|
return;
|
||||||
|
|
||||||
|
m_currentIndex = (m_currentIndex + 1) % m_widgets.size();
|
||||||
|
updateStackedWidgetVisibility();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyCarousel::gotoWidget(int index)
|
||||||
|
{
|
||||||
|
m_currentIndex = index;
|
||||||
|
updateStackedWidgetVisibility();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyCarousel::updateStackedWidgetVisibility()
|
||||||
|
{
|
||||||
|
if (m_widgets.isEmpty())
|
||||||
|
return;
|
||||||
|
|
||||||
|
m_stackedWidget->setCurrentIndex(m_currentIndex);
|
||||||
|
|
||||||
|
if (!m_isLocked) {
|
||||||
|
for (int i = 0; i < m_bottomButtons.size(); ++i)
|
||||||
|
m_bottomButtons[i]->setChecked(i == m_currentIndex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyCarousel::resizeEvent(QResizeEvent*)
|
||||||
|
{
|
||||||
|
if (!m_bottomButtonOverlay)
|
||||||
|
return;
|
||||||
|
|
||||||
|
int count = m_widgets.size();
|
||||||
|
int totalWidth = m_intervalButtonSize * count + 10 * (count - 1);
|
||||||
|
|
||||||
|
int x = (width() - totalWidth) / 2;
|
||||||
|
int y = height() - m_intervalButtonSize;
|
||||||
|
|
||||||
|
m_bottomButtonOverlay->setGeometry(x, y, totalWidth, m_intervalButtonSize);
|
||||||
|
}
|
||||||
66
HPPA/Carousel.h
Normal file
66
HPPA/Carousel.h
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
#include <QPushButton>
|
||||||
|
#include <QStackedWidget>
|
||||||
|
#include <QVBoxLayout>
|
||||||
|
#include <QHBoxLayout>
|
||||||
|
#include <QButtonGroup>
|
||||||
|
#include <QTimer>
|
||||||
|
#include <QMenu>
|
||||||
|
|
||||||
|
class MyCarousel : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit MyCarousel(QWidget* parent = nullptr);
|
||||||
|
|
||||||
|
void addWidget(QWidget* w);
|
||||||
|
void play();
|
||||||
|
void gotoWidget(int index);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void contextMenuEvent(QContextMenuEvent* event) override;
|
||||||
|
void resizeEvent(QResizeEvent* event) override;
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void slideLeft();
|
||||||
|
void slideRight();
|
||||||
|
void onButtonClicked(int index);
|
||||||
|
|
||||||
|
private:
|
||||||
|
// UI
|
||||||
|
QStackedWidget* m_stackedWidget;
|
||||||
|
QWidget* m_bottomButtonOverlay;
|
||||||
|
QHBoxLayout* m_bottomButtonLayout;
|
||||||
|
QButtonGroup* m_bottomButtonGroup;
|
||||||
|
|
||||||
|
QVector<QWidget*> m_widgets;
|
||||||
|
QVector<QPushButton*> m_bottomButtons;
|
||||||
|
QString m_nomalQSS;
|
||||||
|
QString m_lockedQSS;
|
||||||
|
|
||||||
|
// ״ֵ̬
|
||||||
|
int m_currentIndex;
|
||||||
|
bool m_isPlaying;
|
||||||
|
bool m_isLocked;
|
||||||
|
int m_lockedIndex;
|
||||||
|
|
||||||
|
// <20><><EFBFBD><EFBFBD>
|
||||||
|
int m_playInterval;
|
||||||
|
int m_intervalButtonSize;
|
||||||
|
|
||||||
|
QTimer* m_autoPlayerTimer;
|
||||||
|
|
||||||
|
private:
|
||||||
|
void updateStackedWidgetVisibility();
|
||||||
|
void updateButtonState(int index);
|
||||||
|
|
||||||
|
void setButtonLocked(int index);
|
||||||
|
void restoreButtonStyle(int index);
|
||||||
|
|
||||||
|
void showContextMenu(const QPoint& pos);
|
||||||
|
|
||||||
|
void startAutoPlay();
|
||||||
|
void stopAutoPlay();
|
||||||
|
};
|
||||||
204
HPPA/CustomDockWidgetBase.cpp
Normal file
204
HPPA/CustomDockWidgetBase.cpp
Normal file
@ -0,0 +1,204 @@
|
|||||||
|
#include "CustomDockWidgetBase.h"
|
||||||
|
|
||||||
|
CustomDockWidgetBase::CustomDockWidgetBase(QMainWindow* parent)
|
||||||
|
: QDockWidget(parent),
|
||||||
|
m_mainWindow(parent),
|
||||||
|
m_isMaximized(false)
|
||||||
|
{
|
||||||
|
initialize();
|
||||||
|
}
|
||||||
|
|
||||||
|
CustomDockWidgetBase::CustomDockWidgetBase(QString title, QMainWindow* parent)
|
||||||
|
: QDockWidget(title, parent),
|
||||||
|
m_mainWindow(parent),
|
||||||
|
m_isMaximized(false)
|
||||||
|
{
|
||||||
|
initialize();
|
||||||
|
setTile(title);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CustomDockWidgetBase::initialize()
|
||||||
|
{
|
||||||
|
QWidget* titleBar_Background = new QWidget(this);
|
||||||
|
titleBar_Background->setObjectName("titleBar_Background");
|
||||||
|
QGridLayout* layout_titleBar_Background = new QGridLayout(titleBar_Background);
|
||||||
|
layout_titleBar_Background->setContentsMargins(0, 0, 0, 0);
|
||||||
|
titleBar_Background->setStyleSheet(R"(
|
||||||
|
QWidget #titleBar_Background{
|
||||||
|
background: #040125;
|
||||||
|
}
|
||||||
|
)");
|
||||||
|
|
||||||
|
QWidget* titleBar = new QWidget(titleBar_Background);
|
||||||
|
titleBar->setObjectName("titleBar");
|
||||||
|
QHBoxLayout* layout = new QHBoxLayout(titleBar);
|
||||||
|
titleBar->setFixedHeight(30);
|
||||||
|
|
||||||
|
title_label = new QLabel(titleBar);
|
||||||
|
|
||||||
|
layout->setContentsMargins(10, 0, 10, 0);
|
||||||
|
layout->addWidget(title_label);
|
||||||
|
layout->addStretch();
|
||||||
|
|
||||||
|
m_maxButton = new QToolButton(titleBar);
|
||||||
|
m_maxButton->setIcon(style()->standardIcon(QStyle::SP_TitleBarMaxButton));
|
||||||
|
|
||||||
|
layout->addWidget(m_maxButton);
|
||||||
|
|
||||||
|
titleBar->setStyleSheet(R"(
|
||||||
|
QWidget #titleBar{
|
||||||
|
background: #0E1C4C;
|
||||||
|
/*border: 4px solid #2c586b;*/
|
||||||
|
/*padding-top: 10px;
|
||||||
|
padding-bottom: 10px;*/
|
||||||
|
|
||||||
|
border-top: 1px solid #2c586b;
|
||||||
|
border-left: 1px solid #2c586b;
|
||||||
|
border-right: 1px solid #2c586b;
|
||||||
|
border-bottom: none; /* ȡ<><C8A1><EFBFBD>ײ<EFBFBD><D7B2>߿<EFBFBD> */
|
||||||
|
|
||||||
|
border-top-left-radius: 5px;
|
||||||
|
border-top-right-radius: 5px;
|
||||||
|
}
|
||||||
|
)");
|
||||||
|
title_label->setStyleSheet("color: white;");
|
||||||
|
m_maxButton->setStyleSheet("");
|
||||||
|
|
||||||
|
layout_titleBar_Background->addWidget(titleBar);
|
||||||
|
|
||||||
|
setTitleBarWidget(titleBar_Background);
|
||||||
|
setFeatures(QDockWidget::DockWidgetClosable);
|
||||||
|
connect(m_maxButton, &QToolButton::clicked, this, &CustomDockWidgetBase::toggleMaximize);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CustomDockWidgetBase::setTile(QString title)
|
||||||
|
{
|
||||||
|
title_label->setText(title);
|
||||||
|
}
|
||||||
|
|
||||||
|
void CustomDockWidgetBase::hideMaxButton()
|
||||||
|
{
|
||||||
|
m_maxButton->hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CustomDockWidgetBase::toggleMaximize()
|
||||||
|
{
|
||||||
|
if (!m_isMaximized)
|
||||||
|
{
|
||||||
|
m_hiddenDocks.clear();
|
||||||
|
m_originalSizes.clear();
|
||||||
|
|
||||||
|
m_savedState = m_mainWindow->saveState();
|
||||||
|
|
||||||
|
const QList<QDockWidget*> docks = m_mainWindow->findChildren<QDockWidget*>();
|
||||||
|
for (QDockWidget* dock : docks)
|
||||||
|
{
|
||||||
|
m_originalSizes[dock] = dock->size();
|
||||||
|
if (dock != this && dock->isVisible())
|
||||||
|
{
|
||||||
|
dock->hide();
|
||||||
|
m_hiddenDocks.append(dock);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
m_isMaximized = true;
|
||||||
|
emit maximizeStateChanged(m_isMaximized);
|
||||||
|
m_maxButton->setIcon(style()->standardIcon(QStyle::SP_TitleBarNormalButton));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for (QDockWidget* dock : m_hiddenDocks)
|
||||||
|
{
|
||||||
|
dock->show();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!m_savedState.isEmpty())
|
||||||
|
{
|
||||||
|
m_mainWindow->restoreState(m_savedState);
|
||||||
|
m_savedState.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
QList<QDockWidget*> docks;
|
||||||
|
QList<int> widths, heights;
|
||||||
|
for (auto it = m_originalSizes.begin(); it != m_originalSizes.end(); ++it)
|
||||||
|
{
|
||||||
|
docks.append(it.key());
|
||||||
|
widths.append(it.value().width());
|
||||||
|
heights.append(it.value().height());
|
||||||
|
}
|
||||||
|
|
||||||
|
m_mainWindow->resizeDocks(docks, widths, Qt::Horizontal);
|
||||||
|
m_mainWindow->resizeDocks(docks, heights, Qt::Vertical);
|
||||||
|
|
||||||
|
m_isMaximized = false;
|
||||||
|
emit maximizeStateChanged(m_isMaximized);
|
||||||
|
m_maxButton->setIcon(style()->standardIcon(QStyle::SP_TitleBarMaxButton));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
CustomDockWidgetHideAbove::CustomDockWidgetHideAbove(QString title, QMainWindow* parent)
|
||||||
|
:CustomDockWidgetBase(title, parent)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
CustomDockWidgetHideAbove::CustomDockWidgetHideAbove(QMainWindow* parent)
|
||||||
|
:CustomDockWidgetBase(parent)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void CustomDockWidgetHideAbove::toggleMaximize()
|
||||||
|
{
|
||||||
|
if (!m_isMaximized)
|
||||||
|
{
|
||||||
|
m_hiddenDocks.clear();
|
||||||
|
m_originalSizes.clear();
|
||||||
|
|
||||||
|
m_savedState = m_mainWindow->saveState();
|
||||||
|
|
||||||
|
const QList<QDockWidget*> docks = m_mainWindow->findChildren<QDockWidget*>();
|
||||||
|
for (QDockWidget* dock : docks)
|
||||||
|
{
|
||||||
|
m_originalSizes[dock] = dock->size();
|
||||||
|
if (dock->objectName().contains("mDockCarousel") && dock->isVisible())
|
||||||
|
{
|
||||||
|
dock->hide();
|
||||||
|
m_hiddenDocks.append(dock);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
m_isMaximized = true;
|
||||||
|
emit maximizeStateChanged(m_isMaximized);
|
||||||
|
m_maxButton->setIcon(style()->standardIcon(QStyle::SP_TitleBarNormalButton));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for (QDockWidget* dock : m_hiddenDocks)
|
||||||
|
{
|
||||||
|
dock->show();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!m_savedState.isEmpty())
|
||||||
|
{
|
||||||
|
m_mainWindow->restoreState(m_savedState);
|
||||||
|
m_savedState.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
//QList<QDockWidget*> docks;
|
||||||
|
//QList<int> widths, heights;
|
||||||
|
//for (auto it = m_originalSizes.begin(); it != m_originalSizes.end(); ++it)
|
||||||
|
//{
|
||||||
|
// docks.append(it.key());
|
||||||
|
// widths.append(it.value().width());
|
||||||
|
// heights.append(it.value().height());
|
||||||
|
//}
|
||||||
|
|
||||||
|
//m_mainWindow->resizeDocks(docks, widths, Qt::Horizontal);
|
||||||
|
//m_mainWindow->resizeDocks(docks, heights, Qt::Vertical);
|
||||||
|
|
||||||
|
m_isMaximized = false;
|
||||||
|
emit maximizeStateChanged(m_isMaximized);
|
||||||
|
m_maxButton->setIcon(style()->standardIcon(QStyle::SP_TitleBarMaxButton));
|
||||||
|
}
|
||||||
|
}
|
||||||
53
HPPA/CustomDockWidgetBase.h
Normal file
53
HPPA/CustomDockWidgetBase.h
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
#pragma once
|
||||||
|
#include <QDockWidget>
|
||||||
|
#include <QToolButton>
|
||||||
|
#include <QStyle>
|
||||||
|
#include <QHBoxLayout>
|
||||||
|
#include <QMainWindow>
|
||||||
|
#include <QMap>
|
||||||
|
#include <QSize>
|
||||||
|
#include <QLabel>
|
||||||
|
|
||||||
|
class CustomDockWidgetBase :
|
||||||
|
public QDockWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit CustomDockWidgetBase(QString title, QMainWindow* parent = nullptr);
|
||||||
|
explicit CustomDockWidgetBase(QMainWindow* parent = nullptr);
|
||||||
|
void setTile(QString title);
|
||||||
|
void hideMaxButton();
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
virtual void toggleMaximize();
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void maximizeStateChanged(bool isMaximized);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
QMainWindow* m_mainWindow = nullptr;
|
||||||
|
QToolButton* m_maxButton = nullptr;
|
||||||
|
bool m_isMaximized = false;
|
||||||
|
|
||||||
|
QList<QDockWidget*> m_hiddenDocks;
|
||||||
|
QByteArray m_savedState;
|
||||||
|
QMap<QDockWidget*, QSize> m_originalSizes;
|
||||||
|
|
||||||
|
QLabel* title_label;
|
||||||
|
void initialize();
|
||||||
|
};
|
||||||
|
|
||||||
|
class CustomDockWidgetHideAbove :
|
||||||
|
public CustomDockWidgetBase
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit CustomDockWidgetHideAbove(QString title, QMainWindow* parent = nullptr);
|
||||||
|
explicit CustomDockWidgetHideAbove(QMainWindow* parent = nullptr);
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void toggleMaximize();
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
};
|
||||||
662
HPPA/HPPA.cpp
662
HPPA/HPPA.cpp
@ -8,7 +8,7 @@
|
|||||||
#include "ImageReaderWriter.h"
|
#include "ImageReaderWriter.h"
|
||||||
|
|
||||||
|
|
||||||
HPPA::HPPA(QWidget *parent)
|
HPPA::HPPA(QWidget* parent)
|
||||||
: QMainWindow(parent)
|
: QMainWindow(parent)
|
||||||
{
|
{
|
||||||
ui.setupUi(this);
|
ui.setupUi(this);
|
||||||
@ -67,27 +67,8 @@ HPPA::HPPA(QWidget *parent)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
//<2F>ڹ<EFBFBD><DAB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>QLineEdit
|
|
||||||
frame_number = new QLineEdit(ui.mainToolBar);
|
|
||||||
frame_number->setStyleSheet("QLineEdit{background-color:rgb(255,255,255);}");
|
|
||||||
frame_number->setMaximumWidth(100);
|
|
||||||
frame_number->setText("5000");
|
|
||||||
QAction *action = ui.mainToolBar->insertWidget(ui.action_start_recording, frame_number);
|
|
||||||
|
|
||||||
m_FilenameLineEdit = new QLineEdit(ui.mainToolBar);
|
|
||||||
m_FilenameLineEdit->setStyleSheet("QLineEdit{background-color:rgb(255,255,255);}");
|
|
||||||
m_FilenameLineEdit->setMaximumWidth(100);
|
|
||||||
m_FilenameLineEdit->setText("tmp_image");
|
|
||||||
QAction *action1 = ui.mainToolBar->insertWidget(ui.action_start_recording, m_FilenameLineEdit);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*QToolBar *ptoolbar = ui.mainToolBar;
|
|
||||||
QAction *pAction = new QAction("tangchao");
|
|
||||||
ptoolbar->addAction(pAction);*/
|
|
||||||
|
|
||||||
|
|
||||||
|
initMenubarToolbar();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -96,21 +77,6 @@ HPPA::HPPA(QWidget *parent)
|
|||||||
m_RecordState = 0;
|
m_RecordState = 0;
|
||||||
connect(this->ui.action_connect_imager, SIGNAL(triggered()), this, SLOT(onconnect()));//<2F>ź<EFBFBD><C5BA><EFBFBD><EFBFBD>ۣ<EFBFBD><DBA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ź<EFBFBD><C5BA><EFBFBD><EFBFBD>۰<DBB0><F3B6A8B7>ں<EFBFBD><DABA><EFBFBD>onconnect<63><74>
|
connect(this->ui.action_connect_imager, SIGNAL(triggered()), this, SLOT(onconnect()));//<2F>ź<EFBFBD><C5BA><EFBFBD><EFBFBD>ۣ<EFBFBD><DBA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ź<EFBFBD><C5BA><EFBFBD><EFBFBD>۰<DBB0><F3B6A8B7>ں<EFBFBD><DABA><EFBFBD>onconnect<63><74>
|
||||||
|
|
||||||
//rgb<67><62><EFBFBD><EFBFBD>
|
|
||||||
m_RgbCameraThread = new QThread();
|
|
||||||
m_RgbCamera = new RgbCameraOperation();
|
|
||||||
m_RgbCamera->moveToThread(m_RgbCameraThread);
|
|
||||||
m_RgbCameraThread->start();
|
|
||||||
connect(this->ui.open_rgb_camera_btn, SIGNAL(clicked()), m_RgbCamera, SLOT(OpenCamera()));//ʹ<><CAB9><EFBFBD>ź<EFBFBD>֪ͨ<CDA8><D6AA><EFBFBD>̣߳<DFB3>ui<75>̣߳<DFB3>ˢ<EFBFBD><CBA2><EFBFBD><EFBFBD>Ƶ <20><> <20>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǽ<EFBFBD><C7BD>濨<EFBFBD><E6BFA8>
|
|
||||||
connect(m_RgbCamera, SIGNAL(PlotSignal()), this, SLOT(onPlotRgbImage()));
|
|
||||||
|
|
||||||
//m_RgbCamera->setCallback(onPlotRgbImage);
|
|
||||||
//connect(this->ui.open_rgb_camera_btn, SIGNAL(clicked()), m_RgbCamera, SLOT(OpenCamera_callback()));//ʹ<>ûص<C3BB><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˢ<EFBFBD><CBA2><EFBFBD><EFBFBD><EFBFBD>̣߳<DFB3>ui<75>̣߳<DFB3><CCA3>ϵ<EFBFBD><CFB5><EFBFBD>Ƶ <20><> ʧ<><CAA7>
|
|
||||||
|
|
||||||
connect(this->ui.close_rgb_camera_btn, SIGNAL(clicked()), this, SLOT(onCloseRgbCamera()));//<2F>ر<EFBFBD><D8B1><EFBFBD><EFBFBD><EFBFBD>
|
|
||||||
connect(m_RgbCamera, SIGNAL(CamClosed()), this, SLOT(onClearLabel()));
|
|
||||||
|
|
||||||
|
|
||||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֡<EFBFBD>ʷ<EFBFBD>Χ<EFBFBD><CEA7><EFBFBD><EFBFBD>Щ<EFBFBD><D0A9><EFBFBD>ñ<EFBFBD><C3B1><EFBFBD><EFBFBD><EFBFBD>slider<65><72><EFBFBD>źźͲ<C5BA><CDB2><EFBFBD><EFBFBD><EFBFBD>connectǰ<74><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>setMinimum<75><6D><EFBFBD>ı<EFBFBD>slider<65><72>ֵ
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֡<EFBFBD>ʷ<EFBFBD>Χ<EFBFBD><CEA7><EFBFBD><EFBFBD>Щ<EFBFBD><D0A9><EFBFBD>ñ<EFBFBD><C3B1><EFBFBD><EFBFBD><EFBFBD>slider<65><72><EFBFBD>źźͲ<C5BA><CDB2><EFBFBD><EFBFBD><EFBFBD>connectǰ<74><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>setMinimum<75><6D><EFBFBD>ı<EFBFBD>slider<65><72>ֵ
|
||||||
ui.FramerateSlider->setMinimum(1);
|
ui.FramerateSlider->setMinimum(1);
|
||||||
ui.FramerateSlider->setMaximum(250);
|
ui.FramerateSlider->setMaximum(250);
|
||||||
@ -135,86 +101,286 @@ HPPA::HPPA(QWidget *parent)
|
|||||||
//<2F><><EFBFBD><EFBFBD>λ<EFBFBD><CEBB>ģ<EFBFBD><C4A3>
|
//<2F><><EFBFBD><EFBFBD>λ<EFBFBD><CEBB>ģ<EFBFBD><C4A3>
|
||||||
connect(ui.graphicsView->imager, SIGNAL(leftMouseButtonPressed(int, int)), this, SLOT(onimagerSimulatorMove(int, int)));
|
connect(ui.graphicsView->imager, SIGNAL(leftMouseButtonPressed(int, int)), this, SLOT(onimagerSimulatorMove(int, int)));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
ui.ImageViewerTabWidget->clear();//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD>棬<EFBFBD><E6A3AC><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD>tab
|
|
||||||
//ui.ImageViewerTabWidget->setTabsClosable(true);//<2F><><EFBFBD><EFBFBD>ÿҳ<C3BF><D2B3><EFBFBD><EFBFBD><EFBFBD>йرհ<D8B1>ť
|
|
||||||
connect(ui.ImageViewerTabWidget, SIGNAL(currentChanged(int)), this, SLOT(onTabWidgetCurrentChanged(int)));
|
|
||||||
|
|
||||||
//
|
|
||||||
connect(this->ui.action_about, SIGNAL(triggered()), this, SLOT(onAbout()));
|
|
||||||
|
|
||||||
initPanelToolbar();
|
initPanelToolbar();
|
||||||
|
setDockNestingEnabled(true);
|
||||||
|
connect(this->ui.action_about, SIGNAL(triggered()), this, SLOT(onAbout()));
|
||||||
connect(this->ui.mActionOneMotorScenario, SIGNAL(triggered()), this, SLOT(createOneMotorScenario()));
|
connect(this->ui.mActionOneMotorScenario, SIGNAL(triggered()), this, SLOT(createOneMotorScenario()));
|
||||||
|
|
||||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
delete ui.centralWidget;
|
||||||
QWidget* widget = new QWidget();
|
|
||||||
QGridLayout* grid = new QGridLayout(widget);
|
|
||||||
|
|
||||||
m_chartView = new QChartView(ui.mDockWidgetSpectralViewer);
|
QString qss_DockWidget_contentWidget = R"(
|
||||||
|
background: #0D1233;
|
||||||
|
/*border: 1px solid #2c586b;*/
|
||||||
|
|
||||||
|
border-top: 1px solid #2c586b;
|
||||||
|
border-left: 1px solid #2c586b;
|
||||||
|
border-right: 1px solid #2c586b;
|
||||||
|
border-bottom: 1px solid #2c586b;
|
||||||
|
|
||||||
|
border-bottom-left-radius: 10px;
|
||||||
|
border-bottom-right-radius: 10px;
|
||||||
|
)";
|
||||||
|
|
||||||
|
|
||||||
|
ui.mDockWidgetSimulator->setTile(QString::fromLocal8Bit("3Dģ<EFBFBD><EFBFBD>"));
|
||||||
|
ui.mDockWidgetSpectrometer->setTile(QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"));
|
||||||
|
|
||||||
|
//TOC
|
||||||
|
CustomDockWidgetBase* dock_layers = new CustomDockWidgetBase(QString::fromLocal8Bit("layers"), this);
|
||||||
|
dock_layers->setObjectName("mDockLayers");
|
||||||
|
dock_layers->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
|
||||||
|
mPanelMenu->addAction(dock_layers->toggleViewAction());
|
||||||
|
addDockWidget(Qt::LeftDockWidgetArea, dock_layers);
|
||||||
|
dock_layers->hideMaxButton();
|
||||||
|
|
||||||
|
QWidget* dock_layersWidgetContents = new QWidget();
|
||||||
|
dock_layersWidgetContents->setObjectName(QString::fromUtf8("dockWidgetContents_2"));
|
||||||
|
QGridLayout* gridLayout_toc = new QGridLayout(dock_layersWidgetContents);
|
||||||
|
gridLayout_toc->setSpacing(6);
|
||||||
|
gridLayout_toc->setContentsMargins(11, 11, 11, 11);
|
||||||
|
gridLayout_toc->setObjectName(QString::fromUtf8("gridLayout_toc"));
|
||||||
|
gridLayout_toc->setVerticalSpacing(0);
|
||||||
|
gridLayout_toc->setContentsMargins(0, 0, 0, 0);
|
||||||
|
|
||||||
|
ImagerPositionSimulation* graphicsView_delete = new ImagerPositionSimulation(dock_layersWidgetContents);
|
||||||
|
graphicsView_delete->setObjectName(QString::fromUtf8("graphicsView_delete"));
|
||||||
|
QSizePolicy sizePolicy1(QSizePolicy::Preferred, QSizePolicy::Preferred);
|
||||||
|
sizePolicy1.setHorizontalStretch(0);
|
||||||
|
sizePolicy1.setVerticalStretch(0);
|
||||||
|
sizePolicy1.setHeightForWidth(graphicsView_delete->sizePolicy().hasHeightForWidth());
|
||||||
|
graphicsView_delete->setSizePolicy(sizePolicy1);
|
||||||
|
graphicsView_delete->setFrameShape(QFrame::NoFrame);
|
||||||
|
graphicsView_delete->setFrameShadow(QFrame::Raised);
|
||||||
|
|
||||||
|
gridLayout_toc->addWidget(graphicsView_delete, 0, 0, 1, 1);
|
||||||
|
dock_layers->setWidget(dock_layersWidgetContents);
|
||||||
|
dock_layersWidgetContents->setStyleSheet(qss_DockWidget_contentWidget);
|
||||||
|
|
||||||
|
//dock_layers->setMinimumWidth(449);
|
||||||
|
//dock_layers->setMaximumWidth(450);
|
||||||
|
//dock_layers->setMinimumHeight(497);
|
||||||
|
//dock_layers->setMaximumHeight(498);
|
||||||
|
|
||||||
|
|
||||||
|
//<2F>߹<EFBFBD><DFB9>ײ鿴
|
||||||
|
QDockWidget* dock_hyperimgViewer = new CustomDockWidgetBase(QString::fromLocal8Bit("hyimgViewer"), this);
|
||||||
|
dock_hyperimgViewer->setObjectName("hyimgViewer");
|
||||||
|
|
||||||
|
QWidget* dock_hyperimgViewerWidgetContents = new QWidget();
|
||||||
|
dock_hyperimgViewerWidgetContents->setObjectName(QString::fromUtf8("dock_hyperimgViewerWidgetContents"));
|
||||||
|
QGridLayout* gridLayout_hyperimgViewer = new QGridLayout(dock_hyperimgViewerWidgetContents);
|
||||||
|
gridLayout_hyperimgViewer->setSpacing(6);
|
||||||
|
gridLayout_hyperimgViewer->setObjectName(QString::fromUtf8("gridLayout_hyperimgViewer"));
|
||||||
|
gridLayout_hyperimgViewer->setVerticalSpacing(6);
|
||||||
|
gridLayout_hyperimgViewer->setContentsMargins(1, 2, 1, 2);
|
||||||
|
|
||||||
|
m_imageViewerTabWidget = new QTabWidget();
|
||||||
|
//m_imageViewerTabWidget->tabBar()->setFixedHeight(40);//û<><C3BB>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>qss<73><73><EFBFBD><EFBFBD><EFBFBD>ø߶Ȳ<DFB6><C8B2><EFBFBD>Ч<EFBFBD><D0A7><EFBFBD><EFBFBD>Ϊɶ<CEAA><C9B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
m_imageViewerTabWidget->clear();//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD>棬<EFBFBD><E6A3AC><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD>tab
|
||||||
|
QToolButton* maxButton = new QToolButton();
|
||||||
|
maxButton->setIcon(style()->standardIcon(QStyle::SP_TitleBarMaxButton));
|
||||||
|
connect(maxButton, SIGNAL(clicked()), dock_hyperimgViewer, SLOT(toggleMaximize()));
|
||||||
|
m_imageViewerTabWidget->setCornerWidget(maxButton, Qt::TopRightCorner);
|
||||||
|
//onCreateTab(0);
|
||||||
|
//m_imageViewerTabWidget->setTabsClosable(true);//<2F><><EFBFBD><EFBFBD>ÿҳ<C3BF><D2B3><EFBFBD><EFBFBD><EFBFBD>йرհ<D8B1>ť
|
||||||
|
connect(m_imageViewerTabWidget, SIGNAL(currentChanged(int)), this, SLOT(onTabWidgetCurrentChanged(int)));
|
||||||
|
m_imageViewerTabWidget->setStyleSheet(R"(
|
||||||
|
QTabBar::tab {
|
||||||
|
background: #0E1C4C;
|
||||||
|
color: white;
|
||||||
|
padding: 6px 12px;
|
||||||
|
border: none;
|
||||||
|
border-bottom: 1px solid #27376C;
|
||||||
|
height: 18;
|
||||||
|
}
|
||||||
|
|
||||||
|
QTabBar::tab:selected {
|
||||||
|
background: #0D1233;
|
||||||
|
color: white;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*QTabBar::tab:hover {
|
||||||
|
background: #141A45;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
QTabWidget::pane {
|
||||||
|
border: none;
|
||||||
|
border-top: 1px solid #27376C;
|
||||||
|
background: #0D1233;
|
||||||
|
top: -1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QTabWidget QWidget {
|
||||||
|
background: #0D1233;
|
||||||
|
}
|
||||||
|
)");
|
||||||
|
QWidget* imageViewerTabWidgetContainer = new QWidget();
|
||||||
|
QGridLayout* gridLayout_imageViewerTabWidgetContainer = new QGridLayout(imageViewerTabWidgetContainer);
|
||||||
|
gridLayout_imageViewerTabWidgetContainer->setSpacing(6);
|
||||||
|
gridLayout_imageViewerTabWidgetContainer->setObjectName(QString::fromUtf8("gridLayout_imageViewerTabWidgetContainer"));
|
||||||
|
gridLayout_imageViewerTabWidgetContainer->setVerticalSpacing(6);
|
||||||
|
gridLayout_imageViewerTabWidgetContainer->setContentsMargins(0, 0, 0, 0);
|
||||||
|
gridLayout_imageViewerTabWidgetContainer->addWidget(m_imageViewerTabWidget, 0, 0, 1, 1);
|
||||||
|
imageViewerTabWidgetContainer->setStyleSheet(R"(
|
||||||
|
background: #0E1C4C;
|
||||||
|
)");
|
||||||
|
|
||||||
|
QFrame* line = new QFrame();
|
||||||
|
line->setFrameShape(QFrame::HLine);
|
||||||
|
line->setFrameShadow(QFrame::Plain);
|
||||||
|
line->setStyleSheet(R"(
|
||||||
|
QWidget {
|
||||||
|
color: #2c586b;
|
||||||
|
}
|
||||||
|
)");
|
||||||
|
|
||||||
|
m_chartView = new QChartView();
|
||||||
m_chartView->setRenderHint(QPainter::Antialiasing);
|
m_chartView->setRenderHint(QPainter::Antialiasing);
|
||||||
|
m_chartView->setStyleSheet(R"(
|
||||||
|
background: #0D1233;
|
||||||
|
)");
|
||||||
|
//m_chartView->setBackgroundBrush(QColor("#0D1233"));
|
||||||
|
|
||||||
grid->addWidget(m_chartView);
|
m_chart = new QChart();
|
||||||
//grid->setMargin(0);
|
m_chart->setBackgroundBrush(QColor("#0D1233"));
|
||||||
grid->setContentsMargins(0, 0, 0, 0);
|
m_chart->legend()->hide();
|
||||||
//grid->SetMaximumSize(0);
|
//m_chart->setTitle("Simple line chart example");
|
||||||
ui.mDockWidgetSpectralViewer->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea | Qt::TopDockWidgetArea | Qt::BottomDockWidgetArea);
|
|
||||||
ui.mDockWidgetSpectralViewer->setWidget(widget);
|
|
||||||
//QLineSeries *series = new QLineSeries();
|
|
||||||
//QChart *chart = new QChart();
|
|
||||||
mPanelMenu->addAction(ui.mDockWidgetSpectralViewer->toggleViewAction());
|
|
||||||
|
|
||||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>dock
|
QValueAxis* axisX = new QValueAxis();
|
||||||
adjustTable* adt = new adjustTable();
|
QValueAxis* axisY = new QValueAxis();
|
||||||
|
setAxis(axisX, axisY);
|
||||||
|
m_chart->addAxis(axisX, Qt::AlignBottom);
|
||||||
|
m_chart->addAxis(axisY, Qt::AlignLeft);
|
||||||
|
m_chartView->setChart(m_chart);
|
||||||
|
|
||||||
QDockWidget* dock_adt = new QDockWidget(QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"), this);
|
gridLayout_hyperimgViewer->addWidget(imageViewerTabWidgetContainer, 0, 0, 1, 1);
|
||||||
dock_adt->setObjectName("mDockAdjustTable");
|
gridLayout_hyperimgViewer->addWidget(line, 1, 0, 1, 1);
|
||||||
dock_adt->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
|
gridLayout_hyperimgViewer->addWidget(m_chartView, 2, 0, 1, 1);
|
||||||
dock_adt->setWidget(adt);
|
|
||||||
tabifyDockWidget(ui.mDockWidgetSpectrometer, dock_adt);
|
|
||||||
mPanelMenu->addAction(dock_adt->toggleViewAction());
|
|
||||||
|
|
||||||
//<2F><>Դ<EFBFBD><D4B4><EFBFBD><EFBFBD>
|
gridLayout_hyperimgViewer->setRowStretch(0, 3);
|
||||||
PowerControl* pc = new PowerControl();
|
gridLayout_hyperimgViewer->setRowStretch(1, 1);
|
||||||
|
gridLayout_hyperimgViewer->setRowStretch(2, 2);
|
||||||
|
|
||||||
QDockWidget* dock_pc = new QDockWidget(QString::fromLocal8Bit("<EFBFBD><EFBFBD>Դ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"), this);
|
|
||||||
dock_pc->setObjectName("mDockPowerControl");
|
|
||||||
dock_pc->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
|
|
||||||
dock_pc->setWidget(pc);
|
|
||||||
tabifyDockWidget(dock_adt, dock_pc);
|
|
||||||
mPanelMenu->addAction(dock_pc->toggleViewAction());
|
|
||||||
|
|
||||||
//<2F><>е<EFBFBD>ۿ<EFBFBD><DBBF><EFBFBD>
|
dock_hyperimgViewerWidgetContents->setStyleSheet(R"(
|
||||||
rac = new RobotArmControl();
|
QWidget #dock_hyperimgViewerWidgetContents{
|
||||||
connect(rac->robotController, SIGNAL(hsiRecordSignal(int)), this, SLOT(recordFromRobotArm(int)));
|
background: #0D1233;
|
||||||
QDockWidget* dock_rac = new QDockWidget(QString::fromLocal8Bit("<EFBFBD><EFBFBD>е<EFBFBD>ۿ<EFBFBD><EFBFBD><EFBFBD>"), this);
|
/*border: 1px solid #2c586b;*/
|
||||||
dock_rac->setObjectName("mDockRobotArmControl");
|
|
||||||
dock_rac->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
|
|
||||||
dock_rac->setWidget(rac);
|
|
||||||
tabifyDockWidget(dock_adt, dock_rac);
|
|
||||||
mPanelMenu->addAction(dock_rac->toggleViewAction());
|
|
||||||
|
|
||||||
//һ<><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
border-top: 2px solid #2c586b;
|
||||||
omc = new OneMotorControl();
|
border-left: 1px solid #2c586b;
|
||||||
|
border-right: 1px solid #2c586b;
|
||||||
|
border-bottom: 2px solid #2c586b;
|
||||||
|
|
||||||
dock_omc = new QDockWidget(QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"), this);
|
border-top-left-radius: 10px;
|
||||||
dock_omc->setObjectName("mDockOneMotorControl");
|
border-top-right-radius: 10px;
|
||||||
dock_omc->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
|
border-bottom-left-radius: 10px;
|
||||||
dock_omc->setWidget(omc);
|
border-bottom-right-radius: 10px;
|
||||||
tabifyDockWidget(dock_rac, dock_omc);
|
}
|
||||||
mPanelMenu->addAction(dock_omc->toggleViewAction());
|
)");
|
||||||
|
|
||||||
|
dock_hyperimgViewer->setWidget(dock_hyperimgViewerWidgetContents);
|
||||||
|
mPanelMenu->addAction(dock_hyperimgViewer->toggleViewAction());
|
||||||
|
QWidget* tmp6 = new QWidget();
|
||||||
|
dock_hyperimgViewer->setTitleBarWidget(tmp6);
|
||||||
|
|
||||||
|
//<2F>ֲ<EFBFBD><D6B2><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
m_dock_carousel = new CustomDockWidgetBase(QString::fromLocal8Bit("<EFBFBD>ֲ<EFBFBD>"), this);
|
||||||
|
m_dock_carousel->setObjectName("mDockCarousel");
|
||||||
|
m_dock_carousel->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
|
||||||
|
mPanelMenu->addAction(m_dock_carousel->toggleViewAction());
|
||||||
|
//addDockWidget(Qt::LeftDockWidgetArea, m_dock_carousel);
|
||||||
|
|
||||||
|
m_carousel = new MyCarousel();
|
||||||
|
m_carousel->setObjectName(QString::fromUtf8("carousel"));
|
||||||
|
|
||||||
|
QScrollArea* sa = new QScrollArea();
|
||||||
|
sa->setStyleSheet(R"(
|
||||||
|
border: none;
|
||||||
|
)");
|
||||||
|
QGridLayout* gridLayout_sa = new QGridLayout(sa);
|
||||||
|
gridLayout_sa->setSpacing(6);
|
||||||
|
gridLayout_sa->setObjectName(QString::fromUtf8("gridLayout_sa"));
|
||||||
|
gridLayout_sa->setVerticalSpacing(0);
|
||||||
|
gridLayout_sa->setContentsMargins(0, 0, 0, 0);
|
||||||
|
|
||||||
|
m_cam_label = new QLabel();
|
||||||
|
gridLayout_sa->addWidget(m_cam_label);
|
||||||
|
|
||||||
|
m_carousel->addWidget(sa);
|
||||||
|
m_carousel->addWidget(new QLabel("1"));
|
||||||
|
m_carousel->addWidget(new QLabel("2"));
|
||||||
|
m_carousel->addWidget(new QLabel("3"));
|
||||||
|
//m_carousel->addWidget(new QLabel("4"));
|
||||||
|
//m_carousel->addWidget(new QLabel("5"));
|
||||||
|
//m_carousel->addWidget(new QLabel("6"));
|
||||||
|
//m_carousel->addWidget(new QLabel("7"));
|
||||||
|
//m_carousel->addWidget(new QLabel("8"));
|
||||||
|
//m_carousel->addWidget(new QLabel("9"));
|
||||||
|
//m_carousel->addWidget(new QLabel("10"));
|
||||||
|
//m_carousel->addWidget(new QLabel("11"));
|
||||||
|
//m_carousel->addWidget(new QLabel("12"));
|
||||||
|
//m_carousel->addWidget(new QLabel("13"));
|
||||||
|
//m_carousel->addWidget(new QLabel("14"));
|
||||||
|
//m_carousel->addWidget(new QLabel("15"));
|
||||||
|
//m_carousel->addWidget(new QLabel("16"));
|
||||||
|
m_carousel->play();
|
||||||
|
|
||||||
|
m_dock_carousel->setWidget(m_carousel);
|
||||||
|
|
||||||
|
initControlTabwidget();
|
||||||
|
|
||||||
|
|
||||||
|
splitDockWidget(dock_layers, dock_hyperimgViewer, Qt::Horizontal);
|
||||||
|
splitDockWidget(dock_hyperimgViewer, m_dock_carousel, Qt::Horizontal);
|
||||||
|
|
||||||
|
//m_dock_carousel->show();
|
||||||
|
//ui.mDockWidgetRGBCamera->setMinimumWidth(449);
|
||||||
|
//ui.mDockWidgetRGBCamera->setMaximumWidth(450);
|
||||||
|
//ui.mDockWidgetRGBCamera->setMinimumHeight(497);
|
||||||
|
//ui.mDockWidgetRGBCamera->setMaximumHeight(498);
|
||||||
|
|
||||||
|
splitDockWidget(dock_layers, ui.mDockWidgetSimulator, Qt::Vertical);
|
||||||
|
ui.mDockWidgetSimulator->show();
|
||||||
|
|
||||||
|
splitDockWidget(m_dock_carousel, ui.mDockWidgetSpectrometer, Qt::Vertical);
|
||||||
|
ui.mDockWidgetSpectrometer->show();
|
||||||
|
|
||||||
|
setStyleSheet(R"(
|
||||||
|
QMainWindow::separator{
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
background: #040125; /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӱ<EFBFBD><D3B1><EFBFBD>ɫ */
|
||||||
|
/*border: 1px solid #808080;*/ /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӱ߿<D3B1> */
|
||||||
|
}
|
||||||
|
|
||||||
|
QDockWidget {
|
||||||
|
border: 2px solid #2a347a; /* <20><><EFBFBD><EFBFBD>ɫ<EFBFBD>߿<EFBFBD> */
|
||||||
|
background-color: red; /* <20><><EFBFBD>屳<EFBFBD><E5B1B3>ɫ */
|
||||||
|
color: white; /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ */
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||||
|
QDockWidget::title {
|
||||||
|
background-color: #0E1C4C; /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ */
|
||||||
|
text-align: left; /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD><D6BE><EFBFBD> */
|
||||||
|
|
||||||
|
/*padding: 4px;*/
|
||||||
|
}
|
||||||
|
|
||||||
|
/* <20><>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD> DockWidget <20>Ĺرհ<D8B1>ť<EFBFBD><C5A5>ʽ */
|
||||||
|
QDockWidget::close-button, QDockWidget::float-button {
|
||||||
|
background: transparent;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDockWidget::close-button:hover, QDockWidget::float-button:hover {
|
||||||
|
background: rgba(255,255,255,0.2);
|
||||||
|
}
|
||||||
|
)");
|
||||||
|
|
||||||
//2<><32><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
||||||
tmc = new TwoMotorControl(this);
|
|
||||||
connect(tmc, SIGNAL(startLineNumSignal(int)), this, SLOT(onCreateTab(int)));
|
|
||||||
connect(tmc, SIGNAL(sequenceComplete()), this, SLOT(onsequenceComplete()));
|
|
||||||
dock_tmc = new QDockWidget(QString::fromLocal8Bit("2<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"), this);
|
|
||||||
dock_tmc->setObjectName("mDockTwoMotorControl");
|
|
||||||
dock_tmc->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
|
|
||||||
dock_tmc->setWidget(tmc);
|
|
||||||
tabifyDockWidget(dock_omc, dock_tmc);
|
|
||||||
mPanelMenu->addAction(dock_tmc->toggleViewAction());
|
|
||||||
|
|
||||||
|
|
||||||
createActionGroups();
|
createActionGroups();
|
||||||
@ -223,6 +389,8 @@ HPPA::HPPA(QWidget *parent)
|
|||||||
createMoveplatformActionGroup();
|
createMoveplatformActionGroup();
|
||||||
connect(moveplatformActionGroup, &QActionGroup::triggered, this, &HPPA::selectingMoveplatform);
|
connect(moveplatformActionGroup, &QActionGroup::triggered, this, &HPPA::selectingMoveplatform);
|
||||||
|
|
||||||
|
ui.mDockWidgetSimulator->setFeatures(QDockWidget::DockWidgetClosable);
|
||||||
|
|
||||||
QString strPath = QCoreApplication::applicationDirPath() + "/UILayout.ini";
|
QString strPath = QCoreApplication::applicationDirPath() + "/UILayout.ini";
|
||||||
QFile file(strPath);
|
QFile file(strPath);
|
||||||
if (file.open(QIODevice::ReadOnly))
|
if (file.open(QIODevice::ReadOnly))
|
||||||
@ -235,6 +403,181 @@ HPPA::HPPA(QWidget *parent)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void HPPA::initMenubarToolbar()
|
||||||
|
{
|
||||||
|
//<2F>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD><CDB9><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
QWidget* menuWidget = new WidgetWithBackgroundPicture();
|
||||||
|
//menuWidget->setFixedWidth(200);
|
||||||
|
menuWidget->setFixedHeight(66);
|
||||||
|
QHBoxLayout* hLayout_menuWidget = new QHBoxLayout(menuWidget);
|
||||||
|
|
||||||
|
//auto menuBar_tmp = menuBar();
|
||||||
|
auto menuBar_tmp = ui.menuBar;
|
||||||
|
hLayout_menuWidget->addWidget(menuBar_tmp);
|
||||||
|
menuBar_tmp->setAutoFillBackground(false);
|
||||||
|
menuBar_tmp->setStyleSheet(R"(
|
||||||
|
QMenuBar {
|
||||||
|
background: transparent;/*transparent*/
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
QMenuBar::item {
|
||||||
|
background: transparent;
|
||||||
|
color: white; /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD><C4B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ */
|
||||||
|
padding: 4px 8px;
|
||||||
|
padding-top: 8px;
|
||||||
|
padding-bottom: 8px;
|
||||||
|
}
|
||||||
|
QMenuBar::item:selected {
|
||||||
|
background: rgba(255, 255, 255, 50); /* <20><><EFBFBD><CEA2><EFBFBD><EFBFBD> */
|
||||||
|
}
|
||||||
|
|
||||||
|
QMenu {
|
||||||
|
background-color: #0A1245; /* <20>˵<EFBFBD><CBB5><EFBFBD><EFBFBD><EFBFBD>ɫ */
|
||||||
|
border: 1px solid gray; /* <20><>ѡ<EFBFBD><D1A1><EFBFBD>߿<EFBFBD><DFBF><EFBFBD>ʽ */
|
||||||
|
color: white; /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD><C4B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ */
|
||||||
|
}
|
||||||
|
QMenu::item:selected {
|
||||||
|
background-color: rgba(255, 255, 255, 50); /* ѡ<><D1A1>ʱ<EFBFBD>ı<EFBFBD><C4B1><EFBFBD>ɫ */
|
||||||
|
color: white; /* ѡ<><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ<EFBFBD><C9AB><EFBFBD><EFBFBD>ѡ */
|
||||||
|
}
|
||||||
|
)");
|
||||||
|
|
||||||
|
hLayout_menuWidget->addStretch();
|
||||||
|
QPushButton* closeBtn = new QPushButton(QString::fromLocal8Bit("<EFBFBD>˳<EFBFBD>ƽ̨"));
|
||||||
|
closeBtn->setStyleSheet(R"(
|
||||||
|
QPushButton {
|
||||||
|
background: #002CE0;
|
||||||
|
color: white;
|
||||||
|
font-size: 14px;
|
||||||
|
border: none;
|
||||||
|
padding: 8px;
|
||||||
|
}
|
||||||
|
QPushButton:hover {
|
||||||
|
background: #34495e;
|
||||||
|
}
|
||||||
|
)");
|
||||||
|
hLayout_menuWidget->addWidget(closeBtn);
|
||||||
|
|
||||||
|
QWidget* toolBarWidget = new QWidget();
|
||||||
|
toolBarWidget->setStyleSheet("background-color: #0D1233;");
|
||||||
|
QHBoxLayout* hLayout_toolBarWidget = new QHBoxLayout(toolBarWidget);
|
||||||
|
|
||||||
|
//QToolBar* toolBar = this->findChild<QToolBar*>("mainToolBar");
|
||||||
|
QToolBar* toolBar = ui.mainToolBar;
|
||||||
|
//hLayout_toolBarWidget->addWidget(toolBar);
|
||||||
|
toolBar->setAttribute(Qt::WA_TranslucentBackground, true);
|
||||||
|
toolBar->setAutoFillBackground(false);
|
||||||
|
toolBar->setIconSize(QSize(56, 56));
|
||||||
|
toolBar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
|
||||||
|
//<2F>ڹ<EFBFBD><DAB9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>QLineEdit
|
||||||
|
frame_number = new QLineEdit(ui.mainToolBar);
|
||||||
|
frame_number->setStyleSheet("QLineEdit{background-color:rgb(255,255,255);}");
|
||||||
|
frame_number->setMaximumWidth(100);
|
||||||
|
frame_number->setText("5000");
|
||||||
|
QAction* action = ui.mainToolBar->insertWidget(ui.action_start_recording, frame_number);
|
||||||
|
|
||||||
|
m_FilenameLineEdit = new QLineEdit(ui.mainToolBar);
|
||||||
|
m_FilenameLineEdit->setStyleSheet("QLineEdit{background-color:rgb(255,255,255);}");
|
||||||
|
m_FilenameLineEdit->setMaximumWidth(100);
|
||||||
|
m_FilenameLineEdit->setText("tmp_image");
|
||||||
|
QAction* action1 = ui.mainToolBar->insertWidget(ui.action_start_recording, m_FilenameLineEdit);
|
||||||
|
|
||||||
|
ui.action_connect_imager->setIcon(QIcon(".//icon//all//connect_imager.png"));
|
||||||
|
ui.action_auto_exposure->setIcon(QIcon(".//icon//all//exposure.png"));
|
||||||
|
ui.action_focus->setIcon(QIcon(".//icon//all//focus.png"));
|
||||||
|
ui.action_dark->setIcon(QIcon(".//icon//all//dark.png"));
|
||||||
|
ui.action_reference->setIcon(QIcon(".//icon//all//reference.png"));
|
||||||
|
// ʹ<><CAB9><EFBFBD><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
toolBar->setStyleSheet(R"(
|
||||||
|
QToolBar {
|
||||||
|
background: #0D1233;/*transparent*/
|
||||||
|
border: 1px solid #444;
|
||||||
|
border-radius: 6px;
|
||||||
|
}
|
||||||
|
QToolButton {
|
||||||
|
background: transparent;
|
||||||
|
color: white; /* <20>ɸ<EFBFBD><C9B8>ݱ<EFBFBD><DDB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ */
|
||||||
|
padding: 4px;
|
||||||
|
margin: 0 0 0 6px;
|
||||||
|
}
|
||||||
|
QToolButton:hover {
|
||||||
|
background: rgba(255,255,255,50); /* <20><>ͣʱ<CDA3><CAB1><EFBFBD><CEA2><EFBFBD><EFBFBD> */
|
||||||
|
}
|
||||||
|
)");
|
||||||
|
|
||||||
|
|
||||||
|
QWidget* topWidget = new QWidget();
|
||||||
|
topWidget->setStyleSheet("background-color: #040125;");
|
||||||
|
QVBoxLayout* verticalLayout_topWidget = new QVBoxLayout(topWidget);
|
||||||
|
verticalLayout_topWidget->addWidget(menuWidget);
|
||||||
|
//verticalLayout_topWidget->addWidget(toolBarWidget);
|
||||||
|
setMenuWidget(topWidget);
|
||||||
|
}
|
||||||
|
|
||||||
|
void HPPA::initControlTabwidget()
|
||||||
|
{
|
||||||
|
ui.controlTabWidget->removeTab(1);
|
||||||
|
|
||||||
|
QWidget* videoWidget = new QWidget();
|
||||||
|
QVBoxLayout* vBoxLayout_videoWidget = new QVBoxLayout(videoWidget);
|
||||||
|
|
||||||
|
vBoxLayout_videoWidget->setSpacing(6);
|
||||||
|
vBoxLayout_videoWidget->setObjectName(QString::fromUtf8("vBoxLayout_videoWidget"));
|
||||||
|
vBoxLayout_videoWidget->setContentsMargins(0, 0, 0, 0);
|
||||||
|
|
||||||
|
m_open_rgb_camera_btn = new QPushButton(QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"));
|
||||||
|
m_open_rgb_camera_btn->setObjectName(QString::fromUtf8("m_open_rgb_camera_btn"));
|
||||||
|
m_close_rgb_camera_btn = new QPushButton(QString::fromLocal8Bit("<EFBFBD>ر<EFBFBD>"));
|
||||||
|
m_close_rgb_camera_btn->setObjectName(QString::fromUtf8("m_close_rgb_camera_btn"));
|
||||||
|
vBoxLayout_videoWidget->addWidget(m_open_rgb_camera_btn);
|
||||||
|
vBoxLayout_videoWidget->addWidget(m_close_rgb_camera_btn);
|
||||||
|
|
||||||
|
//rgb<67><62><EFBFBD><EFBFBD>
|
||||||
|
m_RgbCameraThread = new QThread();
|
||||||
|
m_RgbCamera = new RgbCameraOperation();
|
||||||
|
m_RgbCamera->moveToThread(m_RgbCameraThread);
|
||||||
|
m_RgbCameraThread->start();
|
||||||
|
connect(m_open_rgb_camera_btn, SIGNAL(clicked()), m_RgbCamera, SLOT(OpenCamera()));//ʹ<><CAB9><EFBFBD>ź<EFBFBD>֪ͨ<CDA8><D6AA><EFBFBD>̣߳<DFB3>ui<75>̣߳<DFB3>ˢ<EFBFBD><CBA2><EFBFBD><EFBFBD>Ƶ <20><> <20>ɹ<EFBFBD><C9B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǽ<EFBFBD><C7BD>濨<EFBFBD><E6BFA8>
|
||||||
|
connect(m_RgbCamera, SIGNAL(PlotSignal()), this, SLOT(onPlotRgbImage()));
|
||||||
|
|
||||||
|
//m_RgbCamera->setCallback(onPlotRgbImage);
|
||||||
|
//connect(this->ui.open_rgb_camera_btn, SIGNAL(clicked()), m_RgbCamera, SLOT(OpenCamera_callback()));//ʹ<>ûص<C3BB><D8B5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˢ<EFBFBD><CBA2><EFBFBD><EFBFBD><EFBFBD>̣߳<DFB3>ui<75>̣߳<DFB3><CCA3>ϵ<EFBFBD><CFB5><EFBFBD>Ƶ <20><> ʧ<><CAA7>
|
||||||
|
|
||||||
|
connect(m_close_rgb_camera_btn, SIGNAL(clicked()), this, SLOT(onCloseRgbCamera()));//<2F>ر<EFBFBD><D8B1><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
connect(m_RgbCamera, SIGNAL(CamClosed()), this, SLOT(onClearLabel()));
|
||||||
|
|
||||||
|
ui.controlTabWidget->addTab(videoWidget, QString::fromLocal8Bit("rgb<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"));
|
||||||
|
|
||||||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>dock
|
||||||
|
adjustTable* adt = new adjustTable();
|
||||||
|
adt->setWindowFlags(Qt::Widget);
|
||||||
|
ui.controlTabWidget->addTab(adt, QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"));
|
||||||
|
|
||||||
|
|
||||||
|
//<2F><>Դ<EFBFBD><D4B4><EFBFBD><EFBFBD>
|
||||||
|
PowerControl* pc = new PowerControl();
|
||||||
|
pc->setWindowFlags(Qt::Widget);
|
||||||
|
ui.controlTabWidget->addTab(pc, QString::fromLocal8Bit("<EFBFBD><EFBFBD>Դ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"));
|
||||||
|
|
||||||
|
//<2F><>е<EFBFBD>ۿ<EFBFBD><DBBF><EFBFBD>
|
||||||
|
rac = new RobotArmControl();
|
||||||
|
connect(rac->robotController, SIGNAL(hsiRecordSignal(int)), this, SLOT(recordFromRobotArm(int)));
|
||||||
|
rac->setWindowFlags(Qt::Widget);
|
||||||
|
ui.controlTabWidget->addTab(rac, QString::fromLocal8Bit("<EFBFBD><EFBFBD>е<EFBFBD>ۿ<EFBFBD><EFBFBD><EFBFBD>"));
|
||||||
|
|
||||||
|
//1<><31><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
omc = new OneMotorControl();
|
||||||
|
omc->setWindowFlags(Qt::Widget);
|
||||||
|
ui.controlTabWidget->addTab(omc, QString::fromLocal8Bit("1<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"));
|
||||||
|
|
||||||
|
//2<><32><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
tmc = new TwoMotorControl(this);
|
||||||
|
connect(tmc, SIGNAL(startLineNumSignal(int)), this, SLOT(onCreateTab(int)));
|
||||||
|
connect(tmc, SIGNAL(sequenceComplete()), this, SLOT(onsequenceComplete()));
|
||||||
|
tmc->setWindowFlags(Qt::Widget);
|
||||||
|
ui.controlTabWidget->addTab(tmc, QString::fromLocal8Bit("2<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"));
|
||||||
|
}
|
||||||
|
|
||||||
void HPPA::recordFromRobotArm(int fileCounter)
|
void HPPA::recordFromRobotArm(int fileCounter)
|
||||||
{
|
{
|
||||||
//qDebug() << "recordFromRobotArm" << fileCounter;
|
//qDebug() << "recordFromRobotArm" << fileCounter;
|
||||||
@ -252,10 +595,10 @@ void HPPA::recordFromRobotArm(int fileCounter)
|
|||||||
|
|
||||||
if (fileCounter - 1 == 0)
|
if (fileCounter - 1 == 0)
|
||||||
{
|
{
|
||||||
ui.ImageViewerTabWidget->clear();
|
m_imageViewerTabWidget->clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
onCreateTab(fileCounter-1);
|
onCreateTab(fileCounter - 1);
|
||||||
emit StartRecordSignal();
|
emit StartRecordSignal();
|
||||||
|
|
||||||
ui.action_start_recording->setText(QString::fromLocal8Bit("<EFBFBD>ɼ<EFBFBD><EFBFBD><EFBFBD>"));
|
ui.action_start_recording->setText(QString::fromLocal8Bit("<EFBFBD>ɼ<EFBFBD><EFBFBD><EFBFBD>"));
|
||||||
@ -373,7 +716,6 @@ void HPPA::initPanelToolbar()
|
|||||||
|
|
||||||
mPanelMenu->addAction(ui.mDockWidgetSpectrometer->toggleViewAction());
|
mPanelMenu->addAction(ui.mDockWidgetSpectrometer->toggleViewAction());
|
||||||
|
|
||||||
mPanelMenu->addAction(ui.mDockWidgetRGBCamera->toggleViewAction());
|
|
||||||
mPanelMenu->addAction(ui.mDockWidgetSimulator->toggleViewAction());
|
mPanelMenu->addAction(ui.mDockWidgetSimulator->toggleViewAction());
|
||||||
|
|
||||||
mToolbarMenu->addAction(ui.mainToolBar->toggleViewAction());
|
mToolbarMenu->addAction(ui.mainToolBar->toggleViewAction());
|
||||||
@ -389,15 +731,11 @@ void HPPA::createOneMotorScenario()
|
|||||||
dock->hide();
|
dock->hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
ui.mDockWidgetSpectralViewer->show();
|
|
||||||
ui.mDockWidgetSpectrometer->show();
|
ui.mDockWidgetSpectrometer->show();
|
||||||
dock_omc->show();
|
|
||||||
|
|
||||||
//tabifyDockWidget(ui.mDockWidgetSpectrometer, dock_omc);
|
//tabifyDockWidget(ui.mDockWidgetSpectrometer, dock_omc);
|
||||||
|
|
||||||
//addDockWidget(Qt::RightDockWidgetArea, ui.mDockWidgetSpectralViewer);
|
|
||||||
//addDockWidget(Qt::RightDockWidgetArea, ui.mDockWidgetSpectrometer);
|
//addDockWidget(Qt::RightDockWidgetArea, ui.mDockWidgetSpectrometer);
|
||||||
//splitDockWidget(ui.mDockWidgetSpectralViewer, ui.mDockWidgetSpectrometer, Qt::Vertical);
|
|
||||||
|
|
||||||
//QDockWidget* dockTop = new QDockWidget(QString::fromLocal8Bit("1"), this);
|
//QDockWidget* dockTop = new QDockWidget(QString::fromLocal8Bit("1"), this);
|
||||||
//QDockWidget* dockBottom = new QDockWidget(QString::fromLocal8Bit("2"), this);
|
//QDockWidget* dockBottom = new QDockWidget(QString::fromLocal8Bit("2"), this);
|
||||||
@ -474,7 +812,7 @@ void HPPA::onStartRecordStep1()
|
|||||||
|
|
||||||
if (m_RecordState % 2 == 1)
|
if (m_RecordState % 2 == 1)
|
||||||
{
|
{
|
||||||
ui.ImageViewerTabWidget->clear();
|
m_imageViewerTabWidget->clear();
|
||||||
|
|
||||||
onCreateTab(0);
|
onCreateTab(0);
|
||||||
|
|
||||||
@ -501,7 +839,7 @@ void HPPA::onStartRecordStep1()
|
|||||||
|
|
||||||
if (m_RecordState % 2 == 1)
|
if (m_RecordState % 2 == 1)
|
||||||
{
|
{
|
||||||
ui.ImageViewerTabWidget->clear();
|
m_imageViewerTabWidget->clear();
|
||||||
|
|
||||||
onCreateTab(0);
|
onCreateTab(0);
|
||||||
|
|
||||||
@ -530,7 +868,7 @@ void HPPA::onStartRecordStep1()
|
|||||||
|
|
||||||
if (m_RecordState % 2 == 1)
|
if (m_RecordState % 2 == 1)
|
||||||
{
|
{
|
||||||
ui.ImageViewerTabWidget->clear();
|
m_imageViewerTabWidget->clear();
|
||||||
|
|
||||||
m_Imager->setFileName2Save(imgPath);
|
m_Imager->setFileName2Save(imgPath);
|
||||||
m_Imager->setFrameNumber(this->frame_number->text().toInt());
|
m_Imager->setFrameNumber(this->frame_number->text().toInt());
|
||||||
@ -570,16 +908,16 @@ void HPPA::onCreateTab(int trackNumber)
|
|||||||
{
|
{
|
||||||
m_numberOfRecording = trackNumber;
|
m_numberOfRecording = trackNumber;
|
||||||
|
|
||||||
QWidget * tabTmp = new QWidget();
|
QWidget* tabTmp = new QWidget();
|
||||||
|
|
||||||
QGridLayout *GridLayout = new QGridLayout();
|
QGridLayout* GridLayout = new QGridLayout();
|
||||||
GridLayout->addWidget(new ImageViewer(tabTmp));
|
GridLayout->addWidget(new ImageViewer(tabTmp));
|
||||||
|
|
||||||
tabTmp->setLayout(GridLayout);
|
tabTmp->setLayout(GridLayout);
|
||||||
|
|
||||||
ui.ImageViewerTabWidget->addTab(tabTmp, QString::number(trackNumber + 1));
|
m_imageViewerTabWidget->addTab(tabTmp, QString::number(trackNumber + 1));
|
||||||
|
|
||||||
ui.ImageViewerTabWidget->setCurrentIndex(trackNumber);
|
m_imageViewerTabWidget->setCurrentIndex(trackNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -596,8 +934,8 @@ void HPPA::onTabWidgetCurrentChanged(int index)//
|
|||||||
m_TabWidgetCurrentIndex = index;
|
m_TabWidgetCurrentIndex = index;
|
||||||
|
|
||||||
//<2F><>ȡ<EFBFBD><C8A1>ͼ<EFBFBD>ؼ<EFBFBD>
|
//<2F><>ȡ<EFBFBD><C8A1>ͼ<EFBFBD>ؼ<EFBFBD>
|
||||||
QWidget* currentWidget = ui.ImageViewerTabWidget->widget(index);
|
QWidget* currentWidget = m_imageViewerTabWidget->widget(index);
|
||||||
QList<ImageViewer *> currentImageViewer = currentWidget->findChildren<ImageViewer *>();
|
QList<ImageViewer*> currentImageViewer = currentWidget->findChildren<ImageViewer*>();
|
||||||
|
|
||||||
//<2F><>disconnectȻ<74><C8BB><EFBFBD><EFBFBD>connect<63><74><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD><C3BF><EFBFBD>л<EFBFBD>һ<EFBFBD>ζ<EFBFBD><CEB6><EFBFBD>connectһ<74>Σ<EFBFBD><CEA3><EFBFBD><EFBFBD>ۻ<EFBFBD>connect<63>ܶ<EFBFBD><DCB6>Σ<EFBFBD>
|
//<2F><>disconnectȻ<74><C8BB><EFBFBD><EFBFBD>connect<63><74><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD><C3BF><EFBFBD>л<EFBFBD>һ<EFBFBD>ζ<EFBFBD><CEB6><EFBFBD>connectһ<74>Σ<EFBFBD><CEA3><EFBFBD><EFBFBD>ۻ<EFBFBD>connect<63>ܶ<EFBFBD><DCB6>Σ<EFBFBD>
|
||||||
disconnect(currentImageViewer[0], SIGNAL(leftMouseButtonPressed(int, int)), this, SLOT(onLeftMouseButtonPressed(int, int)));
|
disconnect(currentImageViewer[0], SIGNAL(leftMouseButtonPressed(int, int)), this, SLOT(onLeftMouseButtonPressed(int, int)));
|
||||||
@ -606,7 +944,7 @@ void HPPA::onTabWidgetCurrentChanged(int index)//
|
|||||||
|
|
||||||
void HPPA::onActionOpenDirectory()
|
void HPPA::onActionOpenDirectory()
|
||||||
{
|
{
|
||||||
FileOperation * fileOperation = new FileOperation();
|
FileOperation* fileOperation = new FileOperation();
|
||||||
string directory = fileOperation->getDirectoryFromString();
|
string directory = fileOperation->getDirectoryFromString();
|
||||||
|
|
||||||
QDesktopServices::openUrl(QUrl::fromLocalFile(QString::fromStdString(directory)));
|
QDesktopServices::openUrl(QUrl::fromLocalFile(QString::fromStdString(directory)));
|
||||||
@ -697,11 +1035,11 @@ void HPPA::onLeftMouseButtonPressed(int x, int y)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
FileOperation * fileOperation = new FileOperation();
|
FileOperation* fileOperation = new FileOperation();
|
||||||
string directory = fileOperation->getDirectoryFromString();
|
string directory = fileOperation->getDirectoryFromString();
|
||||||
string imgPath = directory + "\\" + m_FilenameLineEdit->text().toStdString() + "_" + std::to_string(m_TabWidgetCurrentIndex) + ".bil";
|
string imgPath = directory + "\\" + m_FilenameLineEdit->text().toStdString() + "_" + std::to_string(m_TabWidgetCurrentIndex) + ".bil";
|
||||||
|
|
||||||
ImageReaderWriter *ImageReader = new ImageReaderWriter(imgPath.c_str());
|
ImageReaderWriter* ImageReader = new ImageReaderWriter(imgPath.c_str());
|
||||||
|
|
||||||
|
|
||||||
if (x < 0 || x>ImageReader->getXCount() || y<0 || y>ImageReader->getyCount() - 1)
|
if (x < 0 || x>ImageReader->getXCount() || y<0 || y>ImageReader->getyCount() - 1)
|
||||||
@ -710,10 +1048,10 @@ void HPPA::onLeftMouseButtonPressed(int x, int y)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
float *data = ImageReader->ReadImage(x, y, 1, 1);
|
float* data = ImageReader->ReadImage(x, y, 1, 1);
|
||||||
|
|
||||||
|
|
||||||
QLineSeries *series = new QLineSeries();
|
QLineSeries* series = new QLineSeries();
|
||||||
//series->clear();//////////////////////////////
|
//series->clear();//////////////////////////////
|
||||||
|
|
||||||
QString imagerSelected = mImagerGroup->checkedAction()->objectName();
|
QString imagerSelected = mImagerGroup->checkedAction()->objectName();
|
||||||
@ -751,18 +1089,16 @@ void HPPA::onLeftMouseButtonPressed(int x, int y)
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
series->setPen(QPen(QColor("#FF928A"), 2));
|
||||||
|
|
||||||
|
m_chart->removeAllSeries();
|
||||||
|
m_chart->addSeries(series);
|
||||||
|
m_chart->createDefaultAxes();
|
||||||
|
|
||||||
|
QValueAxis* axisX = qobject_cast<QValueAxis*>(m_chart->axisX());
|
||||||
|
QValueAxis* axisY = qobject_cast<QValueAxis*>(m_chart->axisY());
|
||||||
|
|
||||||
QChart *chart = new QChart();
|
setAxis(axisX, axisY);
|
||||||
chart->legend()->hide();
|
|
||||||
chart->addSeries(series);
|
|
||||||
chart->createDefaultAxes();
|
|
||||||
//chart->setTitle("Simple line chart example");
|
|
||||||
|
|
||||||
m_chartView->setChart(chart);
|
|
||||||
//m_chartView->update();//////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
/*std::cout << "x<><78><EFBFBD><EFBFBD>:" << x << std::endl;
|
/*std::cout << "x<><78><EFBFBD><EFBFBD>:" << x << std::endl;
|
||||||
std::cout << "y<><79><EFBFBD><EFBFBD>:" << y << std::endl;
|
std::cout << "y<><79><EFBFBD><EFBFBD>:" << y << std::endl;
|
||||||
@ -776,7 +1112,31 @@ void HPPA::onLeftMouseButtonPressed(int x, int y)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void HPPA::timerEvent(QTimerEvent *event)
|
void HPPA::setAxis(QValueAxis* axisX, QValueAxis* axisY)
|
||||||
|
{
|
||||||
|
if (axisX && axisY)
|
||||||
|
{
|
||||||
|
QPen axisPen(QColor("#ACCDFF"));
|
||||||
|
axisPen.setWidth(1);
|
||||||
|
|
||||||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ
|
||||||
|
axisX->setLinePen(axisPen);
|
||||||
|
axisY->setLinePen(axisPen);
|
||||||
|
|
||||||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǩ<EFBFBD><C7A9>ɫ
|
||||||
|
axisX->setLabelsColor(QColor("#ACCDFF"));
|
||||||
|
axisY->setLabelsColor(QColor("#ACCDFF"));
|
||||||
|
|
||||||
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɫ
|
||||||
|
QPen gridPen(QColor("#262A4C"));
|
||||||
|
gridPen.setStyle(Qt::DashLine);
|
||||||
|
gridPen.setWidth(2);
|
||||||
|
axisX->setGridLinePen(gridPen);
|
||||||
|
axisY->setGridLinePen(gridPen);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void HPPA::timerEvent(QTimerEvent* event)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -801,12 +1161,12 @@ void HPPA::onPlotRgbImage()
|
|||||||
//std::cout << "<22><>ʾ<EFBFBD><CABE>Ƶ+++++++++++++++++++++++++++++++++++++++++++" << std::endl;
|
//std::cout << "<22><>ʾ<EFBFBD><CABE>Ƶ+++++++++++++++++++++++++++++++++++++++++++" << std::endl;
|
||||||
QPixmap pixmap = QPixmap::fromImage(m_RgbCamera->m_qImage);
|
QPixmap pixmap = QPixmap::fromImage(m_RgbCamera->m_qImage);
|
||||||
|
|
||||||
int width = ui.cam_label->width();
|
int width = m_cam_label->width();
|
||||||
int height = ui.cam_label->height();
|
int height = m_cam_label->height();
|
||||||
QPixmap fitpixmap = pixmap.scaled(width, height, Qt::KeepAspectRatio, Qt::SmoothTransformation); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
QPixmap fitpixmap = pixmap.scaled(width, height, Qt::KeepAspectRatio, Qt::SmoothTransformation); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
|
||||||
ui.cam_label->setPixmap(fitpixmap);
|
m_cam_label->setPixmap(fitpixmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HPPA::onCloseRgbCamera()
|
void HPPA::onCloseRgbCamera()
|
||||||
@ -817,8 +1177,8 @@ void HPPA::onCloseRgbCamera()
|
|||||||
|
|
||||||
void HPPA::onClearLabel()
|
void HPPA::onClearLabel()
|
||||||
{
|
{
|
||||||
ui.cam_label->clear();
|
m_cam_label->clear();
|
||||||
ui.cam_label->setText("closed");
|
m_cam_label->setText("closed");
|
||||||
}
|
}
|
||||||
|
|
||||||
void HPPA::onCopyFinished()
|
void HPPA::onCopyFinished()
|
||||||
@ -1031,17 +1391,17 @@ void HPPA::onFocus2(int command)
|
|||||||
if (command == 1)
|
if (command == 1)
|
||||||
{
|
{
|
||||||
//<2F><><EFBFBD><EFBFBD>Ӱ<EFBFBD><D3B0><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
|
//<2F><><EFBFBD><EFBFBD>Ӱ<EFBFBD><D3B0><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
|
||||||
QWidget * tabTmp = new QWidget();
|
QWidget* tabTmp = new QWidget();
|
||||||
|
|
||||||
QGridLayout *GridLayout = new QGridLayout();
|
QGridLayout* GridLayout = new QGridLayout();
|
||||||
GridLayout->addWidget(new ImageViewer(tabTmp));
|
GridLayout->addWidget(new ImageViewer(tabTmp));
|
||||||
|
|
||||||
tabTmp->setLayout(GridLayout);
|
tabTmp->setLayout(GridLayout);
|
||||||
|
|
||||||
ui.ImageViewerTabWidget->addTab(tabTmp, QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"));
|
m_imageViewerTabWidget->addTab(tabTmp, QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"));
|
||||||
|
|
||||||
//ui.ImageViewerTabWidget->setCurrentIndex(trackNumber);
|
//m_imageViewerTabWidget->setCurrentIndex(trackNumber);
|
||||||
ui.ImageViewerTabWidget->setCurrentWidget(tabTmp);
|
m_imageViewerTabWidget->setCurrentWidget(tabTmp);
|
||||||
|
|
||||||
|
|
||||||
//<2F><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>
|
//<2F><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>
|
||||||
@ -1132,8 +1492,8 @@ void HPPA::onPlotHyperspectralImageRgbImage(int fileNumber, int frameNumber)
|
|||||||
|
|
||||||
//return;
|
//return;
|
||||||
//<2F><>ȡ<EFBFBD><C8A1>ͼ<EFBFBD>ؼ<EFBFBD>
|
//<2F><>ȡ<EFBFBD><C8A1>ͼ<EFBFBD>ؼ<EFBFBD>
|
||||||
QWidget* currentWidget = ui.ImageViewerTabWidget->widget(fileNumber);
|
QWidget* currentWidget = m_imageViewerTabWidget->widget(fileNumber);
|
||||||
QList<ImageViewer *> currentImageViewer = currentWidget->findChildren<ImageViewer *>();
|
QList<ImageViewer*> currentImageViewer = currentWidget->findChildren<ImageViewer*>();
|
||||||
currentImageViewer[0]->DisplayFrameNumber(m_Imager->getFrameCounter());//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD>Ѿ<EFBFBD><D1BE>ɼ<EFBFBD><C9BC><EFBFBD>֡<EFBFBD><D6A1>
|
currentImageViewer[0]->DisplayFrameNumber(m_Imager->getFrameCounter());//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD>Ѿ<EFBFBD><D1BE>ɼ<EFBFBD><C9BC><EFBFBD>֡<EFBFBD><D6A1>
|
||||||
|
|
||||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA>ʾ<EFBFBD><CABE>ͼ<EFBFBD><CDBC>--opencv<63>汾
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA>ʾ<EFBFBD><CABE>ͼ<EFBFBD><CDBC>--opencv<63>汾
|
||||||
@ -1167,8 +1527,8 @@ void HPPA::PlotSpectral(int state)
|
|||||||
if (state == 1)
|
if (state == 1)
|
||||||
{
|
{
|
||||||
//<2F><>ʾӰ<CABE><D3B0>
|
//<2F><>ʾӰ<CABE><D3B0>
|
||||||
QWidget* currentWidget = ui.ImageViewerTabWidget->currentWidget();
|
QWidget* currentWidget = m_imageViewerTabWidget->currentWidget();
|
||||||
QList<ImageViewer *> currentImageViewer = currentWidget->findChildren<ImageViewer *>();
|
QList<ImageViewer*> currentImageViewer = currentWidget->findChildren<ImageViewer*>();
|
||||||
currentImageViewer[0]->DisplayFrameNumber(m_Imager->getFocusFrameCounter());//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD>Ѿ<EFBFBD><D1BE>ɼ<EFBFBD><C9BC><EFBFBD>֡<EFBFBD><D6A1>
|
currentImageViewer[0]->DisplayFrameNumber(m_Imager->getFocusFrameCounter());//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD>Ѿ<EFBFBD><D1BE>ɼ<EFBFBD><C9BC><EFBFBD>֡<EFBFBD><D6A1>
|
||||||
|
|
||||||
ImageProcessor imageProcessor;
|
ImageProcessor imageProcessor;
|
||||||
@ -1179,7 +1539,7 @@ void HPPA::PlotSpectral(int state)
|
|||||||
currentImageViewer[0]->SetImage(&QPixmap::fromImage(m_Imager->getQImageFocusGrayImage()));//<2F><><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC>
|
currentImageViewer[0]->SetImage(&QPixmap::fromImage(m_Imager->getQImageFocusGrayImage()));//<2F><><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC>
|
||||||
|
|
||||||
//<2F><><EFBFBD>ƹ<EFBFBD><C6B9><EFBFBD>
|
//<2F><><EFBFBD>ƹ<EFBFBD><C6B9><EFBFBD>
|
||||||
QLineSeries *series = new QLineSeries();
|
QLineSeries* series = new QLineSeries();
|
||||||
//series->clear();//////////////////////////////
|
//series->clear();//////////////////////////////
|
||||||
int sampleCount = m_Imager->getSampleCount();
|
int sampleCount = m_Imager->getSampleCount();
|
||||||
for (size_t i = 0; i < sampleCount; i++)
|
for (size_t i = 0; i < sampleCount; i++)
|
||||||
@ -1190,7 +1550,7 @@ void HPPA::PlotSpectral(int state)
|
|||||||
series->append(i, m_Imager->buffer[1368 * 150 + i]);
|
series->append(i, m_Imager->buffer[1368 * 150 + i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
QChart *chart = new QChart();
|
QChart* chart = new QChart();
|
||||||
chart->legend()->hide();
|
chart->legend()->hide();
|
||||||
chart->addSeries(series);
|
chart->addSeries(series);
|
||||||
chart->createDefaultAxes();
|
chart->createDefaultAxes();
|
||||||
@ -1206,7 +1566,7 @@ void HPPA::PlotSpectral(int state)
|
|||||||
|
|
||||||
|
|
||||||
////<2F><>ʾӰ<CABE><D3B0>
|
////<2F><>ʾӰ<CABE><D3B0>
|
||||||
//QWidget* currentWidget = ui.ImageViewerTabWidget->currentWidget();
|
//QWidget* currentWidget = m_imageViewerTabWidget->currentWidget();
|
||||||
//QList<ImageViewer *> currentImageViewer = currentWidget->findChildren<ImageViewer *>();
|
//QList<ImageViewer *> currentImageViewer = currentWidget->findChildren<ImageViewer *>();
|
||||||
//
|
//
|
||||||
|
|
||||||
@ -1288,7 +1648,7 @@ void HPPA::onsequenceComplete()
|
|||||||
m_RecordState++;
|
m_RecordState++;
|
||||||
}
|
}
|
||||||
|
|
||||||
WorkerThread3::WorkerThread3(CFocusMotorControl * ctrlFocusMotor)
|
WorkerThread3::WorkerThread3(CFocusMotorControl* ctrlFocusMotor)
|
||||||
{
|
{
|
||||||
m_ctrlFocusMotor = ctrlFocusMotor;
|
m_ctrlFocusMotor = ctrlFocusMotor;
|
||||||
}
|
}
|
||||||
|
|||||||
44
HPPA/HPPA.h
44
HPPA/HPPA.h
@ -12,6 +12,7 @@
|
|||||||
#include <QLineSeries>
|
#include <QLineSeries>
|
||||||
#include <QChart>
|
#include <QChart>
|
||||||
#include <QChartView>
|
#include <QChartView>
|
||||||
|
#include <QValueAxis>
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
|
|
||||||
#include <QNetworkRequest>
|
#include <QNetworkRequest>
|
||||||
@ -42,6 +43,9 @@
|
|||||||
#include "ResononNirImager.h"
|
#include "ResononNirImager.h"
|
||||||
#include "Corning410Imager.h"
|
#include "Corning410Imager.h"
|
||||||
|
|
||||||
|
#include "CustomDockWidgetBase.h"
|
||||||
|
#include "Carousel.h"
|
||||||
|
|
||||||
#define PI 3.1415926
|
#define PI 3.1415926
|
||||||
|
|
||||||
QT_CHARTS_USE_NAMESPACE//QChartView ʹ<><CAB9> <20><>Ҫ<EFBFBD>Ӻ꣬ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD><CAB9>
|
QT_CHARTS_USE_NAMESPACE//QChartView ʹ<><CAB9> <20><>Ҫ<EFBFBD>Ӻ꣬ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʹ<EFBFBD><CAB9>
|
||||||
@ -123,6 +127,31 @@ signals:
|
|||||||
void threadSignal(QString s);
|
void threadSignal(QString s);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class WidgetWithBackgroundPicture : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit WidgetWithBackgroundPicture(QWidget* parent = nullptr)
|
||||||
|
: QWidget(parent),
|
||||||
|
m_pixmap(".//icon//titile_bar_bgp.png") // ʹ<><CAB9><EFBFBD><EFBFBD>Դ<EFBFBD><D4B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>·<EFBFBD><C2B7>
|
||||||
|
{
|
||||||
|
// <20><>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD>ó<EFBFBD>ʼ<EFBFBD><CABC>С
|
||||||
|
resize(800, 600);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void paintEvent(QPaintEvent* event) override
|
||||||
|
{
|
||||||
|
QPainter painter(this);
|
||||||
|
QPixmap scaled = m_pixmap.scaled(size(), Qt::KeepAspectRatioByExpanding, Qt::SmoothTransformation);
|
||||||
|
painter.drawPixmap(rect(), scaled);
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
QPixmap m_pixmap;
|
||||||
|
};
|
||||||
|
|
||||||
class HPPA : public QMainWindow
|
class HPPA : public QMainWindow
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -137,11 +166,14 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::HPPAClass ui;
|
Ui::HPPAClass ui;
|
||||||
|
QTabWidget* m_imageViewerTabWidget;
|
||||||
|
|
||||||
QMenu* mPanelMenu = nullptr;
|
QMenu* mPanelMenu = nullptr;
|
||||||
QMenu* mToolbarMenu = nullptr;
|
QMenu* mToolbarMenu = nullptr;
|
||||||
|
|
||||||
|
void initMenubarToolbar();
|
||||||
void initPanelToolbar();
|
void initPanelToolbar();
|
||||||
|
void initControlTabwidget();
|
||||||
|
|
||||||
QLineEdit * frame_number;
|
QLineEdit * frame_number;
|
||||||
QLineEdit * m_FilenameLineEdit;
|
QLineEdit * m_FilenameLineEdit;
|
||||||
@ -160,6 +192,7 @@ private:
|
|||||||
FileOperation * m_FileOperation;
|
FileOperation * m_FileOperation;
|
||||||
|
|
||||||
QChartView * m_chartView;
|
QChartView * m_chartView;
|
||||||
|
QChart* m_chart;
|
||||||
|
|
||||||
//QLineSeries *series;
|
//QLineSeries *series;
|
||||||
//QChart *chart;
|
//QChart *chart;
|
||||||
@ -189,13 +222,17 @@ private:
|
|||||||
RobotArmControl* rac;
|
RobotArmControl* rac;
|
||||||
|
|
||||||
OneMotorControl* omc;
|
OneMotorControl* omc;
|
||||||
QDockWidget* dock_omc;
|
|
||||||
|
|
||||||
TwoMotorControl* tmc;
|
TwoMotorControl* tmc;
|
||||||
QDockWidget* dock_tmc;
|
|
||||||
|
|
||||||
FILE* m_hTimesFile;
|
FILE* m_hTimesFile;
|
||||||
|
|
||||||
|
CustomDockWidgetBase* m_dock_carousel;
|
||||||
|
|
||||||
|
MyCarousel* m_carousel;
|
||||||
|
QLabel* m_cam_label;
|
||||||
|
QPushButton* m_open_rgb_camera_btn;
|
||||||
|
QPushButton* m_close_rgb_camera_btn;
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
void onPlotHyperspectralImageRgbImage(int fileNumber, int frameNumber);
|
void onPlotHyperspectralImageRgbImage(int fileNumber, int frameNumber);
|
||||||
void PlotSpectral(int state);
|
void PlotSpectral(int state);
|
||||||
@ -228,6 +265,7 @@ public Q_SLOTS:
|
|||||||
void OnGainSliderChanged(double Gain);//
|
void OnGainSliderChanged(double Gain);//
|
||||||
|
|
||||||
void onLeftMouseButtonPressed(int x, int y);//<2F><><EFBFBD><EFBFBD>Ӱ<EFBFBD><D3B0><EFBFBD><EFBFBD>Ԫ<EFBFBD><D4AA>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
|
void onLeftMouseButtonPressed(int x, int y);//<2F><><EFBFBD><EFBFBD>Ӱ<EFBFBD><D3B0><EFBFBD><EFBFBD>Ԫ<EFBFBD><D4AA>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD>
|
||||||
|
void setAxis(QValueAxis* axisX, QValueAxis* axisY);
|
||||||
|
|
||||||
|
|
||||||
void timerEvent(QTimerEvent *event);
|
void timerEvent(QTimerEvent *event);
|
||||||
|
|||||||
312
HPPA/HPPA.ui
312
HPPA/HPPA.ui
@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1194</width>
|
<width>1486</width>
|
||||||
<height>834</height>
|
<height>899</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -37,46 +37,6 @@
|
|||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QTabWidget" name="ImageViewerTabWidget">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
|
||||||
<horstretch>5</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="currentIndex">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="tab_4">
|
|
||||||
<attribute name="title">
|
|
||||||
<string>Tab 1</string>
|
|
||||||
</attribute>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_5">
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</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>0</number>
|
|
||||||
</property>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="tab_5">
|
|
||||||
<attribute name="title">
|
|
||||||
<string>Tab 2</string>
|
|
||||||
</attribute>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenuBar" name="menuBar">
|
<widget class="QMenuBar" name="menuBar">
|
||||||
@ -84,7 +44,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1194</width>
|
<width>1486</width>
|
||||||
<height>30</height>
|
<height>30</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -273,125 +233,15 @@ QToolBar QToolButton:hover {
|
|||||||
</string>
|
</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QDockWidget" name="mDockWidgetRGBCamera">
|
<widget class="CustomDockWidgetBase" name="mDockWidgetSimulator">
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">/* 标题设置 */
|
<string notr="true"/>
|
||||||
QDockWidget::title {
|
|
||||||
text-align: left;
|
|
||||||
background-color: rgb(240, 240, 240);
|
|
||||||
/*padding-left: 35px;*/
|
|
||||||
}</string>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>RGB 相机</string>
|
|
||||||
</property>
|
|
||||||
<attribute name="dockWidgetArea">
|
|
||||||
<number>1</number>
|
|
||||||
</attribute>
|
|
||||||
<widget class="QWidget" name="dockWidgetContents">
|
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</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>0</number>
|
|
||||||
</property>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QGroupBox" name="groupBox_4">
|
|
||||||
<property name="mouseTracking">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">QGroupBox {
|
|
||||||
/* border: 2px solid #3498db; 边框颜色 */
|
|
||||||
border-radius: 5px; /* 圆角 */
|
|
||||||
padding: 10px; /* 内边距 */
|
|
||||||
background-color: rgb(255, 255, 255);
|
|
||||||
}
|
|
||||||
|
|
||||||
QGroupBox:title {
|
|
||||||
subcontrol-position: top left; /* 标题位置 */
|
|
||||||
padding: 0 10px; /* 标题内边距 */
|
|
||||||
font-weight: bold; /* 标题字体加粗 */
|
|
||||||
color: #3498db; /* 标题文字颜色 */
|
|
||||||
}
|
|
||||||
</string>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_3">
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QPushButton" name="close_rgb_camera_btn">
|
|
||||||
<property name="text">
|
|
||||||
<string>关闭</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QPushButton" name="open_rgb_camera_btn">
|
|
||||||
<property name="text">
|
|
||||||
<string>打开</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0" colspan="2">
|
|
||||||
<widget class="QLabel" name="cam_label">
|
|
||||||
<property name="frameShape">
|
|
||||||
<enum>QFrame::NoFrame</enum>
|
|
||||||
</property>
|
|
||||||
<property name="frameShadow">
|
|
||||||
<enum>QFrame::Plain</enum>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>摄像头关闭!</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
<widget class="QDockWidget" name="mDockWidgetSimulator">
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">/* 标题设置 */
|
|
||||||
QDockWidget::title {
|
|
||||||
text-align: left;
|
|
||||||
background-color: rgb(240, 240, 240);
|
|
||||||
/*padding-left: 35px;*/
|
|
||||||
}</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="features">
|
<property name="features">
|
||||||
<set>QDockWidget::AllDockWidgetFeatures</set>
|
<set>QDockWidget::AllDockWidgetFeatures</set>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>线性平台位置模拟</string>
|
<string>3D模型</string>
|
||||||
</property>
|
</property>
|
||||||
<attribute name="dockWidgetArea">
|
<attribute name="dockWidgetArea">
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
@ -432,100 +282,52 @@ QDockWidget::title {
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QDockWidget" name="mDockWidgetSpectralViewer">
|
<widget class="CustomDockWidgetHideAbove" name="mDockWidgetSpectrometer">
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">/* 标题设置 */
|
<string notr="true"/>
|
||||||
QDockWidget::title {
|
|
||||||
text-align: left;
|
|
||||||
background-color: rgb(240, 240, 240);
|
|
||||||
/*padding-left: 35px;*/
|
|
||||||
}</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>光谱曲线</string>
|
<string>控制</string>
|
||||||
</property>
|
|
||||||
<attribute name="dockWidgetArea">
|
|
||||||
<number>2</number>
|
|
||||||
</attribute>
|
|
||||||
<widget class="QWidget" name="dockWidgetContents_3">
|
|
||||||
<layout class="QGridLayout" name="gridLayout_10">
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>0</number>
|
|
||||||
</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>0</number>
|
|
||||||
</property>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
<widget class="QDockWidget" name="mDockWidgetSpectrometer">
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">/* 标题设置 */
|
|
||||||
QDockWidget::title {
|
|
||||||
text-align: left;
|
|
||||||
background-color: rgb(240, 240, 240);
|
|
||||||
/*padding-left: 35px;*/
|
|
||||||
}</string>
|
|
||||||
</property>
|
|
||||||
<property name="windowTitle">
|
|
||||||
<string>光谱仪</string>
|
|
||||||
</property>
|
</property>
|
||||||
<attribute name="dockWidgetArea">
|
<attribute name="dockWidgetArea">
|
||||||
<number>2</number>
|
<number>2</number>
|
||||||
</attribute>
|
</attribute>
|
||||||
<widget class="QWidget" name="dockWidgetContents_4">
|
<widget class="QWidget" name="dockWidgetContents_4">
|
||||||
<layout class="QGridLayout" name="gridLayout_13">
|
<layout class="QGridLayout" name="gridLayout_5">
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
<number>9</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="topMargin">
|
<property name="topMargin">
|
||||||
<number>9</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="rightMargin">
|
<property name="rightMargin">
|
||||||
<number>9</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="bottomMargin">
|
<property name="bottomMargin">
|
||||||
<number>9</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="spacing">
|
<item row="0" column="0">
|
||||||
<number>6</number>
|
<widget class="QTabWidget" name="controlTabWidget">
|
||||||
|
<property name="tabPosition">
|
||||||
|
<enum>QTabWidget::South</enum>
|
||||||
</property>
|
</property>
|
||||||
<item row="1" column="0">
|
<widget class="QWidget" name="tab">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_11">
|
<attribute name="title">
|
||||||
<item>
|
<string>光谱仪</string>
|
||||||
<spacer name="horizontalSpacer_16">
|
</attribute>
|
||||||
<property name="orientation">
|
<layout class="QGridLayout" name="gridLayout_4">
|
||||||
<enum>Qt::Horizontal</enum>
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeType">
|
<property name="topMargin">
|
||||||
<enum>QSizePolicy::Fixed</enum>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="rightMargin">
|
||||||
<size>
|
<number>0</number>
|
||||||
<width>100</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
<property name="bottomMargin">
|
||||||
</item>
|
<number>0</number>
|
||||||
<item>
|
|
||||||
<widget class="QDoubleSlider" name="FramerateSlider">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_10">
|
<layout class="QHBoxLayout" name="horizontalLayout_10">
|
||||||
<item>
|
<item>
|
||||||
@ -571,6 +373,33 @@ QDockWidget::title {
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_11">
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_16">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>100</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QDoubleSlider" name="FramerateSlider">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_12">
|
<layout class="QHBoxLayout" name="horizontalLayout_12">
|
||||||
<item>
|
<item>
|
||||||
@ -717,13 +546,22 @@ QDockWidget::title {
|
|||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>20</width>
|
<width>20</width>
|
||||||
<height>123</height>
|
<height>594</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QWidget" name="tab_2">
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Tab 2</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<action name="action_exit">
|
<action name="action_exit">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -978,7 +816,19 @@ QDockWidget::title {
|
|||||||
<customwidget>
|
<customwidget>
|
||||||
<class>ImagerPositionSimulation</class>
|
<class>ImagerPositionSimulation</class>
|
||||||
<extends>QGraphicsView</extends>
|
<extends>QGraphicsView</extends>
|
||||||
<header location="global">imagerpositionsimulation.h</header>
|
<header>imagerpositionsimulation.h</header>
|
||||||
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>CustomDockWidgetBase</class>
|
||||||
|
<extends>QDockWidget</extends>
|
||||||
|
<header>customdockwidgetbase.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>CustomDockWidgetHideAbove</class>
|
||||||
|
<extends>QDockWidget</extends>
|
||||||
|
<header>CustomDockWidgetBase.h</header>
|
||||||
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
|
|||||||
@ -107,7 +107,9 @@
|
|||||||
<ClCompile Include="aboutWindow.cpp" />
|
<ClCompile Include="aboutWindow.cpp" />
|
||||||
<ClCompile Include="adjustTable.cpp" />
|
<ClCompile Include="adjustTable.cpp" />
|
||||||
<ClCompile Include="CaptureCoordinator.cpp" />
|
<ClCompile Include="CaptureCoordinator.cpp" />
|
||||||
|
<ClCompile Include="Carousel.cpp" />
|
||||||
<ClCompile Include="Corning410Imager.cpp" />
|
<ClCompile Include="Corning410Imager.cpp" />
|
||||||
|
<ClCompile Include="CustomDockWidgetBase.cpp" />
|
||||||
<ClCompile Include="hppaConfigFile.cpp" />
|
<ClCompile Include="hppaConfigFile.cpp" />
|
||||||
<ClCompile Include="ImagerOperationBase.cpp" />
|
<ClCompile Include="ImagerOperationBase.cpp" />
|
||||||
<ClCompile Include="imager_base.cpp" />
|
<ClCompile Include="imager_base.cpp" />
|
||||||
@ -166,6 +168,8 @@
|
|||||||
<QtMoc Include="RobotArmControl.h" />
|
<QtMoc Include="RobotArmControl.h" />
|
||||||
<QtMoc Include="Corning410Imager.h" />
|
<QtMoc Include="Corning410Imager.h" />
|
||||||
<QtMoc Include="CaptureCoordinator.h" />
|
<QtMoc Include="CaptureCoordinator.h" />
|
||||||
|
<QtMoc Include="CustomDockWidgetBase.h" />
|
||||||
|
<QtMoc Include="Carousel.h" />
|
||||||
<ClInclude Include="imager_base.h" />
|
<ClInclude Include="imager_base.h" />
|
||||||
<ClInclude Include="irisximeaimager.h" />
|
<ClInclude Include="irisximeaimager.h" />
|
||||||
<QtMoc Include="OneMotorControl.h" />
|
<QtMoc Include="OneMotorControl.h" />
|
||||||
|
|||||||
@ -133,6 +133,12 @@
|
|||||||
<ClCompile Include="TwoMotorControl.cpp">
|
<ClCompile Include="TwoMotorControl.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="CustomDockWidgetBase.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="Carousel.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<QtMoc Include="fileOperation.h">
|
<QtMoc Include="fileOperation.h">
|
||||||
@ -192,6 +198,12 @@
|
|||||||
<QtMoc Include="CaptureCoordinator.h">
|
<QtMoc Include="CaptureCoordinator.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</QtMoc>
|
</QtMoc>
|
||||||
|
<QtMoc Include="CustomDockWidgetBase.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</QtMoc>
|
||||||
|
<QtMoc Include="Carousel.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</QtMoc>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="imageProcessor.h">
|
<ClInclude Include="imageProcessor.h">
|
||||||
|
|||||||
@ -184,12 +184,13 @@ void TwoMotorControl::onConnectMotor()
|
|||||||
connect(this->ui.ymotor_backward_btn, SIGNAL(pressed()), this, SLOT(onyMotorbackward()));
|
connect(this->ui.ymotor_backward_btn, SIGNAL(pressed()), this, SLOT(onyMotorbackward()));
|
||||||
connect(this->ui.ymotor_backward_btn, SIGNAL(released()), this, SLOT(onyMotorStop()));
|
connect(this->ui.ymotor_backward_btn, SIGNAL(released()), this, SLOT(onyMotorStop()));
|
||||||
|
|
||||||
//connect(this->ui.move2loc_pushButton, SIGNAL(pressed()), this, SLOT(onxMove2Loc()));
|
connect(this->ui.move2loc_x_pushButton, SIGNAL(pressed()), this, SLOT(onxMove2Loc()));
|
||||||
|
connect(this->ui.move2loc_y_pushButton, SIGNAL(pressed()), this, SLOT(onyMove2Loc()));
|
||||||
|
|
||||||
connect(m_multiAxisController, SIGNAL(broadcastLocationSignal(std::vector<double>)), this, SLOT(displayRealTimeLoc(std::vector<double>)));
|
connect(m_multiAxisController, SIGNAL(broadcastLocationSignal(std::vector<double>)), this, SLOT(displayRealTimeLoc(std::vector<double>)));
|
||||||
|
|
||||||
connect(this, SIGNAL(moveSignal(int, bool, double, int)), m_multiAxisController, SLOT(move(int, bool, double, int)));
|
connect(this, SIGNAL(moveSignal(int, bool, double, int)), m_multiAxisController, SLOT(move(int, bool, double, int)));
|
||||||
//connect(this, SIGNAL(move2LocSignal(int, double, double, int)), m_multiAxisController, SLOT(moveTo(int, double, double, int)));
|
connect(this, SIGNAL(move2LocSignal(int, double, double, int)), m_multiAxisController, SLOT(moveTo(int, double, double, int)));
|
||||||
connect(this, SIGNAL(stopSignal(int)), m_multiAxisController, SLOT(stop(int)));
|
connect(this, SIGNAL(stopSignal(int)), m_multiAxisController, SLOT(stop(int)));
|
||||||
|
|
||||||
connect(this->ui.zero_start_btn, SIGNAL(released()), this, SLOT(zeroStart()));
|
connect(this->ui.zero_start_btn, SIGNAL(released()), this, SLOT(zeroStart()));
|
||||||
@ -291,6 +292,22 @@ void TwoMotorControl::onyMotorStop()
|
|||||||
emit stopSignal(1);
|
emit stopSignal(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TwoMotorControl::onxMove2Loc()
|
||||||
|
{
|
||||||
|
double s = ui.xmotor_move_speed_lineEdit->text().toDouble();
|
||||||
|
double l = ui.move2loc_x_lineEdit->text().toDouble();
|
||||||
|
|
||||||
|
emit move2LocSignal(0, l, s, 1000);
|
||||||
|
}
|
||||||
|
|
||||||
|
void TwoMotorControl::onyMove2Loc()
|
||||||
|
{
|
||||||
|
double s = ui.ymotor_move_speed_lineEdit->text().toDouble();
|
||||||
|
double l = ui.move2loc_y_lineEdit->text().toDouble();
|
||||||
|
|
||||||
|
emit move2LocSignal(1, l, s, 1000);
|
||||||
|
}
|
||||||
|
|
||||||
void TwoMotorControl::displayRealTimeLoc(std::vector<double> loc)
|
void TwoMotorControl::displayRealTimeLoc(std::vector<double> loc)
|
||||||
{
|
{
|
||||||
double tmp = round(loc[0] * 100) / 100;
|
double tmp = round(loc[0] * 100) / 100;
|
||||||
|
|||||||
@ -48,10 +48,12 @@ public Q_SLOTS:
|
|||||||
void onxMotorRight();
|
void onxMotorRight();
|
||||||
void onxMotorLeft();
|
void onxMotorLeft();
|
||||||
void onxMotorStop();
|
void onxMotorStop();
|
||||||
|
void onxMove2Loc();
|
||||||
|
|
||||||
void onyMotorforward();
|
void onyMotorforward();
|
||||||
void onyMotorbackward();
|
void onyMotorbackward();
|
||||||
void onyMotorStop();
|
void onyMotorStop();
|
||||||
|
void onyMove2Loc();
|
||||||
|
|
||||||
void onAddRecordLine_btn();
|
void onAddRecordLine_btn();
|
||||||
void onRemoveRecordLine_btn();
|
void onRemoveRecordLine_btn();
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>684</width>
|
<width>684</width>
|
||||||
<height>674</height>
|
<height>799</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -43,18 +43,24 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>684</width>
|
<width>684</width>
|
||||||
<height>674</height>
|
<height>799</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_6">
|
<layout class="QGridLayout" name="gridLayout_6">
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QGroupBox" name="groupBox_2">
|
<widget class="QGroupBox" name="groupBox_2">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
<sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>150</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true"/>
|
<string notr="true"/>
|
||||||
</property>
|
</property>
|
||||||
@ -62,26 +68,21 @@
|
|||||||
<string>控制</string>
|
<string>控制</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_5">
|
<layout class="QGridLayout" name="gridLayout_5">
|
||||||
<item row="1" column="0">
|
<property name="leftMargin">
|
||||||
<spacer name="verticalSpacer_3">
|
<number>0</number>
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="topMargin">
|
||||||
<size>
|
<number>0</number>
|
||||||
<width>20</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
<property name="rightMargin">
|
||||||
</item>
|
<number>0</number>
|
||||||
<item row="2" column="0">
|
</property>
|
||||||
<widget class="QPushButton" name="run_btn">
|
<property name="bottomMargin">
|
||||||
<property name="text">
|
<number>0</number>
|
||||||
<string>运行</string>
|
</property>
|
||||||
|
<property name="spacing">
|
||||||
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QWidget" name="widget" native="true">
|
<widget class="QWidget" name="widget" native="true">
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
@ -247,6 +248,13 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QPushButton" name="run_btn">
|
||||||
|
<property name="text">
|
||||||
|
<string>运行</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QPushButton" name="stop_btn">
|
<widget class="QPushButton" name="stop_btn">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -254,17 +262,39 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<spacer name="verticalSpacer_3">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Expanding</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QGroupBox" name="groupBox_3">
|
<widget class="QGroupBox" name="groupBox_3">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>127</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">#QGroupBox{border:none}</string>
|
<string notr="true">#QGroupBox{border:none}</string>
|
||||||
</property>
|
</property>
|
||||||
@ -272,6 +302,37 @@
|
|||||||
<string>x马达</string>
|
<string>x马达</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_3">
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</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>6</number>
|
||||||
|
</property>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Expanding</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>1</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
<item>
|
<item>
|
||||||
@ -399,19 +460,6 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="3" column="0">
|
||||||
<spacer name="verticalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>112</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer_6">
|
<spacer name="horizontalSpacer_6">
|
||||||
@ -444,6 +492,66 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="move2loc_x_pushButton">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" 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>50</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>移动至</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="move2loc_x_lineEdit">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
|
<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">background-color: rgb(255, 255, 255);</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>0</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -455,6 +563,12 @@
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>125</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true"/>
|
<string notr="true"/>
|
||||||
</property>
|
</property>
|
||||||
@ -462,6 +576,18 @@
|
|||||||
<string>y马达</string>
|
<string>y马达</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||||
<item>
|
<item>
|
||||||
@ -588,7 +714,20 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="4" column="0">
|
||||||
|
<spacer name="verticalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||||
<item>
|
<item>
|
||||||
<spacer name="horizontalSpacer_7">
|
<spacer name="horizontalSpacer_7">
|
||||||
@ -621,18 +760,65 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="2" column="0">
|
||||||
<spacer name="verticalSpacer_2">
|
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
||||||
<property name="orientation">
|
<item>
|
||||||
<enum>Qt::Vertical</enum>
|
<widget class="QPushButton" name="move2loc_y_pushButton">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>20</width>
|
<width>0</width>
|
||||||
<height>0</height>
|
<height>0</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>50</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>移动至</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="move2loc_y_lineEdit">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
|
<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">background-color: rgb(255, 255, 255);</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>0</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
@ -643,6 +829,18 @@
|
|||||||
<string>采集线</string>
|
<string>采集线</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_4">
|
<layout class="QGridLayout" name="gridLayout_4">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_23">
|
<layout class="QHBoxLayout" name="horizontalLayout_23">
|
||||||
<item>
|
<item>
|
||||||
|
|||||||
Reference in New Issue
Block a user