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

#ifndef COLUMN_PREFERENCES_FRAME_H
#define COLUMN_PREFERENCES_FRAME_H

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

#include <QFrame>
#include <QItemSelection>

namespace Ui {
class ColumnPreferencesFrame;
}

class ColumnPreferencesFrame : public QFrame
{
    Q_OBJECT

public:
    explicit ColumnPreferencesFrame(QWidget *parent = Q_NULLPTR);
    ~ColumnPreferencesFrame();

    void unstash();

private:
    Ui::ColumnPreferencesFrame *ui;
    ColumnListModel * model_;
    ColumnProxyModel * proxyModel_;
    ColumnTypeDelegate * delegate_;

private slots:
    void selectionChanged(const QItemSelection &selected, const QItemSelection &deselected);
    void on_newToolButton_clicked();
    void on_deleteToolButton_clicked();
    void on_chkShowDisplayedOnly_stateChanged(int);

    void on_columnTreeView_customContextMenuRequested(const QPoint &pos);
    void resetAction(bool checked = false);
};

#endif // COLUMN_PREFERENCES_FRAME_H