Signature plugin: dot plugin

This commit is contained in:
Jakub Melka
2022-02-27 17:08:24 +01:00
parent c642722faf
commit 7d84f26476
7 changed files with 104 additions and 12 deletions

View File

@@ -25,6 +25,7 @@ namespace pdf
class PDFPageContentScene;
class PDFPageContentSvgElement;
class PDFPageContentElementDot;
class PDFPageContentElementLine;
class PDFPageContentElementRectangle;
@@ -135,6 +136,35 @@ private:
std::optional<QPointF> m_startPoint;
};
/// Tool that creates dot element.
class PDF4QTLIBSHARED_EXPORT PDFCreatePCElementDotTool : public PDFCreatePCElementTool
{
Q_OBJECT
private:
using BaseClass = PDFCreatePCElementTool;
public:
explicit PDFCreatePCElementDotTool(PDFDrawWidgetProxy* proxy,
PDFPageContentScene* scene,
QAction* action,
QObject* parent);
virtual ~PDFCreatePCElementDotTool() override;
virtual void drawPage(QPainter* painter,
PDFInteger pageIndex,
const PDFPrecompiledPage* compiledPage,
PDFTextLayoutGetter& layoutGetter,
const QMatrix& pagePointToDevicePointMatrix,
QList<PDFRenderError>& errors) const override;
private:
void onPointPicked(pdf::PDFInteger pageIndex, QPointF pagePoint);
PDFPickTool* m_pickTool;
PDFPageContentElementDot* m_element;
};
} // namespace pdf
#endif // PDFPAGECONTENTEDITORTOOLS_H