File indexing completed on 2024-05-12 04:43:20
0001 /* This file is part of the KDE project 0002 * Copyright (C) 2007-2008 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 #include "KReportScriptBarcode.h" 0019 0020 #include <KProperty> 0021 #include <QSizeF> 0022 #include <QPointF> 0023 0024 namespace Scripting 0025 { 0026 0027 Barcode::Barcode(KReportItemBarcode *b) 0028 { 0029 m_barcode = b; 0030 } 0031 0032 Barcode::~Barcode() 0033 { 0034 } 0035 0036 QPointF Barcode::position() const 0037 { 0038 return m_barcode->position(); 0039 } 0040 0041 void Barcode::setPosition(const QPointF& p) 0042 { 0043 m_barcode->setPosition(p); 0044 } 0045 0046 QSizeF Barcode::size() const 0047 { 0048 return m_barcode->size(); 0049 } 0050 0051 void Barcode::setSize(const QSizeF& s) 0052 { 0053 m_barcode->setSize(s); 0054 } 0055 0056 Qt::Alignment Barcode::horizontalAlignment() const 0057 { 0058 return m_barcode->horizontalAlignment(); 0059 } 0060 0061 void Barcode::setHorizonalAlignment(Qt::Alignment value) 0062 { 0063 m_barcode->setHorizontalAlignment(value); 0064 } 0065 0066 QString Barcode::source() const 0067 { 0068 return m_barcode->itemDataSource(); 0069 } 0070 0071 void Barcode::setSource(const QString& s) 0072 { 0073 m_barcode->setItemDataSource(s); 0074 } 0075 0076 QString Barcode::format() const 0077 { 0078 return m_barcode->m_format->value().toString(); 0079 } 0080 0081 void Barcode::setFormat(const QString& s) 0082 { 0083 m_barcode->m_format->setValue(s); 0084 } 0085 }