| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
filter_completer.h
Go to the documentation of this file.
1
9
10#ifndef FILTER_COMPLETER_H
11#define FILTER_COMPLETER_H
12
13#include <QCompleter>
14#include <QString>
15#include <QStringList>
16
32 class FilterCompleter : public QCompleter
33{
34 Q_OBJECT
35
36 public:
37 explicit FilterCompleter(QObject *parent = nullptr);
38
44 void setTokenChars(const QString &token_chars) { token_chars_ = token_chars; }
45
47 const QString &tokenChars() const { return token_chars_; }
48
53 QStringList splitPath(const QString &path) const override;
54
58 QString pathFromIndex(const QModelIndex &index) const override;
59
60 protected:
69 bool eventFilter(QObject *watched, QEvent *event) override;
70
71 QString token_chars_;
72};
73
74#endif // FILTER_COMPLETER_H
FilterCompleter::splitPath
QStringList splitPath(const QString &path) const override
Splits path into the prefix QCompleter should match against.
Definition filter_completer.cpp:52
FilterCompleter::pathFromIndex
QString pathFromIndex(const QModelIndex &index) const override
Maps a chosen completion row back to the text to insert.
Definition filter_completer.cpp:69
FilterCompleter::token_chars_
QString token_chars_
Definition filter_completer.h:71
FilterCompleter::eventFilter
bool eventFilter(QObject *watched, QEvent *event) override
Constrains the popup to its content width on show/resize.
Definition filter_completer.cpp:33
FilterCompleter::setTokenChars
void setTokenChars(const QString &token_chars)
Sets the characters considered part of a single completion token.
Definition filter_completer.h:44
FilterCompleter::tokenChars
const QString & tokenChars() const
Returns the configured token characters.
Definition filter_completer.h:47