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

#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
{
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