Tag-Filter hinzugefügt
This commit is contained in:
@@ -8,13 +8,13 @@
|
||||
#include <QCheckBox>
|
||||
#include <QLabel>
|
||||
#include <QSpinBox>
|
||||
#include <QRegularExpression>
|
||||
|
||||
// RawView shows the raw UART output in a QPlainTextEdit with:
|
||||
// - Configurable maximum line count (default: unlimited / very large)
|
||||
// - Auto-scroll that pauses when the user scrolls up
|
||||
// - Horizontal scroll (word wrap off)
|
||||
// - Incremental text search
|
||||
// - Clear button
|
||||
// - Timestamp prefix on every line (hh:mm:ss.zzz)
|
||||
// - Configurable tag suppression (lines whose tag is in the filter set are hidden)
|
||||
// - Unlimited history, H+V scrolling, incremental search
|
||||
// - Copy-to-clipboard and Clear buttons
|
||||
class RawView : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -23,13 +23,15 @@ public:
|
||||
explicit RawView(QWidget *parent = nullptr);
|
||||
|
||||
public slots:
|
||||
void appendLine(const QString &line);
|
||||
// suppressedTags: set of uppercase tag names whose lines should NOT appear here
|
||||
void appendLine(const QString &line, const QSet<QString> &suppressedTags = {});
|
||||
void clear();
|
||||
|
||||
private slots:
|
||||
void onSearch(const QString &text);
|
||||
void onScrollValueChanged(int value);
|
||||
void onAutoScrollToggled(bool enabled);
|
||||
void copyToClipboard();
|
||||
|
||||
private:
|
||||
void setupUi();
|
||||
@@ -38,8 +40,11 @@ private:
|
||||
QPlainTextEdit *m_textEdit = nullptr;
|
||||
QLineEdit *m_searchEdit = nullptr;
|
||||
QPushButton *m_clearBtn = nullptr;
|
||||
QPushButton *m_copyBtn = nullptr;
|
||||
QCheckBox *m_autoScrollCb = nullptr;
|
||||
QLabel *m_lineCountLbl = nullptr;
|
||||
bool m_autoScroll = true;
|
||||
int m_lineCount = 0;
|
||||
|
||||
static const QRegularExpression s_tagRe;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user