refactor: Introduce SketchTool base class and derived tool skeletons
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
51
src/LineTool.cpp
Normal file
51
src/LineTool.cpp
Normal file
@@ -0,0 +1,51 @@
|
||||
#include "LineTool.h"
|
||||
#include "ViewportWidget.h"
|
||||
#include <QMouseEvent>
|
||||
#include <QKeyEvent>
|
||||
#include <QPainter>
|
||||
|
||||
LineTool::LineTool(ViewportWidget* viewport)
|
||||
: SketchTool(viewport)
|
||||
{
|
||||
}
|
||||
|
||||
void LineTool::activate()
|
||||
{
|
||||
m_isDefiningLine = false;
|
||||
m_viewport->setProperty("dimensionInput", "");
|
||||
m_viewport->setProperty("angleInput", "");
|
||||
m_viewport->setProperty("dimensionEditMode", "length");
|
||||
m_viewport->setProperty("isChainedLine", false);
|
||||
}
|
||||
|
||||
void LineTool::deactivate()
|
||||
{
|
||||
m_isDefiningLine = false;
|
||||
m_viewport->setProperty("dimensionInput", "");
|
||||
m_viewport->setProperty("angleInput", "");
|
||||
}
|
||||
|
||||
void LineTool::mousePressEvent(QMouseEvent *event)
|
||||
{
|
||||
// To be implemented
|
||||
}
|
||||
|
||||
void LineTool::mouseMoveEvent(QMouseEvent *event)
|
||||
{
|
||||
// To be implemented
|
||||
}
|
||||
|
||||
void LineTool::keyPressEvent(QKeyEvent *event)
|
||||
{
|
||||
// To be implemented
|
||||
}
|
||||
|
||||
void LineTool::paintGL()
|
||||
{
|
||||
// To be implemented
|
||||
}
|
||||
|
||||
void LineTool::paint2D(QPainter& painter, const QMatrix4x4& modelView, const QMatrix4x4& projection)
|
||||
{
|
||||
// To be implemented
|
||||
}
|
||||
Reference in New Issue
Block a user