KD Reports API Documentation  2.0
Public Member Functions | List of all members
KDReports::Frame Class Reference

#include <KDReportsFrame.h>

Inheritance diagram for KDReports::Frame:
Inheritance graph
[legend]
Collaboration diagram for KDReports::Frame:
Collaboration graph
[legend]

Public Member Functions

 Frame ()
 
 Frame (const Frame &other)
 
 ~Frame () override
 
void addElement (const Element &element, Qt::AlignmentFlag horizontalAlignment=Qt::AlignLeft)
 
void addInlineElement (const Element &element)
 
void addVariable (VariableType variable)
 
qreal border () const
 
void build (ReportBuilder &builder) const override
 
Elementclone () const override
 
Frameoperator= (const Frame &other)
 
qreal padding () const
 
void setBorder (qreal border)
 
void setHeight (qreal height, Unit unit=Millimeters)
 
void setPadding (qreal padding)
 
void setWidth (qreal width, Unit unit=Millimeters)
 
- Public Member Functions inherited from KDReports::Element
virtual ~Element ()
 
QBrush background () const
 
void setBackground (const QBrush &brush)
 

Additional Inherited Members

- Protected Member Functions inherited from KDReports::Element
 Element ()
 
 Element (const Element &other)
 
Elementoperator= (const Element &other)
 

Detailed Description

This class represents a frame, with other elements inside. The frame can be visible or not.

Since
1.7

Definition at line 51 of file KDReportsFrame.h.

Constructor & Destructor Documentation

◆ Frame() [1/2]

KDReports::Frame::Frame ( )
explicit

Creates a frame.

Definition at line 48 of file KDReportsFrame.cpp.

◆ ~Frame()

KDReports::Frame::~Frame ( )
override

Destroys this frame.

Definition at line 100 of file KDReportsFrame.cpp.

◆ Frame() [2/2]

KDReports::Frame::Frame ( const Frame other)

Copies a frame. The contents are copied over.

Definition at line 53 of file KDReportsFrame.cpp.

Member Function Documentation

◆ addElement()

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.

Definition at line 110 of file KDReportsFrame.cpp.

References KDReports::Element::clone().

◆ addInlineElement()

void KDReports::Frame::addInlineElement ( const Element element)

Adds an element to the frame, next to the previous element, in the same paragraph.

Definition at line 105 of file KDReportsFrame.cpp.

References KDReports::Element::clone().

◆ addVariable()

void KDReports::Frame::addVariable ( VariableType  variable)

Adds an variable in the text of the current paragraph.

See also
KDReportsHeader::addVariable

Definition at line 115 of file KDReportsFrame.cpp.

◆ border()

qreal KDReports::Frame::border ( ) const

Returns the width of the frame

Definition at line 95 of file KDReportsFrame.cpp.

◆ build()

void KDReports::Frame::build ( ReportBuilder builder) const
overridevirtual

◆ clone()

KDReports::Element * KDReports::Frame::clone ( ) const
overridevirtual

Implements KDReports::Element.

Definition at line 170 of file KDReportsFrame.cpp.

◆ operator=()

KDReports::Frame & KDReports::Frame::operator= ( const Frame other)

Copies the text and settings from another frame.

Definition at line 59 of file KDReportsFrame.cpp.

References KDReports::Element::operator=().

◆ padding()

qreal KDReports::Frame::padding ( ) const

Returns the width of the frame's internal padding in millimeters.

Definition at line 85 of file KDReportsFrame.cpp.

◆ setBorder()

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.

Definition at line 90 of file KDReportsFrame.cpp.

◆ setHeight()

void KDReports::Frame::setHeight ( qreal  height,
KDReports::Unit  unit = Millimeters 
)

Set the frame height in millimeters or in percent of the page height.

Definition at line 74 of file KDReportsFrame.cpp.

◆ setPadding()

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.

Definition at line 80 of file KDReportsFrame.cpp.

◆ setWidth()

void KDReports::Frame::setWidth ( qreal  width,
KDReports::Unit  unit = Millimeters 
)

Set the frame width in millimeters or in percent of the page width.

Definition at line 68 of file KDReportsFrame.cpp.


The documentation for this class was generated from the following files:

© 2007-2021 Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
https://www.kdab.com/development-resources/qt-tools/kd-reports/
Generated on Sat Jan 8 2022 02:38:32 for KD Reports API Documentation by doxygen 1.8.17