Changeset View
Changeset View
Standalone View
Standalone View
src/wrtembed/KReportDesignerItemRectBase.h
Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Line(s) | 39 | public: | |||
---|---|---|---|---|---|
42 | ~KReportDesignerItemRectBase() override; | 42 | ~KReportDesignerItemRectBase() override; | ||
43 | 43 | | |||
44 | QRectF pointRect() const; | 44 | QRectF pointRect() const; | ||
45 | 45 | | |||
46 | virtual void enterInlineEditingMode(); | 46 | virtual void enterInlineEditingMode(); | ||
47 | virtual void exitInlineEditingMode(); | 47 | virtual void exitInlineEditingMode(); | ||
48 | 48 | | |||
49 | protected: | 49 | protected: | ||
50 | int m_dpiX; | | |||
51 | int m_dpiY; | | |||
52 | 50 | | |||
53 | enum class SceneRectFlag { | 51 | enum class SceneRectFlag { | ||
54 | UpdateProperty, | 52 | UpdateProperty, | ||
55 | DontUpdateProperty | 53 | DontUpdateProperty | ||
56 | }; | 54 | }; | ||
57 | 55 | | |||
58 | void setSceneRect(const QPointF &topLeft, const QSizeF &size, | 56 | void setSceneRect(const QPointF &topLeft, const QSizeF &size, | ||
59 | SceneRectFlag update = SceneRectFlag::UpdateProperty); | 57 | SceneRectFlag update = SceneRectFlag::UpdateProperty); | ||
60 | void setSceneRect(const QRectF &rect, | 58 | void setSceneRect(const QRectF &rect, | ||
61 | SceneRectFlag update = SceneRectFlag::UpdateProperty); | 59 | SceneRectFlag update = SceneRectFlag::UpdateProperty); | ||
62 | 60 | | |||
63 | void drawHandles(QPainter*); | 61 | void drawHandles(QPainter*); | ||
64 | QRectF sceneRect(); | 62 | QRectF sceneRect(); | ||
65 | void mousePressEvent(QGraphicsSceneMouseEvent * event) override; | 63 | void mousePressEvent(QGraphicsSceneMouseEvent * event) override; | ||
66 | void mouseReleaseEvent(QGraphicsSceneMouseEvent * event) override; | 64 | void mouseReleaseEvent(QGraphicsSceneMouseEvent * event) override; | ||
67 | void mouseMoveEvent(QGraphicsSceneMouseEvent * event) override; | 65 | void mouseMoveEvent(QGraphicsSceneMouseEvent * event) override; | ||
68 | void hoverMoveEvent(QGraphicsSceneHoverEvent * event) override; | 66 | void hoverMoveEvent(QGraphicsSceneHoverEvent * event) override; | ||
69 | QVariant itemChange(GraphicsItemChange change, const QVariant &value) override; | 67 | QVariant itemChange(GraphicsItemChange change, const QVariant &value) override; | ||
70 | 68 | | |||
71 | void propertyChanged(const KPropertySet &s, const KProperty &p); | 69 | void propertyChanged(const KPropertySet &s, const KProperty &p); | ||
72 | 70 | | |||
73 | void move(const QPointF&) override; | 71 | void move(const QPointF&) override; | ||
74 | QRectF properRect(const KReportDesigner &d, qreal minWidth, qreal minHeight) const; | 72 | QRectF properRect(const KReportDesigner &d, qreal minWidth, qreal minHeight) const; | ||
73 | int dpiX() const; | ||||
staniek: +const | |||||
74 | int dpiY() const; | ||||
staniek: +const | |||||
75 | private: | 75 | private: | ||
76 | Q_DISABLE_COPY(KReportDesignerItemRectBase) | ||||
76 | int grabHandle(const QPointF &pos); | 77 | int grabHandle(const QPointF &pos); | ||
77 | QPointF properPressPoint(const KReportDesigner &d) const; | 78 | QPointF properPressPoint(const KReportDesigner &d) const; | ||
78 | 79 | | |||
79 | class Private; | 80 | class Private; | ||
80 | Private * const d; | 81 | Private * const d; | ||
81 | }; | 82 | }; | ||
82 | 83 | | |||
83 | #endif | 84 | #endif |
+const