KReport

KReportScriptBarcode.cpp
1 /* This file is part of the KDE project
2  * Copyright (C) 2007-2008 by Adam Pigg ([email protected])
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 
24 namespace Scripting
25 {
26 
27 Barcode::Barcode(KReportItemBarcode *b)
28 {
29  m_barcode = b;
30 }
31 
32 Barcode::~Barcode()
33 {
34 }
35 
36 QPointF Barcode::position() const
37 {
38  return m_barcode->position();
39 }
40 
41 void Barcode::setPosition(const QPointF& p)
42 {
43  m_barcode->setPosition(p);
44 }
45 
46 QSizeF Barcode::size() const
47 {
48  return m_barcode->size();
49 }
50 
51 void Barcode::setSize(const QSizeF& s)
52 {
53  m_barcode->setSize(s);
54 }
55 
56 Qt::Alignment Barcode::horizontalAlignment() const
57 {
58  return m_barcode->horizontalAlignment();
59 }
60 
61 void Barcode::setHorizonalAlignment(Qt::Alignment value)
62 {
63  m_barcode->setHorizontalAlignment(value);
64 }
65 
66 QString Barcode::source() const
67 {
68  return m_barcode->itemDataSource();
69 }
70 
71 void Barcode::setSource(const QString& s)
72 {
73  m_barcode->setItemDataSource(s);
74 }
75 
76 QString Barcode::format() const
77 {
78  return m_barcode->m_format->value().toString();
79 }
80 
81 void Barcode::setFormat(const QString& s)
82 {
83  m_barcode->m_format->setValue(s);
84 }
85 }
typedef Alignment
Field item script interface.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Feb 7 2023 04:17:37 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.