![]() |
NDEVR
API Documentation
|
Handles creating a report page from some given data. More...
Public Member Functions | |
| ReportHandler (const TranslatedString &name, const TranslatedString &description, const StringView &icon) | |
| Constructs a report handler with the given display properties. | |
| virtual bool | canHandle (UUID, QTModelManager *) const |
| Checks whether this handler can generate a report for the given ID. | |
| virtual void | createReportJSON (const UUID &, JSONNode &, ReportJSONMaker &) const |
| Creates JSON nodes containing report data for the given ID. | |
| virtual bool | defaultEnabled () const |
| Checks whether this report handler is enabled by default. | |
| virtual Buffer< UUID > | defaultReportIDs (const Buffer< UUID > &, QTModelManager *) const |
| Given a list of model objects, returns report IDs this handler requests to process. | |
| const TranslatedString & | description () const |
| Retrieves the description of this report handler. | |
| virtual QWidget * | getReport (const UUID &, QTModelManager *, const QRect &) const |
| Creates a report widget for the given ID within the specified bounds. | |
| const String & | icon () const |
| Retrieves the icon identifier for this report handler. | |
| virtual UUID | id () const |
| Retrieves the unique identifier for this report handler. | |
| const TranslatedString & | name () const |
| Retrieves the display name of this report handler. | |
| virtual QMenu * | popupOptions () const |
| Retrieves an optional popup menu with additional report options. | |
Protected Attributes | |
| bool | m_default_enabled = true |
| Whether this handler is enabled by default. | |
| TranslatedString | m_description |
| The description of this report handler. | |
| String | m_icon |
| The icon identifier for this report handler. | |
| TranslatedString | m_name |
| The display name of this report handler. | |
Handles creating a report page from some given data.
A report page is a QWidget object that is formatted for printing to a printer or PDF page.
Definition at line 71 of file ReportIterator.h.
|
inline |
Constructs a report handler with the given display properties.
| [in] | name | The display name of the report handler. |
| [in] | description | A description of what the report handler generates. |
| [in] | icon | The icon identifier for the report handler. |
Definition at line 80 of file ReportIterator.h.
References description(), icon(), m_description, m_icon, m_name, and name().
|
inlinevirtual |
Checks whether this handler can generate a report for the given ID.
Reimplemented in TransitIncidentReportHandler.
Definition at line 118 of file ReportIterator.h.
|
inlinevirtual |
Creates JSON nodes containing report data for the given ID.
This is allowed to be a no-op if JSON export is not supported.
Reimplemented in TransitIncidentReportHandler.
Definition at line 130 of file ReportIterator.h.
|
inlinevirtual |
Checks whether this report handler is enabled by default.
Definition at line 141 of file ReportIterator.h.
References m_default_enabled.
|
inlinevirtual |
Given a list of model objects, returns report IDs this handler requests to process.
Returned IDs will be stored and then used with canHandle, getReport, and createReportJSON. Report IDs can be Model IDs or unique identifiers specific to this handler.
Reimplemented in TransitIncidentReportHandler.
Definition at line 107 of file ReportIterator.h.
|
inline |
Retrieves the description of this report handler.
Definition at line 95 of file ReportIterator.h.
References m_description.
Referenced by ReportHandler().
|
inlinevirtual |
Creates a report widget for the given ID within the specified bounds.
Reimplemented in TransitIncidentReportHandler.
Definition at line 124 of file ReportIterator.h.
|
inline |
Retrieves the icon identifier for this report handler.
Definition at line 100 of file ReportIterator.h.
References m_icon.
Referenced by ReportHandler().
|
inlinevirtual |
Retrieves the unique identifier for this report handler.
Reimplemented in TransitIncidentReportHandler.
Definition at line 136 of file ReportIterator.h.
References m_name.
|
inline |
Retrieves the display name of this report handler.
Definition at line 90 of file ReportIterator.h.
References m_name.
Referenced by ReportHandler().
|
inlinevirtual |
Retrieves an optional popup menu with additional report options.
Definition at line 113 of file ReportIterator.h.