KDReportsAbstractTableElement.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 KDREPORTSABSTRACTTABLEELEMENT_H
00024 #define KDREPORTSABSTRACTTABLEELEMENT_H
00025 
00026 #include "KDReportsElement.h"
00027 #include "KDReportsUnit.h"
00028 
00029 template <typename T> class QList;
00030 class QFont;
00031 class QTextTableFormat;
00032 class QTextCursor;
00033 namespace KDReports {
00034 
00039 class KDREPORTS_EXPORT AbstractTableElement : public Element
00040 {
00041 public:
00042 
00048     void setBorder( qreal border );
00049 
00053     qreal border() const;
00054 
00059     void setBorderBrush( const QBrush& brush );
00060 
00065     QBrush borderBrush() const;
00066 
00073     void setPadding( qreal padding );
00074 
00078     qreal padding() const;
00079 
00087     void setWidth( qreal width, Unit unit = Millimeters );
00088 
00094     void setDefaultFont( const QFont& font );
00095 
00100     AbstractTableElement(const AbstractTableElement &other);
00104     AbstractTableElement &operator=(const AbstractTableElement &other);
00105 
00106 protected:
00110     AbstractTableElement();
00111 
00115     ~AbstractTableElement();
00116 
00120     void fillTableFormat( QTextTableFormat& tableFormat, QTextCursor& textDocCursor ) const;
00121 
00122 private:
00123     class Private;
00124     Private* const d;
00125 };
00126 
00127 }
00128 
00129 #endif /* KDREPORTSABSTRACTTABLEELEMENT_H */
00130 
 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/