KDReportsAutoTableElement.h

00001 /****************************************************************************
00002 ** Copyright (C) 2007-2011 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 KDREPORTSAUTOTABLEELEMENT_H
00024 #define KDREPORTSAUTOTABLEELEMENT_H
00025 
00026 #include "KDReportsAbstractTableElement.h"
00027 #include <QtCore/QSize>
00028 class QTextDocument;
00029 class QTextTableCell;
00030 class QAbstractItemModel;
00031 
00032 namespace KDReports {
00033 
00042 class KDREPORTS_EXPORT AutoTableElement : public AbstractTableElement
00043 {
00044 public:
00048     explicit AutoTableElement( QAbstractItemModel* tableModel );
00049 
00054     explicit AutoTableElement( const QString& modelKey );
00055 
00059     ~AutoTableElement();
00060 
00065     AutoTableElement(const AutoTableElement &other);
00069     AutoTableElement &operator=(const AutoTableElement &other);
00070 
00075     QAbstractItemModel* tableModel() const;
00076 
00082     void setVerticalHeaderVisible( bool visible );
00083 
00088     void setHorizontalHeaderVisible( bool visible );
00089 
00094     bool isVerticalHeaderVisible() const;
00095 
00100     bool isHorizontalHeaderVisible() const;
00101 
00108     void setHeaderBackground( const QBrush& brush );
00109 
00117     void setIconSize( const QSize& iconSize );
00118 
00123     QSize iconSize() const;
00124 
00129     void build( ReportBuilder& ) const;
00134     Element* clone() const;
00135 
00136     enum {
00137         DecorationAlignmentRole = 0x2D535FB1 
00138     };
00139 
00140 private:
00141     class Private;
00142     Private* const d;
00143 };
00144 
00145 }
00146 
00147 #endif /* KDREPORTSAUTOTABLEELEMENT_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/