KReport

KReportScriptCheck.h
1 /* This file is part of the KDE project
2  * Copyright (C) 2010 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 #ifndef KREPORTSCRIPTCHECK_H
19 #define KREPORTSCRIPTCHECK_H
20 
21 #include <QObject>
22 
23 #include "KReportItemCheck.h"
24 
25 namespace Scripting
26 {
27  /**
28  @brief Checkbox item script interface
29 
30  The user facing interface for scripting report checkbox items
31  */
32  class CheckBox : public QObject
33  {
34  Q_OBJECT
35  public:
36  explicit CheckBox(KReportItemCheckBox *);
37 
38  ~CheckBox() override;
39 
40  public Q_SLOTS:
41 
42  //! @return the value of the checkbox
43  bool value() const;
44  //! Set the value of the checkbox, defaults to checked if no value is given
45  void setValue(bool val = true);
46 
47  //! @return the style of the checkbox as Cross, Tick or Dot
48  QString checkStyle() const;
49  //!Sets the style of the checkbox, valid values are Cross, Tick or Dot
50  void setCheckStyle(const QString&);
51 
52  //! @return the foreground (text) color of the text-item
53  QColor foregroundColor() const;
54 
55  //! Sets the foreground (text) color of the text-item to the given color
56  void setForegroundColor(const QColor&);
57 
58  //! @return the border line color of the text-item
59  QColor lineColor() const;
60 
61  //! Sets the border line color of the text-item to the given color
62  void setLineColor(const QColor&);
63 
64  //! @return the border line weight (thickness) of the text-item
65  int lineWeight() const;
66 
67  //! Sets the border line weight (thickness) of the text-item
68  void setLineWeight(int);
69 
70  //! @return the border line style of the text-item. Values are from Qt::Penstyle range 0-5
71  int lineStyle() const;
72 
73  //! Sets the border line style of the text-item to the given style in the range 0-5
74  void setLineStyle(int);
75 
76  //! @returns the position of the text-item in points
77  QPointF position() const;
78 
79  //! Sets the position of the text-item to the given point coordinates
80  void setPosition(const QPointF&);
81 
82  //! @returns the size of the text-item in points
83  QSizeF size() const;
84 
85  //! Sets the size of the text-item to the given size in points
86  void setSize(const QSizeF&);
87 
88  private:
89  KReportItemCheckBox *m_check;
90  };
91 
92 }
93 #endif // KREPORTSCRIPTCHECK_H
void setLineWeight(int)
Sets the border line weight (thickness) of the text-item.
void setValue(bool val=true)
Set the value of the checkbox, defaults to checked if no value is given.
void setPosition(const QPointF &)
Sets the position of the text-item to the given point coordinates.
void setLineStyle(int)
Sets the border line style of the text-item to the given style in the range 0-5.
Q_OBJECTQ_OBJECT
void setSize(const QSizeF &)
Sets the size of the text-item to the given size in points.
QString checkStyle() const
QColor lineColor() const
void setLineColor(const QColor &)
Sets the border line color of the text-item to the given color.
QColor foregroundColor() const
void setForegroundColor(const QColor &)
Sets the foreground (text) color of the text-item to the given color.
Q_SLOTSQ_SLOTS
QPointF position() const
Checkbox item script interface.
Field item script interface.
void setCheckStyle(const QString &)
Sets the style of the checkbox, valid values are Cross, Tick or Dot.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sun Nov 28 2021 22:59:17 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.