KD Reports 1.4
KDReportsCell.h
00001 /****************************************************************************
00002 ** Copyright (C) 2007-2012 Klaralvdalens Datakonsult AB.  All rights reserved.
00003 **
00004 ** This file is part of the KD Reports library.
00005 **
00006 ** Licensees holding valid commercial KD Reports licenses may use this file in
00007 ** accordance with the KD Reports Commercial License Agreement provided with
00008 ** the Software.
00009 **
00010 **
00011 ** This file may be distributed and/or modified under the terms of the
00012 ** GNU General Public License version 2 and version 3 as published by the
00013 ** Free Software Foundation and appearing in the file LICENSE.GPL included.
00014 **
00015 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00016 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00017 **
00018 ** Contact info@kdab.com if any conditions of this licensing are not
00019 ** clear to you.
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     // TableElement needs to create/destroy/copy cells
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 /* KDREPORTSCELL_H */
 All Classes Namespaces Functions Enumerations Enumerator

Klarälvdalens Datakonsult AB (KDAB)
Qt-related services and products
http://www.kdab.com/
http://www.kdab.com/products/kd-reports/