Debug информация о теге линии

This commit is contained in:
2025-12-15 15:27:48 +03:00
parent c283720a99
commit a6cf2bb13e
3 changed files with 34 additions and 10 deletions

View File

@@ -1,9 +1,13 @@
#pragma once
#define WIDGET_POSITION event->pos()
#define UCS_POSITION screenToLogical(WIDGET_POSITION)
#include <QWidget>
#include <QMouseEvent>
#include <QPointF>
#include <QMessageBox>
#include <QToolTip>
#ifdef _DEBUG
#include <QDebug>
@@ -58,11 +62,16 @@ protected:
void paintEvent(QPaintEvent* event) override;
private:
#ifdef _DEBUG
void showObjectTag(QPointF pos);
#endif
QPointF screenToLogical(const QPointF& screenPos) const;
// ====================== Методы поиска и выбора ======================
/// Найти линию под указанной позицией
Line* findAt(QPointF& position);
Line* findAt(QPointF& pos, qreal tolerance = 5.0);
/// Найти точку в указанной позиции с заданной точностью
Point* findPointAt(QPointF position, qreal tolerance = 5.0);