KReport

KReportScriptLine.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 SCRIPTINGKRSCRIPTLINE_H
19#define SCRIPTINGKRSCRIPTLINE_H
20
21#include <QObject>
22#include <QPointF>
23#include <QColor>
24
25class KReportItemLine;
26
27namespace Scripting
28{
29
30/**
31@brief Line item script interface
32
33The user facing interface for scripting report line items
34*/
35class Line : public QObject
36{
38public:
39 explicit Line(KReportItemLine *);
40
41 ~Line() override;
42
43public Q_SLOTS:
44 /**
45 * Return the start position of the line
46 * @return start position
47 */
48 QPointF startPosition() const;
49
50 /**
51 * Set the start position of the line
52 * @param startPosition
53 */
55
56 /**
57 * Return the end position of the line
58 * @return end position
59 */
60 QPointF endPosition() const;
61
62 /**
63 * Set the end position of the line
64 * @param endPosition
65 */
67
68 /**
69 * Return the color of the linelineColor
70 * @return line color
71 */
72 QColor lineColor() const;
73
74 /**
75 * Sets the line color
76 * @param lineColor
77 */
78 void setLineColor(const QColor& lineColor);
79
80 /**
81 * Return the weight (width) of the line
82 * @return Weight
83 */
84 int lineWeight() const;
85
86 /**
87 * Set the weight (width) of the line
88 * @param weight
89 */
90 void setLineWeight(int const weight);
91
92 /**
93 * Return the line style. Valid values are those from Qt::PenStyle (0-5)
94 * @return Style
95 */
96 int lineStyle() const;
97
98 /**
99 * Set the style of the line
100 * @param style From Qt::PenStyle (0-5)
101 */
102 void setLineStyle(int style);
103
104private:
105 KReportItemLine *m_line;
106
107};
108
109}
110
111#endif
Line item script interface.
void setEndPosition(const QPointF &endPosition)
Set the end position of the line.
void setLineStyle(int style)
Set the style of the line.
QPointF startPosition() const
Return the start position of the line.
int lineWeight() const
Return the weight (width) of the line.
QColor lineColor() const
Return the color of the linelineColor.
QPointF endPosition() const
Return the end position of the line.
void setLineWeight(int const weight)
Set the weight (width) of the line.
int lineStyle() const
Return the line style.
void setLineColor(const QColor &lineColor)
Sets the line color.
void setStartPosition(const QPointF &startPosition)
Set the start position of the line.
Field item script interface.
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jul 26 2024 12:00:43 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.