KD Reports
1.8
|
#include <KDReportsFrame.h>
Public Member Functions | |
Frame () | |
virtual | ~Frame () |
Frame (const Frame &other) | |
Frame & | operator= (const Frame &other) |
void | setWidth (qreal width, Unit unit=Millimeters) |
void | setHeight (qreal height, Unit unit=Millimeters) |
void | setPadding (qreal padding) |
qreal | padding () const |
void | setBorder (qreal border) |
qreal | border () const |
void | addInlineElement (const Element &element) |
void | addElement (const Element &element, Qt::AlignmentFlag horizontalAlignment=Qt::AlignLeft) |
void | addVariable (VariableType variable) |
![]() | |
virtual | ~Element () |
void | setBackground (const QBrush &brush) |
QBrush | background () const |
Additional Inherited Members | |
![]() | |
Element () | |
Element (const Element &other) | |
Element & | operator= (const Element &other) |
This class represents a frame, with other elements inside. The frame can be visible or not.
|
explicit |
Creates a frame.
|
virtual |
Destroys this frame.
KDReports::Frame::Frame | ( | const Frame & | other | ) |
Copies a frame. The contents are copied over.
void KDReports::Frame::addElement | ( | const Element & | element, |
Qt::AlignmentFlag | horizontalAlignment = Qt::AlignLeft |
||
) |
Adds an element to the frame, creating a new paragraph for it. You can specify the alignment of that paragraph.
void KDReports::Frame::addInlineElement | ( | const Element & | element | ) |
Adds an element to the frame, next to the previous element, in the same paragraph.
void KDReports::Frame::addVariable | ( | VariableType | variable | ) |
Adds an variable in the text of the current paragraph.
qreal KDReports::Frame::border | ( | ) | const |
Returns the width of the frame
Copies the text and settings from another frame.
qreal KDReports::Frame::padding | ( | ) | const |
Returns the width of the frame's internal padding in millimeters.
void KDReports::Frame::setBorder | ( | qreal | border | ) |
Specifies the width of the border in pixels. The default border has a width of 1. Set it to 0 for a frame without borders.
void KDReports::Frame::setHeight | ( | qreal | height, |
Unit | unit = Millimeters |
||
) |
Set the frame height in millimeters or in percent of the page height.
void KDReports::Frame::setPadding | ( | qreal | padding | ) |
Specifies the size of the padding in millimeters. Padding is the distance between the contents of the frame and the frame border, all around the contents (above, below, on the left and on the right). The default padding has a size of 0.5 mm.
void KDReports::Frame::setWidth | ( | qreal | width, |
Unit | unit = Millimeters |
||
) |
Set the frame width in millimeters or in percent of the page width.