2017-11-07 15:51:43 +00:00
|
|
|
/* wireshark_mime_data.h
|
|
|
|
*
|
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
2018-04-30 07:47:58 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
*/
|
2017-11-07 15:51:43 +00:00
|
|
|
|
|
|
|
#ifndef UI_QT_UTILS_WIRESHARK_MIME_DATA_H_
|
|
|
|
#define UI_QT_UTILS_WIRESHARK_MIME_DATA_H_
|
|
|
|
|
|
|
|
#include <QMimeData>
|
|
|
|
|
2019-06-16 11:20:58 +00:00
|
|
|
class WiresharkMimeData: public QMimeData {
|
|
|
|
public:
|
|
|
|
virtual QString labelText() const = 0;
|
|
|
|
virtual void allowPlainText();
|
2019-11-03 12:03:12 +00:00
|
|
|
|
|
|
|
static const QString ColoringRulesMimeType;
|
|
|
|
static const QString ColumnListMimeType;
|
|
|
|
static const QString FilterListMimeType;
|
2019-11-03 17:12:12 +00:00
|
|
|
static const QString DisplayFilterMimeType;
|
2017-11-07 15:51:43 +00:00
|
|
|
};
|
|
|
|
|
2019-06-16 11:20:58 +00:00
|
|
|
class ToolbarEntryMimeData: public WiresharkMimeData {
|
2017-11-07 15:51:43 +00:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
|
2017-11-12 10:41:09 +00:00
|
|
|
ToolbarEntryMimeData(QString element, int pos);
|
2017-11-07 15:51:43 +00:00
|
|
|
|
|
|
|
int position() const;
|
2017-11-12 10:41:09 +00:00
|
|
|
QString element() const;
|
2019-10-23 13:36:40 +00:00
|
|
|
QString filter() const;
|
|
|
|
void setFilter(QString);
|
2017-11-12 10:41:09 +00:00
|
|
|
|
2019-06-16 11:20:58 +00:00
|
|
|
QString labelText() const override;
|
2017-11-07 15:51:43 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
2017-11-12 10:41:09 +00:00
|
|
|
QString element_;
|
2019-10-23 13:36:40 +00:00
|
|
|
QString filter_;
|
2017-11-07 15:51:43 +00:00
|
|
|
int pos_;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2017-11-07 15:51:43 +00:00
|
|
|
#endif /* UI_QT_UTILS_WIRESHARK_MIME_DATA_H_ */
|