mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Editor plugin: WIP
This commit is contained in:
@@ -37,6 +37,7 @@ namespace pdf
|
||||
class PDFWidget;
|
||||
class PDFDocument;
|
||||
class PDFPageContentScene;
|
||||
class PDFEditedPageContentElement;
|
||||
|
||||
class PDF4QTLIBWIDGETSSHARED_EXPORT PDFPageContentElement
|
||||
{
|
||||
@@ -89,6 +90,7 @@ public:
|
||||
enum ManipulationModes : uint
|
||||
{
|
||||
None = 0,
|
||||
Select,
|
||||
Translate,
|
||||
Top,
|
||||
Left,
|
||||
@@ -353,6 +355,24 @@ private:
|
||||
Qt::Alignment m_alignment = Qt::AlignCenter;
|
||||
};
|
||||
|
||||
class PDF4QTLIBWIDGETSSHARED_EXPORT PDFPageContentElementEdited : public PDFPageContentElement
|
||||
{
|
||||
public:
|
||||
PDFPageContentElementEdited(const PDFEditedPageContentElement* element);
|
||||
virtual ~PDFPageContentElementEdited();
|
||||
|
||||
virtual PDFPageContentElementEdited* clone() const override;
|
||||
virtual void drawPage(QPainter* painter, PDFInteger pageIndex, const PDFPrecompiledPage* compiledPage, PDFTextLayoutGetter& layoutGetter, const QTransform& pagePointToDevicePointMatrix, QList<PDFRenderError>& errors) const override;
|
||||
virtual uint getManipulationMode(const QPointF& point, PDFReal snapPointDistanceThreshold) const override;
|
||||
virtual void performManipulation(uint mode, const QPointF& offset) override;
|
||||
virtual QRectF getBoundingBox() const override;
|
||||
virtual void setSize(QSizeF size) override;
|
||||
virtual QString getDescription() const override;
|
||||
|
||||
private:
|
||||
std::unique_ptr<PDFEditedPageContentElement> m_element;
|
||||
};
|
||||
|
||||
class PDF4QTLIBWIDGETSSHARED_EXPORT PDFPageContentElementManipulator : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
Reference in New Issue
Block a user