KReport

KReportScriptBarcode.h
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#ifndef SCRIPTINGKRSCRIPTBARCODE_H
19#define SCRIPTINGKRSCRIPTBARCODE_H
20
21#include <QObject>
22
23#include "KReportItemBarcode.h"
24
25namespace Scripting
26{
27
28/**
29*/
30class Barcode : public QObject
31{
33public:
34 explicit Barcode(KReportItemBarcode *f);
35
36 ~Barcode() override;
37
38public Q_SLOTS:
39
40
41 /**
42 * Get the position of the barcode
43 * @return position in points
44 */
45 QPointF position() const;
46
47 /**
48 * Sets the position of the barcode in points
49 * @param Position
50 */
51 void setPosition(const QPointF&);
52
53 /**
54 * Get the size of the barcode
55 * @return size in points
56 */
57 QSizeF size() const;
58
59 /**
60 * Set the size of the barcode in points
61 * @param Size
62 */
63 void setSize(const QSizeF&);
64
65 /**
66 * Get the horizontal alignment
67 * Qt::AlignLeft Left
68 * Qt::AlignHCenter Center
69 * Qt::AlignRight Right
70 * @return alignment
71 */
72 Qt::Alignment horizontalAlignment() const;
73
74 /**
75 * Sets the horizontal alignment
76 * @param Alignemnt
77 */
78 void setHorizonalAlignment(Qt::Alignment value);
79
80
81 /**
82 * @return the data source for the element
83 * The source can be a column name or a valid script expression if prefixed with a '='.
84 */
85 QString source() const;
86
87
88 /**
89 * Sets the data source for the element.
90 * @see source()
91 */
92 void setSource(const QString &s);
93
94
95 /**
96 * Get the barcode format
97 * @return format as string
98 */
99 QString format() const;
100
101 /**
102 * Set the barcode format
103 * @param format
104 */
105 void setFormat(const QString&);
106
107
108private:
109 KReportItemBarcode *m_barcode;
110};
111
112}
113
114#endif
Field item script interface.
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
typedef Alignment
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:19:58 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.