Files
HPPA/HPPA/focusWindow.h
tangchao0503 6469bff15d 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配置文件中,并修改配置文件读写类来读写此量程信息;
2024-12-11 17:33:29 +08:00

103 lines
1.8 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#pragma once
#include "windows.h"
#include <cstdio>
#include <iostream>
#include <exception>
#include <stdexcept>
#include <cmath>
#include <io.h>
#include <QtWidgets/QMainWindow>
#include <QThread>
#include <QLineSeries>
#include <QChart>
#include <QChartView>
#include <QFileDialog>
#include <QtSerialPort/QSerialPort>
#include <QtSerialPort/QSerialPortInfo>
#include "ui_FocusDialog.h"
#include "AbstractPortMiscDefines.h"
#include "CFocusMotorControl.h"
#include "resononImager.h"
#include "hppaConfigFile.h"
#include "path_tc.h"
#include "ImagerOperationBase.h"
class focusWindow:public QDialog
{
Q_OBJECT
public:
focusWindow(QWidget *parent = Q_NULLPTR);
focusWindow(QWidget *parent, ImagerOperationBase* imager);
~focusWindow();
ImagerOperationBase* m_Imager;
private:
Ui::focusDialog ui;
QThread *m_AutoFocusThread;
int m_FocusState;
int m_iMinPos, m_iMaxPos;
CFocusMotorControl* m_ctrlFocusMotor;
void disableBeforeConnect(bool disable);
public Q_SLOTS:
void onConnectMotor();
void onMove2MotorLogicZero();
void onMove2MotorMax();
void onAdd();
void onSubtract();
void onAutoFocus();
void onManualFocus();
void onUpdateCurrentLocation();
void onMoveto();
void onAutoFocusFinished();
void onAutoFocusProgress(int progress);
void onUltrasound_radioButton();
signals:
void StartManualFocusSignal(int);//1开始调焦0停止调焦
};
class WorkerThread2 : public QThread
{
Q_OBJECT
private:
bool m_bIsUltrasound;
public:
WorkerThread2(CFocusMotorControl * ctrlFocusMotor,bool isUltrasound);
CFocusMotorControl *m_ctrlFocusMotor;
protected:
void run();
signals:
void AutoFocusFinishedSignal();
};
class WorkerThread4 : public QThread
{
Q_OBJECT
private:
public:
WorkerThread4(CFocusMotorControl * ctrlFocusMotor);
CFocusMotorControl *m_ctrlFocusMotor;
protected:
void run();
signals:
void AutoFocusProgressSignal(int);
};