相机参数有效性控制2
This commit is contained in:
126
HPPA/HPPA.cpp
126
HPPA/HPPA.cpp
@ -93,27 +93,6 @@ HPPA::HPPA(QWidget* parent)
|
|||||||
ui.splitter->setStretchFactor(2, 3);*/
|
ui.splitter->setStretchFactor(2, 3);*/
|
||||||
|
|
||||||
initMenubarToolbar();
|
initMenubarToolbar();
|
||||||
|
|
||||||
//光谱仪操作
|
|
||||||
m_Imager = nullptr;
|
|
||||||
m_RecordState = 0;
|
|
||||||
connect(this->ui.action_connect_imager, SIGNAL(triggered()), this, SLOT(onconnect()));//信号与槽:连接相机,相机操作相关信号与槽绑定放在函数onconnect中
|
|
||||||
|
|
||||||
//设置相机可用帧率范围:这些设置必须在slider的信号和槽连接connect前,否则setMinimum会改变slider的值
|
|
||||||
ui.FramerateSlider->setMinimum(1);
|
|
||||||
ui.FramerateSlider->setMaximum(250);
|
|
||||||
ui.GainSlider->setMinimum(0);
|
|
||||||
ui.GainSlider->setMaximum(24);
|
|
||||||
//相机参数控件设置为不可用
|
|
||||||
frame_number->setEnabled(false);
|
|
||||||
|
|
||||||
ui.framerate_lineEdit->setEnabled(false);
|
|
||||||
ui.integratioin_time_lineEdit->setEnabled(false);
|
|
||||||
ui.gain_lineEdit->setEnabled(false);
|
|
||||||
|
|
||||||
ui.FramerateSlider->setEnabled(false);
|
|
||||||
ui.IntegratioinTimeSlider->setEnabled(false);
|
|
||||||
ui.GainSlider->setEnabled(false);
|
|
||||||
|
|
||||||
startTimer(1000);
|
startTimer(1000);
|
||||||
|
|
||||||
@ -572,7 +551,10 @@ sizePolicy1.setHeightForWidth(graphicsView_delete->sizePolicy().hasHeightForWidt
|
|||||||
}
|
}
|
||||||
)");
|
)");
|
||||||
|
|
||||||
|
//光谱仪操作
|
||||||
|
m_Imager = nullptr;
|
||||||
|
m_RecordState = 0;
|
||||||
|
connect(this->ui.action_connect_imager, SIGNAL(triggered()), this, SLOT(onconnect()));//信号与槽:连接相机,相机操作相关信号与槽绑定放在函数onconnect中
|
||||||
|
|
||||||
createActionGroups();
|
createActionGroups();
|
||||||
connect(mImagerGroup, &QActionGroup::triggered, this, &HPPA::selectingImager);
|
connect(mImagerGroup, &QActionGroup::triggered, this, &HPPA::selectingImager);
|
||||||
@ -693,6 +675,7 @@ void HPPA::initMenubarToolbar()
|
|||||||
}
|
}
|
||||||
)");
|
)");
|
||||||
QAction* action = ui.mainToolBar->insertWidget(ui.action_start_recording, frame_number);
|
QAction* action = ui.mainToolBar->insertWidget(ui.action_start_recording, frame_number);
|
||||||
|
frame_number->setEnabled(false);
|
||||||
|
|
||||||
m_FilenameLineEdit = new QLineEdit(ui.mainToolBar);
|
m_FilenameLineEdit = new QLineEdit(ui.mainToolBar);
|
||||||
m_FilenameLineEdit->setStyleSheet("QLineEdit{background-color:rgb(255,255,255);}");
|
m_FilenameLineEdit->setStyleSheet("QLineEdit{background-color:rgb(255,255,255);}");
|
||||||
@ -801,6 +784,10 @@ QWidget* HPPA::tmp(QWidget* a)
|
|||||||
|
|
||||||
void HPPA::initControlTabwidget()
|
void HPPA::initControlTabwidget()
|
||||||
{
|
{
|
||||||
|
m_hic = new HyperImagerControl();
|
||||||
|
ui.controlTabWidget->addTab(m_hic, QString::fromLocal8Bit("光谱仪"));
|
||||||
|
m_hic->setDisabled(true);
|
||||||
|
|
||||||
//rgb相机
|
//rgb相机
|
||||||
m_RgbCameraThread = new QThread();
|
m_RgbCameraThread = new QThread();
|
||||||
m_RgbCamera = new RgbCameraOperation();
|
m_RgbCamera = new RgbCameraOperation();
|
||||||
@ -962,8 +949,8 @@ void HPPA::updateImagerPicture(const QString& actionName)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ui.imagerPictureLabel->setAttribute(Qt::WA_TranslucentBackground);
|
m_hic->imagerPictureLabel()->setAttribute(Qt::WA_TranslucentBackground);
|
||||||
ui.imagerPictureLabel->setOriginalPixmap(QPixmap::fromImage(img));
|
m_hic->imagerPictureLabel()->setOriginalPixmap(QPixmap::fromImage(img));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1305,15 +1292,6 @@ void HPPA::createPlantPhenotypeScenario()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void HPPA::CalculateIntegratioinTimeRange()
|
|
||||||
{
|
|
||||||
double range = 1 / m_Imager->getFramerate() * 1000;//毫秒
|
|
||||||
|
|
||||||
ui.IntegratioinTimeSlider->blockSignals(true);//因为setMaximum会触发valueChanged信号,所以调用setMaximum前需要阻断信号
|
|
||||||
ui.IntegratioinTimeSlider->setMaximum(range);
|
|
||||||
ui.IntegratioinTimeSlider->blockSignals(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
void HPPA::onStartRecordStep1()
|
void HPPA::onStartRecordStep1()
|
||||||
{
|
{
|
||||||
QAction* checked = moveplatformActionGroup->checkedAction();
|
QAction* checked = moveplatformActionGroup->checkedAction();
|
||||||
@ -1382,7 +1360,7 @@ void HPPA::onStartRecordStep1()
|
|||||||
m_RecordState -= 1;
|
m_RecordState -= 1;
|
||||||
|
|
||||||
ui.action_start_recording->setText(QString::fromLocal8Bit("采集"));
|
ui.action_start_recording->setText(QString::fromLocal8Bit("采集"));
|
||||||
ui.action_start_recording->setIcon(QIcon(".//icon//all//record_done.svg"));
|
ui.action_start_recording->setIcon(QIcon(".//icon//all//record_done.svg"));
|
||||||
//ui.mainToolBar->widgetForAction(ui.action_start_recording)->setStyleSheet("QWidget{background-color:rgb(0,255,0);}");
|
//ui.mainToolBar->widgetForAction(ui.action_start_recording)->setStyleSheet("QWidget{background-color:rgb(0,255,0);}");
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@ -1542,52 +1520,24 @@ void HPPA::onActionOpenDirectory()
|
|||||||
string directory = fileOperation->getDirectoryFromString();
|
string directory = fileOperation->getDirectoryFromString();
|
||||||
|
|
||||||
QDesktopServices::openUrl(QUrl::fromLocalFile(QString::fromStdString(directory)));
|
QDesktopServices::openUrl(QUrl::fromLocalFile(QString::fromStdString(directory)));
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void HPPA::OnFramerateLineeditEditingFinished()
|
void HPPA::onFramerateChanged(double framerate)
|
||||||
{
|
{
|
||||||
std::cout << "Lineedit设置帧率------------------------------------------" << std::endl;
|
m_Imager->setFramerate(framerate);
|
||||||
m_Imager->setFramerate(this->ui.framerate_lineEdit->text().toDouble());
|
m_hic->setFrameRate(m_Imager->getFramerate());
|
||||||
ui.FramerateSlider->setValue(ui.framerate_lineEdit->text().toDouble());
|
|
||||||
|
|
||||||
CalculateIntegratioinTimeRange();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void HPPA::OnFramerateSliderChanged(double framerate)
|
void HPPA::onIntegrationTimeChanged(double integrationTime)
|
||||||
{
|
{
|
||||||
std::cout << "Slider设置帧率------------------------------------------" << std::endl;
|
m_Imager->setIntegrationTime(integrationTime);
|
||||||
m_Imager->setFramerate(this->ui.framerate_lineEdit->text().toDouble());
|
m_hic->setIntegrationTime(m_Imager->getIntegrationTime());
|
||||||
ui.framerate_lineEdit->setText(QString::number(framerate));
|
|
||||||
|
|
||||||
CalculateIntegratioinTimeRange();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void HPPA::OnIntegratioinTimeEditingFinished()
|
void HPPA::onGainChanged(double gain)
|
||||||
{
|
{
|
||||||
std::cout << "Lineedit设置积分时间------------------------------------------" << std::endl;
|
m_Imager->setGain(gain);
|
||||||
m_Imager->setIntegrationTime(this->ui.integratioin_time_lineEdit->text().toDouble());
|
m_hic->setGain(m_Imager->getGain());
|
||||||
ui.IntegratioinTimeSlider->setValue(ui.integratioin_time_lineEdit->text().toDouble());
|
|
||||||
}
|
|
||||||
|
|
||||||
void HPPA::OnIntegratioinTimeSliderChanged(double IntegratioinTime)
|
|
||||||
{
|
|
||||||
std::cout << "Slider设置积分时间------------------------------------------" << std::endl;
|
|
||||||
m_Imager->setIntegrationTime(IntegratioinTime);
|
|
||||||
ui.integratioin_time_lineEdit->setText(QString::number(IntegratioinTime));
|
|
||||||
}
|
|
||||||
|
|
||||||
void HPPA::OnGainEditingFinished()
|
|
||||||
{
|
|
||||||
m_Imager->setGain(this->ui.gain_lineEdit->text().toDouble());
|
|
||||||
ui.GainSlider->setValue(ui.gain_lineEdit->text().toDouble());
|
|
||||||
}
|
|
||||||
|
|
||||||
void HPPA::OnGainSliderChanged(double Gain)
|
|
||||||
{
|
|
||||||
m_Imager->setGain(this->ui.gain_lineEdit->text().toDouble());
|
|
||||||
ui.gain_lineEdit->setText(QString::number(Gain));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void HPPA::onLeftMouseButtonPressed(int x, int y, QVector<double> wavelengths, QVector<double> spectrum)
|
void HPPA::onLeftMouseButtonPressed(int x, int y, QVector<double> wavelengths, QVector<double> spectrum)
|
||||||
@ -1905,25 +1855,13 @@ void HPPA::onconnect()
|
|||||||
|
|
||||||
connect(this->ui.actionOpenDirectory, SIGNAL(triggered()), this, SLOT(onActionOpenDirectory()));
|
connect(this->ui.actionOpenDirectory, SIGNAL(triggered()), this, SLOT(onActionOpenDirectory()));
|
||||||
|
|
||||||
|
connect(m_hic, SIGNAL(framerateChanged(double)), this, SLOT(onFramerateChanged(double)));
|
||||||
connect(this->ui.framerate_lineEdit, SIGNAL(editingFinished()), this, SLOT(OnFramerateLineeditEditingFinished()));
|
connect(m_hic, SIGNAL(integrationTimeChanged(double)), this, SLOT(onIntegrationTimeChanged(double)));
|
||||||
connect(this->ui.FramerateSlider, SIGNAL(valueChanged(double)), this, SLOT(OnFramerateSliderChanged(double)));
|
connect(m_hic, SIGNAL(gainChanged(double)), this, SLOT(onGainChanged(double)));
|
||||||
connect(this->ui.integratioin_time_lineEdit, SIGNAL(editingFinished()), this, SLOT(OnIntegratioinTimeEditingFinished()));
|
|
||||||
connect(this->ui.IntegratioinTimeSlider, SIGNAL(valueChanged(double)), this, SLOT(OnIntegratioinTimeSliderChanged(double)));
|
|
||||||
connect(this->ui.gain_lineEdit, SIGNAL(editingFinished()), this, SLOT(OnGainEditingFinished()));
|
|
||||||
connect(this->ui.GainSlider, SIGNAL(valueChanged(double)), this, SLOT(OnGainSliderChanged(double)));
|
|
||||||
|
|
||||||
|
|
||||||
//相机参数控件设置为可用 + 输入控制
|
//相机参数控件设置为可用 + 输入控制
|
||||||
frame_number->setEnabled(true);
|
frame_number->setEnabled(true);
|
||||||
|
m_hic->setDisabled(false);
|
||||||
ui.framerate_lineEdit->setEnabled(true);
|
|
||||||
ui.integratioin_time_lineEdit->setEnabled(true);
|
|
||||||
ui.gain_lineEdit->setEnabled(true);
|
|
||||||
|
|
||||||
ui.FramerateSlider->setEnabled(true);
|
|
||||||
ui.IntegratioinTimeSlider->setEnabled(true);
|
|
||||||
ui.GainSlider->setEnabled(true);
|
|
||||||
|
|
||||||
/*QRegExp rx("\\d{0,3}[1-9]$");
|
/*QRegExp rx("\\d{0,3}[1-9]$");
|
||||||
ui.framerate_lineEdit->setValidator(new QRegExpValidator(rx));
|
ui.framerate_lineEdit->setValidator(new QRegExpValidator(rx));
|
||||||
@ -1933,15 +1871,9 @@ void HPPA::onconnect()
|
|||||||
ui.gain_lineEdit->setValidator(new QRegExpValidator(rx));*/
|
ui.gain_lineEdit->setValidator(new QRegExpValidator(rx));*/
|
||||||
|
|
||||||
//获取相机参数并显示到界面中
|
//获取相机参数并显示到界面中
|
||||||
ui.framerate_lineEdit->setText(QString::number(m_Imager->getFramerate(), 10, 2));
|
m_hic->setFrameRate(m_Imager->getFramerate());
|
||||||
ui.FramerateSlider->setValue(m_Imager->getFramerate(), true);
|
m_hic->setIntegrationTime(m_Imager->getIntegrationTime());
|
||||||
CalculateIntegratioinTimeRange();
|
m_hic->setGain(m_Imager->getGain());
|
||||||
|
|
||||||
ui.integratioin_time_lineEdit->setText(QString::number(m_Imager->getIntegrationTime(), 10, 2));
|
|
||||||
ui.IntegratioinTimeSlider->setValue(m_Imager->getIntegrationTime());
|
|
||||||
|
|
||||||
ui.gain_lineEdit->setText(QString::number(m_Imager->getGain(), 10, 2));
|
|
||||||
ui.GainSlider->setValue(m_Imager->getGain());
|
|
||||||
}
|
}
|
||||||
catch (std::exception const& e)
|
catch (std::exception const& e)
|
||||||
{
|
{
|
||||||
@ -1979,7 +1911,7 @@ void HPPA::onAutoExposure()
|
|||||||
double ReturnedExposureTime = m_Imager->auto_exposure();
|
double ReturnedExposureTime = m_Imager->auto_exposure();
|
||||||
|
|
||||||
//将自动曝光所得的值显示到界面
|
//将自动曝光所得的值显示到界面
|
||||||
ui.IntegratioinTimeSlider->setValue(ReturnedExposureTime, false);
|
m_hic->setIntegrationTime(ReturnedExposureTime);
|
||||||
|
|
||||||
//ui.mainToolBar->widgetForAction(ui.action_auto_exposure)->setStyleSheet("QWidget{background-color:rgb(0,255,0);}");
|
//ui.mainToolBar->widgetForAction(ui.action_auto_exposure)->setStyleSheet("QWidget{background-color:rgb(0,255,0);}");
|
||||||
}
|
}
|
||||||
|
|||||||
19
HPPA/HPPA.h
19
HPPA/HPPA.h
@ -69,6 +69,8 @@
|
|||||||
|
|
||||||
#include "AspectRatioLabel.h"
|
#include "AspectRatioLabel.h"
|
||||||
|
|
||||||
|
#include "HyperImagerControl.h"
|
||||||
|
|
||||||
#define PI 3.1415926
|
#define PI 3.1415926
|
||||||
|
|
||||||
QT_CHARTS_USE_NAMESPACE//QChartView 使用 需要加宏, 否则无法使用
|
QT_CHARTS_USE_NAMESPACE//QChartView 使用 需要加宏, 否则无法使用
|
||||||
@ -186,8 +188,6 @@ public:
|
|||||||
static HPPA* instance();
|
static HPPA* instance();
|
||||||
LayerTreeNode* rasterGroupNode() const;
|
LayerTreeNode* rasterGroupNode() const;
|
||||||
|
|
||||||
void CalculateIntegratioinTimeRange();//通过帧率计算积分时间范围,设置slider最大值
|
|
||||||
|
|
||||||
WorkerThread * m_TestImagerStausThread;//检测相机连接状态的线程
|
WorkerThread * m_TestImagerStausThread;//检测相机连接状态的线程
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -267,6 +267,7 @@ private:
|
|||||||
|
|
||||||
TabManager* m_tabManager;
|
TabManager* m_tabManager;
|
||||||
|
|
||||||
|
HyperImagerControl* m_hic;
|
||||||
ImageControl* m_ic;
|
ImageControl* m_ic;
|
||||||
adjustTable* m_adt;
|
adjustTable* m_adt;
|
||||||
PowerControl* m_pc;
|
PowerControl* m_pc;
|
||||||
@ -317,16 +318,12 @@ public Q_SLOTS:
|
|||||||
void onTabWidgetCurrentChanged(int index);
|
void onTabWidgetCurrentChanged(int index);
|
||||||
void onActionOpenDirectory();
|
void onActionOpenDirectory();
|
||||||
|
|
||||||
void OnFramerateLineeditEditingFinished();//
|
void onFramerateChanged(double framerate);
|
||||||
void OnFramerateSliderChanged(double framerate);//
|
void onIntegrationTimeChanged(double integrationTime);
|
||||||
|
void onGainChanged(double gain);
|
||||||
|
|
||||||
void OnIntegratioinTimeEditingFinished();//
|
void onLeftMouseButtonPressed(int x, int y, QVector<double> wavelengths, QVector<double> spectrum);//点击影像像元显示光谱
|
||||||
void OnIntegratioinTimeSliderChanged(double IntegratioinTime);//
|
void setAxis(QValueAxis* axisX, QValueAxis* axisY);
|
||||||
void OnGainEditingFinished();//
|
|
||||||
void OnGainSliderChanged(double Gain);//
|
|
||||||
|
|
||||||
void onLeftMouseButtonPressed(int x, int y, QVector<double> wavelengths, QVector<double> spectrum);//点击影像像元显示光谱
|
|
||||||
void setAxis(QValueAxis* axisX, QValueAxis* axisY);
|
|
||||||
|
|
||||||
|
|
||||||
void timerEvent(QTimerEvent *event);
|
void timerEvent(QTimerEvent *event);
|
||||||
|
|||||||
322
HPPA/HPPA.ui
322
HPPA/HPPA.ui
@ -327,318 +327,6 @@ QTabWidget::pane {
|
|||||||
<property name="elideMode">
|
<property name="elideMode">
|
||||||
<enum>Qt::ElideNone</enum>
|
<enum>Qt::ElideNone</enum>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tab">
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">
|
|
||||||
QLineEdit {
|
|
||||||
background-color: #142D7F;
|
|
||||||
color: #e6eeff;
|
|
||||||
border: 1px solid #2f6bff;
|
|
||||||
border-radius: 6px;
|
|
||||||
padding: 4px 8px;
|
|
||||||
min-width: 70px;
|
|
||||||
min-height: 20px;
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
QLineEdit:hover {
|
|
||||||
border: 1px solid #4d8dff;
|
|
||||||
}
|
|
||||||
|
|
||||||
QLineEdit:focus {
|
|
||||||
border: 1px solid #6aa2ff;
|
|
||||||
background-color: #23345c;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
QSlider::groove:horizontal {
|
|
||||||
height: 10px;
|
|
||||||
background: #1e2a44;
|
|
||||||
border-radius: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 已滑过:渐变蓝 */
|
|
||||||
QSlider::sub-page:horizontal {
|
|
||||||
background: qlineargradient(
|
|
||||||
x1:0, y1:0, x2:1, y2:0,
|
|
||||||
stop:0 #1f4fff,
|
|
||||||
stop:0.5 #2f6bff,
|
|
||||||
stop:1 #5fa0ff
|
|
||||||
);
|
|
||||||
border-radius: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 未滑过 */
|
|
||||||
QSlider::add-page:horizontal {
|
|
||||||
height: 10px;
|
|
||||||
background: #2a3550;
|
|
||||||
border-radius: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ===== 滑块按钮 ===== */
|
|
||||||
QSlider::handle:horizontal {
|
|
||||||
width: 15px;
|
|
||||||
height: 10px;
|
|
||||||
|
|
||||||
/* 蓝色实心 */
|
|
||||||
background: #2f6bff;
|
|
||||||
|
|
||||||
/* 白色外圈 */
|
|
||||||
border: 2px solid #ffffff;
|
|
||||||
border-radius: 5px;
|
|
||||||
|
|
||||||
/* 垂直居中 */
|
|
||||||
margin: -5px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 悬停 */
|
|
||||||
QSlider::handle:horizontal:hover {
|
|
||||||
background: #4d8dff;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 按下 */
|
|
||||||
QSlider::handle:horizontal:pressed {
|
|
||||||
background: #1f4fff;
|
|
||||||
}</string>
|
|
||||||
</property>
|
|
||||||
<attribute name="title">
|
|
||||||
<string>光谱仪</string>
|
|
||||||
</attribute>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>10</number>
|
|
||||||
</property>
|
|
||||||
<property name="topMargin">
|
|
||||||
<number>10</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>10</number>
|
|
||||||
</property>
|
|
||||||
<property name="bottomMargin">
|
|
||||||
<number>10</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing">
|
|
||||||
<number>10</number>
|
|
||||||
</property>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="AspectRatioLabel" name="imagerPictureLabel">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Ignored" vsizetype="Ignored">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QWidget" name="widget_3" native="true">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
|
||||||
<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>10</number>
|
|
||||||
</property>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="label">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">color: rgb(255, 255, 255);</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>帧率</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="framerate_lineEdit">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QDoubleSlider" name="FramerateSlider">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="label_2">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">color: rgb(255, 255, 255);</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>积分时间</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="integratioin_time_lineEdit">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QDoubleSlider" name="IntegratioinTimeSlider">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="label_3">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">color: rgb(255, 255, 255);</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>gain</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="gain_lineEdit">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QDoubleSlider" name="GainSlider">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="rgbCameraWidget">
|
<widget class="QWidget" name="rgbCameraWidget">
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">QGroupBox
|
<string notr="true">QGroupBox
|
||||||
@ -1147,11 +835,6 @@ QPushButton:pressed
|
|||||||
</widget>
|
</widget>
|
||||||
<layoutdefault spacing="6" margin="11"/>
|
<layoutdefault spacing="6" margin="11"/>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
|
||||||
<class>QDoubleSlider</class>
|
|
||||||
<extends>QSlider</extends>
|
|
||||||
<header>qdoubleslider.h</header>
|
|
||||||
</customwidget>
|
|
||||||
<customwidget>
|
<customwidget>
|
||||||
<class>CustomDockWidgetBase</class>
|
<class>CustomDockWidgetBase</class>
|
||||||
<extends>QDockWidget</extends>
|
<extends>QDockWidget</extends>
|
||||||
@ -1164,11 +847,6 @@ QPushButton:pressed
|
|||||||
<header>CustomDockWidgetBase.h</header>
|
<header>CustomDockWidgetBase.h</header>
|
||||||
<container>1</container>
|
<container>1</container>
|
||||||
</customwidget>
|
</customwidget>
|
||||||
<customwidget>
|
|
||||||
<class>AspectRatioLabel</class>
|
|
||||||
<extends>QLabel</extends>
|
|
||||||
<header>AspectRatioLabel.h</header>
|
|
||||||
</customwidget>
|
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="HPPA.qrc"/>
|
<include location="HPPA.qrc"/>
|
||||||
|
|||||||
@ -112,6 +112,7 @@
|
|||||||
<ClCompile Include="Corning410Imager.cpp" />
|
<ClCompile Include="Corning410Imager.cpp" />
|
||||||
<ClCompile Include="CustomDockWidgetBase.cpp" />
|
<ClCompile Include="CustomDockWidgetBase.cpp" />
|
||||||
<ClCompile Include="hppaConfigFile.cpp" />
|
<ClCompile Include="hppaConfigFile.cpp" />
|
||||||
|
<ClCompile Include="HyperImagerControl.cpp" />
|
||||||
<ClCompile Include="imageControl.cpp" />
|
<ClCompile Include="imageControl.cpp" />
|
||||||
<ClCompile Include="ImagerOperationBase.cpp" />
|
<ClCompile Include="ImagerOperationBase.cpp" />
|
||||||
<ClCompile Include="imager_base.cpp" />
|
<ClCompile Include="imager_base.cpp" />
|
||||||
@ -166,6 +167,7 @@
|
|||||||
<ClCompile Include="imagerSimulatioin.cpp" />
|
<ClCompile Include="imagerSimulatioin.cpp" />
|
||||||
<ClCompile Include="ImageViewer.cpp" />
|
<ClCompile Include="ImageViewer.cpp" />
|
||||||
<ClCompile Include="main.cpp" />
|
<ClCompile Include="main.cpp" />
|
||||||
|
<QtUic Include="hyperImagerControl.ui" />
|
||||||
<QtUic Include="imgControl.ui" />
|
<QtUic Include="imgControl.ui" />
|
||||||
<QtUic Include="oneMotorControl.ui" />
|
<QtUic Include="oneMotorControl.ui" />
|
||||||
<QtUic Include="PathPlan.ui" />
|
<QtUic Include="PathPlan.ui" />
|
||||||
@ -196,6 +198,7 @@
|
|||||||
<QtMoc Include="Carousel.h" />
|
<QtMoc Include="Carousel.h" />
|
||||||
<QtMoc Include="imageControl.h" />
|
<QtMoc Include="imageControl.h" />
|
||||||
<QtMoc Include="AspectRatioLabel.h" />
|
<QtMoc Include="AspectRatioLabel.h" />
|
||||||
|
<QtMoc Include="HyperImagerControl.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" />
|
||||||
|
|||||||
@ -193,6 +193,9 @@
|
|||||||
<ClCompile Include="AspectRatioLabel.cpp">
|
<ClCompile Include="AspectRatioLabel.cpp">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="HyperImagerControl.cpp">
|
||||||
|
<Filter>Source Files</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<QtMoc Include="fileOperation.h">
|
<QtMoc Include="fileOperation.h">
|
||||||
@ -312,6 +315,9 @@
|
|||||||
<QtMoc Include="AspectRatioLabel.h">
|
<QtMoc Include="AspectRatioLabel.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</QtMoc>
|
</QtMoc>
|
||||||
|
<QtMoc Include="HyperImagerControl.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</QtMoc>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="imageProcessor.h">
|
<ClInclude Include="imageProcessor.h">
|
||||||
@ -388,6 +394,9 @@
|
|||||||
<QtUic Include="imgControl.ui">
|
<QtUic Include="imgControl.ui">
|
||||||
<Filter>Form Files</Filter>
|
<Filter>Form Files</Filter>
|
||||||
</QtUic>
|
</QtUic>
|
||||||
|
<QtUic Include="hyperImagerControl.ui">
|
||||||
|
<Filter>Form Files</Filter>
|
||||||
|
</QtUic>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="cpp.hint" />
|
<None Include="cpp.hint" />
|
||||||
|
|||||||
111
HPPA/HyperImagerControl.cpp
Normal file
111
HPPA/HyperImagerControl.cpp
Normal file
@ -0,0 +1,111 @@
|
|||||||
|
#include "HyperImagerControl.h"
|
||||||
|
|
||||||
|
HyperImagerControl::HyperImagerControl(QWidget* parent)
|
||||||
|
: QDialog(parent)
|
||||||
|
{
|
||||||
|
ui.setupUi(this);
|
||||||
|
|
||||||
|
connect(ui.framerate_lineEdit, &QLineEdit::editingFinished, this, &HyperImagerControl::onFramerateLineEditEditingFinished);
|
||||||
|
connect(ui.FramerateSlider, &QSlider::valueChanged, this, &HyperImagerControl::onFramerateSliderChanged);
|
||||||
|
connect(ui.FramerateSlider, &QSlider::sliderReleased, this, &HyperImagerControl::onFramerateSliderReleased);
|
||||||
|
|
||||||
|
connect(ui.integratioin_time_lineEdit, &QLineEdit::editingFinished, this, &HyperImagerControl::onIntegrationTimeLineEditEditingFinished);
|
||||||
|
connect(ui.IntegratioinTimeSlider, &QSlider::valueChanged, this, &HyperImagerControl::onIntegrationTimeSliderChanged);
|
||||||
|
connect(ui.IntegratioinTimeSlider, &QSlider::sliderReleased, this, &HyperImagerControl::onIntegrationTimeSliderReleased);
|
||||||
|
|
||||||
|
connect(ui.gain_lineEdit, &QLineEdit::editingFinished, this, &HyperImagerControl::onGainLineEditEditingFinished);
|
||||||
|
connect(ui.GainSlider, &QSlider::valueChanged, this, &HyperImagerControl::onGainSliderChanged);
|
||||||
|
connect(ui.GainSlider, &QSlider::sliderReleased, this, &HyperImagerControl::onGainSliderReleased);
|
||||||
|
|
||||||
|
ui.FramerateSlider->setMinimum(1);
|
||||||
|
ui.FramerateSlider->setMaximum(250);
|
||||||
|
ui.GainSlider->setMinimum(0);
|
||||||
|
ui.GainSlider->setMaximum(12);
|
||||||
|
}
|
||||||
|
|
||||||
|
HyperImagerControl::~HyperImagerControl()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void HyperImagerControl::setFrameRate(double frameRate)
|
||||||
|
{
|
||||||
|
ui.framerate_lineEdit->setText(QString::number(frameRate, 10, 2));
|
||||||
|
ui.FramerateSlider->setValue(frameRate, false);
|
||||||
|
|
||||||
|
//CalculateIntegratioinTimeRange(frameRate);
|
||||||
|
}
|
||||||
|
|
||||||
|
void HyperImagerControl::setIntegrationTime(double integrationTime)
|
||||||
|
{
|
||||||
|
ui.integratioin_time_lineEdit->setText(QString::number(integrationTime, 10, 2));
|
||||||
|
ui.IntegratioinTimeSlider->setValue(integrationTime);
|
||||||
|
}
|
||||||
|
|
||||||
|
void HyperImagerControl::setGain(double gain)
|
||||||
|
{
|
||||||
|
ui.gain_lineEdit->setText(QString::number(gain, 10, 2));
|
||||||
|
ui.GainSlider->setValue(gain);
|
||||||
|
}
|
||||||
|
|
||||||
|
void HyperImagerControl::onFramerateLineEditEditingFinished()
|
||||||
|
{
|
||||||
|
double value = ui.framerate_lineEdit->text().toDouble();
|
||||||
|
ui.FramerateSlider->setValue(value);
|
||||||
|
emit framerateChanged(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
void HyperImagerControl::onFramerateSliderChanged(double framerate)
|
||||||
|
{
|
||||||
|
ui.framerate_lineEdit->setText(QString::number(framerate));
|
||||||
|
}
|
||||||
|
|
||||||
|
void HyperImagerControl::onFramerateSliderReleased()
|
||||||
|
{
|
||||||
|
double framerate = ui.framerate_lineEdit->text().toDouble();
|
||||||
|
emit framerateChanged(framerate);
|
||||||
|
}
|
||||||
|
|
||||||
|
void HyperImagerControl::onIntegrationTimeLineEditEditingFinished()
|
||||||
|
{
|
||||||
|
double value = ui.integratioin_time_lineEdit->text().toDouble();
|
||||||
|
ui.IntegratioinTimeSlider->setValue(value);
|
||||||
|
emit integrationTimeChanged(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
void HyperImagerControl::onIntegrationTimeSliderChanged(double integrationTime)
|
||||||
|
{
|
||||||
|
ui.integratioin_time_lineEdit->setText(QString::number(integrationTime));
|
||||||
|
}
|
||||||
|
|
||||||
|
void HyperImagerControl::onIntegrationTimeSliderReleased()
|
||||||
|
{
|
||||||
|
double integrationTime = ui.integratioin_time_lineEdit->text().toDouble();
|
||||||
|
emit integrationTimeChanged(integrationTime);
|
||||||
|
}
|
||||||
|
|
||||||
|
void HyperImagerControl::onGainLineEditEditingFinished()
|
||||||
|
{
|
||||||
|
double value = ui.gain_lineEdit->text().toDouble();
|
||||||
|
ui.GainSlider->setValue(value);
|
||||||
|
emit gainChanged(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
void HyperImagerControl::onGainSliderChanged(double gain)
|
||||||
|
{
|
||||||
|
ui.gain_lineEdit->setText(QString::number(gain));
|
||||||
|
}
|
||||||
|
|
||||||
|
void HyperImagerControl::onGainSliderReleased()
|
||||||
|
{
|
||||||
|
double gain = ui.gain_lineEdit->text().toDouble();
|
||||||
|
emit gainChanged(gain);
|
||||||
|
}
|
||||||
|
|
||||||
|
void HyperImagerControl::CalculateIntegratioinTimeRange(double frameRate)
|
||||||
|
{
|
||||||
|
double range = 1 / frameRate * 1000;//<2F><><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
ui.IntegratioinTimeSlider->blockSignals(true);//<2F><>ΪsetMaximum<75>ᴥ<EFBFBD><E1B4A5>valueChanged<65>źţ<C5BA><C5A3><EFBFBD><EFBFBD>Ե<EFBFBD><D4B5><EFBFBD>setMaximumǰ<6D><C7B0>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD><EFBFBD>ź<EFBFBD>
|
||||||
|
ui.IntegratioinTimeSlider->setMaximum(range);
|
||||||
|
ui.IntegratioinTimeSlider->blockSignals(false);
|
||||||
|
}
|
||||||
47
HPPA/HyperImagerControl.h
Normal file
47
HPPA/HyperImagerControl.h
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <QDialog>
|
||||||
|
|
||||||
|
#include "ui_hyperImagerControl.h"
|
||||||
|
|
||||||
|
#include "AspectRatioLabel.h"
|
||||||
|
|
||||||
|
class QDoubleSlider;
|
||||||
|
|
||||||
|
class HyperImagerControl : public QDialog
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
HyperImagerControl(QWidget* parent = nullptr);
|
||||||
|
~HyperImagerControl();
|
||||||
|
|
||||||
|
AspectRatioLabel* imagerPictureLabel() const { return ui.imagerPictureLabel; }
|
||||||
|
|
||||||
|
void setFrameRate(double frameRate);
|
||||||
|
void setIntegrationTime(double integrationTime);
|
||||||
|
void setGain(double gain);
|
||||||
|
|
||||||
|
void CalculateIntegratioinTimeRange(double frameRate);
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void framerateChanged(double framerate);
|
||||||
|
void integrationTimeChanged(double integrationTime);
|
||||||
|
void gainChanged(double gain);
|
||||||
|
|
||||||
|
private Q_SLOTS:
|
||||||
|
void onFramerateLineEditEditingFinished();
|
||||||
|
void onFramerateSliderChanged(double framerate);
|
||||||
|
void onFramerateSliderReleased();
|
||||||
|
|
||||||
|
void onIntegrationTimeLineEditEditingFinished();
|
||||||
|
void onIntegrationTimeSliderChanged(double integrationTime);
|
||||||
|
void onIntegrationTimeSliderReleased();
|
||||||
|
|
||||||
|
void onGainLineEditEditingFinished();
|
||||||
|
void onGainSliderChanged(double gain);
|
||||||
|
void onGainSliderReleased();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::HyperImagerControl ui;
|
||||||
|
};
|
||||||
@ -2,7 +2,7 @@
|
|||||||
#include "qDoubleSlider.h"
|
#include "qDoubleSlider.h"
|
||||||
QDoubleSlider::QDoubleSlider(QWidget* pParent /*= NULL*/) :
|
QDoubleSlider::QDoubleSlider(QWidget* pParent /*= NULL*/) :
|
||||||
QSlider(pParent),
|
QSlider(pParent),
|
||||||
m_Multiplier(100.0)
|
m_Multiplier(1.0)
|
||||||
{
|
{
|
||||||
connect(this, SIGNAL(valueChanged(int)), this, SLOT(notifyValueChanged(int)));
|
connect(this, SIGNAL(valueChanged(int)), this, SLOT(notifyValueChanged(int)));
|
||||||
|
|
||||||
|
|||||||
351
HPPA/hyperImagerControl.ui
Normal file
351
HPPA/hyperImagerControl.ui
Normal file
@ -0,0 +1,351 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>HyperImagerControl</class>
|
||||||
|
<widget class="QWidget" name="HyperImagerControl">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>462</width>
|
||||||
|
<height>385</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Color Adjust</string>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QGroupBox
|
||||||
|
{
|
||||||
|
border: 12px solid transparent;
|
||||||
|
/*border-top: 12px solid transparent;
|
||||||
|
border-right: 0px solid transparent;
|
||||||
|
border-bottom: 0px solid transparent;
|
||||||
|
border-left: 0px solid transparent;*/
|
||||||
|
color: #ACCDFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
QPushButton
|
||||||
|
{
|
||||||
|
/*width: 172px;
|
||||||
|
height: 56px;*/
|
||||||
|
font: 10pt "新宋体";
|
||||||
|
background-color: qlineargradient(
|
||||||
|
spread:pad,
|
||||||
|
x1:0.5, y1:0, x2:0.5, y2:1,
|
||||||
|
stop:0 #283D86,
|
||||||
|
stop:1 #0F1A40
|
||||||
|
);
|
||||||
|
color: white;
|
||||||
|
border: none;
|
||||||
|
padding: 8px 8px;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
QPushButton:hover
|
||||||
|
{
|
||||||
|
background-color: qlineargradient(
|
||||||
|
spread:pad,
|
||||||
|
x1:0, y1:0, x2:1, y2:0,
|
||||||
|
stop:0 #3A4875,
|
||||||
|
stop:1 #5F6B91
|
||||||
|
);
|
||||||
|
}
|
||||||
|
/* 按下时的效果 */
|
||||||
|
QPushButton:pressed
|
||||||
|
{
|
||||||
|
background-color: qlineargradient(
|
||||||
|
spread:pad,
|
||||||
|
x1:0, y1:0, x2:1, y2:0,
|
||||||
|
stop:0 #1A254F,
|
||||||
|
stop:1 #3A466B
|
||||||
|
);
|
||||||
|
/* 可选:添加下压效果 */
|
||||||
|
padding-top: 9px;
|
||||||
|
padding-bottom: 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QLabel {
|
||||||
|
color: rgb(255, 255, 255);
|
||||||
|
}
|
||||||
|
|
||||||
|
QSlider::groove:horizontal {
|
||||||
|
height: 10px;
|
||||||
|
background: #1e2a44;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 已滑过:渐变蓝 */
|
||||||
|
QSlider::sub-page:horizontal {
|
||||||
|
background: qlineargradient(
|
||||||
|
x1:0, y1:0, x2:1, y2:0,
|
||||||
|
stop:0 #1f4fff,
|
||||||
|
stop:0.5 #2f6bff,
|
||||||
|
stop:1 #5fa0ff
|
||||||
|
);
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 未滑过 */
|
||||||
|
QSlider::add-page:horizontal {
|
||||||
|
height: 10px;
|
||||||
|
background: #2a3550;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ===== 滑块按钮 ===== */
|
||||||
|
QSlider::handle:horizontal {
|
||||||
|
width: 15px;
|
||||||
|
height: 10px;
|
||||||
|
|
||||||
|
/* 蓝色实心 */
|
||||||
|
background: #2f6bff;
|
||||||
|
|
||||||
|
/* 白色外圈 */
|
||||||
|
border: 2px solid #ffffff;
|
||||||
|
border-radius: 5px;
|
||||||
|
|
||||||
|
/* 垂直居中 */
|
||||||
|
margin: -5px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 悬停 */
|
||||||
|
QSlider::handle:horizontal:hover {
|
||||||
|
background: #4d8dff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 按下 */
|
||||||
|
QSlider::handle:horizontal:pressed {
|
||||||
|
background: #1f4fff;
|
||||||
|
}</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="AspectRatioLabel" name="imagerPictureLabel">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Ignored" vsizetype="Ignored">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QWidget" name="widget_3" native="true">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<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>10</number>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">color: rgb(255, 255, 255);</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>帧率</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="framerate_lineEdit">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true"/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QDoubleSlider" name="FramerateSlider">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">color: rgb(255, 255, 255);</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>积分时间</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="integratioin_time_lineEdit">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true"/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QDoubleSlider" name="IntegratioinTimeSlider">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Maximum" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">color: rgb(255, 255, 255);</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>gain</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="gain_lineEdit">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true"/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QDoubleSlider" name="GainSlider">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>QDoubleSlider</class>
|
||||||
|
<extends>QSlider</extends>
|
||||||
|
<header>qdoubleslider.h</header>
|
||||||
|
</customwidget>
|
||||||
|
<customwidget>
|
||||||
|
<class>AspectRatioLabel</class>
|
||||||
|
<extends>QLabel</extends>
|
||||||
|
<header>AspectRatioLabel.h</header>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
Reference in New Issue
Block a user