16 Q_MOC_INCLUDE(
"Vehicle.h")
17 Q_PROPERTY(QString text READ _getText CONSTANT)
22 void append(
const QString &command);
23 QString up(
const QString ¤t);
24 QString down(
const QString ¤t);
27 QList<QString> _history;
29 static constexpr int kMaxHistoryLength = 100;
36 Q_INVOKABLE
void sendCommand(
const QString &command);
37 Q_INVOKABLE QString
historyUp(
const QString ¤t) {
return _history.up(current); }
38 Q_INVOKABLE QString
historyDown(
const QString ¤t) {
return _history.down(current); }
46 void _setActiveVehicle(
Vehicle *vehicle);
47 void _receiveData(uint8_t device, uint8_t flags, uint16_t timeout, uint32_t baudrate,
const QByteArray &data);
50 bool _processANSItext(QByteArray &line);
51 void _sendSerialData(
const QByteArray &data,
bool close =
false);
52 void _writeLine(
int line,
const QByteArray &text);
53 QString _transformLineForRichText(
const QString &line)
const;
54 QString _getText()
const;
57 int _cursorHomePos = -1;
60 QByteArray _incomingBuffer;
61 QList<QMetaObject::Connection> _connections;
62 CommandHistory _history;
65 static constexpr int kMaxNumLines = 500;