NDEVR
API Documentation
ThirdPartiesEditor.h
1#pragma once
2#include "TransitIncidentManager/Headers/TransitIncidentEntityTable.h"
3#include "TransitIncidentManager/Headers/TransitIncidentManager.h"
4#include <QBoxLayout>
5namespace NDEVR
6{
8 class WitnessEditor : public QWidget
9 {
10 Q_OBJECT
11 public:
15 WitnessEditor(TransitIncidentManager* manager, QWidget* parent = nullptr)
16 : QWidget(parent)
17 , m_manager(manager)
18 {
19 QBoxLayout* layout = new QVBoxLayout();
21 person_table->showSearch(false);
23 layout->addWidget(person_table);
24
25 setWindowTitle(_tqs("Witnesses"));
26 setLayout(layout);
27 }
28 protected:
30 };
31
32 class OfficersEditor : public QWidget
33 {
34 Q_OBJECT
35 public:
39 OfficersEditor(TransitIncidentManager* manager, QWidget* parent = nullptr)
40 : QWidget(parent)
41 , m_manager(manager)
42 {
43 QBoxLayout* layout = new QVBoxLayout();
45 person_table->showSearch(false);
47 layout->addWidget(person_table);
48
49 setWindowTitle(_tqs("Officers"));
50 setLayout(layout);
51 }
52 protected:
54 };
55}
void showSearch(bool show_search)
Shows or hides the search bar.
TransitIncidentManager * m_manager
The owning transit incident manager.
OfficersEditor(TransitIncidentManager *manager, QWidget *parent=nullptr)
Constructs the officers editor and populates it with the officer list.
Central manager for transit incident data, including buses, drivers, witnesses, officers,...
DynamicPointer< QTDesignObject > witnessRoot()
Returns the root design object for witnesses.
DynamicPointer< QTDesignObject > officerRoot()
Returns the root design object for officers.
Table widget for displaying and managing persons in a transit incident.
void createAddButton(TransitIncidentPersonType person_type)
Adds an "Add" button to the table that creates a person of the given type.
TransitIncidentManager * m_manager
The owning transit incident manager.
WitnessEditor(TransitIncidentManager *manager, QWidget *parent=nullptr)
Constructs the witness editor and populates it with the witness list.
The primary namespace for the NDEVR SDK.
@ e_officer
A responding officer.
@ e_witness
A witness to the incident.