KD Reports 1.4
|
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 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 qreal width() const; 00095 00100 Unit unit() const; 00101 00107 void setDefaultFont( const QFont& font ); 00108 00113 AbstractTableElement(const AbstractTableElement &other); 00117 AbstractTableElement &operator=(const AbstractTableElement &other); 00118 00119 protected: 00123 AbstractTableElement(); 00124 00128 ~AbstractTableElement(); 00129 00133 void fillTableFormat( QTextTableFormat& tableFormat, QTextCursor& textDocCursor ) const; 00134 00135 private: 00136 class Private; 00137 Private* const d; 00138 }; 00139 00140 } 00141 00142 #endif /* KDREPORTSABSTRACTTABLEELEMENT_H */ 00143