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(); | | |||
54 | static void setDefaultEntityFont(const QFont &); | | |||
55 | | ||||
56 | virtual KReportDesignerItemBase* clone() = 0; | 53 | virtual KReportDesignerItemBase* clone() = 0; | ||
57 | virtual void move(const QPointF&) = 0; | 54 | virtual void move(const QPointF&) = 0; | ||
58 | 55 | | |||
59 | KReportDesigner* designer() const { | 56 | KReportDesigner* designer() const; | ||
60 | return m_reportDesigner; | 57 | void setDesigner(KReportDesigner* rd); | ||
61 | } | | |||
62 | void setDesigner(KReportDesigner* rd) { | | |||
63 | m_reportDesigner = rd; | | |||
64 | } | | |||
65 | 58 | | |||
66 | static void addPropertyAsAttribute(QDomElement* e, KProperty* p); | 59 | static void addPropertyAsAttribute(QDomElement* e, KProperty* p); | ||
67 | 60 | | |||
68 | protected: | 61 | protected: | ||
69 | explicit KReportDesignerItemBase(KReportDesigner*); | 62 | explicit KReportDesignerItemBase(KReportDesigner*, KReportItemBase*); | ||
70 | KReportDesigner* m_reportDesigner; | | |||
71 | QString dataSourceAndObjectTypeName(const QString& dataSource, const QString& objectTypeName) const; | 63 | QString dataSourceAndObjectTypeName(const QString& dataSource, const QString& objectTypeName) const; | ||
72 | 64 | | |||
73 | /** | 65 | /** | ||
74 | * @brief Updates the text that is shown for the item in the report designer | 66 | * @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 | 67 | * If itemDataSource is set then it is preferred over itemStaticValue | ||
76 | * itemType is appended to the end of the text | 68 | * itemType is appended to the end of the text | ||
77 | * | 69 | * | ||
78 | * @param itemDataSource source field property | 70 | * @param itemDataSource source field property | ||
79 | * @param itemStaticValue value property | 71 | * @param itemStaticValue value property | ||
80 | * @param itemType type of item | 72 | * @param itemType type of item | ||
81 | * @return void | 73 | * @return void | ||
82 | */ | 74 | */ | ||
83 | void updateRenderText(const QString &itemDataSource, const QString &itemStaticValue, const QString &itemType); | 75 | void updateRenderText(const QString &itemDataSource, const QString &itemStaticValue, const QString &itemType); | ||
84 | QString m_renderText; | 76 | KReportItemBase *item() const; | ||
77 | | ||||
78 | void setRenderText(const QString &text); | ||||
79 | QString renderText() const; | ||||
85 | 80 | | |||
86 | private: | 81 | private: | ||
87 | static bool m_readDefaultFont; | 82 | class Private; | ||
staniek: I don't see where are these two members used | |||||
piggz: removed these and related unimplemented functions! | |||||
88 | static QFont m_defaultFont; | 83 | Private * const d; | ||
89 | }; | 84 | }; | ||
90 | 85 | | |||
91 | #endif | 86 | #endif | ||
92 | 87 | |
I don't see where are these two members used