KD Reports 1.4
KDReportsAutoTableElement.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 KDREPORTSAUTOTABLEELEMENT_H
00024 #define KDREPORTSAUTOTABLEELEMENT_H
00025 
00026 #include "KDReportsAbstractTableElement.h"
00027 #include <QtCore/QSize>
00028 
00029 class QTextDocument;
00030 class QTextTableCell;
00031 class QAbstractItemModel;
00032 
00033 namespace KDReports {
00034 
00043 class KDREPORTS_EXPORT AutoTableElement : public AbstractTableElement
00044 {
00045 public:
00049     explicit AutoTableElement( QAbstractItemModel* tableModel );
00050 
00055     explicit AutoTableElement( const QString& modelKey );
00056 
00060     ~AutoTableElement();
00061 
00066     AutoTableElement(const AutoTableElement &other);
00070     AutoTableElement &operator=(const AutoTableElement &other);
00071 
00076     QAbstractItemModel* tableModel() const;
00077 
00082     void setTableModel(QAbstractItemModel *tableModel);
00083 
00088     void setModelKey(const QString &modelKey);
00089 
00095     void setVerticalHeaderVisible( bool visible );
00096 
00101     void setHorizontalHeaderVisible( bool visible );
00102 
00107     bool isVerticalHeaderVisible() const;
00108 
00113     bool isHorizontalHeaderVisible() const;
00114 
00121     void setHeaderBackground( const QBrush& brush );
00122 
00127     QBrush headerBackground() const;
00128 
00136     void setIconSize( const QSize& iconSize );
00137 
00142     QSize iconSize() const;
00143 
00148     void build( ReportBuilder& ) const;
00153     Element* clone() const;
00154 
00155     enum {
00156         DecorationAlignmentRole = 0x2D535FB1 
00157     };
00158 
00159 private:
00160     class Private;
00161     Private* const d;
00162 };
00163 
00164 }
00165 
00166 #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/