File indexing completed on 2024-05-19 04:44:31
0001 /* This file is part of the KDE project 0002 * Copyright (C) 2009-2010 by Adam Pigg (adam@piggz.co.uk) 0003 * 0004 * This library is free software; you can redistribute it and/or 0005 * modify it under the terms of the GNU Lesser General Public 0006 * License as published by the Free Software Foundation; either 0007 * version 2.1 of the License, or (at your option) any later version. 0008 * 0009 * This library is distributed in the hope that it will be useful, 0010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0012 * Lesser General Public License for more details. 0013 * 0014 * You should have received a copy of the GNU Lesser General Public 0015 * License along with this library. If not, see <http://www.gnu.org/licenses/>. 0016 */ 0017 0018 #ifndef KREPORTITEMCHECKBOX_H 0019 #define KREPORTITEMCHECKBOX_H 0020 0021 #include "KReportItemBase.h" 0022 0023 class QDomNode; 0024 0025 namespace Scripting 0026 { 0027 class CheckBox; 0028 } 0029 0030 class KReportItemCheckBox : public KReportItemBase 0031 { 0032 Q_OBJECT 0033 public: 0034 KReportItemCheckBox(); 0035 explicit KReportItemCheckBox(const QDomNode &element); 0036 ~KReportItemCheckBox() override; 0037 0038 QString typeName() const override; 0039 int renderSimpleData(OROPage *page, OROSection *section, const QPointF &offset, const QVariant &data, KReportScriptHandler *script) override; 0040 0041 protected: 0042 KProperty* m_checkStyle; 0043 KProperty* m_foregroundColor; 0044 KProperty* m_lineColor; 0045 KProperty* m_lineWeight; 0046 KProperty* m_lineStyle; 0047 KProperty* m_staticValue; 0048 0049 bool value() const; 0050 void setValue(bool v); 0051 KReportLineStyle lineStyle(); 0052 0053 private: 0054 void createProperties() override; 0055 0056 friend class Scripting::CheckBox; 0057 }; 0058 0059 #endif // KREPORTITEMCHECKBOX_H