29 lines
613 B
C++
29 lines
613 B
C++
#ifndef RECTANGLETOOL_H
|
|
#define RECTANGLETOOL_H
|
|
|
|
#include "SketchTool.h"
|
|
#include <gp_Pnt.hxx>
|
|
|
|
class RectangleTool : public SketchTool
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit RectangleTool(ViewportWidget* viewport);
|
|
|
|
void mousePressEvent(QMouseEvent *event) override;
|
|
void mouseMoveEvent(QMouseEvent *event) override;
|
|
|
|
void paintGL() override;
|
|
void paint2D(QPainter& painter, const QMatrix4x4& modelView, const QMatrix4x4& projection) override;
|
|
|
|
void activate() override;
|
|
|
|
protected:
|
|
void finalizeCreation() override;
|
|
|
|
private:
|
|
gp_Pnt m_firstRectanglePoint;
|
|
};
|
|
|
|
#endif // RECTANGLETOOL_H
|