
2、设置光谱仪帧率、曝光时间、gain; 3、在页面中嵌入了rgb相机图传(通过opencv实现); 4、平台的相机位置模拟、x/y马达的分别控制、x/y马达的量程检测; 5、轨迹规划; 6、加入了张卓的自动调焦模块; 7、加入了自动电源控制;
34 lines
892 B
C++
34 lines
892 B
C++
#ifndef IMAGER_SIMULATIOIN
|
||
#define IMAGER_SIMULATIOIN
|
||
|
||
#include <QGraphicsItem>
|
||
|
||
class imagerSimulatioin :public QObject,public QGraphicsItem
|
||
{
|
||
Q_OBJECT
|
||
Q_INTERFACES(QGraphicsItem)
|
||
public:
|
||
imagerSimulatioin(QGraphicsItem *parent = Q_NULLPTR);
|
||
~imagerSimulatioin();
|
||
|
||
QRectF boundingRect() const;
|
||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||
void setPos(qreal x, qreal y);
|
||
|
||
//在QGraphicsScene中限制图元的拖动范围:https://www.cnblogs.com/sfy5848/p/6611824.html
|
||
QVariant itemChange(GraphicsItemChange change, const QVariant &value);
|
||
|
||
void mouseMoveEvent(QGraphicsSceneMouseEvent *event);//当拖动item时不停会的绘制,消除拖动重影
|
||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);//当放开鼠标时,发射此时图元在scene中的坐标
|
||
protected:
|
||
|
||
|
||
|
||
private:
|
||
int m_width;
|
||
int m_height;
|
||
|
||
signals :
|
||
void leftMouseButtonPressed(int, int);
|
||
};
|
||
#endif |