Changeset View
Changeset View
Standalone View
Standalone View
src/wrtembed/KReportDesignerItemRectBase.h
Show All 33 Lines | |||||
34 | const int KREPORT_ITEM_RECT_DEFAULT_WIDTH = 100; | 34 | const int KREPORT_ITEM_RECT_DEFAULT_WIDTH = 100; | ||
35 | const int KREPORT_ITEM_RECT_DEFAULT_HEIGHT = 100; | 35 | const int KREPORT_ITEM_RECT_DEFAULT_HEIGHT = 100; | ||
36 | 36 | | |||
37 | /** | 37 | /** | ||
38 | */ | 38 | */ | ||
39 | class KREPORT_EXPORT KReportDesignerItemRectBase : public QGraphicsRectItem, public KReportDesignerItemBase | 39 | class KREPORT_EXPORT KReportDesignerItemRectBase : public QGraphicsRectItem, public KReportDesignerItemBase | ||
40 | { | 40 | { | ||
41 | public: | 41 | public: | ||
42 | explicit KReportDesignerItemRectBase(KReportDesigner*); | 42 | explicit KReportDesignerItemRectBase(KReportDesigner *r, KReportItemBase *b); | ||
43 | 43 | | |||
44 | virtual ~KReportDesignerItemRectBase(); | 44 | virtual ~KReportDesignerItemRectBase(); | ||
45 | 45 | | |||
46 | QRectF pointRect() const; | 46 | QRectF pointRect() const; | ||
47 | 47 | | |||
48 | virtual void enterInlineEditingMode(); | 48 | virtual void enterInlineEditingMode(); | ||
49 | virtual void exitInlineEditingMode(); | 49 | virtual void exitInlineEditingMode(); | ||
50 | 50 | | |||
51 | protected: | 51 | protected: | ||
52 | void init(KReportPosition*, KReportSize*, KPropertySet*, KReportDesigner *r); | | |||
53 | | ||||
54 | int m_dpiX; | 52 | int m_dpiX; | ||
staniek: 8X | |||||
55 | int m_dpiY; | 53 | int m_dpiY; | ||
56 | qreal m_userHeight; | 54 | qreal m_userHeight; | ||
57 | qreal m_userWidth; | 55 | qreal m_userWidth; | ||
58 | qreal m_pressX; | 56 | qreal m_pressX; | ||
59 | qreal m_pressY; | 57 | qreal m_pressY; | ||
60 | 58 | | |||
61 | enum UpdatePropertyFlag { | 59 | enum UpdatePropertyFlag { | ||
62 | UpdateProperty, | 60 | UpdateProperty, | ||
Show All 12 Lines | |||||
75 | virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value); | 73 | virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value); | ||
76 | 74 | | |||
77 | void propertyChanged(const KPropertySet &s, const KProperty &p); | 75 | void propertyChanged(const KPropertySet &s, const KProperty &p); | ||
78 | 76 | | |||
79 | virtual void move(const QPointF&); | 77 | virtual void move(const QPointF&); | ||
80 | QRectF properRect(const KReportDesigner &d, qreal minWidth, qreal minHeight) const; | 78 | QRectF properRect(const KReportDesigner &d, qreal minWidth, qreal minHeight) const; | ||
81 | private: | 79 | private: | ||
82 | int grabHandle(QPointF); | 80 | int grabHandle(QPointF); | ||
83 | QPointF properPressPoint(const KReportDesigner &d) const; | 81 | QPointF properPressPoint(const KReportDesigner &d) const; | ||
84 | int m_grabAction; | | |||
85 | | ||||
86 | KReportPosition* m_ppos; | | |||
87 | KReportSize* m_psize; | | |||
88 | KPropertySet* m_pset; | | |||
89 | 82 | | |||
staniek: 8X ? | |||||
83 | class Private; | ||||
84 | Private * const d; | ||||
90 | }; | 85 | }; | ||
91 | 86 | | |||
92 | #endif | 87 | #endif |
8X