KD Reports  1.9
Public Member Functions | List of all members
KDReports::Frame Class Reference

#include <KDReportsFrame.h>

Inheritance diagram for KDReports::Frame:
Inheritance graph
Collaboration diagram for KDReports::Frame:
Collaboration graph

Public Member Functions

 Frame ()
 ~Frame () override
 Frame (const Frame &other)
Frameoperator= (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)
- Public Member Functions inherited from KDReports::Element
virtual ~Element ()
void setBackground (const QBrush &brush)
QBrush background () const

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.


Constructor & Destructor Documentation

KDReports::Frame::Frame ( )

Creates a frame.

KDReports::Frame::~Frame ( )

Destroys this frame.

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

Copies a frame. The contents are copied over.

Member Function Documentation

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.

See also
qreal KDReports::Frame::border ( ) const

Returns the width of the frame

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

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.

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

Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"