NDEVR
API Documentation
IncidentReportHandler.h
1#pragma once
2#include "NDEVR/Headers/ReportIterator.h"
3#include "QTDesignObject.h"
4
5namespace Ui
6{
7 class TransitIncidentReportUI;
8}
9namespace NDEVR
10{
11 class TopDownDeploymentChart;
12 class SideViewDeploymentChart;
13 class StationModel;
14 class Calibration;
15 class Project;
16 class TransitIncidentReport;
17
20 {
21 public:
28 virtual Buffer<UUID> defaultReportIDs(const Buffer<UUID>& objects_to_report, QTModelManager* manager) const override;
29
34 virtual bool canHandle(UUID id, QTModelManager* manager) const override;
35
41 virtual QWidget* getReport(const UUID& id, QTModelManager* manager, const QRect& requested_geometry) const override;
42
47 virtual void createReportJSON(const UUID& id, JSONNode& node, ReportJSONMaker& maker) const override;
48
51 virtual UUID id() const override { return UUID::CreateUUID("Incident Report"); }
52 mutable TransitIncidentReport* m_report = nullptr;
53 };
54}
The equivelent of std::vector but with a bit more control.
Definition Buffer.hpp:58
JavaScript Object Notation or JSON is an open - standard file format that uses human - readable text ...
Definition JSONParser.h:149
A Model which represents a user-project.
Definition Project.h:41
A wrapper around DesignObjectLookup that provides signal and slot functionality and adds rendering ca...
ReportHandler(const TranslatedString &name, const TranslatedString &description, const StringView &icon)
Constructs a report handler with the given display properties.
virtual QWidget * getReport(const UUID &id, QTModelManager *manager, const QRect &requested_geometry) const override
Generates the report widget for the given ID.
virtual Buffer< UUID > defaultReportIDs(const Buffer< UUID > &objects_to_report, QTModelManager *manager) const override
Given a list of model objects, returns report IDs this handler requests to manage.
virtual void createReportJSON(const UUID &id, JSONNode &node, ReportJSONMaker &maker) const override
Serializes the report to JSON format.
TransitIncidentReport * m_report
Cached report instance.
virtual bool canHandle(UUID id, QTModelManager *manager) const override
Checks whether this handler can produce a report for the given ID.
TransitIncidentReportHandler()
Constructs the TransitIncidentReportHandler.
virtual UUID id() const override
Returns the unique identifier for this report handler type.
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
Definition UUID.h:61
static UUID CreateUUID()
The primary namespace for the NDEVR SDK.
Creates a JSON data structure that can be used for generating a report in MSWord.