Freehand curve tool

This commit is contained in:
Jakub Melka
2020-12-08 20:18:11 +01:00
parent 010842cb04
commit 75f7f38984
4 changed files with 200 additions and 0 deletions

View File

@@ -347,6 +347,8 @@ PDFViewerMainWindow::PDFViewerMainWindow(QWidget* parent) :
m_toolManager->addTool(createPolygonTool);
pdf::PDFCreateEllipseTool* createEllipseTool = new pdf::PDFCreateEllipseTool(m_pdfWidget->getDrawWidgetProxy(), m_toolManager, ui->actionCreateEllipse, this);
m_toolManager->addTool(createEllipseTool);
pdf::PDFCreateFreehandCurveTool* createFreehandCurveTool = new pdf::PDFCreateFreehandCurveTool(m_pdfWidget->getDrawWidgetProxy(), m_toolManager, ui->actionCreateFreehandCurve, this);
m_toolManager->addTool(createFreehandCurveTool);
m_annotationManager = new pdf::PDFWidgetAnnotationManager(m_pdfWidget->getDrawWidgetProxy(), this);
connect(m_annotationManager, &pdf::PDFWidgetAnnotationManager::actionTriggered, this, &PDFViewerMainWindow::onActionTriggered);

View File

@@ -153,6 +153,7 @@
<addaction name="actionCreatePolyline"/>
<addaction name="actionCreatePolygon"/>
<addaction name="actionCreateEllipse"/>
<addaction name="actionCreateFreehandCurve"/>
</widget>
<addaction name="menuFile"/>
<addaction name="menuEdit"/>
@@ -682,6 +683,14 @@
<string>Ellipse</string>
</property>
</action>
<action name="actionCreateFreehandCurve">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Freehand Curve</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources>