fix & add
1、在界面上实现选择相机类型的功能; 2、创建了一个光谱仪操作的纯虚基类(ImagerOperationBase)并实现了大部分的操作,具体类型的光谱仪应继承此类并实现纯虚函数; 3、添加了 resonon 的 nir 320 相机,修改 resonon 的 pica l 相机的实现:继承 ImagerOperationBase; 4、重构类 QMotorDoubleSlider,提高其通用性,所有马达相关的 slider 都使用此类; 5、适配 resonon nir 320 显微镜使用的 2 轴线性平台,有些特殊的马达参数设置(setMotorParamMicroscope 函数)绑定了 nir 的相机类型参数; 6、修改:将线性平台的量程信息保存在cfg配置文件中,并修改配置文件读写类来读写此量程信息;
This commit is contained in:
180
HPPA/HPPA.ui
180
HPPA/HPPA.ui
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>2213</width>
|
||||
<height>1262</height>
|
||||
<width>1643</width>
|
||||
<height>831</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -18,7 +18,7 @@
|
||||
<normaloff>:/HPPA/HPPA.ico</normaloff>:/HPPA/HPPA.ico</iconset>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(240, 240, 240);</string>
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralWidget">
|
||||
<layout class="QGridLayout" name="gridLayout_7">
|
||||
@ -51,7 +51,7 @@
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>500</width>
|
||||
<width>200</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
@ -92,7 +92,20 @@
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">border-size:1px;</string>
|
||||
<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/>
|
||||
@ -101,14 +114,14 @@
|
||||
<item row="1" column="0">
|
||||
<widget class="QPushButton" name="open_rgb_camera_btn">
|
||||
<property name="text">
|
||||
<string>打开摄像头</string>
|
||||
<string>打开</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QPushButton" name="close_rgb_camera_btn">
|
||||
<property name="text">
|
||||
<string>关闭摄像头</string>
|
||||
<string>关闭</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -284,12 +297,33 @@
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QTabWidget::pane {
|
||||
border: 1px solid #ccc; /* 选项卡面板边框颜色 */
|
||||
border-radius: 5px; /* 选项卡面板圆角 */
|
||||
|
||||
}
|
||||
|
||||
QTabBar::tab {
|
||||
background: #f0f0f0; /* 选项卡背景颜色 */
|
||||
border: 1px solid #ccc; /* 选项卡边框颜色 */
|
||||
padding: 10px; /* 内边距 */
|
||||
border-radius: 5px; /* 选项卡圆角 */
|
||||
font-size:20px;
|
||||
}
|
||||
|
||||
QTabBar::tab:selected {
|
||||
background: #3498db; /* 激活状态选项卡背景颜色 */
|
||||
color: white; /* 激活状态选项卡文字颜色 */
|
||||
}
|
||||
</string>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>4</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
<string>camera</string>
|
||||
<string>光谱仪</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
@ -456,6 +490,12 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="gain_lineEdit">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: rgb(255, 255, 255);</string>
|
||||
</property>
|
||||
@ -483,6 +523,12 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDoubleSlider" name="GainSlider">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
@ -507,7 +553,7 @@
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_2">
|
||||
<attribute name="title">
|
||||
<string>stage</string>
|
||||
<string>线性平台</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<property name="spacing">
|
||||
@ -642,7 +688,7 @@
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>马达量程检测</string>
|
||||
<string>量程检测</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -1055,9 +1101,9 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<widget class="QGroupBox" name="groupBox_9">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@ -1160,7 +1206,7 @@
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QYMotorDoubleSlider" name="ymotor_location_slider">
|
||||
<widget class="QMotorDoubleSlider" name="ymotor_location_slider">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
@ -1799,28 +1845,56 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>2213</width>
|
||||
<height>30</height>
|
||||
<width>1643</width>
|
||||
<height>33</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QMenuBar{
|
||||
background:rgb(255,255,255);
|
||||
color:rgb(0,0,0);
|
||||
font-size:16px;
|
||||
padding:2px;
|
||||
border:1px solid rgb(165,171,184);
|
||||
}
|
||||
QMenuBar::item{
|
||||
background:rgb(255,255,255);
|
||||
width:52px;
|
||||
height:24px;
|
||||
}
|
||||
QMenuBar::item:selected{
|
||||
background:rgb(185,196,221);
|
||||
}
|
||||
QMenu{
|
||||
background:rgb(255,255,255);
|
||||
color:rgb(0,0,0);
|
||||
border:1px solid rgb(165,171,184);
|
||||
}
|
||||
QMenu::item:selected{
|
||||
background:rgb(69,123,255);
|
||||
color:white;
|
||||
}
|
||||
</string>
|
||||
</property>
|
||||
<widget class="QMenu" name="file">
|
||||
<property name="title">
|
||||
<string>file</string>
|
||||
<string>文件</string>
|
||||
</property>
|
||||
<addaction name="action_exit"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuspectrometer">
|
||||
<property name="title">
|
||||
<string>spectrometer</string>
|
||||
<string>光谱仪</string>
|
||||
</property>
|
||||
<widget class="QMenu" name="menu">
|
||||
<property name="title">
|
||||
<string>选择相机类型</string>
|
||||
</property>
|
||||
<addaction name="actionpica_L"/>
|
||||
<addaction name="actionPika_XC2"/>
|
||||
<addaction name="mActionPica_L"/>
|
||||
<addaction name="mActionPica_NIR"/>
|
||||
<addaction name="mActionPika_XC2"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actioncorning_410"/>
|
||||
<addaction name="mActionCorning_410"/>
|
||||
</widget>
|
||||
<addaction name="menu"/>
|
||||
<addaction name="action_connect_imager"/>
|
||||
@ -1836,7 +1910,7 @@
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuhelp">
|
||||
<property name="title">
|
||||
<string>help</string>
|
||||
<string>帮助</string>
|
||||
</property>
|
||||
<addaction name="action_about"/>
|
||||
</widget>
|
||||
@ -1851,6 +1925,23 @@
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QToolBar{
|
||||
background:rgb(255,255,255);
|
||||
color:rgb(0,0,0);
|
||||
}
|
||||
QToolBar QToolButton {
|
||||
background: rgb(255,255,255); /* 按钮背景颜色 */
|
||||
font-size:15px;
|
||||
border-radius: 3px; /* 按钮圆角 */
|
||||
padding: 4px; /* 按钮内边距 */
|
||||
}
|
||||
QToolBar QToolButton:hover {
|
||||
background: rgb(185,196,221); /* 按钮悬停背景颜色 */
|
||||
color: white; /* 按钮悬停文字颜色 */
|
||||
}
|
||||
</string>
|
||||
</property>
|
||||
<attribute name="toolBarArea">
|
||||
<enum>TopToolBarArea</enum>
|
||||
</attribute>
|
||||
@ -1865,10 +1956,21 @@
|
||||
<addaction name="action_start_recording"/>
|
||||
<addaction name="actionOpenDirectory"/>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusBar"/>
|
||||
<widget class="QStatusBar" name="statusBar">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QStatusBar {
|
||||
|
||||
background-color: rgb(255, 255, 255);
|
||||
color: white; /* 文字颜色 */
|
||||
border-top: 1px solid #ccc; /* 顶部边框 */
|
||||
padding: 5px; /* 内边距 */
|
||||
}
|
||||
</string>
|
||||
</property>
|
||||
</widget>
|
||||
<action name="action_exit">
|
||||
<property name="text">
|
||||
<string>exit</string>
|
||||
<string>退出</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_open">
|
||||
@ -1919,24 +2021,41 @@
|
||||
<string>打开文件夹</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionpica_L">
|
||||
<action name="mActionPica_L">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Pika L</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actioncorning_410">
|
||||
<action name="mActionCorning_410">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Corning 410</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionPika_XC2">
|
||||
<action name="mActionPika_XC2">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Pika XC2</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="action_about">
|
||||
<property name="text">
|
||||
<string>about</string>
|
||||
<string>关于</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="mActionPica_NIR">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Pika NIR</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
@ -1957,11 +2076,6 @@
|
||||
<extends>QGraphicsView</extends>
|
||||
<header location="global">imagerpositionsimulation.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>QYMotorDoubleSlider</class>
|
||||
<extends>QSlider</extends>
|
||||
<header location="global">QYMotorDoubleSlider.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="HPPA.qrc"/>
|
||||
|
||||
Reference in New Issue
Block a user