KReport

KReportScriptBarcode.cpp
1/* This file is part of the KDE project
2 * Copyright (C) 2007-2008 by Adam Pigg (adam@piggz.co.uk)
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#include "KReportScriptBarcode.h"
19
20#include <KProperty>
21#include <QSizeF>
22#include <QPointF>
23
24namespace Scripting
25{
26
27Barcode::Barcode(KReportItemBarcode *b)
28{
29 m_barcode = b;
30}
31
32Barcode::~Barcode()
33{
34}
35
36QPointF Barcode::position() const
37{
38 return m_barcode->position();
39}
40
41void Barcode::setPosition(const QPointF& p)
42{
43 m_barcode->setPosition(p);
44}
45
46QSizeF Barcode::size() const
47{
48 return m_barcode->size();
49}
50
51void Barcode::setSize(const QSizeF& s)
52{
53 m_barcode->setSize(s);
54}
55
56Qt::Alignment Barcode::horizontalAlignment() const
57{
58 return m_barcode->horizontalAlignment();
59}
60
61void Barcode::setHorizonalAlignment(Qt::Alignment value)
62{
63 m_barcode->setHorizontalAlignment(value);
64}
65
66QString Barcode::source() const
67{
68 return m_barcode->itemDataSource();
69}
70
71void Barcode::setSource(const QString& s)
72{
73 m_barcode->setItemDataSource(s);
74}
75
76QString Barcode::format() const
77{
78 return m_barcode->m_format->value().toString();
79}
80
81void Barcode::setFormat(const QString& s)
82{
83 m_barcode->m_format->setValue(s);
84}
85}
QVariant value() const
bool setValue(const QVariant &value, ValueOptions options=ValueOptions())
void setSize(const QSizeF &ptSize)
Sets size for the element.
QPointF position() const
Return the position in points.
void setPosition(const QPointF &ptPos)
Sets position for the element.
QSizeF size() const
Return the size in points.
QString itemDataSource() const
Field item script interface.
typedef Alignment
QString toString() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:06:04 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.