swift
Loading...
Searching...
No Matches
simulatoremulatedmonitordialog.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) 2017 swift Project Community / Contributors
2// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3
5
6#ifndef SWIFT_SIMPLUGIN_EMULATED_SIMULATOREMULATEDMONITORDIALOG_H
7#define SWIFT_SIMPLUGIN_EMULATED_SIMULATOREMULATEDMONITORDIALOG_H
8
9#include <QDialog>
10#include <QScopedPointer>
11#include <QTimer>
12
13#include "misc/identifiable.h"
14#include "misc/logcategories.h"
18
19namespace Ui
20{
21 class CSimulatorEmulatedMonitorDialog;
22}
23namespace swift::simplugin::emulated
24{
26
31 {
33
34 public:
36 static const QStringList &getLogCategories();
37
40
43
46
49
51 void appendReceivingCall(const QString &function, const QString &p1 = {}, const QString &p2 = {},
52 const QString &p3 = {});
53
55 void appendSendingCall(const QString &function, const QString &p1 = {}, const QString &p2 = {},
56 const QString &p3 = {});
57
59 void displayStatusMessage(const swift::misc::CStatusMessage &message);
60
62 void displayTextMessage(const swift::misc::network::CTextMessage &message);
63
65 void updateWindowTitleAndUiValues(const swift::misc::simulation::CSimulatorInfo &info);
66
67 private:
68 static int constexpr MaxLogMessages = 500;
69
71 void appendFunctionCall(const QString &function, const QString &p1 = {}, const QString &p2 = {},
72 const QString &p3 = {});
73
75 void onSimulatorValuesChanged();
76
78 void onSavedComTransmissionValues(swift::misc::aviation::CComSystem::ComUnit unit);
79
81 void changeComFromUi(const swift::misc::simulation::CSimulatedAircraft &aircraft);
82
84 void changeSelcalFromUi(const swift::misc::aviation::CSelcal &selcal);
85
87 void changeSituationFromUi();
88
90 void changePartsFromUi();
91
93 void setSimulatorUiValues();
94
96 void setInternalAircraftUiValues();
97
99 void timerBasedUiUpdates();
100
102 void resetStatistics();
103
105 void interpolatorLogButton();
106
108 void enableInterpolationLogButtons(bool enable);
109
111 void emitSignal();
112
114 void addAutoPublishTestData();
115
117 bool canUseSimulator() const;
118
119 QScopedPointer<Ui::CSimulatorEmulatedMonitorDialog> ui;
120 CSimulatorEmulated *m_simulator = nullptr;
121 QTimer m_uiUpdateTimer;
122 };
123} // namespace swift::simplugin::emulated
124
125#endif // SWIFT_SIMPLUGIN_EMULATED_SIMULATOREMULATEDMONITORDIALOG_H
Base class with a member CIdentifier to be inherited by a class which has an identity in the environm...
Streamable status message, e.g.
Status messages, e.g. from Core -> GUI.
CSimulatorEmulatedMonitorDialog(CSimulatorEmulated *simulator, QWidget *parent=nullptr)
Ctor.
void appendStatusMessageToList(const swift::misc::CStatusMessage &statusMessage)
Append status message.
void appendReceivingCall(const QString &function, const QString &p1={}, const QString &p2={}, const QString &p3={})
Receiving call to be written in log widget.
void displayStatusMessage(const swift::misc::CStatusMessage &message)
Display status message.
void updateWindowTitleAndUiValues(const swift::misc::simulation::CSimulatorInfo &info)
The title.
void appendStatusMessagesToList(const swift::misc::CStatusMessageList &statusMessages)
Append status messages.
void appendSendingCall(const QString &function, const QString &p1={}, const QString &p2={}, const QString &p3={})
Sending call to be written in log widget.
void displayTextMessage(const swift::misc::network::CTextMessage &message)
Display text message.
QDialog(QWidget *parent, Qt::WindowFlags f)
Q_OBJECTQ_OBJECT
QObject * parent() const const
QWidget(QWidget *parent, Qt::WindowFlags f)