00001 #ifndef KDREPORTSCELL_H
00002 #define KDREPORTSCELL_H
00003
00004 #include "KDReportsElement.h"
00005 #include "KDReportsVariableType.h"
00006 #include <QtCore/Qt>
00007 #include <QMap>
00008 #include <QPair>
00009
00010 namespace KDReports
00011 {
00012 class ReportBuilder;
00013 class Element;
00014 class CellContentMap;
00015 class TableElement;
00016
00022 class KDREPORTS_EXPORT Cell : public Element
00023 {
00024 public:
00029 void setColumnSpan( int columnSpan );
00033 int columnSpan() const;
00034
00039 void setRowSpan( int rowSpan );
00043 int rowSpan() const;
00044
00048 void addInlineElement( const Element& element );
00049
00054 void addElement( const Element& element, Qt::AlignmentFlag horizontalAlignment = Qt::AlignLeft );
00055
00060 void addVariable( VariableType variable );
00061
00066 void build( ReportBuilder& builder ) const;
00067
00071 Element* clone() const { return 0; }
00072
00073 private:
00074
00075 friend class TableElement;
00076 friend class QMap<QPair<int, int>, Cell>;
00077 Cell();
00078 ~Cell();
00079 Cell(const Cell &other);
00080 Cell &operator=(const Cell &other);
00081
00082 class Private;
00083 Private* const d;
00084 };
00085
00086 }
00087
00088 #endif