aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/manager/wireshark_preference.h
blob: d8f124190d31a972c23ef1c9468a501ff68686cf (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
/* wireshark_preference.h
 *
 * Wireshark - Network traffic analyzer
 * By Gerald Combs <gerald@wireshark.org>
 * Copyright 1998 Gerald Combs
 *
 * SPDX-License-Identifier: GPL-2.0+
 */

#ifndef WIRESHARK_PREFERENCE_H
#define WIRESHARK_PREFERENCE_H

#include <ui/qt/models/pref_models.h>

#include <QStyleOptionViewItem>
#include <QModelIndex>
#include <QWidget>

class WiresharkPreference : public QObject
{
    Q_OBJECT
public:
    explicit Q_INVOKABLE WiresharkPreference(QObject * parent = Q_NULLPTR);

    virtual QWidget * editor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index);
    virtual void setData(QWidget *editor, const QModelIndex &index);
    virtual void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index);

    void setPrefsItem(PrefsItem *);

protected:
    PrefsItem * prefsItem() const;

private:
    PrefsItem * _prefsItem;

};

#endif // WIRESHARK_PREFERENCE_H