00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef KDREPORTSCELL_H
00024 #define KDREPORTSCELL_H
00025
00026 #include "KDReportsElement.h"
00027 #include "KDReportsVariableType.h"
00028 #include <QtCore/Qt>
00029 #include <QMap>
00030 #include <QPair>
00031
00032 namespace KDReports
00033 {
00034 class ReportBuilder;
00035 class Element;
00036 class CellContentMap;
00037 class TableElement;
00038
00044 class KDREPORTS_EXPORT Cell : public Element
00045 {
00046 public:
00051 void setColumnSpan( int columnSpan );
00055 int columnSpan() const;
00056
00061 void setRowSpan( int rowSpan );
00065 int rowSpan() const;
00066
00070 void addInlineElement( const Element& element );
00071
00076 void addElement( const Element& element, Qt::AlignmentFlag horizontalAlignment = Qt::AlignLeft );
00077
00082 void addVariable( VariableType variable );
00083
00088 void build( ReportBuilder& builder ) const;
00089
00093 Element* clone() const { return 0; }
00094
00095 private:
00096
00097 friend class TableElement;
00098 friend class QMap<QPair<int, int>, Cell>;
00099 Cell();
00100 ~Cell();
00101 Cell(const Cell &other);
00102 Cell &operator=(const Cell &other);
00103
00104 class Private;
00105 Private* const d;
00106 };
00107
00108 }
00109
00110 #endif