35 lines
701 B
C++
35 lines
701 B
C++
#ifndef IMAGER_POSITION_SIMULATION
|
|
#define IMAGER_POSITION_SIMULATION
|
|
#include <QGraphicsView>
|
|
#include <QGraphicsScene>
|
|
|
|
#include "imagerSimulatioin.h"
|
|
|
|
class ImagerPositionSimulation :public QGraphicsView
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
ImagerPositionSimulation(QWidget* pParent = NULL);
|
|
~ImagerPositionSimulation();
|
|
|
|
imagerSimulatioin *imager;
|
|
|
|
void drawX();
|
|
|
|
void setSceneRect();//将QGraphicsView的viewport设置为sceneRect
|
|
|
|
QRectF sceneRect();
|
|
|
|
void mousePressEvent(QMouseEvent *event);
|
|
|
|
void mouseReleaseEvent(QMouseEvent *event);
|
|
|
|
private:
|
|
QGraphicsScene *m_Scene;
|
|
QGraphicsRectItem *m_rectangle;
|
|
|
|
QGraphicsLineItem *topLeftToLowerRight;
|
|
QGraphicsLineItem *topRightToLowerLeft;
|
|
|
|
};
|
|
#endif |