Signature plugin: Element manipulation - bugfixing, graphics and cursor icons

This commit is contained in:
Jakub Melka
2022-03-06 19:00:46 +01:00
parent 8a83d7ae85
commit 6037f77a22
4 changed files with 155 additions and 16 deletions

View File

@ -68,6 +68,10 @@ public:
PDFInteger getElementId() const;
void setElementId(PDFInteger newElementId);
/// Returns cursor shape for manipulation mode
/// \param mode Manipulation mode
static Qt::CursorShape getCursorShapeForManipulationMode(uint mode);
protected:
enum ManipulationModes : uint
@ -330,6 +334,13 @@ public:
void cancelManipulation();
void drawPage(QPainter* painter,
PDFInteger pageIndex,
const PDFPrecompiledPage* compiledPage,
PDFTextLayoutGetter& layoutGetter,
const QMatrix& pagePointToDevicePointMatrix,
QList<PDFRenderError>& errors) const;
signals:
void selectionChanged();
void stateChanged();
@ -407,7 +418,7 @@ public:
signals:
/// This signal is emitted when scene has changed (including graphics)
void sceneChanged();
void sceneChanged(bool graphicsOnly);
private:
@ -448,6 +459,11 @@ private:
/// \param event Mouse event
void ungrabMouse(const MouseEventInfo& info, QMouseEvent* event);
/// Updates mouse cursor
/// \param info Mouse event info
/// \param snapPointDistanceTreshold Snap point threshold
void updateMouseCursor(const MouseEventInfo& info, PDFReal snapPointDistanceThreshold);
PDFInteger m_firstFreeId;
bool m_isActive;
PDFWidget* m_widget;