BPS C++ API  2.24.4
BpsReportSection Class Reference

A report section will typically be created by calling BpsReport::createSection() from within the report script. More...

#include <bpsreportsection.h>

+ Inheritance diagram for BpsReportSection:

Public Slots

BpsReportElementitem (const QString &aName) const
 Get first named item. More...
 
BpsReportElementitemAt (int aPosition) const
 Get item at a certain index position. More...
 
int itemCount () const
 Get the number of items in this. More...
 
qreal printHeight () const
 Returns the height in millimeters required to print the section. More...
 
- Public Slots inherited from BpsReportElement
virtual bool setProperty (const char *aName, const QVariant &aValue)
 Set the value of a named property. More...
 
- Public Slots inherited from BpsPropertyObject
void setModified (bool aModified=true)
 Set or clear the modification status. More...
 
virtual bool setProperty (const char *aName, const QVariant &aValue)
 Set the value of a property. More...
 
bool setPropertyAsString (const char *aName, const QString &aValue)
 Set the value of a property by converting from a string. More...
 

Public Member Functions

 BpsReportSection (const BpsReportElement &aElement, BpsReport *aParent)
 The constructor. More...
 
- Public Member Functions inherited from BpsReportElement
 BpsReportElement (const BpsReportElement &aElement, QObject *aParent=nullptr, bool aCopyChilds=true)
 Copy-constructor for BpsReportElement. More...
 
 BpsReportElement (Type aType, QObject *aParent=nullptr)
 Constructor for BpsReportElement. More...
 
BpsReportElementchildElement (const QString &aName) const
 Get the named child element. More...
 
QGraphicsItemcreateGraphicsItem (int aResolution, const QPointF &aOffset) const
 Creates a graphics item for external use. More...
 
BpsReportElementfirstChild () const
 Get first child element. More...
 
QGraphicsItemgraphicsItem () const
 Get a pointer to the internal graphics item. More...
 
QLineF handleLine () const
 Get the line where the handles should be placed on for single selection. More...
 
QRectF handleRect () const
 Get the rectangle where the sizing handles should be placed on. More...
 
void insertChild (int aIndex, BpsReportElement *aChild)
 Insert a child at the specified position in the list. More...
 
BpsReportElementlastChild () const
 Get last child element. More...
 
QPointF offset () const
 Get the current drawing offset. More...
 
BpsReportElementparentElement () const
 Get the parent element. More...
 
int resolution () const
 Get current drawing resolution. More...
 
void setOffset (const QPointF &aOffset)
 Set the drawing offset in millimeters. More...
 
void setResolution (int aResolution)
 Sets the resolution as number of points per inch. More...
 
Type type () const
 
Type typeByName (const QString &aTypeName) const
 
QString typeName () const
 
- Public Member Functions inherited from BpsPropertyObject
void addAttribute (const char *aProperty, const char *aAttribute, const QVariant &aValue=true)
 Adds or remove an attribute to/from an existing property. More...
 
void addProperty (const char *aName, const QVariant &aValue)
 Add or remove a property. More...
 
void appendChild (BpsPropertyObject *aChild)
 Appends a child to the end of the children list. More...
 
QVariant attribute (const char *aProperty, const char *aAttribute) const
 Get the attributes value. More...
 
QList< QByteArrayattributeNames (const char *aProperty) const
 Get a list of all attributes defined for a certain property. More...
 
 BpsPropertyObject (const BpsPropertyObject &aOther)
 Copy-constructor for BpsPropertyObject. More...
 
 BpsPropertyObject (const QString &aName, QObject *aParent=nullptr)
 Constructor for BpsPropertyObject. More...
 
 BpsPropertyObject (QObject *aParent=nullptr)
 Constructor for BpsPropertyObject. More...
 
BpsPropertyObjectchildAt (int aIndex) const
 Get pointer to indexed child element. More...
 
int childCount () const
 
int childIndex (BpsPropertyObject *aChild) const
 Get index of a child. More...
 
QList< BpsPropertyObject * > children () const
 
void clear ()
 Removes all dynamic properties and deletes all children. More...
 
void emitValues ()
 Emits valueChanged() for all properties.
 
bool hasProperty (const char *aName) const
 Check if a property with given name has been added by BpsPropertyObject::addProperty(). More...
 
void insertChild (int aIndex, BpsPropertyObject *aChild)
 Insert a child at the specified position in the children list. More...
 
bool isModified () const
 
bool isValid (BpsPropertyObject *aObject) const
 
void loadXml (const QString &aDocType, const QString &aXml)
 Load the object from XML. More...
 
QString makeXml (const QString &aDocType, bool aFormat=false) const
 Creates XML to save the object and its children. More...
 
void moveChild (int aOldIndex, int aNewIndex)
 Move a child in the list. More...
 
BpsPropertyObjectoperator= (const BpsPropertyObject &aOther)
 Assignment operator. More...
 
BpsPropertyObjectparent () const
 Get the parent of this object. More...
 
QString propertyAsString (const char *aName) const
 Gets a string representation of the value. More...
 
BpsPropertyObjectremoveChild (BpsPropertyObject *aChild)
 Remove a child. More...
 
BpsPropertyObjectremoveChild (int aIndex)
 Remove a child. More...
 
- Public Member Functions inherited from QObject
bool blockSignals (bool block)
 
const QObjectListchildren () const const
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectInfo ()
 
void dumpObjectInfo () const const
 
void dumpObjectTree ()
 
void dumpObjectTree () const const
 
QList< QByteArraydynamicPropertyNames () const const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegExp &regExp, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const const
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
QVariant property (const char *name) const const
 
 Q_CLASSINFO (Name, Value)
 
 Q_DISABLE_COPY (Class)
 
 Q_DISABLE_COPY_MOVE (Class)
 
 Q_DISABLE_MOVE (Class)
 
 Q_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_OBJECT Q_OBJECT
 
 Q_PROPERTY (...)
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SLOT Q_SLOT
 
 Q_SLOTS Q_SLOTS
 
qFindChild (const QObject *obj, const QString &name)
 
QList< T > qFindChildren (const QObject *obj, const QRegExp &regExp)
 
QList< T > qFindChildren (const QObject *obj, const QString &name)
 
 QObject (QObject *parent)
 
qobject_cast (const QObject *object)
 
qobject_cast (QObject *object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds time, Qt::TimerType timerType)
 
QThreadthread () const const
 

Additional Inherited Members

- Public Types inherited from BpsReportElement
enum  Type { TypeUnknown , TypeReport , TypeSection , TypeSimpletext , TypeRichtext , TypeLine , TypeRectangle , TypeEllipse , TypeBarcode , TypePixmap }
 Element type enumeration. More...
 
- Signals inherited from BpsPropertyObject
void childInserted (int aIndex, BpsPropertyObject *aChild)
 This signal is emitted when a new child is inserted. More...
 
void childMoved (int aOldIndex, int aNewIndex)
 This signal is emitted when a child is moved. More...
 
void childRemoved (int aIndex, BpsPropertyObject *aChild)
 This signal is emitted when a child is removed. More...
 
void modifiedChanged (bool aModified)
 This signal is emitted when the modification status is changed. More...
 
void objectChanged ()
 This signal is emitted whenever anything in the object or any of its descendants (children, grandchildren, ...) is changed. More...
 
void propertyChanged (const QByteArray &aName, const QVariant &aNewValue, const QVariant &aOldValue)
 This signal is emitted whenever a property changes, or after emitValues(). More...
 
- Static Public Member Functions inherited from QObject
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
- Public Attributes inherited from QObject
typedef QObjectList
 
- Protected Member Functions inherited from BpsReportElement
virtual BpsPropertyObjectxmlCreateObject (const QString &aTagName, int aLevel) const
 Create a new object while processing loadXml(). More...
 
virtual QString xmlTagName (int aLevel) const
 Define a XML tag for the element of the level. More...
 
- Protected Member Functions inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
int receivers (const char *signal) const const
 
QObjectsender () const const
 
int senderSignalIndex () const const
 
virtual void timerEvent (QTimerEvent *event)
 
- Properties inherited from QObject
 objectName
 

Detailed Description

A report section will typically be created by calling BpsReport::createSection() from within the report script.

Constructor & Destructor Documentation

◆ BpsReportSection()

BpsReportSection::BpsReportSection ( const BpsReportElement aElement,
BpsReport aParent 
)

The constructor.

Parameters
aElementThe section element to clone.
aParentThe parent report.

Member Function Documentation

◆ item

BpsReportElement* BpsReportSection::item ( const QString aName) const
slot

Get first named item.

Parameters
aNameThe items name to search.
Returns
Returns pointer to the first item with the searched name.
Exceptions
BpsExceptionThrown when no such item is found in the section.

◆ itemAt

BpsReportElement* BpsReportSection::itemAt ( int  aPosition) const
slot

Get item at a certain index position.

Parameters
aPositionThe index position, must be in range 0 ... itemCount()-1.
Returns
Returns pointer to the item.
Exceptions
BpsExceptionThrown when aPosition is invalid.

◆ itemCount

int BpsReportSection::itemCount ( ) const
slot

Get the number of items in this.

Returns
Returns...
Exceptions
BpsExceptionThrown when...

◆ printHeight

qreal BpsReportSection::printHeight ( ) const
slot

Returns the height in millimeters required to print the section.

This may differ from the height defined in the report designer when the section has property "autogrow" set true.

Returns
The height when printing.

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