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:
2026-02-17 10:18:36 -07:00
parent e64755ea0c
commit 3e2f464de9
7 changed files with 209 additions and 4 deletions

51
src/LineTool.cpp Normal file
View 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
}