diff options
Diffstat (limited to 'ui/qt/utils/wireshark_mime_data.h')
-rw-r--r-- | ui/qt/utils/wireshark_mime_data.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/ui/qt/utils/wireshark_mime_data.h b/ui/qt/utils/wireshark_mime_data.h new file mode 100644 index 0000000..4732f39 --- /dev/null +++ b/ui/qt/utils/wireshark_mime_data.h @@ -0,0 +1,47 @@ +/** @file + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1998 Gerald Combs + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#ifndef UI_QT_UTILS_WIRESHARK_MIME_DATA_H_ +#define UI_QT_UTILS_WIRESHARK_MIME_DATA_H_ + +#include <QMimeData> + +class WiresharkMimeData: public QMimeData { +public: + virtual QString labelText() const = 0; + virtual void allowPlainText(); + + static const QString ColoringRulesMimeType; + static const QString ColumnListMimeType; + static const QString FilterListMimeType; + static const QString DisplayFilterMimeType; +}; + +class ToolbarEntryMimeData: public WiresharkMimeData { + Q_OBJECT +public: + + ToolbarEntryMimeData(QString element, int pos); + + int position() const; + QString element() const; + QString filter() const; + void setFilter(QString); + + QString labelText() const override; + +private: + + QString element_; + QString filter_; + int pos_; + +}; + +#endif /* UI_QT_UTILS_WIRESHARK_MIME_DATA_H_ */ |