mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Dimension plugins - basic tools
This commit is contained in:
@ -730,14 +730,19 @@ PDFToolManager::PDFToolManager(PDFDrawWidgetProxy* proxy, Actions actions, QObje
|
||||
|
||||
for (PDFWidgetTool* tool : m_predefinedTools)
|
||||
{
|
||||
m_tools.insert(tool);
|
||||
connect(tool, &PDFWidgetTool::messageDisplayRequest, this, &PDFToolManager::messageDisplayRequest);
|
||||
addTool(tool);
|
||||
}
|
||||
}
|
||||
|
||||
if (QAction* action = tool->getAction())
|
||||
{
|
||||
m_actionsToTools[action] = tool;
|
||||
connect(action, &QAction::triggered, this, &PDFToolManager::onToolActionTriggered);
|
||||
}
|
||||
void PDFToolManager::addTool(PDFWidgetTool* tool)
|
||||
{
|
||||
m_tools.insert(tool);
|
||||
connect(tool, &PDFWidgetTool::messageDisplayRequest, this, &PDFToolManager::messageDisplayRequest);
|
||||
|
||||
if (QAction* action = tool->getAction())
|
||||
{
|
||||
m_actionsToTools[action] = tool;
|
||||
connect(action, &QAction::triggered, this, &PDFToolManager::onToolActionTriggered);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1142,6 +1147,11 @@ void PDFPickTool::mouseMoveEvent(QWidget* widget, QMouseEvent* event)
|
||||
}
|
||||
}
|
||||
|
||||
QPointF PDFPickTool::getSnappedPoint() const
|
||||
{
|
||||
return m_snapper.getSnappedPoint();
|
||||
}
|
||||
|
||||
void PDFPickTool::setActiveImpl(bool active)
|
||||
{
|
||||
BaseClass::setActiveImpl(active);
|
||||
|
Reference in New Issue
Block a user