Engauge Digitizer 2
Loading...
Searching...
No Matches
PdfFrameHandle.h
Go to the documentation of this file.
1/******************************************************************************************************
2 * (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3 * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4 * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5 ******************************************************************************************************/
6
7#ifndef PDF_FRAME_HANDLE_H
8#define PDF_FRAME_HANDLE_H
9
10#include <QGraphicsRectItem>
11
12class PdfCropping;
13class QGraphicsScene;
14class QGraphicsView;
15class QPointF;
16class QRectF;
17
19class PdfFrameHandle : public QGraphicsRectItem
20{
21public:
23 PdfFrameHandle(QGraphicsScene &scene,
24 QGraphicsView &view,
25 const QPointF &pointReference,
26 int orientationFlags,
27 PdfCropping &pdfCropping,
28 int zValue);
29
31 virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value);
32
34 virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
35
38
39private:
41
42 PdfCropping &m_pdfCropping;
43 int m_orientationFlags; // From PdfCropping constants
44
45 bool m_disableEventsWhileMovingAutomatically;
46 QGraphicsScene &m_scene;
47 QGraphicsView &m_view;
48};
49
50#endif // PDF_FRAME_HANDLE_H
This class shows a frame around the selected portion of the pdf import preview window.
Definition PdfCropping.h:25
PdfFrameHandle(QGraphicsScene &scene, QGraphicsView &view, const QPointF &pointReference, int orientationFlags, PdfCropping &pdfCropping, int zValue)
Single constructor.
void setDisableEventsWhileMovingAutomatically(bool disable)
Temporarily disable event handling so code can move this object without triggering a cascade of event...
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value)
Intercept the drags and process them, which is the whole point of handles.
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
Override the paint method so the dashed-border-when-selected can be removed.