Go to the documentation of this file.00001
00004 #ifndef BPSREPORTELEMENT_H
00005 #define BPSREPORTELEMENT_H
00006
00007 #include "bpspropertyobject.h"
00008 #include <QMetaType>
00009 #include <QPointF>
00010
00011 class QGraphicsItem;
00012
00072 class BPSCORE_EXPORT BpsReportElement : public BpsPropertyObject
00073 {
00074 Q_OBJECT
00075 BPS_PRIVATE(BpsReportElement)
00076
00077 public:
00078
00082 enum Type {
00083 TypeUnknown,
00084 TypeReport,
00085 TypeSection,
00086 TypeSimpletext,
00087 TypeRichtext,
00088 TypeLine,
00089 TypeRectangle,
00090 TypeEllipse,
00091 TypeBarcode,
00092 TypePixmap
00093 };
00094
00100 BpsReportElement(Type aType, QObject* aParent = 0);
00101
00108 BpsReportElement(const BpsReportElement& aElement, QObject* aParent = 0, bool aCopyChilds = true);
00109
00110 virtual ~BpsReportElement();
00111
00116 BpsReportElement* parentElement() const;
00117
00124 BpsReportElement* childElement(const QString& aName) const;
00125
00131 void insertChild(int aIndex, BpsReportElement* aChild);
00132
00136 Type type() const;
00137
00142 Type typeByName(const QString& aTypeName) const;
00143
00147 QString typeName() const;
00148
00158 QGraphicsItem* graphicsItem() const;
00159
00170 QGraphicsItem* createGraphicsItem(int aResolution, const QPointF& aOffset) const;
00171
00180 QRectF handleRect() const;
00181
00188 QLineF handleLine() const;
00189
00194 BpsReportElement* firstChild() const;
00195
00200 BpsReportElement* lastChild() const;
00201
00209 void setResolution(int aResolution);
00210
00215 int resolution() const;
00216
00222 void setOffset(const QPointF& aOffset);
00223
00228 QPointF offset() const;
00229
00230 public slots:
00239 virtual bool setProperty(const char* aName, const QVariant& aValue);
00240
00241 protected:
00242
00249 virtual BpsPropertyObject* xmlCreateObject(const QString& aTagName, int aLevel) const;
00250
00256 virtual QString xmlTagName(int aLevel) const;
00257
00258 };
00259
00260 Q_DECLARE_METATYPE(BpsReportElement*)
00261
00262 #endif // BPSREPORTELEMENT_H