00001 #ifndef KDREPORTSHEADER_H
00002 #define KDREPORTSHEADER_H
00003
00004 #include "KDReportsGlobal.h"
00005 #include "KDReportsVariableType.h"
00006 #include <QtCore/Qt>
00007 #include <QtGui/QTextOption>
00008
00009 template<class T> class QList;
00010 class QFont;
00011 class QTextDocument;
00012
00013 namespace KDReports {
00014
00015 class XmlParser;
00016 class Element;
00017 class HeaderMap;
00018 class Report;
00019 class ReportPrivate;
00020 class TextDocument;
00021
00028 class KDREPORTS_EXPORT Header
00029 {
00030 public:
00035 void setDefaultFont( const QFont& font );
00036
00040 void addInlineElement( const Element& element );
00041
00046 void addElement( const Element& element, Qt::AlignmentFlag horizontalAlignment = Qt::AlignLeft );
00047
00059 void addVariable( VariableType variable );
00060
00066 void addVerticalSpacing( qreal space );
00067
00077 #if QT_VERSION >= 0x040400
00078 void setTabPositions( const QList<QTextOption::Tab>& tabs );
00079 #endif
00080
00081 private:
00082 friend class XmlParser;
00083 friend class Report;
00084 friend class ReportPrivate;
00085 Header( Report* report );
00086 ~Header();
00087 friend class Test;
00088 friend class HeaderMap;
00089 TextDocument& doc();
00090 void preparePaintingPage( int pageNumber );
00091
00092 Q_DISABLE_COPY( Header )
00093
00094 class Private;
00095 Private* const d;
00096 };
00097
00098 typedef Header Footer;
00099
00100 }
00101
00102 #endif