NDEVR
API Documentation
WidgetIterator

Provides a way to iterate over a series of widgets, useful for printing dialogs or turning Widgets into reports or PDF files. More...

Inheritance diagram for WidgetIterator:
[legend]
Collaboration diagram for WidgetIterator:
[legend]

Public Member Functions

 WidgetIterator ()
 Constructs an empty WidgetIterator.
 WidgetIterator (const Buffer< QWidget * > &objects_to_report)
 Constructs a WidgetIterator with a buffer of widgets.
virtual QWidget * getReport (uint04 report_index) const
 Returns the widget at the given report index.
QSize preferredSize () const
 Returns the preferred size for rendering each report page.
uint04 reportCount () const
 Returns the total number of report widgets.
virtual void setCustomReport (uint04 index, QWidget *widget)
 Replaces the widget at the given index with a custom widget.

Protected Attributes

QSize m_preferred_size
 The preferred size for report rendering.
Buffer< QWidget * > m_widgets
 The collection of widgets to iterate over.

Detailed Description

Provides a way to iterate over a series of widgets, useful for printing dialogs or turning Widgets into reports or PDF files.


Definition at line 14 of file WidgetIterator.h.

Constructor & Destructor Documentation

◆ WidgetIterator()

WidgetIterator::WidgetIterator ( const Buffer< QWidget * > & objects_to_report)

Constructs a WidgetIterator with a buffer of widgets.

Parameters
[in]objects_to_reportThe widgets to iterate over.

References WidgetIterator().

Member Function Documentation

◆ getReport()

virtual QWidget * WidgetIterator::getReport ( uint04 report_index) const
virtual

Returns the widget at the given report index.

Parameters
[in]report_indexThe zero-based index of the report widget.
Returns
The QWidget at the specified index.

Reimplemented in ReportIterator.

◆ preferredSize()

QSize WidgetIterator::preferredSize ( ) const

Returns the preferred size for rendering each report page.

Returns
The preferred QSize.

◆ reportCount()

uint04 WidgetIterator::reportCount ( ) const

Returns the total number of report widgets.

Returns
The widget count.

◆ setCustomReport()

virtual void WidgetIterator::setCustomReport ( uint04 index,
QWidget * widget )
virtual

Replaces the widget at the given index with a custom widget.

Parameters
[in]indexThe zero-based index to replace.
[in]widgetThe replacement widget.

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