Changeset View
Changeset View
Standalone View
Standalone View
src/wrtembed/KReportDesignerItemBase.h
Show All 40 Lines | |||||
41 | class KREPORT_EXPORT KReportDesignerItemBase | 41 | class KREPORT_EXPORT KReportDesignerItemBase | ||
42 | { | 42 | { | ||
43 | public: | 43 | public: | ||
44 | virtual ~KReportDesignerItemBase(); | 44 | virtual ~KReportDesignerItemBase(); | ||
45 | 45 | | |||
46 | static void buildXML(QGraphicsItem * item, QDomDocument *doc, QDomElement *parent); | 46 | static void buildXML(QGraphicsItem * item, QDomDocument *doc, QDomElement *parent); | ||
47 | virtual void buildXML(QDomDocument *doc, QDomElement *parent) = 0; | 47 | virtual void buildXML(QDomDocument *doc, QDomElement *parent) = 0; | ||
48 | 48 | | |||
49 | static void buildXMLRect(QDomDocument *doc, QDomElement *entity, KReportPosition *pos, KReportSize *size); | 49 | static void buildXMLRect(QDomDocument *doc, QDomElement *entity, KReportItemBase *i); | ||
50 | static void buildXMLTextStyle(QDomDocument *doc, QDomElement *entity, const KRTextStyleData &ts); | 50 | static void buildXMLTextStyle(QDomDocument *doc, QDomElement *entity, const KRTextStyleData &ts); | ||
51 | static void buildXMLLineStyle(QDomDocument *doc, QDomElement *entity, const KReportLineStyle &ls); | 51 | static void buildXMLLineStyle(QDomDocument *doc, QDomElement *entity, const KReportLineStyle &ls); | ||
52 | 52 | | |||
53 | static QFont getDefaultEntityFont(); | 53 | static QFont getDefaultEntityFont(); | ||
54 | static void setDefaultEntityFont(const QFont &); | 54 | static void setDefaultEntityFont(const QFont &); | ||
55 | 55 | | |||
56 | virtual KReportDesignerItemBase* clone() = 0; | 56 | virtual KReportDesignerItemBase* clone() = 0; | ||
57 | virtual void move(const QPointF&) = 0; | 57 | virtual void move(const QPointF&) = 0; | ||
58 | 58 | | |||
59 | KReportDesigner* designer() const { | 59 | KReportDesigner* designer() const; | ||
60 | return m_reportDesigner; | 60 | void setDesigner(KReportDesigner* rd); | ||
61 | } | | |||
62 | void setDesigner(KReportDesigner* rd) { | | |||
63 | m_reportDesigner = rd; | | |||
64 | } | | |||
65 | 61 | | |||
66 | static void addPropertyAsAttribute(QDomElement* e, KProperty* p); | 62 | static void addPropertyAsAttribute(QDomElement* e, KProperty* p); | ||
67 | 63 | | |||
68 | protected: | 64 | protected: | ||
69 | explicit KReportDesignerItemBase(KReportDesigner*); | 65 | explicit KReportDesignerItemBase(KReportDesigner*, KReportItemBase*); | ||
70 | KReportDesigner* m_reportDesigner; | | |||
71 | QString dataSourceAndObjectTypeName(const QString& dataSource, const QString& objectTypeName) const; | 66 | QString dataSourceAndObjectTypeName(const QString& dataSource, const QString& objectTypeName) const; | ||
72 | 67 | | |||
73 | /** | 68 | /** | ||
74 | * @brief Updates the text that is shown for the item in the report designer | 69 | * @brief Updates the text that is shown for the item in the report designer | ||
75 | * If itemDataSource is set then it is preferred over itemStaticValue | 70 | * If itemDataSource is set then it is preferred over itemStaticValue | ||
76 | * itemType is appended to the end of the text | 71 | * itemType is appended to the end of the text | ||
77 | * | 72 | * | ||
78 | * @param itemDataSource source field property | 73 | * @param itemDataSource source field property | ||
79 | * @param itemStaticValue value property | 74 | * @param itemStaticValue value property | ||
80 | * @param itemType type of item | 75 | * @param itemType type of item | ||
81 | * @return void | 76 | * @return void | ||
82 | */ | 77 | */ | ||
83 | void updateRenderText(const QString &itemDataSource, const QString &itemStaticValue, const QString &itemType); | 78 | void updateRenderText(const QString &itemDataSource, const QString &itemStaticValue, const QString &itemType); | ||
84 | QString m_renderText; | 79 | QString m_renderText; | ||
85 | 80 | | |||
81 | KReportItemBase *item() const; | ||||
82 | | ||||
86 | private: | 83 | private: | ||
87 | static bool m_readDefaultFont; | 84 | static bool m_readDefaultFont; | ||
staniek: I don't see where are these two members used | |||||
piggz: removed these and related unimplemented functions! | |||||
88 | static QFont m_defaultFont; | 85 | static QFont m_defaultFont; | ||
86 | | ||||
87 | class Private; | ||||
88 | Private * const d; | ||||
89 | }; | 89 | }; | ||
90 | 90 | | |||
91 | #endif | 91 | #endif | ||
92 | 92 | |
I don't see where are these two members used