File indexing completed on 2024-05-19 04:44:33

0001 /* This file is part of the KDE project
0002  * Copyright (C) 2001-2007 by OpenMFG, LLC (info@openmfg.com)
0003  * Copyright (C) 2007-2008 by Adam Pigg (adam@piggz.co.uk)
0004  * Copyright (C) 2010-2015 Jarosław Staniek <staniek@kde.org>
0005  *
0006  * This library is free software; you can redistribute it and/or
0007  * modify it under the terms of the GNU Lesser General Public
0008  * License as published by the Free Software Foundation; either
0009  * version 2.1 of the License, or (at your option) any later version.
0010  *
0011  * This library is distributed in the hope that it will be useful,
0012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
0014  * Lesser General Public License for more details.
0015  *
0016  * You should have received a copy of the GNU Lesser General Public
0017  * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
0018  */
0019 
0020 #ifndef KREPORTLABELELEMENT_H
0021 #define KREPORTLABELELEMENT_H
0022 
0023 #include "KReportElement.h"
0024 #include "KReportLineStyle.h"
0025 
0026 #include <QFont>
0027 
0028 /*!
0029  * @brief The KReportLabelElement class represents a label element of a report design
0030  * @warning This API is currently private.
0031  */
0032 class KREPORT_EXPORT KReportLabelElement : public KReportElement //SDC: explicit operator== virtual_dtor
0033 {
0034 public:
0035     /*!
0036     @getter
0037     @return element's name.
0038     @setter
0039     Sets the element's name to @a name.
0040     */
0041     QString text; //SDC:
0042 
0043     /*!
0044     @getter
0045     @return element's font.
0046     @setter
0047     Sets the element's font to @a font.
0048     */
0049     QFont font; //SDC:
0050 
0051     /*!
0052     @getter
0053     @return element's text alignment. Default value is Qt::AlignLeft|Qt::AlignVCenter.
0054     @setter
0055     Sets the element's text alignment to @a alignment.
0056     */
0057     Qt::Alignment alignment; //SDC: default=Qt::AlignLeft|Qt::AlignVCenter
0058 
0059     /*!
0060     @getter
0061     @return element's border style.
0062     @setter
0063     Sets the element's border style to @a borderStyle.
0064     */
0065     KReportLineStyle borderStyle; //SDC:
0066 
0067     //! Constructs a label with text @a text.
0068     explicit KReportLabelElement(const QString &text)
0069         : KReportElement(new Data)
0070     {
0071         setText(text);
0072     }
0073 };
0074 
0075 #endif // KREPORTLABELELEMENT_H