Files
uartscope/include/tableview.h
Dany Thinnes d3229c7b64 - Auto-scroll standard aktiv
- Tag-Filter wird gespeichert
- Tag Monitor kann bei einem Tag jetzt pro Key mehrere Werte in einer Tabelle anzeigen
- Bug für Clear behoben
2026-06-23 23:19:06 +02:00

46 lines
1.1 KiB
C++

#pragma once
#include <QWidget>
#include <QTableWidget>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QLineEdit>
#include <QPushButton>
#include <QCheckBox>
#include <QLabel>
#include <QComboBox>
// TableView interprets UART lines as delimited data and shows them in a table.
class TableView : public QWidget
{
Q_OBJECT
public:
explicit TableView(QWidget *parent = nullptr);
public slots:
void appendLine(const QString &line);
void clear();
private slots:
void onDelimiterChanged(int index);
void onMaxRowsChanged();
void rebuildTable();
private:
void parseHeaders(const QString &line);
bool tryAppendRow(const QString &line);
QTableWidget *m_table = nullptr;
QComboBox *m_delimCombo = nullptr;
QLineEdit *m_maxRowsEdit = nullptr;
QPushButton *m_clearBtn = nullptr;
QCheckBox *m_autoScrollCb = nullptr;
QStringList m_headers;
QList<QStringList> m_rows;
int m_maxRows = 500;
char m_delimiter = ',';
bool m_autoScroll = true;
bool m_headersSet = false;
};