19 Q_MOC_INCLUDE(
"Vehicle.h")
20 Q_PROPERTY(QString text READ _getText CONSTANT)
25 void append(
const QString &command);
26 QString up(
const QString ¤t);
27 QString down(
const QString ¤t);
30 QList<QString> _history;
32 static constexpr int kMaxHistoryLength = 100;
39 Q_INVOKABLE
void sendCommand(
const QString &command);
40 Q_INVOKABLE QString
historyUp(
const QString ¤t) {
return _history.up(current); }
41 Q_INVOKABLE QString
historyDown(
const QString ¤t) {
return _history.down(current); }
49 void _setActiveVehicle(
Vehicle *vehicle);
50 void _receiveData(uint8_t device, uint8_t flags, uint16_t timeout, uint32_t baudrate,
const QByteArray &data);
53 bool _processANSItext(QByteArray &line);
54 void _sendSerialData(
const QByteArray &data,
bool close =
false);
55 void _writeLine(
int line,
const QByteArray &text);
56 QString _transformLineForRichText(
const QString &line)
const;
57 QString _getText()
const;
60 int _cursorHomePos = -1;
63 QByteArray _incomingBuffer;
64 QList<QMetaObject::Connection> _connections;
65 CommandHistory _history;
68 static constexpr int kMaxNumLines = 500;