ManageInterfacesDialog: New handling of pipes
[metze/wireshark/wip.git] / ui / qt / manage_interfaces_dialog.h
1 /* manage_interfaces_dialog.h
2  *
3  * Wireshark - Network traffic analyzer
4  * By Gerald Combs <gerald@wireshark.org>
5  * Copyright 1998 Gerald Combs
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20  */
21
22 #ifndef MANAGE_INTERFACES_DIALOG_H
23 #define MANAGE_INTERFACES_DIALOG_H
24
25 #include <config.h>
26
27 #include <glib.h>
28 #include "capture_opts.h"
29
30 #include "ui/qt/interface_tree_cache_model.h"
31 #include "ui/qt/interface_sort_filter_model.h"
32
33 #include "geometry_state_dialog.h"
34 #include <QStyledItemDelegate>
35
36 class QTreeWidget;
37 class QTreeWidgetItem;
38 class QStandardItemModel;
39
40 class QLineEdit;
41
42
43 namespace Ui {
44 class ManageInterfacesDialog;
45 }
46
47 class ManageInterfacesDialog : public GeometryStateDialog
48 {
49     Q_OBJECT
50
51 public:
52     explicit ManageInterfacesDialog(QWidget *parent = 0);
53     ~ManageInterfacesDialog();
54
55 private:
56     Ui::ManageInterfacesDialog *ui;
57
58     InterfaceTreeCacheModel * sourceModel;
59     InterfaceSortFilterModel * proxyModel;
60     InterfaceSortFilterModel * pipeProxyModel;
61
62     void showRemoteInterfaces();
63
64 signals:
65     void ifsChanged();
66 #ifdef HAVE_PCAP_REMOTE
67     void remoteAdded(GList *rlist, remote_options *roptions);
68     void remoteSettingsChanged(interface_t *iface);
69 #endif
70
71 private slots:
72     void updateWidgets();
73
74     void on_buttonBox_accepted();
75
76     void on_addPipe_clicked();
77     void on_delPipe_clicked();
78
79     void onSelectionChanged(const QItemSelection &sel, const QItemSelection &desel);
80
81 #ifdef HAVE_PCAP_REMOTE
82     void on_addRemote_clicked();
83     void on_delRemote_clicked();
84     void remoteAccepted();
85     void on_remoteList_currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous);
86     void on_remoteList_itemClicked(QTreeWidgetItem *item, int column);
87     void addRemoteInterfaces(GList *rlist, remote_options *roptions);
88     void setRemoteSettings(interface_t *iface);
89     void remoteSelectionChanged(QTreeWidgetItem* item, int col);
90     void on_remoteSettings_clicked();
91 #endif
92     void on_buttonBox_helpRequested();
93 };
94
95 #endif // MANAGE_INTERFACES_DIALOG_H
96
97 /*
98  * Editor modelines
99  *
100  * Local Variables:
101  * c-basic-offset: 4
102  * tab-width: 8
103  * indent-tabs-mode: nil
104  * End:
105  *
106  * ex: set shiftwidth=4 tabstop=8 expandtab:
107  * :indentSize=4:tabSize=8:noTabs=true:
108  */