summaryrefslogtreecommitdiffstats
path: root/ui/qt/utils/wireshark_mime_data.h
blob: 4732f39a8940da9f945b49f75c36854f2bb9b802 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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_ */